diff --git a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
index c13d0f5580c..3c45a96b139 100644
--- a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
@@ -266,7 +266,7 @@
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
user << "Now welding the vent."
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(!src || !WT.isOn()) return
playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1)
if(!welded)
@@ -302,7 +302,7 @@
return 1
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
user << "You begin to unfasten \the [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
index 78fcd687b8f..61b0a1af8d2 100644
--- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
@@ -166,7 +166,7 @@
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "You begin to unfasten \the [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm
index e191bb85b9a..cf7d2665939 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm
@@ -198,7 +198,7 @@ Thus, the two variables affect pump operation are set in New():
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "You begin to unfasten \the [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
index 6ea82979dcd..6bdacfa49b8 100644
--- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
@@ -185,7 +185,7 @@ Thus, the two variables affect pump operation are set in New():
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "You begin to unfasten \the [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
index 6f4d880a67d..cb730e39c5a 100644
--- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
@@ -84,7 +84,7 @@
return 1
user << "You begin to unfasten \the [src]..."
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
diff --git a/code/ATMOSPHERICS/components/portables_connector.dm b/code/ATMOSPHERICS/components/portables_connector.dm
index 64c0cdec852..b777707ca2a 100644
--- a/code/ATMOSPHERICS/components/portables_connector.dm
+++ b/code/ATMOSPHERICS/components/portables_connector.dm
@@ -149,7 +149,7 @@
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "You begin to unfasten \the [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
index 09aecb64393..2f55358d122 100755
--- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
@@ -161,7 +161,7 @@ Filter types:
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "You begin to unfasten \the [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
index 796ec44afb9..1b1d276565a 100644
--- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
@@ -125,7 +125,7 @@
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "You begin to unfasten \the [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
diff --git a/code/ATMOSPHERICS/components/tvalve.dm b/code/ATMOSPHERICS/components/tvalve.dm
index ce4dcf1fb48..e5c5b4975f0 100644
--- a/code/ATMOSPHERICS/components/tvalve.dm
+++ b/code/ATMOSPHERICS/components/tvalve.dm
@@ -369,7 +369,7 @@
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "You begin to unfasten \the [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
diff --git a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm
index 7e3509d2979..7f17f339cd0 100644
--- a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm
+++ b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm
@@ -80,7 +80,7 @@
return 1
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
user << "You begin to unfasten \the [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
diff --git a/code/ATMOSPHERICS/components/unary/outlet_injector.dm b/code/ATMOSPHERICS/components/unary/outlet_injector.dm
index 43c9a84d988..023ad1aa11d 100644
--- a/code/ATMOSPHERICS/components/unary/outlet_injector.dm
+++ b/code/ATMOSPHERICS/components/unary/outlet_injector.dm
@@ -188,7 +188,7 @@
return 1
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
user << "You begin to unfasten \the [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
diff --git a/code/ATMOSPHERICS/components/unary/thermal_plate.dm b/code/ATMOSPHERICS/components/unary/thermal_plate.dm
index 65e37feff34..80f215f75ad 100644
--- a/code/ATMOSPHERICS/components/unary/thermal_plate.dm
+++ b/code/ATMOSPHERICS/components/unary/thermal_plate.dm
@@ -83,7 +83,7 @@
return 1
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
user << "You begin to unfasten \the [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm
index d61f22485cf..359be880d7f 100644
--- a/code/ATMOSPHERICS/components/unary/vent_pump.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm
@@ -323,7 +323,7 @@
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
user << "Now welding the vent."
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(!src || !WT.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
if(!welded)
@@ -411,7 +411,7 @@
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "You begin to unfasten \the [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
index 9b37207774e..1361a339438 100644
--- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
@@ -366,7 +366,7 @@
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
user << "Now welding the scrubber."
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(!src || !WT.isOn()) return
playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1)
if(!welded)
@@ -402,7 +402,7 @@
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "You begin to unfasten \the [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
diff --git a/code/ATMOSPHERICS/components/valve.dm b/code/ATMOSPHERICS/components/valve.dm
index 3706560e15c..73383358296 100644
--- a/code/ATMOSPHERICS/components/valve.dm
+++ b/code/ATMOSPHERICS/components/valve.dm
@@ -324,7 +324,7 @@
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "You begin to unfasten \the [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
diff --git a/code/ATMOSPHERICS/pipes/pipe.dm b/code/ATMOSPHERICS/pipes/pipe.dm
index 07af3328013..6b98bdf6c5c 100644
--- a/code/ATMOSPHERICS/pipes/pipe.dm
+++ b/code/ATMOSPHERICS/pipes/pipe.dm
@@ -75,7 +75,7 @@
if (istype(W, /obj/item/device/pipe_freezer))
if(!src.frozen) // If the pipe is not already frozen
user << "You begin to freeze the [src]."
- if (do_after(user, 60))
+ if (do_after(user, 60, target = src))
user.visible_message( \
"[user] freezes \the [src].", \
"You finished freezing \the [src].", \
@@ -107,7 +107,7 @@
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "You begin to unfasten \the [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
diff --git a/code/ATMOSPHERICS/pipes/vent.dm b/code/ATMOSPHERICS/pipes/vent.dm
index 78813a950dc..f9479f14578 100644
--- a/code/ATMOSPHERICS/pipes/vent.dm
+++ b/code/ATMOSPHERICS/pipes/vent.dm
@@ -96,7 +96,7 @@
return 1
playsound(T, 'sound/items/Ratchet.ogg', 50, 1)
user << "You begin to unfasten \the [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index c24e749cbb4..ebc0de30564 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -605,7 +605,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
return M
if(M < 0)
return -M
-
+
/proc/get_mob_by_ckey(key)
if(!key)
return
@@ -779,45 +779,101 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
else return get_step(ref, base_dir)
-/proc/do_mob(var/mob/user , var/mob/target, var/time = 30) //This is quite an ugly solution but i refuse to use the old request system.
- if(!user || !target) return 0
- var/user_loc = user.loc
- var/target_loc = target.loc
- var/holding = user.get_active_hand()
- sleep(time)
- if(!user || !target) return 0
- if ( user.loc == user_loc && target.loc == target_loc && user.get_active_hand() == holding && !( user.stat ) && ( !user.stunned && !user.weakened && !user.paralysis && !user.lying ) )
- return 1
- else
- return 0
-
-/proc/do_after(var/mob/user as mob, delay as num, var/numticks = 5, var/needhand = 1)
- if(!user || isnull(user))
+/proc/do_mob(var/mob/user , var/mob/target, var/time = 30, numticks = 5, var/stealth = 0) //This is quite an ugly solution but i refuse to use the old request system.
+ if(!user || !target)
return 0
if(numticks == 0)
return 0
-
- var/delayfraction = round(delay/numticks)
- var/original_loc = user.loc
+ var/user_loc = user.loc
+ var/target_loc = target.loc
var/holding = user.get_active_hand()
-
- for(var/i = 0, iYou feel hooks sink into your mind and pull."
- if(!do_after(user, 30))
+ if(!do_after(user, 30, target = user))
user << "Your concentration has been broken. The mental hooks you have sent out now retract into your mind."
return
diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm
index 7509a79639b..eafbb40fa19 100644
--- a/code/game/machinery/Sleeper.dm
+++ b/code/game/machinery/Sleeper.dm
@@ -100,21 +100,21 @@
/obj/machinery/sleep_console/attack_ai(mob/user as mob)
return attack_hand(user)
-
+
/obj/machinery/sleep_console/attack_ghost(mob/user as mob)
return attack_hand(user)
/obj/machinery/sleep_console/attack_hand(mob/user as mob)
if(stat & (NOPOWER|BROKEN))
return
-
+
if (panel_open)
user << "Close the maintenance panel first."
return
-
+
if (!src.connected)
findsleeper()
-
+
if (src.connected)
var/mob/living/occupant = src.connected.occupant
var/dat = "Occupant Statistics:
"
@@ -168,11 +168,11 @@
/obj/machinery/sleep_console/Topic(href, href_list)
if(..())
return 1
-
+
if(panel_open)
usr << "Close the maintenance panel first."
return 1
-
+
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
usr.set_machine(src)
if (href_list["chemical"])
@@ -352,7 +352,7 @@
visible_message("[user] starts putting [G:affecting:name] into the sleeper.", 3)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = G:affecting))
if(src.occupant)
user << "\blue The sleeper is already occupied!"
return
@@ -555,7 +555,7 @@
else
visible_message("[user] starts putting [L.name] into the sleeper.", 3)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = L))
if(src.occupant)
user << "\blue The sleeper is already occupied!"
return
@@ -596,7 +596,7 @@
usr << "You're too busy getting your life sucked out of you."
return
visible_message("[usr] starts climbing into the sleeper.", 3)
- if(do_after(usr, 20))
+ if(do_after(usr, 20, target = usr))
if(src.occupant)
usr << "\blue The sleeper is already occupied!"
return
diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm
index d181367d6b9..83510cd8357 100644
--- a/code/game/machinery/alarm.dm
+++ b/code/game/machinery/alarm.dm
@@ -1053,7 +1053,7 @@
else if(istype(W, /obj/item/weapon/crowbar))
user << "You start prying out the circuit."
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
- if(do_after(user,20))
+ if(do_after(user,20, target = src))
user << "You pry out the circuit!"
var/obj/item/weapon/airalarm_electronics/circuit = new /obj/item/weapon/airalarm_electronics()
circuit.loc = user.loc
diff --git a/code/game/machinery/atmo_control.dm b/code/game/machinery/atmo_control.dm
index ea13b442df4..5bfccec2229 100644
--- a/code/game/machinery/atmo_control.dm
+++ b/code/game/machinery/atmo_control.dm
@@ -77,7 +77,7 @@ obj/machinery/air_sensor
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to unfasten \the [src]..."
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
user.visible_message("[user] unfastens \the [src].", "\blue You have unfastened \the [src].", "You hear ratchet.")
new /obj/item/pipe_gsensor(src.loc)
qdel(src)
diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index 644420fc3c1..b68b74313d5 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -633,7 +633,7 @@ update_flag
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
WT.eyecheck(user)
busy = 1
- if(do_after(user, 50))
+ if(do_after(user, 50, target = src))
busy = 0
if(!WT.isOn())
return 0
diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm
index f4e38aea3e9..f1a35688314 100644
--- a/code/game/machinery/atmoalter/meter.dm
+++ b/code/game/machinery/atmoalter/meter.dm
@@ -124,7 +124,7 @@
return ..()
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to unfasten \the [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"\blue You have unfastened \the [src].", \
diff --git a/code/game/machinery/bees_apiary.dm b/code/game/machinery/bees_apiary.dm
index a8a1fdd291d..088a9e6712d 100644
--- a/code/game/machinery/bees_apiary.dm
+++ b/code/game/machinery/bees_apiary.dm
@@ -69,7 +69,7 @@
angry_swarm(user)
else
user << "\blue You begin to dislodge the dead apiary from the tray."
- if(do_after(user, 50))
+ if(do_after(user, 50, target = src))
new hydrotray_type(src.loc)
new /obj/item/apiary(src.loc)
user << "\red You dislodge the apiary from the tray."
@@ -90,7 +90,7 @@
angry_swarm(user)
else
user << "\blue You begin to harvest the honey."
- if(do_after(user,50))
+ if(do_after(user,50, target = src))
G.reagents.add_reagent("honey",harvestable_honey)
harvestable_honey = 0
user << "\blue You successfully harvest the honey."
diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm
index a3670dd44c6..33a3d45d849 100644
--- a/code/game/machinery/bots/ed209bot.dm
+++ b/code/game/machinery/bots/ed209bot.dm
@@ -624,7 +624,7 @@ Auto Patrol[]"},
user << "You need one length of cable to wire the ED-209."
return
user << "You start to wire [src]..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
if (coil.amount >= 1 && build_step == 6)
coil.use(1)
build_step = 7
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 353f807a682..c3b692564c6 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -337,7 +337,7 @@
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
WT.eyecheck(user)
busy = 1
- if(do_after(user, 100))
+ if(do_after(user, 100, target = src))
busy = 0
if(!WT.isOn())
return 0
diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm
index f91565511f5..5c45212406d 100644
--- a/code/game/machinery/camera/camera_assembly.dm
+++ b/code/game/machinery/camera/camera_assembly.dm
@@ -165,7 +165,7 @@
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
WT.eyecheck(user)
busy = 1
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
busy = 0
if(!WT.isOn())
return 0
diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm
index 76fd8cf7ea5..569680c2afd 100644
--- a/code/game/machinery/computer/ai_core.dm
+++ b/code/game/machinery/computer/ai_core.dm
@@ -15,7 +15,7 @@
if(0)
if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
user << "\blue You wrench the frame into place."
anchored = 1
state = 1
@@ -25,7 +25,7 @@
user << "The welder must be on for this task."
return
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(!src || !WT.remove_fuel(0, user)) return
user << "\blue You deconstruct the frame."
new /obj/item/stack/sheet/plasteel( loc, 4)
@@ -33,7 +33,7 @@
if(1)
if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
user << "\blue You unfasten the frame."
anchored = 0
state = 0
@@ -65,7 +65,7 @@
if(istype(P, /obj/item/stack/cable_coil))
if(P:amount >= 5)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
P:amount -= 5
if(!P:amount) qdel(P)
user << "\blue You add cables to the frame."
@@ -86,7 +86,7 @@
if(istype(P, /obj/item/stack/sheet/rglass))
if(P:amount >= 2)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if (P)
P:amount -= 2
if(!P:amount) qdel(P)
@@ -186,7 +186,7 @@
else if(istype(W, /obj/item/weapon/wrench))
if(anchored)
user.visible_message("\blue \The [user] starts to unbolt \the [src] from the plating...")
- if(!do_after(user,40))
+ if(!do_after(user,40, target = src))
user.visible_message("\blue \The [user] decides not to unbolt \the [src].")
return
user.visible_message("\blue \The [user] finishes unfastening \the [src]!")
@@ -194,7 +194,7 @@
return
else
user.visible_message("\blue \The [user] starts to bolt \the [src] to the plating...")
- if(!do_after(user,40))
+ if(!do_after(user,40, target = src))
user.visible_message("\blue \The [user] decides not to bolt \the [src].")
return
user.visible_message("\blue \The [user] finishes fastening down \the [src]!")
diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm
index 6f8ea8eaf4d..c4c73f7c5bb 100644
--- a/code/game/machinery/computer/buildandrepair.dm
+++ b/code/game/machinery/computer/buildandrepair.dm
@@ -293,7 +293,7 @@
if(0)
if(istype(P, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
user << "\blue You wrench the frame into place."
src.anchored = 1
src.state = 1
@@ -303,7 +303,7 @@
user << "The welding tool must be on to complete this task."
return
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(!src || !WT.isOn()) return
user << "\blue You deconstruct the frame."
new /obj/item/stack/sheet/metal( src.loc, 5 )
@@ -311,7 +311,7 @@
if(1)
if(istype(P, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
user << "\blue You unfasten the frame."
src.anchored = 0
src.state = 0
@@ -347,7 +347,7 @@
if(istype(P, /obj/item/stack/cable_coil))
if(P:amount >= 5)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(P)
P:amount -= 5
if(!P:amount) qdel(P)
@@ -366,7 +366,7 @@
if(istype(P, /obj/item/stack/sheet/glass))
if(P:amount >= 2)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(P)
P:use(2)
user << "\blue You put in the glass panel."
@@ -404,7 +404,7 @@
if(0)
if(istype(P, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
user << "\blue You wrench the frame into place."
src.anchored = 1
src.state = 1
@@ -414,7 +414,7 @@
user << "The welding tool must be on to complete this task."
return
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(!src || !WT.isOn()) return
user << "\blue You deconstruct the frame."
new /obj/item/stack/sheet/mineral/bananium( src.loc, 5 )
@@ -422,7 +422,7 @@
if(1)
if(istype(P, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
user << "\blue You unfasten the frame."
src.anchored = 0
src.state = 0
@@ -458,7 +458,7 @@
if(istype(P, /obj/item/stack/cable_coil))
if(P:amount >= 5)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(P)
P:amount -= 5
if(!P:amount) qdel(P)
@@ -477,7 +477,7 @@
if(istype(P, /obj/item/stack/sheet/glass))
if(P:amount >= 2)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(P)
P:use(2)
user << "\blue You put in the glass panel."
diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm
index c7bd2c86388..0efc24b2ccb 100644
--- a/code/game/machinery/computer/computer.dm
+++ b/code/game/machinery/computer/computer.dm
@@ -107,7 +107,7 @@
/obj/machinery/computer/attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.circuit = M
diff --git a/code/game/machinery/computer/honkputer.dm b/code/game/machinery/computer/honkputer.dm
index abf8880b125..188b22e502d 100644
--- a/code/game/machinery/computer/honkputer.dm
+++ b/code/game/machinery/computer/honkputer.dm
@@ -96,7 +96,7 @@
/obj/machinery/computer/HONKputer/attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
var/obj/structure/computerframe/HONKputer/A = new /obj/structure/computerframe/HONKputer( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.circuit = M
diff --git a/code/game/machinery/computer/prisonshuttle.dm b/code/game/machinery/computer/prisonshuttle.dm
index 0857b599d78..5aa3bff2fb2 100644
--- a/code/game/machinery/computer/prisonshuttle.dm
+++ b/code/game/machinery/computer/prisonshuttle.dm
@@ -36,7 +36,7 @@ var/prison_shuttle_timeleft = 0
attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/prison_shuttle/M = new /obj/item/weapon/circuitboard/prison_shuttle( A )
for (var/obj/C in src)
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index 67839fe6fff..a3802a72af6 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -62,7 +62,7 @@
if(C.amount >= 5)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "You start to add cables to the frame."
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(C.amount >= 5 && state == 1)
C.use(5)
user << "You add cables to the frame."
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index c28edd89e55..9e92135c72c 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -456,7 +456,7 @@
visible_message("[user] starts putting [G:affecting:name] into \the [src].", 3)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = G:affecting))
if(!M || !G || !G:affecting) return
M.loc = src
@@ -547,7 +547,7 @@
else
visible_message("[user] starts putting [L] into the cryo pod.", 3)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = L))
if(!L) return
L.loc = src
@@ -635,7 +635,7 @@
visible_message("[usr] starts climbing into \the [src].", 3)
- if(do_after(usr, 20))
+ if(do_after(usr, 20, target = usr))
if(!usr || !usr.client)
return
diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm
index 47333ed7ec4..a179a6e14ce 100644
--- a/code/game/machinery/deployable.dm
+++ b/code/game/machinery/deployable.dm
@@ -69,7 +69,7 @@ for reference:
if (istype(W, /obj/item/stack/sheet/wood))
if (src.health < src.maxhealth)
visible_message("\red [user] begins to repair the [src]!")
- if(do_after(user,20))
+ if(do_after(user,20, target = src))
src.health = src.maxhealth
W:use(1)
visible_message("\red [user] repairs the [src]!")
diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm
index 215cc8c1968..304e38118db 100644
--- a/code/game/machinery/door_control.dm
+++ b/code/game/machinery/door_control.dm
@@ -148,7 +148,7 @@
if(istype(W, /obj/item/weapon/wrench))
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, 30))
+ if(do_after(user, 30, target = src))
user << "You detach \the [src] from the wall."
new/obj/item/mounted/frame/driver_button(get_turf(src))
qdel(src)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index abc14227433..ee3653d8623 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -789,7 +789,7 @@ About the new airlock wires panel:
if( beingcrowbarred && src.p_open && (operating == -1 || (density && welded && operating != 1 && !src.arePowerSystemsOn() && !src.locked)) )
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.")
- if(do_after(user,40))
+ if(do_after(user,40, target = src))
user << "\blue You removed the airlock electronics!"
var/obj/structure/door_assembly/da = new assembly_type(src.loc)
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index a8c2491ab04..88000858646 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -280,7 +280,7 @@
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] removes the electronics from the [src.name].", \
"You start to remove electronics from the [src.name].")
- if(do_after(user,40))
+ if(do_after(user,40, target = src))
if(src.p_open && !src.density && !src.operating && src.loc)
var/obj/structure/windoor_assembly/WA = new /obj/structure/windoor_assembly(src.loc)
switch(base_state)
diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm
index 00f14939a92..987739b1a5f 100644
--- a/code/game/machinery/kitchen/gibber.dm
+++ b/code/game/machinery/kitchen/gibber.dm
@@ -256,7 +256,7 @@
user.visible_message("[user] starts to put [victim] into the gibber!")
src.add_fingerprint(user)
- if(do_after(user, 30) && user.Adjacent(src) && victim.Adjacent(user) && !occupant)
+ if(do_after(user, 30, target = victim) && user.Adjacent(src) && victim.Adjacent(user) && !occupant)
user.visible_message("[user] stuffs [victim] into the gibber!")
diff --git a/code/game/machinery/kitchen/kitchen_machine.dm b/code/game/machinery/kitchen/kitchen_machine.dm
index 34092be1636..2bef05d57a9 100644
--- a/code/game/machinery/kitchen/kitchen_machine.dm
+++ b/code/game/machinery/kitchen/kitchen_machine.dm
@@ -83,7 +83,7 @@
"[user] starts to fix part of \the [src].", \
"You start to fix part of \the [src]." \
)
- if (do_after(user,20))
+ if (do_after(user,20, target = src))
user.visible_message( \
"[user] fixes part of \the [src].", \
"You have fixed part of \the [src]." \
@@ -94,7 +94,7 @@
"[user] starts to fix part of \the [src].", \
"You start to fix part of \the [src]." \
)
- if (do_after(user,20))
+ if (do_after(user,20, target = src))
user.visible_message( \
"[user] fixes \the [src].", \
"You have fixed \the [src]." \
@@ -112,7 +112,7 @@
"[user] starts to clean \the [src].", \
"You start to clean \the [src]." \
)
- if (do_after(user,20))
+ if (do_after(user,20, target = src))
user.visible_message( \
"[user] has cleaned \the [src].", \
"You have cleaned \the [src]." \
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index 23d726a2980..ca86c4ba839 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -410,7 +410,7 @@ Class Procs:
if(istype(W))
user << "Now [anchored ? "un" : ""]securing [name]."
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, time))
+ if(do_after(user, time, target = src))
user << "You've [anchored ? "un" : ""]secured [name]."
anchored = !anchored
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm
index 205b9a08243..121b8118de0 100644
--- a/code/game/machinery/mass_driver.dm
+++ b/code/game/machinery/mass_driver.dm
@@ -23,7 +23,7 @@
if(istype(W, /obj/item/weapon/screwdriver))
user << "You begin to unscrew the bolts off the [src]..."
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 30))
+ if(do_after(user, 30, target = src))
var/obj/machinery/mass_driver_frame/F = new(get_turf(src))
F.dir = src.dir
F.anchored = 1
@@ -108,7 +108,7 @@
return 1
playsound(get_turf(src), 'sound/items/Welder.ogg', 50, 1)
user << "You begin to cut the frame apart..."
- if(do_after(user, 30) && (build == 0))
+ if(do_after(user, 30, target = src) && (build == 0))
user << "You detach the plasteel sheets from each others."
new /obj/item/stack/sheet/plasteel(get_turf(src),3)
qdel(src)
@@ -116,7 +116,7 @@
if(istype(W, /obj/item/weapon/wrench))
user << "You begin to anchor \the [src] on the floor."
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, 10) && (build == 0))
+ if(do_after(user, 10, target = src) && (build == 0))
user << "You anchor \the [src]!"
anchored = 1
build++
@@ -126,7 +126,7 @@
if(istype(W, /obj/item/weapon/wrench))
user << "You begin to de-anchor \the [src] from the floor."
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, 10) && (build == 1))
+ if(do_after(user, 10, target = src) && (build == 1))
build--
update_icon()
anchored = 0
@@ -139,7 +139,7 @@
return 1
playsound(get_turf(src), 'sound/items/Welder.ogg', 50, 1)
user << "You begin to weld \the [src] to the floor..."
- if(do_after(user, 40) && (build == 1))
+ if(do_after(user, 40, target = src) && (build == 1))
user << "You welded \the [src] to the floor."
build++
update_icon()
@@ -152,7 +152,7 @@
return 1
playsound(get_turf(src), 'sound/items/Welder.ogg', 50, 1)
user << "You begin to unweld \the [src] to the floor..."
- if(do_after(user, 40) && (build == 2))
+ if(do_after(user, 40, target = src) && (build == 2))
user << "You unwelded \the [src] to the floor."
build--
update_icon()
@@ -160,7 +160,7 @@
var/obj/item/stack/cable_coil/C=W
user << "You start adding cables to \the [src]..."
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 20) && (C.amount >= 3) && (build == 2))
+ if(do_after(user, 20, target = src) && (C.amount >= 3) && (build == 2))
C.use(3)
user << "You've added cables to \the [src]."
build++
@@ -168,7 +168,7 @@
if(3) // Wired
if(istype(W, /obj/item/weapon/wirecutters))
user << "You begin to remove the wiring from \the [src]."
- if(do_after(user, 10) && (build == 3))
+ if(do_after(user, 10, target = src) && (build == 3))
new /obj/item/stack/cable_coil(loc,3)
playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 50, 1)
user << "You've removed the cables from \the [src]."
@@ -179,7 +179,7 @@
var/obj/item/stack/rods/R=W
user << "You begin to complete \the [src]..."
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 20) && (R.amount >= 3) && (build == 3))
+ if(do_after(user, 20, target = src) && (R.amount >= 3) && (build == 3))
R.use(3)
user << "You've added the grille to \the [src]."
build++
@@ -189,7 +189,7 @@
if(istype(W, /obj/item/weapon/crowbar))
user << "You begin to pry off the grille from \the [src]..."
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
- if(do_after(user, 30) && (build == 4))
+ if(do_after(user, 30, target = src) && (build == 4))
new /obj/item/stack/rods(loc,2)
build--
update_icon()
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 43d4363a997..b37d4313f6b 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -712,7 +712,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if(istype(I, /obj/item/weapon/wrench))
user << "Now [anchored ? "un" : ""]securing [name]"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, 60))
+ if(do_after(user, 60, target = src))
new /obj/item/mounted/frame/newscaster_frame(loc)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
qdel(src)
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index 49bdac91c98..d8381ae1b42 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -107,7 +107,7 @@
if (unwrenched==0)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to unfasten \the [src] from the floor..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"\blue You have unfastened \the [src]. Now it can be pulled somewhere else.", \
@@ -120,7 +120,7 @@
else /*if (unwrenched==1)*/
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to fasten \the [src] to the floor..."
- if (do_after(user, 20))
+ if (do_after(user, 20, target = src))
user.visible_message( \
"[user] fastens \the [src].", \
"\blue You have fastened \the [src]. Now it can dispense pipes.", \
diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm
index 992c5f4b37d..b58c9a215d8 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -325,7 +325,7 @@ var/list/turret_icons
//If the turret is destroyed, you can remove it with a crowbar to
//try and salvage its components
user << "You begin prying the metal coverings off."
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(prob(70))
user << "You remove the turret and salvage some components."
if(installation)
@@ -357,7 +357,7 @@ var/list/turret_icons
)
wrenching = 1
- if(do_after(user, 50))
+ if(do_after(user, 50, target = src))
//This code handles moving the turret around. After all, it's a portable turret!
if(!anchored)
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
@@ -782,7 +782,7 @@ var/list/turret_icons
return
playsound(loc, pick('sound/items/Welder.ogg', 'sound/items/Welder2.ogg'), 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(!src || !WT.remove_fuel(5, user)) return
build_step = 1
user << "You remove the turret's interior metal armor."
@@ -863,7 +863,7 @@ var/list/turret_icons
user << "You need more fuel to complete this task."
playsound(loc, pick('sound/items/Welder.ogg', 'sound/items/Welder2.ogg'), 50, 1)
- if(do_after(user, 30))
+ if(do_after(user, 30, target = src))
if(!src || !WT.remove_fuel(5, user))
return
build_step = 8
diff --git a/code/game/machinery/programmable_unloader.dm b/code/game/machinery/programmable_unloader.dm
index 1076467f187..608279392b9 100644
--- a/code/game/machinery/programmable_unloader.dm
+++ b/code/game/machinery/programmable_unloader.dm
@@ -200,7 +200,7 @@
if (unwrenched==0)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to unfasten \the [src] from the floor..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"\blue You have unfastened \the [src]. Now it can be pulled somewhere else.", \
@@ -213,7 +213,7 @@
else /* unwrenched */
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to fasten \the [src] to the floor..."
- if (do_after(user, 20))
+ if (do_after(user, 20, target = src))
user.visible_message( \
"[user] fastens \the [src].", \
"\blue You fastened \the [src] into place.", \
@@ -238,7 +238,7 @@
if(istype(I,/obj/item/weapon/crowbar))
if(open)
user << "\blue You begin to pry out the [src]'s circuits."
- if(do_after(user,40))
+ if(do_after(user,40, target = src))
user << "\blue You remove the circuitboard."
circuit_removed = 1
use_power = 0
diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm
index 4cce116c3bc..8a995cc3aa2 100644
--- a/code/game/machinery/shieldgen.dm
+++ b/code/game/machinery/shieldgen.dm
@@ -246,8 +246,8 @@
else if(istype(W, /obj/item/stack/cable_coil) && malfunction && is_open)
var/obj/item/stack/cable_coil/coil = W
user << "\blue You begin to replace the wires."
- //if(do_after(user, min(60, round( ((maxhealth/health)*10)+(malfunction*10) ))) //Take longer to repair heavier damage
- if(do_after(user, 30))
+ //if(do_after(user, min(60, round( ((maxhealth/health)*10)+(malfunction*10) ), target = src)) //Take longer to repair heavier damage
+ if(do_after(user, 30, target = src))
if(!src || !coil) return
coil.use(1)
health = max_health
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index a841267faa3..f11be9ce9e8 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -451,7 +451,7 @@
usr << "It's too cluttered inside for you to fit in!"
return
visible_message("[usr] starts squeezing into the suit storage unit!", 3)
- if(do_after(usr, 10))
+ if(do_after(usr, 10, target = usr))
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
@@ -495,7 +495,7 @@
user << "The unit's storage area is too cluttered."
return
visible_message("[user] starts putting [G.affecting.name] into the Suit Storage Unit.", 3)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = G:affecting))
if(!G || !G.affecting) return //derpcheck
var/mob/M = G.affecting
if (M.client)
@@ -653,7 +653,7 @@
visible_message("[user] starts putting [G.affecting.name] into the suit cycler.", 3)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = G:affecting))
if(!G || !G.affecting) return
var/mob/M = G.affecting
if (M.client)
diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm
index 824dc21db76..23a01d13508 100644
--- a/code/game/machinery/telecomms/logbrowser.dm
+++ b/code/game/machinery/telecomms/logbrowser.dm
@@ -220,7 +220,7 @@
attackby(var/obj/item/weapon/D as obj, var/mob/user as mob, params)
if(istype(D, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm
index fd6f2fe97eb..35ae4601a9f 100644
--- a/code/game/machinery/telecomms/machine_interactions.dm
+++ b/code/game/machinery/telecomms/machine_interactions.dm
@@ -73,7 +73,7 @@
if(istype(P, /obj/item/weapon/crowbar))
user << "You begin prying out the circuit board other components..."
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
- if(do_after(user,60))
+ if(do_after(user,60, target = src))
user << "You finish prying out the components."
// Drop all the component stuff
diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm
index cdade74f121..f1eb5bcc883 100644
--- a/code/game/machinery/telecomms/telemonitor.dm
+++ b/code/game/machinery/telecomms/telemonitor.dm
@@ -129,7 +129,7 @@
attackby(var/obj/item/weapon/D as obj, var/mob/user as mob, params)
if(istype(D, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm
index be8b0b5c57f..440b6465f63 100644
--- a/code/game/machinery/telecomms/traffic_control.dm
+++ b/code/game/machinery/telecomms/traffic_control.dm
@@ -208,7 +208,7 @@
/obj/machinery/computer/telecomms/traffic/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob, params)
if(istype(D, /obj/item/weapon/screwdriver))
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 7a9894ef151..eb4375809c7 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -140,7 +140,7 @@
pr_give_air = new /datum/global_iterator/mecha_tank_give_air(list(src))
pr_internal_damage = new /datum/global_iterator/mecha_internal_damage(list(src),0)
-/obj/mecha/proc/do_after(delay as num)
+/obj/mecha/proc/mecha_do_after(delay as num)
sleep(delay)
if(src)
return 1
@@ -252,7 +252,7 @@
return
target.mech_melee_attack(src)
melee_can_hit = 0
- if(do_after(melee_cooldown))
+ if(mecha_do_after(melee_cooldown))
melee_can_hit = 1
return
@@ -335,7 +335,7 @@
if(!src.check_for_support())
src.pr_inertial_movement.start(list(src,direction))
src.log_message("Movement control lost. Inertial movement started.")
- if(do_after(step_in))
+ if(mecha_do_after(step_in))
can_move = 1
return 1
return 0
@@ -616,10 +616,10 @@
M.gib() //AIs are loaded into the mech computer itself. When the mech dies, so does the AI. Forever.
else
M.Move(loc)
-
+
if(prob(30))
explosion(get_turf(loc), 0, 0, 1, 3)
-
+
if(istype(src, /obj/mecha/working/ripley/))
var/obj/mecha/working/ripley/R = src
if(R.cargo)
@@ -666,7 +666,7 @@
pr_give_air = null
pr_internal_damage = null
spark_system = null
-
+
mechas_list -= src //global mech list
return ..()
@@ -962,7 +962,7 @@
return
AI.aiRestorePowerRoutine = 0//So the AI initially has power.
AI.control_disabled = 1
- AI.aiRadio.disabledAi = 1
+ AI.aiRadio.disabledAi = 1
AI.loc = card
occupant = null
AI.controlled_mech = null
@@ -1783,7 +1783,7 @@
src.occupant_message("Recalibrating coordination system.")
src.log_message("Recalibration of coordination system started.")
var/T = src.loc
- if(do_after(100))
+ if(mecha_do_after(100))
if(T == src.loc)
src.clearInternalDamage(MECHA_INT_CONTROL_LOST)
src.occupant_message("Recalibration successful.")
diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm
index f09f0deb84a..84b4c895e07 100644
--- a/code/game/objects/items/crayons.dm
+++ b/code/game/objects/items/crayons.dm
@@ -85,7 +85,7 @@
else if(graffiti.Find(drawtype))
temp = "graffiti"
user << "You start drawing a [temp] on the [target.name]."
- if(instant || do_after(user, 50))
+ if(instant || do_after(user, 50, target = target))
new /obj/effect/decal/cleanable/crayon(target,colour,drawtype,temp)
user << "You finish drawing [temp]."
if(uses)
diff --git a/code/game/objects/items/devices/pizza_bomb.dm b/code/game/objects/items/devices/pizza_bomb.dm
index f5e559eed91..ae2a698cb35 100644
--- a/code/game/objects/items/devices/pizza_bomb.dm
+++ b/code/game/objects/items/devices/pizza_bomb.dm
@@ -84,7 +84,7 @@
user << "You can't see the box well enough to cut the wires out."
return
user.visible_message("[user] starts removing the payload and wires from \the [src].")
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
playsound(src, 'sound/items/Wirecutter.ogg', 50, 1, 1)
user.unEquip(src)
user.visible_message("[user] removes the insides of \the [src]!")
diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm
index b6bb39bd32b..0255b0551bc 100644
--- a/code/game/objects/items/devices/radio/intercom.dm
+++ b/code/game/objects/items/devices/radio/intercom.dm
@@ -76,7 +76,7 @@
if(iswirecutter(W) && b_stat && wires.IsAllCut())
user << "You cut out the intercoms wiring and disconnect its electronics."
playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 50, 1)
- if(do_after(user, 10))
+ if(do_after(user, 10, target = src))
new /obj/item/stack/cable_coil(get_turf(src),5)
on = 0
b_stat = 1
@@ -88,7 +88,7 @@
if(2)
if(isscrewdriver(W))
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 10))
+ if(do_after(user, 10, target = src))
update_icon()
on = 1
b_stat = 0
@@ -105,7 +105,7 @@
if(coil.amount < 5)
user << "You need more cable for this!"
return
- if(do_after(user, 10))
+ if(do_after(user, 10, target = src))
coil.use(5)
user << "You wire \the [src]!"
buildstage = 2
@@ -113,7 +113,7 @@
if(iscrowbar(W))
user << "You begin removing the electronics..."
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 10))
+ if(do_after(user, 10, target = src))
new /obj/item/weapon/intercom_electronics(get_turf(src))
user << "The circuitboard pops out!"
buildstage = 0
@@ -121,7 +121,7 @@
if(0)
if(istype(W,/obj/item/weapon/intercom_electronics))
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 10))
+ if(do_after(user, 10, target = src))
qdel(W)
user << "You insert \the [W] into \the [src]!"
buildstage = 1
@@ -132,7 +132,7 @@
if(!WT.remove_fuel(3, user))
user << "You're out of welding fuel."
return 1
- if(do_after(user, 10))
+ if(do_after(user, 10, target = src))
user << "You cut the intercom frame from the wall!"
new /obj/item/mounted/frame/intercom(get_turf(src))
qdel(src)
diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm
index 200c0a0a855..a480944e9c3 100644
--- a/code/game/objects/items/devices/taperecorder.dm
+++ b/code/game/objects/items/devices/taperecorder.dm
@@ -292,7 +292,7 @@
/obj/item/device/tape/attackby(obj/item/I, mob/user)
if(ruined && istype(I, /obj/item/weapon/screwdriver))
user << "You start winding the tape back in."
- if(do_after(user, 120))
+ if(do_after(user, 120, target = src))
user << "You wound the tape back in!"
fix()
diff --git a/code/game/objects/items/mountable_frames/lights.dm b/code/game/objects/items/mountable_frames/lights.dm
index cb264794f6b..c1710d842a4 100644
--- a/code/game/objects/items/mountable_frames/lights.dm
+++ b/code/game/objects/items/mountable_frames/lights.dm
@@ -11,7 +11,7 @@
playsound(get_turf(src), 'sound/machines/click.ogg', 75, 1)
var/constrdir = user.dir
var/constrloc = get_turf(user)
- if (!do_after(user, 30))
+ if (!do_after(user, 30, target = src))
return
var/obj/machinery/light_construct/newlight
switch(fixture_type)
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index 3ac400eefeb..4f83c7bd2ac 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -246,7 +246,7 @@
user << "\red You can't apply a splint to the arm you're using!"
return
user.visible_message("\red [user] starts to apply \the [src] to their [limb].", "\red You start to apply \the [src] to your [limb].", "\red You hear something being wrapped.")
- if(do_after(user, 50))
+ if(do_after(user, 50, target = M))
if (M != user)
user.visible_message("\red [user] finishes applying \the [src] to [M]'s [limb].", "\red You finish applying \the [src] to [M]'s [limb].", "\red You hear something being wrapped.")
else
diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm
index a4d429a655e..139745b0cae 100644
--- a/code/game/objects/items/stacks/rods.dm
+++ b/code/game/objects/items/stacks/rods.dm
@@ -72,7 +72,7 @@
return
usr << "\blue Assembling grille..."
- if (!do_after(usr, 10))
+ if (!do_after(usr, 10, target = src))
return
var /obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc )
diff --git a/code/game/objects/items/stacks/sheets/leather.dm b/code/game/objects/items/stacks/sheets/leather.dm
index ab86e4994cf..bac1cdb68f5 100644
--- a/code/game/objects/items/stacks/sheets/leather.dm
+++ b/code/game/objects/items/stacks/sheets/leather.dm
@@ -98,7 +98,7 @@
//visible message on mobs is defined as visible_message(var/message, var/self_message, var/blind_message)
usr.visible_message("\blue \the [usr] starts cutting hair off \the [src]", "\blue You start cutting the hair off \the [src]", "You hear the sound of a knife rubbing against flesh")
- if(do_after(user,50))
+ if(do_after(user,50, target = src))
usr << "\blue You cut the hair from this [src.singular_name]"
//Try locating an exisitng stack on the tile and add to there if possible
for(var/obj/item/stack/sheet/hairlesshide/HS in usr.loc)
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 08e4b53d212..c41d26c9bc2 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -131,7 +131,7 @@
return
if (R.time)
usr << "\blue Building [R.title] ..."
- if (!do_after(usr, R.time))
+ if (!do_after(usr, R.time, target = src))
return
if (src.amount < R.req_amount*multiplier)
return
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 9b7888c9bcb..4e4c953ae94 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -1309,7 +1309,7 @@ obj/item/toy/cards/deck/syndicate/black
/obj/item/toy/minigibber/attackby(var/obj/O, var/mob/user, params)
if(istype(O,/obj/item/toy/character) && O.loc == user)
user << "You start feeding \the [O] \icon[O] into \the [src]'s mini-input."
- if(do_after(user,10))
+ if(do_after(user,10, target = src))
if(O.loc != user)
user << "\The [O] is too far away to feed into \the [src]!"
else
diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm
index 2d788e219a4..9ecfdf3a33e 100644
--- a/code/game/objects/items/weapons/RCD.dm
+++ b/code/game/objects/items/weapons/RCD.dm
@@ -34,12 +34,12 @@ RCD
spark_system.attach(src)
rcd_list += src
return
-
+
Destroy()
qdel(spark_system)
spark_system = null
rcd_list -= src
- return ..()
+ return ..()
attackby(obj/item/weapon/W, mob/user, params)
..()
@@ -105,7 +105,7 @@ RCD
if(checkResource(3, user))
user << "Building Wall ..."
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = A))
if(!useResource(3, user)) return 0
activate()
A:ChangeTurf(/turf/simulated/wall)
@@ -117,7 +117,7 @@ RCD
if(checkResource(10, user))
user << "Building Airlock..."
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
- if(do_after(user, 50))
+ if(do_after(user, 50, target = A))
if(!useResource(10, user)) return 0
activate()
var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock( A )
@@ -133,7 +133,7 @@ RCD
if(checkResource(5, user))
user << "Deconstructing Wall..."
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
- if(do_after(user, 40))
+ if(do_after(user, 40, target = A))
if(!useResource(5, user)) return 0
activate()
A:ChangeTurf(/turf/simulated/floor/plating)
@@ -144,7 +144,7 @@ RCD
if(checkResource(5, user))
user << "Deconstructing Floor..."
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
- if(do_after(user, 50))
+ if(do_after(user, 50, target = A))
if(!useResource(5, user)) return 0
activate()
A:ChangeTurf(/turf/space)
@@ -155,7 +155,7 @@ RCD
if(checkResource(20, user))
user << "Deconstructing Airlock..."
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
- if(do_after(user, 50))
+ if(do_after(user, 50, target = A))
if(!useResource(20, user)) return 0
activate()
qdel(A)
diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm
index 0cb3430fd07..d58fe73b587 100644
--- a/code/game/objects/items/weapons/clown_items.dm
+++ b/code/game/objects/items/weapons/clown_items.dm
@@ -61,12 +61,12 @@
user << "You need to take that [target.name] off before cleaning it."
else if(istype(target,/obj/effect/decal/cleanable))
user.visible_message("[user] begins to scrub \the [target.name] out with [src].")
- if(do_after(user, src.cleanspeed) && target)
+ if(do_after(user, src.cleanspeed, target = target) && target)
user << "You scrub \the [target.name] out."
qdel(target)
else
user.visible_message("[user] begins to clean \the [target.name] with [src].")
- if(do_after(user, src.cleanspeed))
+ if(do_after(user, src.cleanspeed, target = target))
user << "You clean \the [target.name]."
var/obj/effect/decal/cleanable/C = locate() in target
qdel(C)
diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm
index d26e8c5a408..6cd8134b617 100644
--- a/code/game/objects/items/weapons/cosmetics.dm
+++ b/code/game/objects/items/weapons/cosmetics.dm
@@ -59,7 +59,7 @@
else
user.visible_message("[user] begins to do [H]'s lips with \the [src].", \
"You begin to apply \the [src].")
- if(do_after(user, 20) && do_after(H, 20, 5, 0)) //user needs to keep their active hand, H does not.
+ if(do_after(user, 20, target = H) && do_after(H, 20, 5, 0)) //user needs to keep their active hand, H does not.
user.visible_message("[user] does [H]'s lips with \the [src].", \
"You apply \the [src].")
H.lip_style = "lipstick"
@@ -89,7 +89,7 @@
if(H == user) //shaving yourself
user.visible_message("[user] starts to shave their facial hair with \the [src].", \
"You take a moment shave your facial hair with \the [src].")
- if(do_after(user, 50))
+ if(do_after(user, 50, target = H))
user.visible_message("[user] shaves his facial hair clean with the [src].", \
"You finish shaving with the [src]. Fast and clean!")
H.f_style = "Shaved"
@@ -100,7 +100,7 @@
var/turf/H_loc = H.loc
user.visible_message("[user] tries to shave [H]'s facial hair with \the [src].", \
"You start shaving [H]'s facial hair.")
- if(do_after(user, 50))
+ if(do_after(user, 50, target = H))
if(user_loc == user.loc && H_loc == H.loc)
user.visible_message("[user] shaves off [H]'s facial hair with \the [src].", \
"You shave [H]'s facial hair clean off.")
@@ -117,7 +117,7 @@
if(H == user) //shaving yourself
user.visible_message("[user] starts to shave their head with \the [src].", \
"You start to shave your head with \the [src].")
- if(do_after(user, 50))
+ if(do_after(user, 50, target = H))
user.visible_message("[user] shaves his head with the [src].", \
"You finish shaving with the [src].")
H.h_style = "Skinhead"
@@ -128,7 +128,7 @@
var/turf/H_loc = H.loc
user.visible_message("[user] tries to shave [H]'s head with \the [src]!", \
"You start shaving [H]'s head.")
- if(do_after(user, 50))
+ if(do_after(user, 50, target = H))
if(user_loc == user.loc && H_loc == H.loc)
user.visible_message("[user] shaves [H]'s head bald with \the [src]!", \
"You shave [H]'s head bald.")
diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm
index 1cea34da688..22226dcdcea 100644
--- a/code/game/objects/items/weapons/defib.dm
+++ b/code/game/objects/items/weapons/defib.dm
@@ -340,7 +340,7 @@
user.visible_message("[user] begins to place [src] on [M.name]'s chest.", "You begin to place [src] on [M.name]'s chest.")
busy = 1
update_icon()
- if(do_after(user, 30)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
+ if(do_after(user, 30, target = M)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
user.visible_message("[user] places [src] on [M.name]'s chest.", "You place [src] on [M.name]'s chest.")
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
@@ -349,7 +349,7 @@
var/tloss = 3000 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
- if(do_after(user, 20)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
+ if(do_after(user, 20, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
for(var/obj/item/carried_item in H.contents)
if(istype(carried_item, /obj/item/clothing/suit/space))
if(!defib.combat)
@@ -459,7 +459,7 @@
user.visible_message("[user] begins to place [src] on [M.name]'s chest.", "You begin to place [src] on [M.name]'s chest.")
busy = 1
update_icon()
- if(do_after(user, 30)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
+ if(do_after(user, 30, target = M)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
user.visible_message("[user] places [src] on [M.name]'s chest.", "You place [src] on [M.name]'s chest.")
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
@@ -468,7 +468,7 @@
var/tloss = 3000 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
- if(do_after(user, 20)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
+ if(do_after(user, 20, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
if(H.stat == 2)
var/health = H.health
M.visible_message("[M]'s body convulses a bit.")
diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm
index 45ed9da7217..83b0b1e9cfc 100644
--- a/code/game/objects/items/weapons/explosives.dm
+++ b/code/game/objects/items/weapons/explosives.dm
@@ -72,7 +72,7 @@
return
user << "Planting explosives..."
- if(do_after(user, 50) && in_range(user, target))
+ if(do_after(user, 50, target = target) && in_range(user, target))
user.drop_item()
src.target = target
loc = null
diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm
index 4de580b70de..423ab379253 100644
--- a/code/game/objects/items/weapons/implants/implanter.dm
+++ b/code/game/objects/items/weapons/implants/implanter.dm
@@ -27,7 +27,7 @@
O.show_message("\red [user] is attemping to implant [M].", 1)
var/turf/T1 = get_turf(M)
- if (T1 && ((M == user) || do_after(user, 50)))
+ if (T1 && ((M == user) || do_after(user, 50, target = M)))
if(user && M && (get_turf(M) == T1) && src && src.imp)
for (var/mob/O in viewers(M, null))
O.show_message("\red [M] has been implanted by [user].", 1)
diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm
index acbe349fc8e..874f96271fe 100644
--- a/code/game/objects/items/weapons/mop.dm
+++ b/code/game/objects/items/weapons/mop.dm
@@ -44,7 +44,7 @@
if(istype(turf))
user.visible_message("[user] begins to clean \the [turf] with [src].")
- if(do_after(user, mopspeed))
+ if(do_after(user, mopspeed, target = src))
clean(turf)
user << "You have finished mopping!"
diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm
index b782dd12ba0..456a518f75e 100644
--- a/code/game/objects/items/weapons/storage/belt.dm
+++ b/code/game/objects/items/weapons/storage/belt.dm
@@ -454,7 +454,7 @@
user.visible_message("\red [user.name] is trying to strap a belt to [target.name]!")
- if(do_after(user, 50) && in_range(user, target))
+ if(do_after(user, 50, target = target) && in_range(user, target))
user.drop_item()
target = target
loc = null
diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm
index aa35239fc9a..ddbed058f6d 100644
--- a/code/game/objects/items/weapons/storage/secure.dm
+++ b/code/game/objects/items/weapons/storage/secure.dm
@@ -38,14 +38,14 @@
emag_act(user, W)
if (istype(W, /obj/item/weapon/screwdriver))
- if (do_after(user, 20))
+ if (do_after(user, 20, target = src))
src.open =! src.open
user.show_message(text("\blue You [] the service panel.", (src.open ? "open" : "close")))
return
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
user.show_message(text("\red Now attempting to reset internal memory, please hold."), 1)
src.l_hacking = 1
- if (do_after(usr, 100))
+ if (do_after(usr, 100, target = src))
if (prob(40))
src.l_setshort = 1
src.l_set = 0
diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm
index ef365fdd059..f353b40c785 100644
--- a/code/game/objects/structures.dm
+++ b/code/game/objects/structures.dm
@@ -72,7 +72,7 @@
usr.visible_message("[user] starts climbing onto \the [src]!")
climber = user
- if(!do_after(user,50))
+ if(!do_after(user,50, target = src))
climber = null
return
diff --git a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm
index ca6c64318f2..4bed706a6e8 100644
--- a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm
+++ b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm
@@ -25,7 +25,7 @@
if(istype(O, /obj/item/device/multitool))
user << "\red Resetting circuitry..."
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
src.locked = 0
user << " You disable the locking modules."
update_icon()
@@ -89,7 +89,7 @@
src.locked = 1
user << "\blue You re-enable the locking modules."
playsound(user, 'sound/machines/lockenable.ogg', 50, 1)
- if(do_after(user,20))
+ if(do_after(user,20, target = src))
src.locked = 1
user << " You re-enable the locking modules."
return
diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm
index 698592e9c5f..4203daca65d 100644
--- a/code/game/objects/structures/door_assembly.dm
+++ b/code/game/objects/structures/door_assembly.dm
@@ -155,7 +155,7 @@ obj/structure/door_assembly
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
if(istext(glass))
user.visible_message("[user] welds the [glass] plating off the airlock assembly.", "You start to weld the [glass] plating off the airlock assembly.")
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(!src || !WT.isOn()) return
user << "\blue You welded the [glass] plating off!"
var/M = text2path("/obj/item/stack/sheet/mineral/[glass]")
@@ -163,14 +163,14 @@ obj/structure/door_assembly
glass = 0
else if(glass == 1)
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly.")
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(!src || !WT.isOn()) return
user << "\blue You welded the glass panel out!"
new /obj/item/stack/sheet/rglass(src.loc)
glass = 0
else if(!anchored)
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(!src || !WT.isOn()) return
user << "\blue You dissasembled the airlock assembly!"
new /obj/item/stack/sheet/metal(src.loc, 4)
@@ -186,7 +186,7 @@ obj/structure/door_assembly
else
user.visible_message("[user] secures the airlock assembly to the floor.", "You start to secure the airlock assembly to the floor.")
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(!src) return
user << "\blue You [anchored? "un" : ""]secured the airlock assembly!"
anchored = !anchored
@@ -194,7 +194,7 @@ obj/structure/door_assembly
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored )
var/obj/item/stack/cable_coil/coil = W
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(!src) return
coil.use(1)
src.state = 1
@@ -204,7 +204,7 @@ obj/structure/door_assembly
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(!src) return
user << "\blue You cut the airlock wires.!"
new/obj/item/stack/cable_coil(src.loc, 1)
@@ -216,7 +216,7 @@ obj/structure/door_assembly
user.drop_item()
W.loc = src
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(!src) return
user << "\blue You installed the airlock electronics!"
src.state = 2
@@ -229,7 +229,7 @@ obj/structure/door_assembly
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to install electronics into the airlock assembly.")
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(!src) return
user << "\blue You removed the airlock electronics!"
src.state = 1
@@ -249,7 +249,7 @@ obj/structure/door_assembly
if(istype(S, /obj/item/stack/sheet/rglass))
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
user << "\blue You installed reinforced glass windows into the airlock assembly!"
S.use(1)
glass = 1
@@ -258,7 +258,7 @@ obj/structure/door_assembly
if(S.amount>=2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
user << "\blue You installed [M] plating into the airlock assembly!"
S.use(2)
glass = "[M]"
@@ -267,7 +267,7 @@ obj/structure/door_assembly
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user << "\blue Now finishing the airlock."
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(!src) return
user << "\blue You finish the airlock!"
var/path
diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm
index ef70953075d..ddd121434d2 100644
--- a/code/game/objects/structures/girders.dm
+++ b/code/game/objects/structures/girders.dm
@@ -11,7 +11,7 @@
if(anchored && !istype(src,/obj/structure/girder/displaced))
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user << "\blue Now disassembling the girder"
- if(do_after(user,40))
+ if(do_after(user,40, target = src))
if(!src) return
user << "\blue You dissasembled the girder!"
new /obj/item/stack/sheet/metal(get_turf(src))
@@ -26,7 +26,7 @@
else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
user << "\blue Now slicing apart the girder"
- if(do_after(user,30))
+ if(do_after(user,30, target = src))
if(!src) return
user << "\blue You slice apart the girder!"
new /obj/item/stack/sheet/metal(get_turf(src))
@@ -40,7 +40,7 @@
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 && istype(src,/obj/structure/girder/reinforced))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user << "\blue Now unsecuring support struts"
- if(do_after(user,40))
+ if(do_after(user,40, target = src))
if(!src) return
user << "\blue You unsecured the support struts!"
state = 1
@@ -48,7 +48,7 @@
else if(istype(W, /obj/item/weapon/wirecutters) && istype(src,/obj/structure/girder/reinforced) && state == 1)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
user << "\blue Now removing support struts"
- if(do_after(user,40))
+ if(do_after(user,40, target = src))
if(!src) return
user << "\blue You removed the support struts!"
new/obj/structure/girder( src.loc )
@@ -57,7 +57,7 @@
else if(istype(W, /obj/item/weapon/crowbar) && state == 0 && anchored )
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user << "\blue Now dislodging the girder"
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(!src) return
user << "\blue You dislodged the girder!"
new/obj/structure/girder/displaced( src.loc )
@@ -78,7 +78,7 @@
else
if(S.amount < 2) return ..()
user << "\blue Now adding plating..."
- if (do_after(user,40))
+ if (do_after(user,40, target = src))
if(!src || !S || S.amount < 2) return
S.use(2)
user << "\blue You added the plating!"
@@ -100,7 +100,7 @@
if (src.icon_state == "reinforced") //I cant believe someone would actually write this line of code...
if(S.amount < 1) return ..()
user << "\blue Now finalising reinforced wall."
- if(do_after(user, 50))
+ if(do_after(user, 50, target = src))
if(!src || !S || S.amount < 1) return
S.use(1)
user << "\blue Wall fully reinforced!"
@@ -113,7 +113,7 @@
else
if(S.amount < 1) return ..()
user << "\blue Now reinforcing girders"
- if (do_after(user,60))
+ if (do_after(user,60, target = src))
if(!src || !S || S.amount < 1) return
S.use(1)
user << "\blue Girders reinforced!"
@@ -133,7 +133,7 @@
else
if(S.amount < 2) return ..()
user << "\blue Now adding plating..."
- if (do_after(user,40))
+ if (do_after(user,40, target = src))
if(!src || !S || S.amount < 2) return
S.use(2)
user << "\blue You added the plating!"
@@ -214,13 +214,13 @@
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user << "\blue Now disassembling the girder"
- if(do_after(user,40))
+ if(do_after(user,40, target = src))
user << "\blue You dissasembled the girder!"
dismantle()
else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
user << "\blue Now slicing apart the girder"
- if(do_after(user,30))
+ if(do_after(user,30, target = src))
user << "\blue You slice apart the girder!"
dismantle()
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 7845a7a5217..1d7dc74320d 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -174,7 +174,7 @@
user << "There is already a window facing this way there."
return
user << "You start placing the window."
- if(do_after(user,20))
+ if(do_after(user,20, target = src))
if(!src) return //Grille destroyed while waiting
for(var/obj/structure/window/WINDOW in loc)
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm
index cc7e50bf888..5676b8e0c6d 100644
--- a/code/game/objects/structures/janicart.dm
+++ b/code/game/objects/structures/janicart.dm
@@ -484,7 +484,7 @@
user << "[src] can't hold any more signs."
else if(istype(I, /obj/item/weapon/crowbar))
user.visible_message("[user] begins to empty the contents of [src].")
- if(do_after(user, 30))
+ if(do_after(user, 30, target = src))
usr << "You empty the contents of [src]'s bucket onto the floor."
reagents.reaction(src.loc)
src.reagents.clear_reagents()
diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm
index 3a792030371..78f67ab8847 100644
--- a/code/game/objects/structures/mineral_doors.dm
+++ b/code/game/objects/structures/mineral_doors.dm
@@ -112,7 +112,7 @@
if(istype(W,/obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/digTool = W
user << "You start digging the [name]."
- if(do_after(user,digTool.digspeed*hardness) && src)
+ if(do_after(user,digTool.digspeed*hardness, target = src) && src)
user << "You finished digging."
Dismantle()
else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc?
diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm
index b1a47c474d9..3d3adcf9339 100644
--- a/code/game/objects/structures/musician.dm
+++ b/code/game/objects/structures/musician.dm
@@ -337,7 +337,7 @@
if (!anchored && !isinspace())
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << " You begin to tighten \the [src] to the floor..."
- if (do_after(user, 20))
+ if (do_after(user, 20, target = src))
user.visible_message( \
"[user] tightens \the [src]'s casters.", \
" You have tightened \the [src]'s casters. Now it can be played again.", \
@@ -346,7 +346,7 @@
else if(anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << " You begin to loosen \the [src]'s casters..."
- if (do_after(user, 40))
+ if (do_after(user, 40, target = src))
user.visible_message( \
"[user] loosens \the [src]'s casters.", \
" You have loosened \the [src]. Now it can be pulled somewhere else.", \
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index a0255e1344f..ae88b3b38f8 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -420,7 +420,7 @@
if (istype(W, /obj/item/weapon/wrench))
user << "\blue Now disassembling table"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user,50))
+ if(do_after(user,50, target = src))
destroy()
return
@@ -696,7 +696,7 @@
var/obj/item/stack/sheet/glass/G = I
if(G.amount >= 2)
user << "You start to add the glass to \the [src]."
- if(do_after(user, 10))
+ if(do_after(user, 10, target = src))
G.use(2)
user << "You add the glass to \the [src]."
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
@@ -709,7 +709,7 @@
if(iswrench(I))
user << "You start to deconstruct \the [src]."
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
- if(do_after(user, 10))
+ if(do_after(user, 10, target = src))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 75, 1)
user << "You dismantle \the [src]."
new /obj/item/stack/sheet/metal(loc)
@@ -816,14 +816,14 @@
if(src.status == 2)
user << "\blue Now weakening the reinforced table"
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
- if (do_after(user, 50))
+ if (do_after(user, 50, target = src))
if(!src || !WT.isOn()) return
user << "\blue Table weakened"
src.status = 1
else
user << "\blue Now strengthening the reinforced table"
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
- if (do_after(user, 50))
+ if (do_after(user, 50, target = src))
if(!src || !WT.isOn()) return
user << "\blue Table strengthened"
src.status = 2
diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm
index 303f5bd041b..e3ddc913bb1 100644
--- a/code/game/objects/structures/transit_tubes/station.dm
+++ b/code/game/objects/structures/transit_tubes/station.dm
@@ -53,7 +53,7 @@
else if(icon_state == "open")
if(pod.contents.len && user.loc != pod)
user.visible_message("[user] starts emptying [pod]'s contents onto the floor!")
- if(do_after(user, 40)) //So it doesn't default to close_animation() on fail
+ if(do_after(user, 40, target = src)) //So it doesn't default to close_animation() on fail
if(pod.loc == loc)
for(var/atom/movable/AM in pod)
AM.loc = get_turf(user)
@@ -73,7 +73,7 @@
var/mob/GM = G.affecting
for(var/obj/structure/transit_tube_pod/pod in loc)
pod.visible_message("[user] starts putting [GM] into the [pod]!")
- if(do_after(user, 60) && GM && G && G.affecting == GM)
+ if(do_after(user, 60, target = GM) && GM && G && G.affecting == GM)
GM.Weaken(5)
src.Bumped(GM)
qdel(G)
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 89b2b5f23c7..44ee7ef52db 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -46,7 +46,7 @@
if(istype(I, /obj/item/weapon/crowbar))
user << "You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]."
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
- if(do_after(user, 30))
+ if(do_after(user, 30, target = src))
user.visible_message("[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!", "You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!", "You hear grinding porcelain.")
cistern = !cistern
update_icon()
@@ -65,7 +65,7 @@
if(open && !swirlie)
user.visible_message("[user] starts to give [GM.name] a swirlie!", "You start to give [GM.name] a swirlie!")
swirlie = GM
- if(do_after(user, 30, 5, 0))
+ if(do_after(user, 30, 5, 0, target = src))
user.visible_message("[user] gives [GM.name] a swirlie!", "You give [GM.name] a swirlie!", "You hear a toilet flushing.")
if(!GM.internal)
GM.adjustOxyLoss(5)
@@ -156,7 +156,7 @@
user << "The water temperature seems to be [watertemp]."
if(istype(I, /obj/item/weapon/wrench))
user << "You begin to adjust the temperature valve with the [I]."
- if(do_after(user, 50))
+ if(do_after(user, 50, target = src))
switch(watertemp)
if("normal")
watertemp = "freezing"
diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm
index f732e1d78d2..e8ad95cbe3b 100644
--- a/code/game/objects/structures/windoor_assembly.dm
+++ b/code/game/objects/structures/windoor_assembly.dm
@@ -80,7 +80,7 @@ obj/structure/windoor_assembly/Destroy()
user.visible_message("[user] dissassembles the windoor assembly.", "You start to dissassemble the windoor assembly.")
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(!src || !WT.isOn()) return
user << "You dissasembled the windoor assembly!"
var/obj/item/stack/sheet/rglass/RG = new (get_turf(src), 5)
@@ -101,7 +101,7 @@ obj/structure/windoor_assembly/Destroy()
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor.")
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(!src || src.anchored)
return
for(var/obj/machinery/door/window/WD in src.loc)
@@ -120,7 +120,7 @@ obj/structure/windoor_assembly/Destroy()
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("[user] unsecures the windoor assembly to the floor.", "You start to unsecure the windoor assembly to the floor.")
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(!src || !src.anchored)
return
user << "You've unsecured the windoor assembly!"
@@ -138,7 +138,7 @@ obj/structure/windoor_assembly/Destroy()
return
user << "You start to reinforce the windoor with plasteel."
- if(do_after(user,40))
+ if(do_after(user,40, target = src))
if(!src || secure)
return
@@ -154,7 +154,7 @@ obj/structure/windoor_assembly/Destroy()
else if(istype(W, /obj/item/stack/cable_coil) && anchored)
user.visible_message("[user] wires the windoor assembly.", "You start to wire the windoor assembly.")
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(!src || !src.anchored || src.state != "01")
return
var/obj/item/stack/cable_coil/CC = W
@@ -175,7 +175,7 @@ obj/structure/windoor_assembly/Destroy()
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(!src || src.state != "02")
return
@@ -194,7 +194,7 @@ obj/structure/windoor_assembly/Destroy()
user.drop_item()
W.loc = src
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(!src || src.electronics)
W.loc = src.loc
return
@@ -212,7 +212,7 @@ obj/structure/windoor_assembly/Destroy()
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly.")
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(!src || !electronics)
return
user << "You've removed the airlock electronics!"
@@ -242,7 +242,7 @@ obj/structure/windoor_assembly/Destroy()
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame.")
- if(do_after(user, 40))
+ if(do_after(user, 40, target = src))
if(src.loc && src.electronics)
diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm
index 2e673d8ad7a..60fd31ae47c 100644
--- a/code/game/turfs/simulated/floor.dm
+++ b/code/game/turfs/simulated/floor.dm
@@ -517,7 +517,7 @@ var/list/wood_icons = list("wood","wood-broken")
if (is_plating())
if (R.amount >= 2)
user << "\blue Reinforcing the floor..."
- if(do_after(user, 30) && R && R.amount >= 2 && is_plating())
+ if(do_after(user, 30, target = src) && R && R.amount >= 2 && is_plating())
ChangeTurf(/turf/simulated/floor/engine)
playsound(src, 'sound/items/Deconstruct.ogg', 80, 1)
R.use(2)
diff --git a/code/game/turfs/simulated/floor_types.dm b/code/game/turfs/simulated/floor_types.dm
index 08d1458f726..03d158b8501 100644
--- a/code/game/turfs/simulated/floor_types.dm
+++ b/code/game/turfs/simulated/floor_types.dm
@@ -74,7 +74,7 @@
if(istype(C, /obj/item/weapon/wrench))
user << "You begin removing rods..."
playsound(src, 'sound/items/Ratchet.ogg', 80, 1)
- if(do_after(user, 30))
+ if(do_after(user, 30, target = src))
new /obj/item/stack/rods(src, 2)
ChangeTurf(/turf/simulated/floor/plating)
return
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index 91e7c4599b2..88539a52284 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -292,12 +292,12 @@
return
//get the user's location
- if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such
+ if(!istype(user.loc, /turf)) return //can't do this stuff whilst inside objects and such
if(rotting)
if(istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
- if( WT.remove_fuel(0,user) )
+ if(WT.remove_fuel(0,user))
user << "You burn away the fungi with \the [WT]."
playsound(src, 'sound/items/Welder.ogg', 10, 1)
for(var/obj/effect/E in src) if(E.name == "Wallrot")
@@ -310,10 +310,10 @@
return
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
- if( thermite )
- if( istype(W, /obj/item/weapon/weldingtool) )
+ if(thermite)
+ if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
- if( WT.remove_fuel(0,user) )
+ if(WT.remove_fuel(0,user))
thermitemelt(user)
return
@@ -321,7 +321,7 @@
thermitemelt(user)
return
- else if( istype(W, /obj/item/weapon/melee/energy/blade) )
+ else if(istype(W, /obj/item/weapon/melee/energy/blade))
var/obj/item/weapon/melee/energy/blade/EB = W
EB.spark_system.start()
@@ -332,10 +332,8 @@
thermitemelt(user)
return
- var/turf/T = user.loc //get user's location for delay checks
-
//DECONSTRUCTION
- if( istype(W, /obj/item/weapon/weldingtool) )
+ if(istype(W, /obj/item/weapon/weldingtool))
var/response = "Dismantle"
if(damage)
@@ -347,7 +345,7 @@
if(response == "Repair")
user << "You start repairing the damage to [src]."
playsound(src, 'sound/items/Welder.ogg', 100, 1)
- if(do_after(user, max(5, damage / 5)) && WT && WT.isOn())
+ if(do_after(user, max(5, damage / 5), target = src) && WT && WT.isOn())
user << "You finish repairing the damage to [src]."
take_damage(-damage)
@@ -355,71 +353,51 @@
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 )
+ if(do_after(user, 100, target = src) && WT && WT.isOn())
user << "You remove the outer plating."
dismantle_wall()
- return
+
+ else
+ user << "You stop slicing through [src]."
+ return
+
else
user << "You need more welding fuel to complete this task."
return
- else if( istype(W, /obj/item/weapon/gun/energy/plasmacutter) )
+ else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
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( user.loc == T && user.get_active_hand() == W )
+ if(do_after(user, mineral == "diamond" ? 120 : 60, target = src))
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)
- return
+ visible_message("[user] slices apart \the [src]!","You hear metal being sliced apart.")
//DRILLING
else if (istype(W, /obj/item/weapon/pickaxe/drill/diamonddrill))
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( user.loc == T && user.get_active_hand() == W )
+ if(do_after(user, mineral == "diamond" ? 120 : 60, target = src))
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)
- return
+ visible_message("[user] drills through \the [src]!","You hear the grinding of metal.")
- else if( istype(W, /obj/item/weapon/melee/energy/blade) )
+ else if(istype(W, /obj/item/weapon/melee/energy/blade))
var/obj/item/weapon/melee/energy/blade/EB = W
EB.spark_system.start()
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( user.loc == T && user.get_active_hand() == W )
+ if(do_after(user, mineral == "diamond" ? 140 : 70, target = src))
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)
- return
+ visible_message("[user] slices apart \the [src]!","You hear metal being sliced apart and sparks flying.")
else if(istype(W,/obj/item/mounted)) //if we place it, we don't want to have a silly message
return
@@ -440,7 +418,7 @@
"[user] starts drilling a hole in \the [src].", \
"\blue You start drilling a hole in \the [src].", \
"You hear ratchet.")
- if (do_after(user, 80))
+ if (do_after(user, 80, target = src))
user.visible_message( \
"[user] drills a hole in \the [src] and pushes \a [P] into the void", \
"\blue You have finished drilling in \the [src] and push the [P] into the void.", \
diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm
index cf094395019..04ef0fdf73f 100644
--- a/code/game/turfs/simulated/walls_reinforced.dm
+++ b/code/game/turfs/simulated/walls_reinforced.dm
@@ -90,7 +90,7 @@
if(WT.remove_fuel(0,user))
user << "You start repairing the damage to [src]."
playsound(src, 'sound/items/Welder.ogg', 100, 1)
- if(do_after(user, max(5, damage / 5)) && WT && WT.isOn())
+ if(do_after(user, max(5, damage / 5), target = src) && WT && WT.isOn())
user << "You finish repairing the damage to [src]."
take_damage(-damage)
return
@@ -98,16 +98,15 @@
user << "You need more welding fuel to complete this task."
return
- var/turf/T = user.loc //get user's location for delay checks
//DECONSTRUCTION
switch(d_state)
if(0)
- if (istype(W, /obj/item/weapon/wirecutters))
+ if(istype(W, /obj/item/weapon/wirecutters))
playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
- src.d_state = 1
- src.icon_state = "r_wall-1"
- new /obj/item/stack/rods( src )
+ d_state = 1
+ icon_state = "r_wall-1"
+ new /obj/item/stack/rods(src)
user << "You cut the outer grille."
return
@@ -116,136 +115,104 @@
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( d_state == 1 && user.loc == T && user.get_active_hand() == W )
- src.d_state = 2
- src.icon_state = "r_wall-2"
+ if(do_after(user, 40, target = src) && d_state == 1)
+ d_state = 2
+ icon_state = "r_wall-2"
user << "You remove the support lines."
return
//REPAIRING (replacing the outer grille for cosmetic damage)
- else if( istype(W, /obj/item/stack/rods) )
+ else if(istype(W, /obj/item/stack/rods))
var/obj/item/stack/O = W
- src.d_state = 0
- src.icon_state = "r_wall"
- relativewall_neighbours() //call smoothwall stuff
- user << "You replace the outer grille."
- if (O.amount > 1)
- O.amount--
+ if(O.use(1))
+ d_state = 0
+ icon_state = "r_wall"
+ relativewall_neighbours() //call smoothwall stuff
+ user << "You replace the outer grille."
else
- qdel(O)
- return
+ user << "You don't have enough rods for that!"
if(2)
- if( istype(W, /obj/item/weapon/weldingtool) )
+ if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
- if( WT.remove_fuel(0,user) )
-
+ if(WT.remove_fuel(0,user))
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( d_state == 2 && user.loc == T && user.get_active_hand() == WT )
- src.d_state = 3
- src.icon_state = "r_wall-3"
+ if(do_after(user, 60, target = src) && d_state == 2)
+ d_state = 3
+ icon_state = "r_wall-3"
user << "You press firmly on the cover, dislodging it."
+
else
user << "You need more welding fuel to complete this task."
return
- if( istype(W, /obj/item/weapon/gun/energy/plasmacutter) )
-
+ if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
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( d_state == 2 && user.loc == T && user.get_active_hand() == W )
- src.d_state = 3
- src.icon_state = "r_wall-3"
+ if(do_after(user, 40, target = src) && d_state == 2)
+ d_state = 3
+ icon_state = "r_wall-3"
user << "You press firmly on the cover, dislodging it."
return
if(3)
- if (istype(W, /obj/item/weapon/crowbar))
-
+ if(istype(W, /obj/item/weapon/crowbar))
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( d_state == 3 && user.loc == T && user.get_active_hand() == W )
- src.d_state = 4
- src.icon_state = "r_wall-4"
+ if(do_after(user, 100, target = src) && d_state == 3)
+ d_state = 4
+ icon_state = "r_wall-4"
user << "You pry off the cover."
return
if(4)
- if (istype(W, /obj/item/weapon/wrench))
-
+ if(istype(W, /obj/item/weapon/wrench))
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( d_state == 4 && user.loc == T && user.get_active_hand() == W )
- src.d_state = 5
- src.icon_state = "r_wall-5"
+ if(do_after(user, 40, target = src) && d_state == 4)
+ d_state = 5
+ icon_state = "r_wall-5"
user << "You remove the bolts anchoring the support rods."
return
if(5)
- if( istype(W, /obj/item/weapon/weldingtool) )
+ if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
- if( WT.remove_fuel(0,user) )
-
+ if(WT.remove_fuel(0,user))
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( 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 )
+ if(do_after(user, 100, target = src) && d_state == 5)
+ d_state = 6
+ 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."
else
user << "You need more welding fuel to complete this task."
return
- if( istype(W, /obj/item/weapon/gun/energy/plasmacutter) )
-
+ if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
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( d_state == 5 && user.loc == T && user.get_active_hand() == W )
- src.d_state = 6
- src.icon_state = "r_wall-6"
+ if(do_after(user, 70, target = src) && d_state == 5)
+ d_state = 6
+ 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)
- if( istype(W, /obj/item/weapon/crowbar) )
-
+ if(istype(W, /obj/item/weapon/crowbar))
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( user.loc == T && user.get_active_hand() == W )
+ if(do_after(user, 100, target = src) && d_state == 6)
user << "You pry off the outer sheath."
dismantle_wall()
return
@@ -253,35 +220,29 @@
//vv OK, we weren't performing a valid deconstruction step or igniting thermite,let's check the other possibilities vv
//DRILLING
- if (istype(W, /obj/item/weapon/pickaxe/drill/diamonddrill))
-
+ if(istype(W, /obj/item/weapon/pickaxe/drill/diamonddrill))
user << "You begin to drill though the wall."
- sleep(200)
- if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
-
- if( user.loc == T && user.get_active_hand() == W )
+ if(do_after(user, 200, target = src))
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 )
+ else if(istype(W, /obj/item/stack/sheet/metal) && d_state)
var/obj/item/stack/sheet/metal/MS = W
user << "You begin patching-up the wall with \a [MS]."
- sleep( max(20*d_state,100) ) //time taken to repair is proportional to the damage! (max 10 seconds)
- if( !istype(src, /turf/simulated/wall/r_wall) || !user || !MS || !T ) return
+ if(do_after(user, max(20 * d_state, 100), target = src) && d_state)
+ if(!MS.use(1))
+ user << "You don't have enough metal for that!"
+ return
- if( user.loc == T && user.get_active_hand() == MS && d_state )
- src.d_state = 0
- src.icon_state = "r_wall"
+ d_state = 0
+ icon_state = "r_wall"
relativewall_neighbours() //call smoothwall stuff
user << "You repair the last of the damage."
- if (MS.amount > 1)
- MS.amount--
- else
- qdel(MS)
+
//APC
else if(istype(W,/obj/item/mounted))
@@ -303,7 +264,7 @@
"[user] starts drilling a hole in \the [src].", \
"\blue You start drilling a hole in \the [src]. This is going to take a while.", \
"You hear ratchet.")
- if (do_after(user, 160))
+ if (do_after(user, 160, target = src))
user.visible_message( \
"[user] drills a hole in \the [src] and pushes \a [P] into the void", \
"\blue You have finished drilling in \the [src] and push the [P] into the void.", \
diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm
index 40295b5e4bb..48f3623897a 100644
--- a/code/game/turfs/space/space.dm
+++ b/code/game/turfs/space/space.dm
@@ -60,7 +60,7 @@
user << "\red You don't have enough rods to do that."
return
user << "\blue You begin to build a catwalk."
- if(do_after(user,30))
+ if(do_after(user,30, target = src))
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
user << "\blue You build a catwalk!"
R.use(2)
diff --git a/code/game/vehicles/spacepods/spacepod.dm b/code/game/vehicles/spacepods/spacepod.dm
index c173a85e305..52f9c67b1c9 100644
--- a/code/game/vehicles/spacepods/spacepod.dm
+++ b/code/game/vehicles/spacepods/spacepod.dm
@@ -269,7 +269,7 @@
if (health < initial(health))
user << "\blue You start welding the spacepod..."
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(!src || !WT.remove_fuel(3, user)) return
repair_damage(10)
user << "\blue You mend some [pick("dents","bumps","damage")] with \the [WT]"
diff --git a/code/modules/DetectiveWork/footprints_and_rag.dm b/code/modules/DetectiveWork/footprints_and_rag.dm
index c8cac2da273..64ade59adee 100644
--- a/code/modules/DetectiveWork/footprints_and_rag.dm
+++ b/code/modules/DetectiveWork/footprints_and_rag.dm
@@ -39,7 +39,7 @@
if(!proximity) return
if(istype(A) && src in user)
user.visible_message("[user] starts to wipe down [A] with [src]!")
- if(do_after(user,30))
+ if(do_after(user,30, target = A))
user.visible_message("[user] finishes wiping off the [A]!")
A.clean_blood()
return
diff --git a/code/modules/computer3/buildandrepair.dm b/code/modules/computer3/buildandrepair.dm
index 7a75e590f92..8c8a31bf9bc 100644
--- a/code/modules/computer3/buildandrepair.dm
+++ b/code/modules/computer3/buildandrepair.dm
@@ -81,7 +81,7 @@
if(0)
if(istype(P, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
user << "\blue You wrench the frame into place."
src.anchored = 1
src.state = 1
@@ -91,7 +91,7 @@
user << "The welding tool must be on to complete this task."
return
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(!src || !WT.isOn()) return
user << "\blue You deconstruct the frame."
new /obj/item/stack/sheet/metal( src.loc, 5 )
@@ -99,7 +99,7 @@
if(1)
if(istype(P, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
user << "\blue You unfasten the frame."
src.anchored = 0
src.state = 0
@@ -136,7 +136,7 @@
if(istype(P, /obj/item/weapon/crowbar))
if(battery)
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
- if(do_after(10))
+ if(do_after(10, target = src))
battery.loc = loc
user << "\blue You remove [battery]."
battery = null
@@ -146,7 +146,7 @@
if(istype(P, /obj/item/weapon/stock_parts/cell))
if(!battery)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(5))
+ if(do_after(5, target = src))
battery = P
P.loc = src
user << "\blue You insert [battery]."
@@ -157,7 +157,7 @@
if(istype(P, /obj/item/stack/cable_coil))
if(P:amount >= 5)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(P)
P:amount -= 5
if(!P:amount) qdel(P)
@@ -182,7 +182,7 @@
if(istype(P, /obj/item/stack/sheet/glass))
if(P:amount >= 2)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(P)
P:use(2)
user << "\blue You put in the glass panel."
@@ -227,7 +227,7 @@
if(I)
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
- if(do_after(usr,25))
+ if(do_after(usr,25, target = src))
if(I==hdd)
components -= hdd
hdd.loc = loc
diff --git a/code/modules/computer3/computers/prisonshuttle.dm b/code/modules/computer3/computers/prisonshuttle.dm
index e091c4dd5f5..e45f32337e2 100644
--- a/code/modules/computer3/computers/prisonshuttle.dm
+++ b/code/modules/computer3/computers/prisonshuttle.dm
@@ -37,7 +37,7 @@ var/prison_shuttle_timeleft = 0
attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/tool/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/part/board/circuit/prison_shuttle/M = new /obj/item/part/board/circuit/prison_shuttle( A )
for (var/obj/C in src)
diff --git a/code/modules/crafting/table.dm b/code/modules/crafting/table.dm
index bf3847b5658..b43c4cb89ce 100644
--- a/code/modules/crafting/table.dm
+++ b/code/modules/crafting/table.dm
@@ -72,7 +72,7 @@
/obj/structure/table/proc/construct_item(mob/user, datum/table_recipe/R)
check_table()
if(check_contents(R) && check_tools(user, R))
- if(do_after(user, R.time))
+ if(do_after(user, R.time, target = src))
if(!check_contents(R) || !check_tools(user, R))
return 0
var/atom/movable/I = new R.result (loc)
diff --git a/code/modules/fish/fishtank.dm b/code/modules/fish/fishtank.dm
index 977af3a2fed..f27a5c320a7 100644
--- a/code/modules/fish/fishtank.dm
+++ b/code/modules/fish/fishtank.dm
@@ -659,7 +659,7 @@
if(water_level == 0)
usr << "Now disassembling [src]."
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user,50))
+ if(do_after(user,50, target = src))
destroy(1)
else
usr << "[src] must be empty before you disassemble it!"
diff --git a/code/modules/hydroponics/trays/tray_apiary.dm b/code/modules/hydroponics/trays/tray_apiary.dm
index 4ac67613a6c..f21ac2765df 100644
--- a/code/modules/hydroponics/trays/tray_apiary.dm
+++ b/code/modules/hydroponics/trays/tray_apiary.dm
@@ -69,7 +69,7 @@
angry_swarm(user)
else
user << "\blue You begin to dislodge the dead apiary from the tray."
- if(do_after(user, 50))
+ if(do_after(user, 50, target = src))
new hydrotray_type(src.loc)
new /obj/item/apiary(src.loc)
user << "\red You dislodge the apiary from the tray."
@@ -90,7 +90,7 @@
angry_swarm(user)
else
user << "\blue You begin to harvest the honey."
- if(do_after(user,50))
+ if(do_after(user,50, target = src))
G.reagents.add_reagent("honey",harvestable_honey)
harvestable_honey = 0
user << "\blue You successfully harvest the honey."
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index a741c792642..0b4375964eb 100644
--- a/code/modules/library/lib_items.dm
+++ b/code/modules/library/lib_items.dm
@@ -34,7 +34,7 @@
else if(istype(O, /obj/item/weapon/wrench))
user << "\blue Now disassembling bookcase"
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user,50))
+ if(do_after(user,50, target = src))
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
@@ -251,7 +251,7 @@
else if(istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/wirecutters))
if(carved) return
user << "You begin to carve out [title]."
- if(do_after(user, 30))
+ if(do_after(user, 30, target = src))
user << "You carve out the pages from [title]! You didn't want to read it anyway."
carved = 1
return
diff --git a/code/modules/media/jukebox.dm b/code/modules/media/jukebox.dm
index 6e5554a52dd..a6b27dcd1e7 100644
--- a/code/modules/media/jukebox.dm
+++ b/code/modules/media/jukebox.dm
@@ -169,7 +169,7 @@ var/global/loopModeNames=list(
else if(istype(W,/obj/item/weapon/wrench))
var/un = !anchored ? "" : "un"
user.visible_message("\blue [user.name] begins [un]locking \the [src.name]'s casters.","\blue You begin [un]locking \the [src.name]'s casters.")
- if(do_after(user,30))
+ if(do_after(user,30, target = src))
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
anchored = !anchored
user.visible_message("\blue [user.name] [un]locks \the [src.name]'s casters.","\red You [un]lock \the [src.name]'s casters.")
diff --git a/code/modules/mining/coins.dm b/code/modules/mining/coins.dm
index b427aabdd49..9516af4268f 100644
--- a/code/modules/mining/coins.dm
+++ b/code/modules/mining/coins.dm
@@ -133,7 +133,7 @@
flick("coin_[cmineral]_flip", src)
icon_state = "coin_[cmineral]_[coinflip]"
playsound(user.loc, 'sound/items/coinflip.ogg', 50, 1)
- if(do_after(user, 15))
+ if(do_after(user, 15, target = src))
user.visible_message("[user] has flipped [src]. It lands on [coinflip].", \
"You flip [src]. It lands on [coinflip].", \
"You hear the clattering of loose change.")
\ No newline at end of file
diff --git a/code/modules/mining/drilling/scanner.dm b/code/modules/mining/drilling/scanner.dm
index 56cff6e71e8..91ff1e12f8e 100644
--- a/code/modules/mining/drilling/scanner.dm
+++ b/code/modules/mining/drilling/scanner.dm
@@ -12,7 +12,7 @@
user << "You begin sweeping \the [src] about, scanning for metal deposits."
- if(!do_after(user,50)) return
+ if(!do_after(user,50, target = src)) return
if(!user || !src) return
diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm
index 96f23aaea0f..a6dff1764df 100644
--- a/code/modules/mining/mine_turfs.dm
+++ b/code/modules/mining/mine_turfs.dm
@@ -362,7 +362,7 @@ var/global/list/rockTurfEdgeCache
user << "You start picking..."
P.playDigSound()
- if(do_after(user, P.digspeed))
+ if(do_after(user, P.digspeed, target = src))
if(istype(src, /turf/simulated/mineral)) //sanity check against turf being deleted during digspeed delay
user << "You finish cutting into the rock."
P.update_icon()
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index b23874b399f..7853a307053 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -333,7 +333,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
visible_message("[src] begins climbing into the ventilation system...", \
"You begin climbing into the ventilation system...")
- if(!do_after(src, 45))
+ if(!do_after(src, 45, target = src))
return
if(!client)
diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm
index 5624355b161..1054a639819 100644
--- a/code/modules/mob/living/carbon/human/emote.dm
+++ b/code/modules/mob/living/carbon/human/emote.dm
@@ -787,7 +787,7 @@
if(SUPER_FART in mutations)
visible_message("\red [name] hunches down and grits their teeth!")
- if(do_after(usr,30))
+ if(do_after(usr,30, target = src))
visible_message("\red [name] unleashes a [pick("tremendous","gigantic","colossal")] fart!","You hear a [pick("tremendous","gigantic","colossal")] fart.")
//playsound(L.loc, 'superfart.ogg', 50, 0)
for(var/mob/living/V in range(location,aoe_range))
diff --git a/code/modules/mob/living/carbon/human/species/apollo.dm b/code/modules/mob/living/carbon/human/species/apollo.dm
index ccfc7d429ef..8289d8bc267 100644
--- a/code/modules/mob/living/carbon/human/species/apollo.dm
+++ b/code/modules/mob/living/carbon/human/species/apollo.dm
@@ -59,7 +59,7 @@
M.visible_message("[M] begins to violently pull off [H]'s antennae.")
H << "[M] grips your antennae and starts violently pulling!"
- do_after(H, 250)
+ do_after(H, 250, target = src)
if(p_loc == M.loc && p_loc_m == H.loc)
qdel(H.internal_organs_by_name["antennae"])
H.remove_language("Wryn Hivemind")
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 416dc1626cd..f6113e61694 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -610,7 +610,7 @@
O.show_message("\red [usr] attempts to unbuckle themself!", 1)
spawn(0)
- if(do_after(usr, 1200))
+ if(do_after(usr, 1200, target = C))
if(!C.buckled)
return
for(var/mob/O in viewers(C))
@@ -648,7 +648,7 @@
spawn(0)
- if(do_after(usr,(breakout_time*60*10))) //minutes * 60seconds * 10deciseconds
+ if(do_after(usr,(breakout_time*60*10), target = C)) //minutes * 60seconds * 10deciseconds
if(!C || !L || L.stat != CONSCIOUS || L.loc != C || C.opened) //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
return
@@ -743,7 +743,7 @@
for(var/mob/O in viewers(CM))
O.show_message( "\red [usr] attempts to [hulklien ? "break" : "remove"] \the [HC]!", 1)
spawn(0)
- if(do_after(CM, breakouttime))
+ if(do_after(CM, breakouttime, target = src))
if(!CM.handcuffed || CM.buckled)
return // time leniency for lag which also might make this whole thing pointless but the server
@@ -786,7 +786,7 @@
O.show_message( "\red [usr] attempts to [hulklien ? "break" : "remove"] \the [HC]!", 1)
spawn(0)
- if(do_after(CM, breakouttime))
+ if(do_after(CM, breakouttime, target = src))
if(!CM.legcuffed || CM.buckled)
return // time leniency for lag which also might make this whole thing pointless but the server
for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink
@@ -937,4 +937,3 @@
/mob/living/proc/spawn_dust()
new /obj/effect/decal/cleanable/ash(loc)
-
\ No newline at end of file
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index d64dc143ec2..9bf17bc3ab1 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -900,7 +900,7 @@ var/list/ai_verbs_default = list(
if(istype(W, /obj/item/weapon/wrench))
if(anchored)
user.visible_message("\blue \The [user] starts to unbolt \the [src] from the plating...")
- if(!do_after(user,40))
+ if(!do_after(user,40, target = src))
user.visible_message("\blue \The [user] decides not to unbolt \the [src].")
return
user.visible_message("\blue \The [user] finishes unfastening \the [src]!")
@@ -908,7 +908,7 @@ var/list/ai_verbs_default = list(
return
else
user.visible_message("\blue \The [user] starts to bolt \the [src] to the plating...")
- if(!do_after(user,40))
+ if(!do_after(user,40, target = src))
user.visible_message("\blue \The [user] decides not to bolt \the [src].")
return
user.visible_message("\blue \The [user] finishes fastening down \the [src]!")
diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm
index f1367d3fc19..25904e27723 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm
@@ -192,7 +192,7 @@
D << "\red You begin decompiling the other drone."
- if(!do_after(D,50))
+ if(!do_after(D,50, target = target))
D << "\red You need to remain still while decompiling such a large object."
return
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 15168dfbfc6..1cb015c6c05 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -616,7 +616,7 @@ var/list/robot_verbs_default = list(
return
user << "You jam the crowbar into the robot and begin levering [mmi]."
- if(do_after(user,3 SECONDS))
+ if(do_after(user,3 SECONDS, target = src))
user << "You damage some parts of the chassis, but eventually manage to rip out [mmi]!"
var/obj/item/robot_parts/robot_suit/C = new/obj/item/robot_parts/robot_suit(loc)
C.l_leg = new/obj/item/robot_parts/l_leg(C)
diff --git a/code/modules/mob/living/simple_animal/borer.dm b/code/modules/mob/living/simple_animal/borer.dm
index 8ab01f44ab1..68216b57736 100644
--- a/code/modules/mob/living/simple_animal/borer.dm
+++ b/code/modules/mob/living/simple_animal/borer.dm
@@ -406,7 +406,7 @@ mob/living/simple_animal/borer/proc/detatch()
src << "You slither up [M] and begin probing at their ear canal..."
- if(!do_after(src,50))
+ if(!do_after(src,50, target = M))
src << "As [M] moves away, you are dislodged and fall to the ground."
return
diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm
index df86545879b..85599a57af8 100644
--- a/code/modules/mob/living/simple_animal/friendly/corgi.dm
+++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm
@@ -105,7 +105,7 @@
user << "You can't shave this corgi, it's already been shaved!"
return
user.visible_message("[user] starts to shave [src] using \the [O].", "You start to shave [src] using \the [O]...")
- if(do_after(user, 50))
+ if(do_after(user, 50, target = src))
user.visible_message("[user] shaves [src]'s hair using \the [O].")
playsound(loc, 'sound/items/Welder2.ogg', 20, 1)
shaved = 1
diff --git a/code/modules/mob/living/simple_animal/hostile/spaceworms.dm b/code/modules/mob/living/simple_animal/hostile/spaceworms.dm
index f5e98b2a2ec..4736c407839 100644
--- a/code/modules/mob/living/simple_animal/hostile/spaceworms.dm
+++ b/code/modules/mob/living/simple_animal/hostile/spaceworms.dm
@@ -165,7 +165,7 @@
src.visible_message("\the [src] starts to eat \the [noms]!","You start to eat \the [noms]. (This will take about [ufnomDelay] seconds.)","You hear gnashing.") //inform everyone what the fucking worm is doing.
- if(do_after(src, nomDelay,5,0))
+ if(do_after(src, nomDelay,5,0, target = noms))
if(noms && Adjacent(noms) && (currentlyEating == noms))//It exists, were next to it, and it's still the thing were eating
if(W)
W.ChangeTurf(/turf/simulated/floor/plating)
diff --git a/code/modules/mob/living/simple_animal/revenant/revenant.dm b/code/modules/mob/living/simple_animal/revenant/revenant.dm
index 1d83cbcc9d8..fa8cce35004 100644
--- a/code/modules/mob/living/simple_animal/revenant/revenant.dm
+++ b/code/modules/mob/living/simple_animal/revenant/revenant.dm
@@ -56,8 +56,8 @@
return 1 //Immune to the effects of explosions.
/mob/living/simple_animal/revenant/blob_act()
- return 1 //blah blah blobs aren't in tune with the spirit world, or something.
-
+ return 1 //blah blah blobs aren't in tune with the spirit world, or something.
+
/mob/living/simple_animal/revenant/ClickOn(var/atom/A, var/params) //Copypaste from ghost code - revenants can't interact with the world directly.
if(client.buildmode)
build_click(src, client.buildmode, params, A)
@@ -82,7 +82,7 @@
A.attack_ghost(src)
if(ishuman(A) && in_range(src, A))
Harvest(A)
-
+
/mob/living/simple_animal/revenant/proc/Harvest(mob/living/carbon/human/target)
if(!castcheck(0))
return
@@ -100,7 +100,7 @@
draining = 1
essence_drained = 2
src << "You search for the soul of [target]."
- if(do_after(src, 10, 3, 0, target)) //did they get deleted in that second?
+ if(do_after(src, 10, 3, 0, target = target)) //did they get deleted in that second?
if(target.ckey)
src << "Their soul burns with intelligence."
essence_drained += 2
@@ -109,7 +109,7 @@
essence_drained += 2
else
src << "Their soul is weak and faltering."
- if(do_after(src, 20, 6, 0, target)) //did they get deleted NOW?
+ if(do_after(src, 20, 6, 0, target = target)) //did they get deleted NOW?
switch(essence_drained)
if(1 to 2)
src << "[target] will not yield much essence. Still, every bit counts."
@@ -117,7 +117,7 @@
src << "[target] will yield an average amount of essence."
if(5 to INFINITY)
src << "Such a feast! [target] will yield much essence to you."
- if(do_after(src, 30, 9, 0, target)) //how about now
+ if(do_after(src, 30, 9, 0, target = target)) //how about now
if(!target.stat)
src << "They are now powerful enough to fight off your draining."
target << "You feel something tugging across your body before subsiding."
@@ -221,7 +221,7 @@
inhibited = 1
spawn(30)
inhibited = 0
-
+
..()
/mob/living/simple_animal/revenant/proc/castcheck(essence_cost)
@@ -278,8 +278,8 @@
src << "You cannot move!"
spawn(time)
notransform = 0
- src << "You can move again!"
-
+ src << "You can move again!"
+
/datum/objective/revenant
var/targetAmount = 100
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 9cd4cb9b25f..eaee09c58d5 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -1229,7 +1229,7 @@ mob/proc/yank_out_object()
else
U << "You attempt to get a good grip on [selection] in [S]'s body."
- if(!do_after(U, 80))
+ if(!do_after(U, 80, target = S))
return
if(!selection || !S || !U)
return
diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm
index dc13bd8c00a..bdd2ce25169 100644
--- a/code/modules/mob/mob_grab.dm
+++ b/code/modules/mob/mob_grab.dm
@@ -391,7 +391,7 @@
var/mob/living/carbon/attacker = user
user.visible_message("[user] is attempting to devour \the [affecting]!")
- if(!do_mob(user, affecting) || !do_after(user, checktime(user, affecting))) return
+ if(!do_mob(user, affecting) || !do_after(user, checktime(user, affecting, target = affecting))) return
user.visible_message("[user] devours \the [affecting]!")
diff --git a/code/modules/ninja/suit/suit_attackby.dm b/code/modules/ninja/suit/suit_attackby.dm
index 7d785b44229..760f6648452 100644
--- a/code/modules/ninja/suit/suit_attackby.dm
+++ b/code/modules/ninja/suit/suit_attackby.dm
@@ -6,7 +6,7 @@
var/obj/item/weapon/stock_parts/cell/CELL
if(CELL.maxcharge > cell.maxcharge && suitGloves)
U << "Higher maximum capacity detected.\nUpgrading..."
- if (n_gloves && n_gloves.candrain && do_after(U,s_delay))
+ if (n_gloves && n_gloves.candrain && do_after(U,s_delay, target = U))
U.drop_item()
CELL.loc = src
CELL.charge = min(CELL.charge+cell.charge, CELL.maxcharge)
diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm
index 9f1d25d8278..26ef2e5e7b4 100644
--- a/code/modules/paperwork/paper.dm
+++ b/code/modules/paperwork/paper.dm
@@ -59,11 +59,11 @@
usr << "You have to go closer if you want to read it."
return
-/obj/item/weapon/paper/proc/show_content(var/mob/user, var/forceshow = 0, var/forcestars = 0, var/infolinks = 0, var/view = 1)
+/obj/item/weapon/paper/proc/show_content(var/mob/user, var/forceshow = 0, var/forcestars = 0, var/infolinks = 0, var/view = 1)
set src in oview(1)
if(user.client) // Send the paper images to the client
var/datum/asset/simple/S = new/datum/asset/simple/paper()
- send_asset_list(user.client, S.assets)
+ send_asset_list(user.client, S.assets)
var/data
if((!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon)) && !forceshow) || forcestars)
@@ -134,7 +134,7 @@
else
user.visible_message("[user] begins to wipe [H]'s face clean with \the [src].", \
"You begin to wipe off [H]'s face.")
- if(do_after(user, 10) && do_after(H, 10, 5, 0)) //user needs to keep their active hand, H does not.
+ if(do_after(user, 10, target = H) && do_after(H, 10, 5, 0)) //user needs to keep their active hand, H does not.
user.visible_message("[user] wipes [H]'s face clean with \the [src].", \
"You wipe off [H]'s face.")
H.lip_style = null
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 32379a466d6..c399fe4e969 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -409,7 +409,7 @@
return
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
user << "You are trying to remove the power control board..." //lpeters - fixed grammar issues
- if(do_after(user, 50))
+ if(do_after(user, 50, target = src))
if (has_electronics==1)
has_electronics = 0
if ((stat & BROKEN) || malfhack)
@@ -502,7 +502,7 @@
return
user << "You start adding cables to the APC frame..."
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if (C.amount >= 10 && !terminal && opened && has_electronics != 2)
var/turf/T = get_turf(src)
var/obj/structure/cable/N = T.get_cable_node()
@@ -523,7 +523,7 @@
return
user << "You begin to cut the cables..."
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 50))
+ if(do_after(user, 50, target = src))
if(terminal && opened && has_electronics!=2)
if (prob(50) && electrocute_mob(usr, terminal.powernet, terminal))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
@@ -536,7 +536,7 @@
else if (istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics==0 && !((stat & BROKEN) || malfhack))
user << "You trying to insert the power control board into the frame..."
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 10))
+ if(do_after(user, 10, target = src))
if(has_electronics==0)
has_electronics = 1
user << "You place the power control board inside the frame."
@@ -553,7 +553,7 @@
"You start welding the APC frame...", \
"You hear welding.")
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
- if(do_after(user, 50))
+ if(do_after(user, 50, target = src))
if(!src || !WT.remove_fuel(3, user)) return
if (emagged || malfhack || (stat & BROKEN) || opened==2)
new /obj/item/stack/sheet/metal(loc)
@@ -583,7 +583,7 @@
user << "You cannot repair this APC until you remove the electronics still inside."
return
user << "You begin to replace the damaged APC frame..."
- if(do_after(user, 50))
+ if(do_after(user, 50, target = src))
user.visible_message(\
"[user.name] has replaced the damaged APC frame with new one.",\
"You replace the damaged APC frame with new one.")
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index d8769065d32..46242540f8f 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -47,7 +47,7 @@
if (src.stage == 1)
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
usr << "You begin deconstructing [src]."
- if (!do_after(usr, 30))
+ if (!do_after(usr, 30, target = src))
return
new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
user.visible_message("[user.name] deconstructs [src].", \
diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm
index dcd22dc2157..93936f3b06f 100644
--- a/code/modules/power/singularity/emitter.dm
+++ b/code/modules/power/singularity/emitter.dm
@@ -258,7 +258,7 @@
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
"You start to weld the [src] to the floor.", \
"You hear welding")
- if (do_after(user,20))
+ if (do_after(user,20, target = src))
if(!src || !WT.isOn()) return
state = 2
user << "You weld the [src] to the floor."
@@ -271,7 +271,7 @@
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
"You start to cut the [src] free from the floor.", \
"You hear welding")
- if (do_after(user,20))
+ if (do_after(user,20, target = src))
if(!src || !WT.isOn()) return
state = 1
user << "You cut the [src] free from the floor."
diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm
index 7b8547eb880..4adc108f82c 100644
--- a/code/modules/power/singularity/field_generator.dm
+++ b/code/modules/power/singularity/field_generator.dm
@@ -130,7 +130,7 @@ field_generator power level display
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
"You start to weld the [src] to the floor.", \
"You hear welding")
- if (do_after(user,20))
+ if (do_after(user,20, target = src))
if(!src || !WT.isOn()) return
state = 2
user << "You weld the field generator to the floor."
@@ -142,7 +142,7 @@ field_generator power level display
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
"You start to cut the [src] free from the floor.", \
"You hear welding")
- if (do_after(user,20))
+ if (do_after(user,20, target = src))
if(!src || !WT.isOn()) return
state = 1
user << "You cut the [src] free from the floor."
diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm
index f133dff4a16..14012f080d9 100644
--- a/code/modules/power/smes.dm
+++ b/code/modules/power/smes.dm
@@ -182,7 +182,7 @@
user << "You begin to dismantle the power terminal..."
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 50))
+ if(do_after(user, 50, target = src))
if (prob(50) && electrocute_mob(usr, terminal.powernet, terminal)) //animate the electrocution if uncautious and unlucky
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
@@ -321,7 +321,7 @@
user << "You must remove the floor plating first."
return 1
user << "You start adding cable to the [src]."
- if(do_after(user, 50))
+ if(do_after(user, 50, target = src))
var/turf/T = get_turf(user)
var/obj/structure/cable/N = T.get_cable_node() //get the connecting node cable, if there's one
if (prob(50) && electrocute_mob(user, N, N)) //animate the electrocution if uncautious and unlucky
diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm
index 0fcd59cc009..3f714c911c2 100644
--- a/code/modules/power/solar.dm
+++ b/code/modules/power/solar.dm
@@ -60,7 +60,7 @@
if(istype(W, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user.visible_message("[user] begins to take the glass off the solar panel.", "You begin to take the glass off the solar panel...")
- if(do_after(user, 50))
+ if(do_after(user, 50, target = src))
var/obj/item/solar_assembly/S = locate() in src
if(S)
S.loc = src.loc
@@ -416,7 +416,7 @@
/obj/machinery/power/solar_control/attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if (src.stat & BROKEN)
user << "The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
diff --git a/code/modules/power/switch.dm b/code/modules/power/switch.dm
index 8c846cdb76b..da5d80d95d2 100644
--- a/code/modules/power/switch.dm
+++ b/code/modules/power/switch.dm
@@ -42,12 +42,12 @@
busy = 1
for(var/mob/O in viewers(user))
- O.show_message(text("\red [user] started pulling the [src]."), 1)
+ O.show_message(text("\red [user] starts pulling the [src]."), 1)
- if(do_after(user, 50))
+ if(do_after(user, 50, target = src))
set_state(!on)
for(var/mob/O in viewers(user))
- O.show_message(text("\red [user] flipped the [src] into the [on ? "on": "off"] position."), 1)
+ O.show_message(text("\red [user] flips the [src] into the [on ? "on": "off"] position."), 1)
busy = 0
/obj/structure/powerswitch/proc/set_state(var/state)
diff --git a/code/modules/power/tracker.dm b/code/modules/power/tracker.dm
index 8b4f5d32aee..190c971f7cf 100644
--- a/code/modules/power/tracker.dm
+++ b/code/modules/power/tracker.dm
@@ -63,7 +63,7 @@
if(istype(W, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user.visible_message("[user] begins to take the glass off the solar tracker.")
- if(do_after(user, 50))
+ if(do_after(user, 50, target = src))
var/obj/item/solar_assembly/S = locate() in src
if(S)
S.loc = src.loc
diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm
index 583de36d245..4df92ceb7bd 100644
--- a/code/modules/power/turbine.dm
+++ b/code/modules/power/turbine.dm
@@ -224,7 +224,7 @@
/obj/machinery/computer/turbine_computer/attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index f236200337b..44d510b42f5 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -264,7 +264,7 @@
if (M == user && user.zone_sel.selecting == "mouth" && !mouthshoot)
mouthshoot = 1
M.visible_message("\red [user] sticks their gun in their mouth, ready to pull the trigger...")
- if(!do_after(user, 40))
+ if(!do_after(user, 40, target = M))
M.visible_message("\blue [user] decided life was worth living")
mouthshoot = 0
return
diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm
index 262dec36b5c..68007f5bd26 100644
--- a/code/modules/projectiles/guns/projectile/revolver.dm
+++ b/code/modules/projectiles/guns/projectile/revolver.dm
@@ -124,7 +124,7 @@
afterattack(user, user) //you know the drill
user.visible_message("[src] goes off!", "[src] goes off in your face!")
return
- if(do_after(user, 30))
+ if(do_after(user, 30, target = src))
if(magazine.ammo_count())
user << "You can't modify it!"
return
@@ -141,7 +141,7 @@
afterattack(user, user) //and again
user.visible_message("[src] goes off!", "[src] goes off in your face!")
return
- if(do_after(user, 30))
+ if(do_after(user, 30, target = src))
if(magazine.ammo_count())
user << "You can't modify it!"
return
diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm
index 9713918b549..744c7758029 100644
--- a/code/modules/projectiles/guns/projectile/shotgun.dm
+++ b/code/modules/projectiles/guns/projectile/shotgun.dm
@@ -224,7 +224,7 @@
sawn_state = SAWN_SAWING
- if(do_after(user, 30))
+ if(do_after(user, 30, target = src))
user.visible_message("[user] shortens \the [src]!", "You shorten \the [src]!")
name = "sawn-off [src.name]"
desc = sawn_desc
diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm
index b0d3a7e4a85..cd306a78e49 100644
--- a/code/modules/reagents/reagent_dispenser.dm
+++ b/code/modules/reagents/reagent_dispenser.dm
@@ -118,7 +118,7 @@
/obj/structure/reagent_dispensers/fueltank/attack_hand()
if (rig)
usr.visible_message("[usr] begins to detach [rig] from \the [src].", "You begin to detach [rig] from \the [src]")
- if(do_after(usr, 20))
+ if(do_after(usr, 20, target = src))
usr.visible_message("\blue [usr] detaches [rig] from \the [src].", "\blue You detach [rig] from \the [src]")
rig.loc = get_turf(usr)
rig = null
@@ -130,7 +130,7 @@
user << "\red There is another device in the way."
return ..()
user.visible_message("[user] begins rigging [W] to \the [src].", "You begin rigging [W] to \the [src]")
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
user.visible_message("\blue [user] rigs [W] to \the [src].", "\blue You rig [W] to \the [src]")
var/obj/item/device/assembly_holder/H = W
diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm
index 8eddccfac04..a0997497d34 100644
--- a/code/modules/recycling/disposal-construction.dm
+++ b/code/modules/recycling/disposal-construction.dm
@@ -214,7 +214,7 @@
if(W.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "Welding the [nicetype] in place."
- if(do_after(user, 20))
+ if(do_after(user, 20, target = src))
if(!src || !W.isOn()) return
user << "The [nicetype] has been welded in place!"
update() // TODO: Make this neat
diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm
index e6a16f00765..91cdc759161 100644
--- a/code/modules/recycling/disposal.dm
+++ b/code/modules/recycling/disposal.dm
@@ -78,7 +78,7 @@
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "You start slicing the floorweld off the disposal unit."
- if(do_after(user,20))
+ if(do_after(user,20, target = src))
if(!src || !W.isOn()) return
user << "You sliced the floorweld off the disposal unit."
var/obj/structure/disposalconstruct/C = new (src.loc)
@@ -114,7 +114,7 @@
var/mob/GM = G.affecting
for (var/mob/V in viewers(usr))
V.show_message("[usr] starts putting [GM.name] into the disposal.", 3)
- if(do_after(usr, 20))
+ if(do_after(usr, 20, target = GM))
if (GM.client)
GM.client.perspective = EYE_PERSPECTIVE
GM.client.eye = src
@@ -157,7 +157,7 @@
if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis)
if(target.anchored) return
V.show_message("[usr] starts stuffing [target.name] into the disposal.", 3)
- if(!do_after(usr, 20))
+ if(!do_after(usr, 20, target = target))
return
if(target_loc != target.loc)
return
@@ -745,7 +745,7 @@
if(!T)
return
-
+
var/turf/target
if(T.density) // dense ouput turf, so stop holder
@@ -1319,7 +1319,7 @@
if(W.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "You start slicing the floorweld off the disposal outlet."
- if(do_after(user,20))
+ if(do_after(user,20, target = src))
if(!src || !W.isOn()) return
user << "You sliced the floorweld off the disposal outlet."
var/obj/structure/disposalconstruct/C = new (src.loc)
diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm
index ac92bd70b33..07c245d889d 100755
--- a/code/modules/recycling/sortingmachinery.dm
+++ b/code/modules/recycling/sortingmachinery.dm
@@ -319,7 +319,7 @@
if(W.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "You start slicing the floorweld off the delivery chute."
- if(do_after(user,20))
+ if(do_after(user,20, target = src))
if(!src || !W.isOn()) return
user << "You sliced the floorweld off the delivery chute."
var/obj/structure/disposalconstruct/C = new (src.loc)
diff --git a/code/modules/research/xenoarchaeology/artifact/artifact.dm b/code/modules/research/xenoarchaeology/artifact/artifact.dm
index 8730b04e063..0215c67e520 100644
--- a/code/modules/research/xenoarchaeology/artifact/artifact.dm
+++ b/code/modules/research/xenoarchaeology/artifact/artifact.dm
@@ -80,7 +80,7 @@
if (istype(W, /obj/item/device/measuring_tape))
var/obj/item/device/measuring_tape/P = W
user.visible_message("\blue[user] extends [P] towards [src].","\blue You extend [P] towards [src].")
- if(do_after(user,40))
+ if(do_after(user,40, target = src))
user << "\blue \icon[P] [src] has been excavated to a depth of [2*src.excavation_level]cm."
return
@@ -89,7 +89,7 @@
user << "\red You start [P.drill_verb] [src]."
- if(!do_after(user,P.digspeed))
+ if(!do_after(user,P.digspeed, target = src))
return
user << "\blue You finish [P.drill_verb] [src]."
diff --git a/code/modules/research/xenoarchaeology/artifact/artifact_hoverpod.dm b/code/modules/research/xenoarchaeology/artifact/artifact_hoverpod.dm
index 838c26a87c9..c1d97b7a75d 100644
--- a/code/modules/research/xenoarchaeology/artifact/artifact_hoverpod.dm
+++ b/code/modules/research/xenoarchaeology/artifact/artifact_hoverpod.dm
@@ -27,7 +27,7 @@
if(!src.check_for_support())
src.pr_inertial_movement.start(list(src,direction))
src.log_message("Movement control lost. Inertial movement started.")*/
- if(do_after(step_in))
+ if(do_after(step_in, target = src))
can_move = 1
return 1
return 0
diff --git a/icons/effects/doafter_icon.dmi b/icons/effects/doafter_icon.dmi
new file mode 100644
index 00000000000..0add263e976
Binary files /dev/null and b/icons/effects/doafter_icon.dmi differ