From 74a8fa152c13750612284f8afe96860f80f59b41 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Tue, 4 Mar 2014 20:57:40 -0600 Subject: [PATCH] APC overlay bugfix. Before: If you turned off the breaker and fiddled with on/off states and turned on the breaker it wouldn't update the overlay because the check_updates wasn't doing an if(operating) check and would think it didn't need to update the overlays once you turned on the breaker. After: Check_update() is doing a check for the breaker being on or off and taking that into account with the update_overlay flags and will update the overlays properly. Thanks Razharas from /tg/ #coderbus for bringing this to my attention. --- code/modules/power/apc.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 7a5f17eeca..a98eb6a197 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -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 100 // 10 seconds @@ -323,6 +324,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