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

@ -20,7 +20,7 @@ func _process(delta: float) -> void:
inventory.advance(delta)
queue_redraw()
var next : Structure = get_next()
if next == null or next.inventory.can_add_from_side(Globals.facing_difference(next.facing,parent_structure.facing)) == false:
if next == null or next.inventory == null or next.inventory.can_add_from_side(Globals.facing_difference(next.facing,parent_structure.facing)) == false:
return
var popped = inventory.pop()
if popped == null: