mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
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:
@@ -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))
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user