diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 42a4dcbc16a..a770e7a9c2e 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -889,14 +889,15 @@ About the new airlock wires panel:
src.add_fingerprint(user)
if((istype(C, /obj/item/weapon/weldingtool) && !( src.operating ) && src.density))
var/obj/item/weapon/weldingtool/W = C
- user.visible_message("[user] is [welded ? "unwelding":"welding"] the airlock.", \
+ if(W.remove_fuel(0,user))
+ user.visible_message("[user] is [welded ? "unwelding":"welding"] the airlock.", \
"You begin [welded ? "unwelding":"welding"] the airlock...", \
"You hear welding.")
- playsound(loc, 'sound/items/Welder.ogg', 40, 1)
- if(do_after(user,40,5,1))
- if(density && !operating)//Door must be closed to weld.
- if(W.remove_fuel(0,user))
- playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
+ playsound(loc, 'sound/items/Welder.ogg', 40, 1)
+ if(do_after(user,40,5,1))
+ if(density && !operating)//Door must be closed to weld.
+ if( !istype(src, /obj/machinery/door/airlock) || !user || !W || !W.isOn() || !user.loc )
+ return playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
welded = !welded
user.visible_message("[src] has been [welded? "welded shut":"unwelded"] by [user.name].", \
"You've [welded ? "welded the airlock shut":"unwelded the airlock"].")
@@ -982,10 +983,11 @@ About the new airlock wires panel:
return
/obj/machinery/door/airlock/plasma/attackby(C as obj, mob/user as mob)
- if(C)
- message_admins("Plasma airlock ignited by [key_name(user, user.client)](?) in ([x],[y],[z] - JMP)",0,1)
- log_game("Plasma airlock ignited by [user.ckey]([user]) in ([x],[y],[z])")
+ if(is_hot(C) > 300)//If the temperature of the object is over 300, then ignite
+ message_admins("Plasma wall ignited by [key_name(user, user.client)](?) in ([x],[y],[z] - JMP)")
+ log_game("Plasma wall ignited by [user.ckey]([user]) in ([x],[y],[z])")
ignite(is_hot(C))
+ return
..()
/obj/machinery/door/airlock/open(var/forced=0)
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 5da6def05ae..db1480e7ebd 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -179,16 +179,16 @@
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
- user << "You begin cutting the [src] apart..."
- playsound(loc, 'sound/items/Welder.ogg', 40, 1)
- if(do_after(user,40,5,1))
- if(src.opened)
- if(WT.remove_fuel(0,user))
- playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
- new /obj/item/stack/sheet/metal(src.loc)
- for(var/mob/M in viewers(src))
- M.show_message("\The [src] has been cut apart by [user] with \the [WT].", 3, "You hear welding.", 2)
- qdel(src)
+ if(WT.remove_fuel(0,user))
+ user << "You begin cutting the [src] apart..."
+ playsound(loc, 'sound/items/Welder.ogg', 40, 1)
+ if(do_after(user,40,5,1))
+ if( !src.opened || !istype(src, /obj/structure/closet) || !user || !WT || !WT.isOn() || !user.loc )
+ return
+ playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
+ new /obj/item/stack/sheet/metal(src.loc)
+ visible_message("\The [src] has been cut apart by [user] with \the [WT].", "You hear welding.")
+ qdel(src)
return
if(isrobot(user))
@@ -201,16 +201,17 @@
return
else if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
- user << "You begin [welded ? "unwelding":"welding"] the [src]..."
- playsound(loc, 'sound/items/Welder2.ogg', 40, 1)
- if(do_after(user,40,5,1))
- if(!src.opened)
- if(WT.remove_fuel(0,user))
- playsound(loc, 'sound/items/welder.ogg', 50, 1)
- welded = !welded
- user << "You [welded ? "welded the [src] shut":"unwelded the [src]"]"
- update_icon()
- user.visible_message("[src] has been [welded? "welded shut":"unwelded"] by [user.name].")
+ if(WT.remove_fuel(0,user))
+ user << "You begin [welded ? "unwelding":"welding"] the [src]..."
+ playsound(loc, 'sound/items/Welder2.ogg', 40, 1)
+ if(do_after(user,40,5,1))
+ if(src.opened || !istype(src, /obj/structure/closet) || !user || !WT || !WT.isOn() || !user.loc )
+ return
+ playsound(loc, 'sound/items/welder.ogg', 50, 1)
+ welded = !welded
+ user << "You [welded ? "welded the [src] shut":"unwelded the [src]"]"
+ update_icon()
+ user.visible_message("[src] has been [welded? "welded shut":"unwelded"] by [user.name].")
return
else if(!place(user, W))
src.attack_hand(user)
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index d18d8c1ca9c..c70c8e29f2c 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -155,45 +155,10 @@
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
if( thermite )
- if( istype(W, /obj/item/weapon/weldingtool) )
- var/obj/item/weapon/weldingtool/WT = W
- if( WT.remove_fuel(0,user) )
- thermitemelt(user)
- return
-
- else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
+ if(is_hot(W))
thermitemelt(user)
- return
- else if(istype(W, /obj/item/weapon/lighter))
- var/obj/item/weapon/lighter/L = W
- if(L.lit)
- thermitemelt(user)
- return
-
- else if(istype(W, /obj/item/weapon/match))
- var/obj/item/weapon/match/M = W
- if(M.lit)
- thermitemelt(user)
- return
-
- else if(istype(W, /obj/item/device/flashlight/flare/torch))
- var/obj/item/device/flashlight/flare/torch/T = W
- if(T.on)
- thermitemelt(user)
- return
-
- else if(istype(W, /obj/item/device/assembly/igniter))
- thermitemelt(user)
- return
-
- else if(istype(W, /obj/item/candle))
- var/obj/item/candle/C = W
- if(C.lit)
- thermitemelt(user)
- return
-
- else if( istype(W, /obj/item/weapon/melee/energy/blade) )
+ if( istype(W, /obj/item/weapon/melee/energy/blade) )
var/obj/item/weapon/melee/energy/blade/EB = W
EB.spark_system.start()
@@ -201,16 +166,13 @@
playsound(src, "sparks", 50, 1)
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
- thermitemelt(user)
- return
+ return
- else if(istype(W, /obj/item/weapon/melee/energy/sword))
- var/obj/item/weapon/melee/energy/sword/ES = W
- if(ES.active)
- thermitemelt(user)
- return
var/turf/T = user.loc //get user's location for delay checks
+ var/slicing_duration = 100 //default time taken to slice the wall
+ if( mineral == "diamond" )
+ slicing_duration = 200 //diamond wall takes twice as much time
//DECONSTRUCTION
add_fingerprint(user)
@@ -221,12 +183,12 @@
user << "You begin slicing through the outer plating."
playsound(src, 'sound/items/Welder.ogg', 100, 1)
- sleep(100)
- if( !istype(src, /turf/simulated/wall) || !user || !WT || !WT.isOn() || !T ) return
-
- if( user.loc == T && user.get_active_hand() == WT )
- user << "You remove the outer plating."
- dismantle_wall()
+ if(do_after(user, slicing_duration))
+ if( !istype(src, /turf/simulated/wall) || !user || !WT || !WT.isOn() || !T )
+ return
+ if( user.loc == T && user.get_active_hand() == WT )
+ user << "You remove the outer plating."
+ dismantle_wall()
else
return
@@ -235,16 +197,14 @@
user << "You begin slicing through the outer plating."
playsound(src, 'sound/items/Welder.ogg', 100, 1)
- sleep(60)
- if(mineral == "diamond")//Oh look, it's tougher
- sleep(60)
- if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
+ if(do_after(user, slicing_duration*0.6)) // plasma cutter is faster than welding tool
+ if( !istype(src, /turf/simulated/wall) || !user || !W || !T )
+ return
- if( user.loc == T && user.get_active_hand() == W )
- user << "You remove the outer plating."
- dismantle_wall()
- for(var/mob/O in viewers(user, 5))
- O.show_message("The wall was sliced apart by [user]!", 1, "You hear metal being sliced apart.", 2)
+ if( user.loc == T && user.get_active_hand() == W )
+ user << "You remove the outer plating."
+ dismantle_wall()
+ visible_message("The wall was sliced apart by [user]!", "You hear metal being sliced apart.")
return
//DRILLING
@@ -252,16 +212,14 @@
user << "You begin to drill though the wall."
- sleep(60)
- if(mineral == "diamond")
- sleep(60)
- if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
+ if(do_after(user, slicing_duration*0.6)) // diamond drill is faster than welding tool slicing
+ if( !istype(src, /turf/simulated/wall) || !user || !W || !T )
+ return
- if( user.loc == T && user.get_active_hand() == W )
- user << "Your drill tears though the last of the reinforced plating."
- dismantle_wall()
- for(var/mob/O in viewers(user, 5))
- O.show_message("The wall was drilled through by [user]!", 1, "You hear the grinding of metal.", 2)
+ if( user.loc == T && user.get_active_hand() == W )
+ user << "Your drill tears though the last of the reinforced plating."
+ dismantle_wall()
+ visible_message("The wall was drilled through by [user]!", "You hear the grinding of metal.")
return
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
@@ -271,18 +229,16 @@
user << "You stab \the [EB] into the wall and begin to slice it apart."
playsound(src, "sparks", 50, 1)
- sleep(70)
- if(mineral == "diamond")
- sleep(70)
- if( !istype(src, /turf/simulated/wall) || !user || !EB || !T ) return
+ if(do_after(user, slicing_duration*0.7)) //energy blade slicing is faster than welding tool slicing
+ if( !istype(src, /turf/simulated/wall) || !user || !EB || !T )
+ return
- if( user.loc == T && user.get_active_hand() == W )
- EB.spark_system.start()
- playsound(src, "sparks", 50, 1)
- playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
- dismantle_wall(1)
- for(var/mob/O in viewers(user, 5))
- O.show_message("The wall was sliced apart by [user]!", 1, "You hear metal being sliced apart and sparks flying.", 2)
+ if( user.loc == T && user.get_active_hand() == W )
+ EB.spark_system.start()
+ playsound(src, "sparks", 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
+ dismantle_wall(1)
+ visible_message("The wall was sliced apart by [user]!", "You hear metal being sliced apart and sparks flying.")
return
else if(istype(W,/obj/item/apc_frame))
diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm
index 7364cc147bc..7144e133388 100644
--- a/code/game/turfs/simulated/walls_reinforced.dm
+++ b/code/game/turfs/simulated/walls_reinforced.dm
@@ -22,17 +22,10 @@
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
if( thermite )
- if( istype(W, /obj/item/weapon/weldingtool) )
- var/obj/item/weapon/weldingtool/WT = W
- if( WT.remove_fuel(0,user) )
- thermitemelt(user)
- return
-
- else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
+ if( is_hot(W) )
thermitemelt(user)
- return
- else if( istype(W, /obj/item/weapon/melee/energy/blade) )
+ if( istype(W, /obj/item/weapon/melee/energy/blade) )
var/obj/item/weapon/melee/energy/blade/EB = W
EB.spark_system.start()
@@ -40,8 +33,7 @@
playsound(src, "sparks", 50, 1)
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
- thermitemelt(user)
- return
+ return
else if(istype(W, /obj/item/weapon/melee/energy/blade))
user << "This wall is too thick to slice through. You will need to find a different path."
@@ -65,13 +57,14 @@
user << "You begin removing the support lines."
playsound(src, 'sound/items/Screwdriver.ogg', 100, 1)
- sleep(40)
- if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
+ if(do_after(user, 40))
+ if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T )
+ return
- if( d_state == 1 && user.loc == T && user.get_active_hand() == W )
- src.d_state = 2
- src.icon_state = "r_wall-2"
- user << "You remove the support lines."
+ if( d_state == 1 && user.loc == T && user.get_active_hand() == W )
+ src.d_state = 2
+ src.icon_state = "r_wall-2"
+ user << "You remove the support lines."
return
//REPAIRING (replacing the outer grille for cosmetic damage)
@@ -95,13 +88,14 @@
user << "You begin slicing through the metal cover."
playsound(src, 'sound/items/Welder.ogg', 100, 1)
- sleep(60)
- if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !WT.isOn() || !T ) return
+ if(do_after(user, 60))
+ if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !WT.isOn() || !T )
+ return
- if( d_state == 2 && user.loc == T && user.get_active_hand() == WT )
- src.d_state = 3
- src.icon_state = "r_wall-3"
- user << "You press firmly on the cover, dislodging it."
+ if( d_state == 2 && user.loc == T && user.get_active_hand() == WT )
+ src.d_state = 3
+ src.icon_state = "r_wall-3"
+ user << "You press firmly on the cover, dislodging it."
return
if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
@@ -109,13 +103,14 @@
user << "You begin slicing through the metal cover."
playsound(src, 'sound/items/Welder.ogg', 100, 1)
- sleep(40)
- if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
+ if(do_after(user, 60))
+ if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T )
+ return
- if( d_state == 2 && user.loc == T && user.get_active_hand() == W )
- src.d_state = 3
- src.icon_state = "r_wall-3"
- user << "You press firmly on the cover, dislodging it."
+ if( d_state == 2 && user.loc == T && user.get_active_hand() == W )
+ src.d_state = 3
+ src.icon_state = "r_wall-3"
+ user << "You press firmly on the cover, dislodging it."
return
if(3)
@@ -124,13 +119,14 @@
user << "You struggle to pry off the cover."
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
- sleep(100)
- if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
+ if(do_after(user, 100))
+ if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T )
+ return
- if( d_state == 3 && user.loc == T && user.get_active_hand() == W )
- src.d_state = 4
- src.icon_state = "r_wall-4"
- user << "You pry off the cover."
+ if( d_state == 3 && user.loc == T && user.get_active_hand() == W )
+ src.d_state = 4
+ src.icon_state = "r_wall-4"
+ user << "You pry off the cover."
return
if(4)
@@ -139,13 +135,14 @@
user << "You start loosening the anchoring bolts which secure the support rods to their frame."
playsound(src, 'sound/items/Ratchet.ogg', 100, 1)
- sleep(40)
- if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
+ if(do_after(user, 40))
+ if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T )
+ return
- if( d_state == 4 && user.loc == T && user.get_active_hand() == W )
- src.d_state = 5
- src.icon_state = "r_wall-5"
- user << "You remove the bolts anchoring the support rods."
+ if( d_state == 4 && user.loc == T && user.get_active_hand() == W )
+ src.d_state = 5
+ src.icon_state = "r_wall-5"
+ user << "You remove the bolts anchoring the support rods."
return
if(5)
@@ -156,14 +153,15 @@
user << "You begin slicing through the support rods."
playsound(src, 'sound/items/Welder.ogg', 100, 1)
- sleep(100)
- if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !WT.isOn() || !T ) return
+ if(do_after(user, 100))
+ if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !WT.isOn() || !T )
+ return
- if( d_state == 5 && user.loc == T && user.get_active_hand() == WT )
- src.d_state = 6
- src.icon_state = "r_wall-6"
- new /obj/item/stack/rods( src )
- user << "The support rods drop out as you cut them loose from the frame."
+ if( d_state == 5 && user.loc == T && user.get_active_hand() == WT )
+ src.d_state = 6
+ src.icon_state = "r_wall-6"
+ new /obj/item/stack/rods( src )
+ user << "The support rods drop out as you cut them loose from the frame."
return
if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
@@ -171,14 +169,15 @@
user << "You begin slicing through the support rods."
playsound(src, 'sound/items/Welder.ogg', 100, 1)
- sleep(70)
- if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
+ if(do_after(user, 70))
+ if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T )
+ return
- if( d_state == 5 && user.loc == T && user.get_active_hand() == W )
- src.d_state = 6
- src.icon_state = "r_wall-6"
- new /obj/item/stack/rods( src )
- user << "The support rods drop out as you cut them loose from the frame."
+ if( d_state == 5 && user.loc == T && user.get_active_hand() == W )
+ src.d_state = 6
+ src.icon_state = "r_wall-6"
+ new /obj/item/stack/rods( src )
+ user << "The support rods drop out as you cut them loose from the frame."
return
if(6)
@@ -187,12 +186,13 @@
user << "You struggle to pry off the outer sheath."
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
- sleep(100)
- if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
+ if(do_after(user, 100))
+ if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T )
+ return
- if( user.loc == T && user.get_active_hand() == W )
- user << "You pry off the outer sheath."
- dismantle_wall()
+ if( user.loc == T && user.get_active_hand() == W )
+ user << "You pry off the outer sheath."
+ dismantle_wall()
return
//vv OK, we weren't performing a valid deconstruction step or igniting thermite,let's check the other possibilities vv
@@ -202,12 +202,13 @@
user << "You begin to drill though the wall."
- sleep(200)
- if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
+ if(do_after(user, 200))
+ if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T )
+ return
- if( user.loc == T && user.get_active_hand() == W )
- user << "Your drill tears though the last of the reinforced plating."
- dismantle_wall()
+ if( user.loc == T && user.get_active_hand() == W )
+ user << "Your drill tears though the last of the reinforced plating."
+ dismantle_wall()
//REPAIRING
else if(istype(W, /obj/item/stack/sheet/metal) && d_state)