Craft
This commit is contained in:
parent
3af13d0a8b
commit
5da9e11f36
5 changed files with 48 additions and 26 deletions
|
@ -72,6 +72,8 @@ func can_be_merged(item : Item) -> bool:
|
|||
|
||||
## Add provided stack's amount to this amount. Returns null if stack is empty or items arent matching
|
||||
func merge_stack(stack: Stack) -> Stack:
|
||||
if stack == null or stack.held_item == null or stack.amount == 0:
|
||||
return stack
|
||||
if held_item == null:
|
||||
if filter != null and filter.is_equal(stack.held_item) == false:
|
||||
return stack
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue