This commit is contained in:
Rendo 2025-10-17 18:22:49 +05:00
commit 074bb21ffd
18 changed files with 99 additions and 51 deletions

View file

@ -20,6 +20,8 @@ func _init() -> void:
resize.call_deferred()
func add(stack : Stack, _context: InventoryContext = null) -> Stack:
if stack == null:
return stack
for i in range(input_capacity):
if input_array[i].can_be_merged(stack.held_item):
stack_added.emit(stack,i)
@ -69,3 +71,7 @@ func find(item : Item) -> int:
if output_slot.held_item == item:
return 0
return -1
func refresh() -> void:
for i in range(input_capacity):
input_array[i].updated = false