mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
SMES UI fixes
- SMES now shows "Partially Charging" in UI when it has at least some input, but not enough to charge at set rate. - Added yellowish-orange overlay which is used instead of the normal one if the SMES is partially charging, so you can visually see it without having to open the UI. - UI input/output rate fields are now 20px wider. This fixes issues with values that exceed 1 000 000 W. Such values are possible with multi-coiled SMESs.
This commit is contained in:
@@ -61,7 +61,9 @@
|
||||
|
||||
overlays += image('icons/obj/power.dmi', "smes-op[online]")
|
||||
|
||||
if(charging)
|
||||
if(charging == 2)
|
||||
overlays += image('icons/obj/power.dmi', "smes-oc2")
|
||||
else if (charging == 1)
|
||||
overlays += image('icons/obj/power.dmi', "smes-oc1")
|
||||
else
|
||||
if(chargemode)
|
||||
@@ -96,9 +98,11 @@
|
||||
var/actual_load = add_load(target_load) // add the load to the terminal side network
|
||||
charge += actual_load * SMESRATE // increase the charge
|
||||
|
||||
if (actual_load >= target_load) // did the powernet have enough power available for us?
|
||||
if (actual_load >= target_load) // Did we charge at full rate?
|
||||
charging = 2
|
||||
else if (actual_load) // If not, did we charge at least partially?
|
||||
charging = 1
|
||||
else
|
||||
else // Or not at all?
|
||||
charging = 0
|
||||
|
||||
if(online) // if outputting
|
||||
|
||||
Reference in New Issue
Block a user