11 lines
252 B
GDScript3
11 lines
252 B
GDScript3
|
extends Building
|
||
|
|
||
|
var held_item: Item = null
|
||
|
|
||
|
func _process(delta: float) -> void:
|
||
|
if !producer.consumers.is_empty():
|
||
|
held_item = consumer.take_any_item_from_storage()
|
||
|
|
||
|
if held_item != null and producer.send_item(held_item):
|
||
|
held_item = null
|