Merge pull request #39400 from McBawbaggings/yoyoSMESfix

Fixes SMES terminals and connection issues (PR by YoYoBatty)
This commit is contained in:
Jordan Brown
2018-07-28 19:51:32 -04:00
committed by GitHub
+13 -10
View File
@@ -53,11 +53,11 @@
terminal = term
break dir_loop
if(!terminal)
stat |= BROKEN
return
terminal.master = src
update_icon()
if(!terminal)
stat |= BROKEN
return
terminal.master = src
update_icon()
/obj/machinery/power/smes/RefreshParts()
var/IO = 0
@@ -141,11 +141,7 @@
//build the terminal and link it to the network
make_terminal(T)
terminal.connect_to_network()
return
//disassembling the terminal
if(istype(I, /obj/item/wirecutters) && terminal && panel_open)
terminal.dismantle(user, I)
connect_to_network()
return
//crowbarring it !
@@ -160,6 +156,13 @@
return ..()
/obj/machinery/power/smes/wirecutter_act(mob/living/user, obj/item/I)
//disassembling the terminal
if(terminal && panel_open)
terminal.dismantle(user, I)
return TRUE
/obj/machinery/power/smes/default_deconstruction_crowbar(obj/item/crowbar/C)
if(istype(C) && terminal)
to_chat(usr, "<span class='warning'>You must first remove the power terminal!</span>")