Infinite Frame Fixy

Ports a fix from https://github.com/Citadel-Station-13/Citadel-Station-13-RP/pull/855 to prevent creation of infinite frames with doorbell chimes. Eliminates the runtime that would result from failed deconstruction.
This commit is contained in:
TheFurryFeline
2019-06-03 20:50:18 -04:00
parent ce0dabee1c
commit b8bbe08b83
2 changed files with 7 additions and 3 deletions

View File

@@ -43,12 +43,13 @@
else
icon_state = "dbchime-standby"
//TFF 3/6/19 - Port Cit RP fix of infinite frames. ToDo: Make it so that you can completely deconstruct it and reconstruct it.
/obj/machinery/doorbell_chime/attackby(obj/item/W as obj, mob/user as mob)
src.add_fingerprint(user)
if(default_deconstruction_screwdriver(user, W))
return
else if(default_deconstruction_crowbar(user, W))
return
// else if(default_deconstruction_crowbar(user, W))
// return
else if(default_part_replacement(user, W))
return
else if(panel_open && istype(W, /obj/item/device/multitool))

View File

@@ -408,6 +408,9 @@ Class Procs:
/obj/machinery/proc/dismantle()
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
//TFF 3/6/19 - port Cit RP fix of infinite frames.
if(!circuit)
return 0
var/obj/structure/frame/A = new /obj/structure/frame(src.loc)
var/obj/item/weapon/circuitboard/M = circuit
A.circuit = M
@@ -451,4 +454,4 @@ Class Procs:
return
/datum/proc/remove_visual(mob/M)
return
return