mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-24 20:46:29 +01:00
Infinite Frame Fixy
Ports https://github.com/Citadel-Station-13/Citadel-Station-13-RP/pull/855 to fix runtimes for several machinery objects.
This commit is contained in:
@@ -74,26 +74,23 @@
|
||||
/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)
|
||||
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 << "<span class='warning'>Turn off the [src] before dismantling it.</span>"
|
||||
if(charge < (capacity/100))
|
||||
if (output_attempt || input_attempt)
|
||||
to_chat(user, "<span class='warning'>Turn off \the [src] before dismantling it.</span>")
|
||||
return
|
||||
if(terminal)
|
||||
to_chat(user, "<span class='warning'>You have to disassemble the terminal first!</span>")
|
||||
return
|
||||
return dismantle()
|
||||
else
|
||||
user << "<span class='warning'>Better let [src] discharge before dismantling it.</span>"
|
||||
to_chat(user, "<span class='warning'>Better let \the [src] discharge before dismantling it.</span>")
|
||||
return
|
||||
|
||||
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)
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
|
||||
can_buckle = TRUE
|
||||
buckle_lying = FALSE
|
||||
circuit = /obj/item/weapon/circuitboard/grounding_rod
|
||||
|
||||
/obj/machinery/power/grounding_rod/update_icon()
|
||||
if(panel_open)
|
||||
|
||||
Reference in New Issue
Block a user