trash can
This commit is contained in:
parent
fed57e38df
commit
39c52694da
11 changed files with 57 additions and 5 deletions
|
@ -53,11 +53,11 @@ func add(stack: Stack, _context: InventoryContext = null) -> Stack:
|
|||
|
||||
func can_add(item : Item = null, _context: InventoryContext = null) -> bool:
|
||||
if item == null:
|
||||
for i in range(internal_array):
|
||||
for i in range(capacity):
|
||||
return internal_array[i].amount == 0
|
||||
return false
|
||||
else:
|
||||
for i in range(internal_array):
|
||||
for i in range(capacity):
|
||||
if internal_array[i].amount == 0:
|
||||
return (internal_array[i].filter != null and internal_array[i].filter.is_equal(item)) or internal_array[i].filter == null
|
||||
return internal_array[i].held_item.is_equal(item)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue