Fixed confict between null inventories, non conveyor inventories and conveyor
This commit is contained in:
parent
c566936cfc
commit
2f68d123d7
4 changed files with 17 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue