everything_has_a_price_jam/gui/production_chart.gd
2026-09-26 10:54:36 -06:00

12 lines
328 B
GDScript

extends VBoxContainer
func _ready() -> void:
Economy.productions_update.connect(sync)
func sync(productions: Array[Production]):
for child in get_children():
child.queue_free()
for p in productions:
var display := preload("res://gui/production_display.tscn").instantiate()
display.production = p
add_child(display)