everything_has_a_price_jam/gui/production_ledger.gd
2026-09-26 17:07:56 -06:00

15 lines
462 B
GDScript

extends VBoxContainer
func _ready() -> void:
Economy.production_log.connect(append)
func append(producer: Currency, production: Production):
var display := preload("res://gui/production_log.tscn").instantiate()
display.set_color(Color.YELLOW)
for child in get_children():
if child is ProductionLog and child.is_old:
child.set_color(Color.WHITE)
display.producer = producer
display.production = production
add_child(display)
move_child(display, 0)