Return of smooth belt
This commit is contained in:
parent
8dcd7725a9
commit
d413c211b5
3 changed files with 4 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
extends StructureBehaviour
|
||||
|
||||
@onready var animator : AnimationPlayer = $"../AnimationPlayer"
|
||||
@onready var inventory : BeltInventory = structure_parent.inventory
|
||||
|
||||
func _draw() -> void:
|
||||
for i in range(inventory.capacity):
|
||||
|
@ -23,7 +23,7 @@ func get_next() -> Structure:
|
|||
return structure_parent.get_relative(structure_parent.direction_vector())
|
||||
|
||||
func try_transfer(structure : Structure) -> void:
|
||||
if structure == null or inventory.internal_array[inventory.capacity-1].amount == 0:
|
||||
if structure == null or inventory.internal_array[inventory.capacity-1].amount == 0 or inventory.progress_array[inventory.capacity-1] < inventory.pop_treshold:
|
||||
return
|
||||
var last_slot = inventory.internal_array[inventory.capacity-1]
|
||||
var ang_diff = structure_parent.direction_difference(structure)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue