2025-05-08 13:05:57 +01:00
|
|
|
extends Building
|
|
|
|
|
|
|
|
var held_item: Item = null
|
|
|
|
|
|
|
|
func _process(delta: float) -> void:
|
2025-05-11 20:00:22 +01:00
|
|
|
super(delta)
|
|
|
|
if is_functional():
|
|
|
|
if !producer.consumers.is_empty() and held_item == null:
|
|
|
|
held_item = consumer.take_any_item_from_storage()
|
|
|
|
|
2025-05-08 13:05:57 +01:00
|
|
|
if held_item != null and producer.send_item(held_item):
|
|
|
|
held_item = null
|