12 lines
328 B
GDScript
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)
|