Merge pull request #4170 from RemieRichards/FixDoorLockerWeld

Fixes Permanent Airlock welding, adds sound to dismantling a locker
This commit is contained in:
Alex
2014-07-22 15:18:32 +01:00
2 changed files with 20 additions and 15 deletions
+9 -8
View File
@@ -881,14 +881,15 @@ About the new airlock wires panel:
user << "<span class='notice'>You begin [welded ? "unwelding":"welding"] the airlock...</span>"
playsound(loc, 'sound/items/Welder2.ogg', 40, 1)
if(do_after(user,40,5,1))
if(W.remove_fuel(0,user))
playsound(loc, 'sound/items/welder.ogg', 50, 1)
welded = !welded
user << "<span class='notice'>You [welded ? "welded the airlock shut":"unwelded the airlock"]</span>"
update_icon()
user.visible_message("<span class='warning'>[src] has been [welded? "welded shut":"unwelded"] by [user.name].</span>")
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
if(!density && !operating)//Door must be closed to weld.
if(W.remove_fuel(0,user))
playsound(loc, 'sound/items/welder.ogg', 50, 1)
welded = !welded
user << "<span class='notice'>You [welded ? "welded the airlock shut":"unwelded the airlock"]</span>"
update_icon()
user.visible_message("<span class='warning'>[src] has been [welded? "welded shut":"unwelded"] by [user.name].</span>")
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
else if(istype(C, /obj/item/weapon/screwdriver))
src.p_open = !( src.p_open )
@@ -179,13 +179,17 @@
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.remove_fuel(0,user))
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
new /obj/item/stack/sheet/metal(src.loc)
for(var/mob/M in viewers(src))
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WT].</span>", 3, "You hear welding.", 2)
qdel(src)
user << "<span class='notice'>You begin cutting the [src] apart...</span>"
playsound(loc, 'sound/items/Welder2.ogg', 40, 1)
if(do_after(user,40,5,1))
if(!WT.remove_fuel(0,user))
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
playsound(loc, 'sound/items/welder.ogg', 50, 1)
new /obj/item/stack/sheet/metal(src.loc)
for(var/mob/M in viewers(src))
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WT].</span>", 3, "You hear welding.", 2)
qdel(src)
return
if(isrobot(user))