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:
Atlantiscze
2014-11-05 12:55:58 +01:00
parent 8165c5db7e
commit e0dd1fbfcf
3 changed files with 13 additions and 7 deletions

View File

@@ -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