From bc7a2fcc5baa411736d31008be7fc632c82c515f Mon Sep 17 00:00:00 2001 From: McBawbaggings Date: Fri, 27 Jul 2018 12:57:32 +0100 Subject: [PATCH] panel open check and terminal nulling on disconnect --- code/modules/power/smes.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 2523abde348..aad401de2b9 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -158,7 +158,7 @@ /obj/machinery/power/smes/wirecutter_act(mob/living/user, obj/item/I) //disassembling the terminal - if(terminal) + if(terminal && panel_open) terminal.dismantle(user, I) return TRUE @@ -195,6 +195,7 @@ /obj/machinery/power/smes/disconnect_terminal() if(terminal) terminal.master = null + terminal = null stat |= BROKEN