From b8bbe08b836e6f892642d4bf0d40e49715ebf612 Mon Sep 17 00:00:00 2001 From: TheFurryFeline Date: Mon, 3 Jun 2019 20:50:18 -0400 Subject: [PATCH] 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. --- code/game/machinery/doorbell_vr.dm | 5 +++-- code/game/machinery/machinery.dm | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/doorbell_vr.dm b/code/game/machinery/doorbell_vr.dm index 25fb75df44..d6c5d67719 100644 --- a/code/game/machinery/doorbell_vr.dm +++ b/code/game/machinery/doorbell_vr.dm @@ -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)) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 5486facff1..fb0cc10b2e 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -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 \ No newline at end of file + return \ No newline at end of file