Item void

This commit is contained in:
Rendo 2025-10-17 01:11:01 +05:00
commit fa6212400b
7 changed files with 43 additions and 29 deletions

View file

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