Merge pull request #2987 from Ccomp5950/apc_bugfix

APC overlay bugfix.
This commit is contained in:
fleure
2014-03-12 10:46:19 +00:00
+5
View File
@@ -27,6 +27,7 @@
#define APC_UPOVERLAY_ENVIRON1 1024
#define APC_UPOVERLAY_ENVIRON2 2048
#define APC_UPOVERLAY_LOCKED 4096
#define APC_UPOVERLAY_OPERATING 8192
#define APC_UPDATE_ICON_COOLDOWN 200 // 20 seconds
@@ -302,6 +303,9 @@
if(update_state <= 1)
update_state |= UPSTATE_ALLGOOD
if(operating)
update_overlay |= APC_UPOVERLAY_OPERATING
if(update_state & UPSTATE_ALLGOOD)
if(locked)
update_overlay |= APC_UPOVERLAY_LOCKED
@@ -333,6 +337,7 @@
update_overlay |= APC_UPOVERLAY_ENVIRON1
else if(environ==2)
update_overlay |= APC_UPOVERLAY_ENVIRON2
var/results = 0
if(last_update_state == update_state && last_update_overlay == update_overlay)