ticker
This commit is contained in:
parent
c5846aba7b
commit
074bb21ffd
18 changed files with 99 additions and 51 deletions
|
@ -29,7 +29,7 @@ func deferred_init():
|
|||
down_array[i] = InventorySlot.new()
|
||||
|
||||
func add(stack : Stack, context: InventoryContext = null) -> Stack:
|
||||
if context == null:
|
||||
if context == null or stack == null:
|
||||
return stack
|
||||
if context.position == context.target.global_position:
|
||||
return add_to_array(stack,upper_array,context)
|
||||
|
@ -72,3 +72,8 @@ func take(item : Item,amount: int) -> Stack:
|
|||
## Finds first entry of item. Returns -1 if no item found
|
||||
func find(item : Item) -> int:
|
||||
return -1
|
||||
|
||||
func refresh() -> void:
|
||||
for i in range(capacity):
|
||||
upper_array[i].updated = false
|
||||
down_array[i].updated = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue