Item void
This commit is contained in:
parent
788e42135f
commit
fa6212400b
7 changed files with 43 additions and 29 deletions
|
@ -20,6 +20,7 @@ class_name InventorySlot
|
|||
amount = 0
|
||||
return
|
||||
if held_item == null:
|
||||
amount = 0
|
||||
return
|
||||
if value > held_item.stack_size:
|
||||
amount = held_item.stack_size
|
||||
|
@ -66,7 +67,7 @@ func as_stack() -> Stack:
|
|||
func can_be_merged(item : Item) -> bool:
|
||||
if filter != null:
|
||||
return filter.is_equal(item)
|
||||
if amount == 0:
|
||||
if amount <= 0:
|
||||
return true
|
||||
return item == held_item
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue