From 2a97453a8a37891b350b8a7f27fc99cd62e9d3e6 Mon Sep 17 00:00:00 2001 From: the real drline Date: Fri, 2 Jun 2017 12:10:56 -0700 Subject: [PATCH] Fix cable coil dupe and APC icon oddity (#27921) * Fix APCs creating terminal on cut cable connection * Fix missing icon state for empty APCs * Make the wire panel inaccesable for empty APCs * Make the ui inaccessable for empty APCs * Redo this a different way so it performs correctly * Update apc.dm --- code/modules/power/apc.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 0dcbf89ab51..bdf720b50f6 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -99,8 +99,6 @@ /obj/machinery/power/apc/connect_to_network() //Override because the APC does not directly connect to the network; it goes through a terminal. //The terminal is what the power computer looks for anyway. - if(!terminal) - make_terminal() if(terminal) terminal.connect_to_network() @@ -241,6 +239,8 @@ icon_state = "apcemag" else if(update_state & UPSTATE_WIREEXP) icon_state = "apcewires" + else if(update_state & UPSTATE_MAINT) + icon_state = "apc0" if(!(update_state & UPSTATE_ALLGOOD)) cut_overlays() @@ -448,6 +448,8 @@ update_icon() else if(emagged) to_chat(user, "The interface is broken!") + else if((stat & MAINT) && !opened) + ..() //its an empty closed frame... theres no wires to expose! else panel_open = !panel_open to_chat(user, "The wires have been [panel_open ? "exposed" : "unexposed"]") @@ -630,6 +632,8 @@ charging = 0 src.update_icon() return + if((stat & MAINT) && !opened) //no board; no interface + return ..() /obj/machinery/power/apc/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \