From ec8f90efd97b7c02efb721c58d7ecfc67707ee90 Mon Sep 17 00:00:00 2001 From: Bone White Date: Sun, 11 Jan 2015 11:18:58 +0000 Subject: [PATCH] Air Alarms now deconstructable They also update to the correct area when constructed, and the runtime errors (which I'm assuming were why deconstructing them was disabled) have been fixed. --- code/game/machinery/alarm.dm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 75b33bf83fe..1aa1d7d1e74 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -287,6 +287,11 @@ ) /obj/machinery/alarm/proc/master_is_operating() + + + if (! alarm_area) + alarm_area = areaMaster + return alarm_area.master_air_alarm && !(alarm_area.master_air_alarm.stat & (NOPOWER|BROKEN)) @@ -892,6 +897,15 @@ update_icon() return + if(istype(W, /obj/item/weapon/wirecutters)) // cutting the wires out + if (wires.wires_status == 31) // all wires cut + var/obj/item/stack/cable_coil/new_coil = new /obj/item/stack/cable_coil() + new_coil.amount = 5 + new_coil.loc = user.loc + buildstage = 1 + update_icon() + return + if (wiresexposed && ((istype(W, /obj/item/device/multitool) || istype(W, /obj/item/weapon/wirecutters)))) return attack_hand(user) @@ -906,6 +920,8 @@ updateUsrDialog() else user << "\red Access denied." + + return if(1) @@ -1475,4 +1491,4 @@ Code shamelessly copied from apc_frame else usr << browse(null, "window=partyalarm") return - return + return