Fixes fixing fire alarms (#996)

This commit is contained in:
CitadelStationBot
2017-05-18 12:06:22 -05:00
committed by Poojawa
parent 2f16bb4efb
commit 45d9ea57a7

View File

@@ -153,6 +153,21 @@
return
if(panel_open)
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == INTENT_HELP)
var/obj/item/weapon/weldingtool/WT = W
if(obj_integrity < max_integrity)
if(WT.remove_fuel(0,user))
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
playsound(loc, WT.usesound, 40, 1)
if(do_after(user, 40*WT.toolspeed, target = src))
obj_integrity = max_integrity
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
to_chat(user, "<span class='notice'>You repair [src].</span>")
else
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
return
switch(buildstage)
if(2)
if(istype(W, /obj/item/device/multitool))
@@ -190,6 +205,7 @@
if(buildstage == 1)
if(stat & BROKEN)
to_chat(user, "<span class='notice'>You remove the destroyed circuit.</span>")
stat &= ~BROKEN
else
to_chat(user, "<span class='notice'>You pry out the circuit.</span>")
new /obj/item/weapon/electronics/firealarm(user.loc)
@@ -230,9 +246,10 @@
/obj/machinery/firealarm/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
new /obj/item/stack/sheet/metal(loc, 1)
var/obj/item/I = new /obj/item/weapon/electronics/firealarm(loc)
if(!disassembled)
I.obj_integrity = I.max_integrity * 0.5
if(!(stat & BROKEN))
var/obj/item/I = new /obj/item/weapon/electronics/firealarm(loc)
if(!disassembled)
I.obj_integrity = I.max_integrity * 0.5
new /obj/item/stack/cable_coil(loc, 3)
qdel(src)