This commit is contained in:
Rendo 2025-10-15 15:46:28 +05:00
commit 5da9e11f36
5 changed files with 48 additions and 26 deletions

View file

@ -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