extends Control
onready var scene = $"/root/scene" as GameInstance
func set_current_charge(val: float):
$Container/CurrentBox/HBoxContainer/CurrentChargeLabel.text = "(%.2fMJ)" % (val / 1000.0)
$Container/CurrentBox/ProgressBar.value = val
func set_max_charge(val: float):
$Container/CurrentBox/ProgressBar.max_value = val
func init_values(max_charge: float, max_discharge: float):
$Container/ChargeBox/SpinBox.value = int(max_charge)
$Container/ChargeBox/SpinBox2.value = int(max_discharge)