14 lines
316 B
GDScript
14 lines
316 B
GDScript
extends Control
|
|
|
|
@export var producer: Currency
|
|
@export var production: Production
|
|
|
|
func _ready() -> void:
|
|
%producer.text = producer.name
|
|
%amount.text = str(abs(production.amount))
|
|
if production.amount > 0:
|
|
%type.text = "produced"
|
|
else:
|
|
%type.text = "consumed"
|
|
|
|
%production.text = production.currency.name
|