From 83f7801c16f7bebdb6dd01bc9d1b3580c931ede2 Mon Sep 17 00:00:00 2001 From: TheFurryFeline Date: Mon, 3 Jun 2019 19:59:53 -0400 Subject: [PATCH] Revert Changes Perma runtime with this thing if wires are added into a battery rack to make a terminal. Reverting changes to the file. --- code/modules/power/batteryrack.dm | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/code/modules/power/batteryrack.dm b/code/modules/power/batteryrack.dm index c6773ce168..7bb37a5662 100644 --- a/code/modules/power/batteryrack.dm +++ b/code/modules/power/batteryrack.dm @@ -74,23 +74,26 @@ /obj/machinery/power/smes/batteryrack/chargedisplay() return round(4 * charge/(capacity ? capacity : 5e6)) -//TFF 3/6/19 - Port Cit RP fix for infinite frames + /obj/machinery/power/smes/batteryrack/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) //these can only be moved by being reconstructed, solves having to remake the powernet. ..() //SMES attackby for now handles screwdriver, cable coils and wirecutters, no need to repeat that here if(open_hatch) if(istype(W, /obj/item/weapon/crowbar)) - if(charge < (capacity/100)) - if (output_attempt || input_attempt) - to_chat(user, "Turn off \the [src] before dismantling it.") - return - if(terminal) - to_chat(user, "You have to disassemble the terminal first!") - return - return dismantle() + if (charge < (capacity / 100)) + if (!output_attempt && !input_attempt) + playsound(src, W.usesound, 50, 1) + var/obj/structure/frame/M = new /obj/structure/frame(src.loc) + M.frame_type = "machine" + M.state = 2 + M.icon_state = "machine_1" + for(var/obj/I in component_parts) + I.loc = src.loc + qdel(src) + return 1 + else + user << "Turn off the [src] before dismantling it." else - to_chat(user, "Better let \the [src] discharge before dismantling it.") - return - + user << "Better let [src] discharge before dismantling it." else if ((istype(W, /obj/item/weapon/stock_parts/capacitor) && (capacitors_amount < 5)) || (istype(W, /obj/item/weapon/cell) && (cells_amount < 5))) if (charge < (capacity / 100)) if (!output_attempt && !input_attempt)