Fixed confict between null inventories, non conveyor inventories and conveyor

This commit is contained in:
Rendo 2025-10-15 00:38:41 +05:00
commit 2f68d123d7
4 changed files with 17 additions and 1 deletions

View file

@ -48,12 +48,18 @@ func add(stack: Stack) -> Stack:
return null
return stack
func add_from_side(stack : Stack, _ang_diff : float) -> Stack:
return add(stack)
func can_add() -> bool:
for i in range(capacity):
if internal_array[i].amount == 0:
return true
return false
func can_add_from_side(_ang_diff : float) -> bool:
return can_add()
## Tries to take first item. Returns null if no items in inventory
func pop() -> Stack:
for i in range(len(internal_array)):