diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
index d82d641c4d..9ac395439d 100644
--- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
@@ -287,7 +287,7 @@
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
- if (do_after(user, 40 * W.toolspeed))
+ if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm
index fbfaf71482..28ccea08cd 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm
@@ -248,7 +248,7 @@ Thus, the two variables affect pump operation are set in New():
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
- if (do_after(user, 40 * W.toolspeed))
+ if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("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 d5d7183ec0..658c18fbcf 100644
--- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
@@ -90,7 +90,7 @@
return 1
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
playsound(src, W.usesound, 50, 1)
- if(do_after(user, 40 * W.toolspeed))
+ if(do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + "unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
diff --git a/code/ATMOSPHERICS/components/portables_connector.dm b/code/ATMOSPHERICS/components/portables_connector.dm
index 2dbc9afc00..e692557d34 100644
--- a/code/ATMOSPHERICS/components/portables_connector.dm
+++ b/code/ATMOSPHERICS/components/portables_connector.dm
@@ -160,7 +160,7 @@
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
- if (do_after(user, 40 * W.toolspeed))
+ if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
diff --git a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm
index 83af58bb64..5a1e62e2af 100644
--- a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm
@@ -60,7 +60,7 @@
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
- if (do_after(user, 40 * W.toolspeed))
+ if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
diff --git a/code/ATMOSPHERICS/components/tvalve.dm b/code/ATMOSPHERICS/components/tvalve.dm
index 45c0d55742..904ae90e47 100644
--- a/code/ATMOSPHERICS/components/tvalve.dm
+++ b/code/ATMOSPHERICS/components/tvalve.dm
@@ -335,7 +335,7 @@
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
- if (do_after(user, 40 * W.toolspeed))
+ if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
diff --git a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm
index 9a0529d457..c12bd6a6fb 100644
--- a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm
+++ b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm
@@ -83,7 +83,7 @@
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
- if (do_after(user, 40 * W.toolspeed))
+ if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
diff --git a/code/ATMOSPHERICS/components/unary/outlet_injector.dm b/code/ATMOSPHERICS/components/unary/outlet_injector.dm
index e971889748..9e4b819e7d 100644
--- a/code/ATMOSPHERICS/components/unary/outlet_injector.dm
+++ b/code/ATMOSPHERICS/components/unary/outlet_injector.dm
@@ -193,7 +193,7 @@
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
- if (do_after(user, 40 * W.toolspeed))
+ if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm
index 5cd2feec3f..a81e0ff4c9 100644
--- a/code/ATMOSPHERICS/components/unary/vent_pump.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm
@@ -387,7 +387,7 @@
var/obj/item/weldingtool/WT = W.get_welder()
if (WT.remove_fuel(0,user))
to_chat(user, span_notice("Now welding the vent."))
- if(do_after(user, 20 * WT.toolspeed))
+ if(do_after(user, 20 * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
playsound(src, WT.usesound, 50, 1)
if(!welded)
@@ -440,7 +440,7 @@
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
- if (do_after(user, 40 * W.toolspeed))
+ if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
index 343ce5e96d..23a48b8a51 100644
--- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
@@ -284,7 +284,7 @@
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
- if (do_after(user, 40 * W.toolspeed))
+ if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
diff --git a/code/ATMOSPHERICS/components/valve.dm b/code/ATMOSPHERICS/components/valve.dm
index 167df1ae55..3ce203140d 100644
--- a/code/ATMOSPHERICS/components/valve.dm
+++ b/code/ATMOSPHERICS/components/valve.dm
@@ -299,7 +299,7 @@
return 1
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
- if (do_after(user, 40 * W.toolspeed))
+ if (do_after(user, 40 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
diff --git a/code/ATMOSPHERICS/pipes/pipe_base.dm b/code/ATMOSPHERICS/pipes/pipe_base.dm
index a394b5db0f..32bb9f0262 100644
--- a/code/ATMOSPHERICS/pipes/pipe_base.dm
+++ b/code/ATMOSPHERICS/pipes/pipe_base.dm
@@ -154,7 +154,7 @@
playsound(src, W.usesound, 50, 1)
- if (do_after(user, 10 * W.toolspeed))
+ if (do_after(user, 10 * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm
index dc92eb5cbd..f2d222ea79 100644
--- a/code/_helpers/mobs.dm
+++ b/code/_helpers/mobs.dm
@@ -315,12 +315,13 @@ Proc for attack log creation, because really why not
drifting = TRUE*/
var/holding = user.get_active_hand()
-
+/* //Disabling for now. Meant to be used for modifier slowdowns.
if(!(timed_action_flags & IGNORE_SLOWDOWNS))
var/slowdown = user.calculate_item_encumbrance()
if(slowdown)
- delay *= slowdown
-
+ //Let's not be TOO evil. You can be up to 4x faster, but never more than 3x slower.
+ delay *= CLAMP(slowdown, 0.25, 3)
+*/
var/datum/progressbar/progbar
var/datum/cogbar/cog
diff --git a/code/datums/components/reagent_hose/inflation.dm b/code/datums/components/reagent_hose/inflation.dm
index 8006a6e23b..70c586cf37 100644
--- a/code/datums/components/reagent_hose/inflation.dm
+++ b/code/datums/components/reagent_hose/inflation.dm
@@ -78,7 +78,7 @@
// Display action
name = "[human_owner]'s [feedback]"
user.visible_message("\The [user] starts to connect the hose to \the [human_owner]'s [feedback]...")
- if(!do_after(user,7 SECONDS,human_owner))
+ if(!do_after(user, 7 SECONDS, target = human_owner))
to_chat(user,span_warning("You couldn't connect the hose!"))
return FALSE
if(other.get_hose() || get_hose()) // SHouldn't be connected to anything yet!
diff --git a/code/datums/components/species/shadekin/powers/dark_maw.dm b/code/datums/components/species/shadekin/powers/dark_maw.dm
index cbe5596ca5..67c4c53bac 100644
--- a/code/datums/components/species/shadekin/powers/dark_maw.dm
+++ b/code/datums/components/species/shadekin/powers/dark_maw.dm
@@ -33,7 +33,7 @@
to_chat(src, span_warning("There is too much light here for your trap to last!"))
return FALSE
- if(do_after(src, 10))
+ if(do_after(src, 1 SECOND, target = src))
if(SK.in_phase)
new /obj/effect/abstract/dark_maw(loc, src, TRUE)
else
diff --git a/code/datums/components/species/shadekin/powers/dark_tunnel/dark_tunneling.dm b/code/datums/components/species/shadekin/powers/dark_tunnel/dark_tunneling.dm
index 261bb61782..9ad1160aa7 100644
--- a/code/datums/components/species/shadekin/powers/dark_tunnel/dark_tunneling.dm
+++ b/code/datums/components/species/shadekin/powers/dark_tunnel/dark_tunneling.dm
@@ -64,7 +64,7 @@
smoke.start()
src.visible_message(span_notice("[src] begins pulling dark energies around themselves."))
- if(do_after(src, tunnel_time))
+ if(do_after(src, tunnel_time, target = src))
if(SK.created_dark_tunnel) //check again because the user may have queued this up multiple times.
to_chat(src, span_warning("You have already made a tunnel to the Dark!"))
return FALSE
diff --git a/code/datums/components/traits/weaver.dm b/code/datums/components/traits/weaver.dm
index 24b712745a..ef0e952263 100644
--- a/code/datums/components/traits/weaver.dm
+++ b/code/datums/components/traits/weaver.dm
@@ -115,7 +115,7 @@
to_chat(owner, span_warning("You can't weave here!"))
return
- if(do_after(owner, desired_result.time))
+ if(do_after(owner, desired_result.time, target = src))
if(desired_result.cost > silk_reserve)
to_chat(owner, span_warning("You don't have enough silk to weave that!"))
return
@@ -168,7 +168,7 @@
to_chat(owner, span_warning("You can't weave here!"))
return
- if(do_after(owner, desired_result.time))
+ if(do_after(owner, desired_result.time, target = src))
if(desired_result.cost > silk_reserve)
to_chat(owner, span_warning("You don't have enough silk to weave that!"))
return
diff --git a/code/datums/elements/climbable.dm b/code/datums/elements/climbable.dm
index 1d99bd1a3c..b826f647bf 100644
--- a/code/datums/elements/climbable.dm
+++ b/code/datums/elements/climbable.dm
@@ -76,7 +76,7 @@
user.visible_message(span_warning("[user] starts climbing onto \the [climbed_thing]!"))
LAZYADDASSOCLIST(current_climbers, climbed_thing, user)
- if(do_after(user,(issmall(user) ? delay_time * 0.6 : delay_time)))
+ if(do_after(user,(issmall(user) ? delay_time * 0.6 : delay_time), target = user))
if(can_climb(climbed_thing, user, post_climb_check=1))
climb_to(climbed_thing, user)
if(get_turf(user) == get_turf(climbed_thing))
diff --git a/code/game/gamemodes/cult/construct_spells.dm b/code/game/gamemodes/cult/construct_spells.dm
index 6c171afd5e..8f04558a04 100644
--- a/code/game/gamemodes/cult/construct_spells.dm
+++ b/code/game/gamemodes/cult/construct_spells.dm
@@ -528,7 +528,7 @@
T.add_overlay(target_image)
- if(do_after(user, pre_shot_delay))
+ if(do_after(user, pre_shot_delay, target = src))
succeeded = TRUE
T.cut_overlay(target_image)
@@ -676,7 +676,7 @@
var/windup = cooldown
if(W.reinf_material)
windup = cooldown * 2
- if(do_after(user, windup))
+ if(do_after(user, windup, target = src))
W.visible_message(span_danger("\The [user] [attack_message] \the [W], obliterating it!"))
W.dismantle_wall(1)
else
diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm
index f185b412cb..10a1e2d075 100644
--- a/code/game/gamemodes/cult/ritual.dm
+++ b/code/game/gamemodes/cult/ritual.dm
@@ -404,7 +404,7 @@ GLOBAL_LIST_INIT(rnwords, list("ire","ego","nahlizet","certum","veri","jatkaa","
V.show_message(span_danger("\The [user] slices open a finger and begins to chant and paint symbols on the floor."), 3, span_danger("You hear chanting."), 2)
to_chat(user, span_danger("You slice open one of your fingers and begin drawing a rune on the floor whilst chanting the ritual that binds your life essence with the dark arcane energies flowing through the surrounding world."))
user.take_overall_damage((rand(9)+1)/10) // 0.1 to 1.0 damage
- if(do_after(user, 50))
+ if(do_after(user, 5 SECONDS, target = src))
var/area/A = get_area(user)
log_and_message_admins("created \an [chosen_rune] rune at \the [A.name] - [user.loc.x]-[user.loc.y]-[user.loc.z].")
if(user.get_active_hand() != src)
diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm
index a0edeec9f0..59f4b76981 100644
--- a/code/game/machinery/Sleeper.dm
+++ b/code/game/machinery/Sleeper.dm
@@ -406,7 +406,7 @@
return
if(UNCONSCIOUS)
to_chat(usr, span_notice("You struggle through the haze to hit the eject button. This will take a couple of minutes..."))
- if(do_after(usr, 2 MINUTES, src))
+ if(do_after(usr, 2 MINUTES, target = src))
go_out()
if(CONSCIOUS)
go_out()
@@ -472,7 +472,7 @@
else
visible_message("\The [user] starts putting [M] into \the [src].")
- if(do_after(user, 20))
+ if(do_after(user, 2 SECONDS, target = src))
if(M.buckled)
return
if(occupant)
diff --git a/code/game/machinery/atm_ret_field.dm b/code/game/machinery/atm_ret_field.dm
index 59eab0278e..88159a5fac 100644
--- a/code/game/machinery/atm_ret_field.dm
+++ b/code/game/machinery/atm_ret_field.dm
@@ -74,7 +74,7 @@
return
user.visible_message("[user] starts to disassemble \the [src].", "You start to disassemble \the [src].")
playsound(src, WT.usesound, 50, 1)
- if(do_after(user,15 * W.toolspeed))
+ if(do_after(user,15 * W.toolspeed, target = src))
if(!src || !user || !WT.remove_fuel(5, user)) return
to_chat(user, span_notice("You fully disassemble \the [src]. There were no salvageable parts."))
qdel(src)
diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index 5854488d10..f2f4d7d94a 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -267,7 +267,7 @@ update_flag
to_chat(user, span_warning("\The [src]'s internal pressure is too high! Empty the canister before attempting to weld it apart."))
return
playsound(src, WT.usesound, 50, 1)
- if(do_after(user, 20 * WT.toolspeed))
+ if(do_after(user, 2 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, span_notice("You deconstruct the [src]."))
new /obj/item/stack/material/steel( src.loc, 10)
diff --git a/code/game/machinery/atmoalter/clamp.dm b/code/game/machinery/atmoalter/clamp.dm
index b32ae4774c..a9b35f5af3 100644
--- a/code/game/machinery/atmoalter/clamp.dm
+++ b/code/game/machinery/atmoalter/clamp.dm
@@ -118,7 +118,7 @@
if(open && over_object == usr && Adjacent(usr))
to_chat(usr, span_notice("You begin to remove \the [src]..."))
- if (do_after(usr, 30, src))
+ if (do_after(usr, 3 SECONDS, target = src))
to_chat(usr, span_notice("You have removed \the [src]."))
var/obj/item/clamp/C = new/obj/item/clamp(src.loc)
C.forceMove(usr.loc)
@@ -143,7 +143,7 @@
if (istype(A, /obj/machinery/atmospherics/pipe/simple))
to_chat(user, span_notice("You begin to attach \the [src] to \the [A]..."))
var/C = locate(/obj/machinery/clamp) in get_turf(A)
- if (do_after(user, 30, src) && !C)
+ if (do_after(user, 3 SECONDS, target = src) && !C)
if(!user.unEquip(src))
return
to_chat(user, span_notice("You have attached \the [src] to \the [A]."))
diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm
index e96fd1bd10..2d9a5e3153 100644
--- a/code/game/machinery/atmoalter/meter.dm
+++ b/code/game/machinery/atmoalter/meter.dm
@@ -109,7 +109,7 @@
if(W.has_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src]..."))
- if(do_after(user, 40 * W.toolspeed))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " unfastens \the [src]."), \
span_notice("You have unfastened \the [src]."), \
diff --git a/code/game/machinery/bioprinter.dm b/code/game/machinery/bioprinter.dm
index d95c4e8022..32326ecba0 100644
--- a/code/game/machinery/bioprinter.dm
+++ b/code/game/machinery/bioprinter.dm
@@ -333,7 +333,7 @@
if(container)
to_chat(user, span_warning("\The [src] already has a container loaded!"))
return
- else if(do_after(user, 1 SECOND))
+ else if(do_after(user, 1 SECOND, target = src))
user.visible_message("[user] has loaded \the [G] into \the [src].", "You load \the [G] into \the [src].")
container = G
user.drop_item()
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 9eb9dea09f..e142a696e3 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -390,7 +390,7 @@
playsound(src, WT.usesound, 50, 1)
WT.eyecheck(user)
busy = 1
- if(do_after(user, 100 * WT.toolspeed))
+ if(do_after(user, 10 SECONDS * WT.toolspeed, 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 de3fdf9f53..f77ea2ec86 100644
--- a/code/game/machinery/camera/camera_assembly.dm
+++ b/code/game/machinery/camera/camera_assembly.dm
@@ -165,7 +165,7 @@
playsound(src, WT.usesound, 50, 1)
WT.eyecheck(user)
busy = 1
- if(do_after(user, 20 * WT.toolspeed))
+ if(do_after(user, 2 SECONDS * WT.toolspeed, target = src))
busy = 0
if(!WT.isOn())
return 0
diff --git a/code/game/machinery/clawmachine.dm b/code/game/machinery/clawmachine.dm
index c135e39080..7dfce59542 100644
--- a/code/game/machinery/clawmachine.dm
+++ b/code/game/machinery/clawmachine.dm
@@ -119,7 +119,7 @@
else
user.visible_message("[user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
- if(do_after(user, 20 * W.toolspeed))
+ if(do_after(user, 2 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You [anchored? "un" : ""]secured \the [src]!"))
anchored = !anchored
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index 526311e56d..fb14f1713a 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -233,7 +233,7 @@
else if(istype(W,/obj/item/reagent_containers/glass))
if(LAZYLEN(containers) >= container_limit)
to_chat(user, span_warning("\The [src] has too many containers loaded!"))
- else if(do_after(user, 1 SECOND))
+ else if(do_after(user, 1 SECOND, target = src))
user.visible_message("[user] has loaded \the [W] into \the [src].", "You load \the [W] into \the [src].")
containers += W
user.drop_item()
diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm
index 21880fda24..fdde2bfe43 100644
--- a/code/game/machinery/computer/ai_core.dm
+++ b/code/game/machinery/computer/ai_core.dm
@@ -23,7 +23,7 @@
if(0)
if(P.has_tool_quality(TOOL_WRENCH))
playsound(src, P.usesound, 50, 1)
- if(do_after(user, 20 * P.toolspeed))
+ if(do_after(user, 2 SECONDS * P.toolspeed, target = src))
to_chat(user, span_notice("You wrench the frame into place."))
anchored = TRUE
state = 1
@@ -33,7 +33,7 @@
to_chat(user, "The welder must be on for this task.")
return
playsound(src, WT.usesound, 50, 1)
- if(do_after(user, 20 * WT.toolspeed))
+ if(do_after(user, 2 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.remove_fuel(0, user)) return
to_chat(user, span_notice("You deconstruct the frame."))
new /obj/item/stack/material/plasteel( loc, 4)
@@ -41,7 +41,7 @@
if(1)
if(P.has_tool_quality(TOOL_WRENCH))
playsound(src, P.usesound, 50, 1)
- if(do_after(user, 20 * P.toolspeed))
+ if(do_after(user, 2 SECONDS * P.toolspeed, target = src))
to_chat(user, span_notice("You unfasten the frame."))
anchored = FALSE
state = 0
@@ -77,7 +77,7 @@
return
to_chat(user, span_notice("You start to add cables to the frame."))
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
- if (do_after(user, 20) && state == 2)
+ if (do_after(user, 2 SECONDS, target = src) && state == 2)
if (C.use(5))
state = 3
icon_state = "3"
@@ -101,7 +101,7 @@
return
to_chat(user, span_notice("You start to put in the glass panel."))
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
- if (do_after(user, 20) && state == 3)
+ if (do_after(user, 2 SECONDS, target = src) && state == 3)
if(RG.use(2))
to_chat(user, span_notice("You put in the glass panel."))
state = 4
@@ -242,7 +242,7 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva
if(anchored)
user.visible_message(span_bold("\The [user]") + " starts to unbolt \the [src] from the plating...")
playsound(src, W.usesound, 50, 1)
- if(!do_after(user,40 * W.toolspeed))
+ if(!do_after(user, 4 SECONDS * W.toolspeed, target = src))
user.visible_message(span_bold("\The [user]") + " decides not to unbolt \the [src].")
return
user.visible_message(span_bold("\The [user]") + " finishes unfastening \the [src]!")
@@ -251,7 +251,7 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva
else
user.visible_message(span_bold("\The [user]") + " starts to bolt \the [src] to the plating...")
playsound(src, W.usesound, 50, 1)
- if(!do_after(user,40 * W.toolspeed))
+ if(!do_after(user, 4 SECONDS * W.toolspeed, target = src))
user.visible_message(span_bold("\The [user]") + " decides not to bolt \the [src].")
return
user.visible_message(span_bold("\The [user]") + " finishes fastening down \the [src]!")
diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm
index 886b81ef7e..4521214170 100644
--- a/code/game/machinery/computer/buildandrepair.dm
+++ b/code/game/machinery/computer/buildandrepair.dm
@@ -15,7 +15,7 @@
if(0)
if(P.has_tool_quality(TOOL_WRENCH))
playsound(src, P.usesound, 50, 1)
- if(do_after(user, 20 * P.toolspeed))
+ if(do_after(user, 2 SECONDS * P.toolspeed, target = src))
to_chat(user, span_notice("You wrench the frame into place."))
src.anchored = TRUE
src.state = 1
@@ -25,7 +25,7 @@
to_chat(user, "The welding tool must be on to complete this task.")
return
playsound(src, WT.usesound, 50, 1)
- if(do_after(user, 20 * WT.toolspeed))
+ if(do_after(user, 2 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, span_notice("You deconstruct the frame."))
new /obj/item/stack/material/steel( src.loc, 5 )
@@ -33,7 +33,7 @@
if(1)
if(P.has_tool_quality(TOOL_WRENCH))
playsound(src, P.usesound, 50, 1)
- if(do_after(user, 20 * P.toolspeed))
+ if(do_after(user, 2 SECONDS * P.toolspeed, target = src))
to_chat(user, span_notice("You unfasten the frame."))
src.anchored = FALSE
src.state = 0
@@ -73,7 +73,7 @@
return
to_chat(user, span_notice("You start to add cables to the frame."))
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 20) && state == 2)
+ if(do_after(user, 2 SECONDS, target = src) && state == 2)
if (C.use(5))
to_chat(user, span_notice("You add cables to the frame."))
state = 3
@@ -94,7 +94,7 @@
return
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, span_notice("You start to put in the glass panel."))
- if(do_after(user, 20) && state == 3)
+ if(do_after(user, 2 SECONDS, target = src) && state == 3)
if (G.use(2))
to_chat(user, span_notice("You put in the glass panel."))
src.state = 4
diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm
index 2a4556f11a..ee3cd6bbee 100644
--- a/code/game/machinery/computer/pod.dm
+++ b/code/game/machinery/computer/pod.dm
@@ -52,7 +52,7 @@
/obj/machinery/computer/pod/attackby(I as obj, user as mob)
if(I.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 2 SECONDS, target = src))
if(stat & BROKEN)
to_chat(user, span_notice("The broken glass falls out."))
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index 4f8f7cac36..a689007e22 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -35,7 +35,7 @@
return
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, span_notice("You start to add cables to the frame."))
- if(do_after(user, 20) && state == 1)
+ if(do_after(user, 2 SECONDS, target = src) && state == 1)
if(C.use(5))
to_chat(user, span_notice("You add cables to the frame."))
state = 2
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index fbe9625124..780e5114bd 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -629,7 +629,7 @@
visible_message("[usr] [on_enter_visible_message] [src].", 3)
- if(do_after(usr, 20))
+ if(do_after(usr, 2 SECONDS, target = src))
if(!usr || !usr.client)
return
@@ -726,7 +726,7 @@
else
visible_message("\The [user] starts putting [M] into \the [src].", 3)
- if(do_after(user, 20))
+ if(do_after(user, 2 SECONDS, target = src))
if(occupant)
to_chat(user, span_warning("\The [src] is already occupied."))
return
diff --git a/code/game/machinery/deployable_vr.dm b/code/game/machinery/deployable_vr.dm
index c47981c56b..bb9fc07ed4 100644
--- a/code/game/machinery/deployable_vr.dm
+++ b/code/game/machinery/deployable_vr.dm
@@ -74,7 +74,7 @@
var/choice = tgui_input_list(user, "What would you like to paint the cutout as?", "Cutout Painting", cutout_types)
if(!choice || !Adjacent(user) || I != user.get_active_hand())
return TRUE
- if(do_after(user, 10 SECONDS, src))
+ if(do_after(user, 10 SECONDS, target = src))
var/picked_type = cutout_types[choice]
new picked_type(loc)
qdel(src) //Laaaazy. Technically heals it too. Must be held together with all that paint.
diff --git a/code/game/machinery/doorbell_vr.dm b/code/game/machinery/doorbell_vr.dm
index 9b14473538..6115f71c79 100644
--- a/code/game/machinery/doorbell_vr.dm
+++ b/code/game/machinery/doorbell_vr.dm
@@ -139,7 +139,7 @@
else if(W.has_tool_quality(TOOL_WRENCH))
to_chat(user, span_notice("You start to unwrench \the [src]."))
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, 15) && !QDELETED(src))
+ if(do_after(user, 15, target = src) && !QDELETED(src))
to_chat(user, span_notice("You unwrench \the [src]."))
new /obj/item/frame/doorbell(src.loc)
qdel(src)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 3cf103c9b0..e1912c96ce 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -68,7 +68,7 @@
if(src.locked || src.welded)
visible_message(span_danger("\The [user] begins breaking into \the [src] internals!"))
user.set_AI_busy(TRUE) // If the mob doesn't have an AI attached, this won't do anything.
- if(do_after(user,10 SECONDS,src))
+ if(do_after(user, 10 SECONDS, target = src))
src.locked = 0
src.welded = 0
update_icon()
@@ -94,7 +94,7 @@
if(src.locked || src.welded)
visible_message(span_alium("\The [user] begins tearing into \the [src] internals!"))
src.do_animate("deny")
- if(do_after(user,15 SECONDS,src))
+ if(do_after(user, 15 SECONDS, target = src))
visible_message(span_danger("\The [user] tears \the [src] open, sparks flying from its electronics!"))
src.do_animate("spark")
playsound(src, 'sound/machines/door/airlock_tear_apart.ogg', 100, 1, volume_channel = VOLUME_CHANNEL_DOORS)
@@ -105,7 +105,7 @@
src.set_broken() //These aren't emags, these be CLAWS
else if(src.density)
visible_message(span_alium("\The [user] begins forcing \the [src] open!"))
- if(do_after(user, 5 SECONDS,src))
+ if(do_after(user, 5 SECONDS, target = src))
playsound(src, 'sound/machines/door/airlock_creaking.ogg', 100, 1, volume_channel = VOLUME_CHANNEL_DOORS)
visible_message(span_danger("\The [user] forces \the [src] open!"))
open(1)
@@ -1216,7 +1216,7 @@ About the new airlock wires panel:
if(can_remove_electronics())
playsound(src, C.usesound, 75, 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 * C.toolspeed))
+ if(do_after(user, 4 SECONDS * C.toolspeed, target = src))
to_chat(user, span_notice("You removed the airlock electronics!"))
var/obj/structure/door_assembly/da = new assembly_type(src.loc)
diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm
index 1a5af7d316..40b0a5da74 100644
--- a/code/game/machinery/doors/blast_door.dm
+++ b/code/game/machinery/doors/blast_door.dm
@@ -199,7 +199,7 @@
to_chat(user, span_warning("You don't have enough sheets to repair this! You need at least [amt] sheets."))
return
to_chat(user, span_notice("You begin repairing [src]..."))
- if(do_after(user, 30))
+ if(do_after(user, 3 SECONDS, target = src))
if(P.use(amt))
to_chat(user, span_notice("You have repaired \The [src]"))
src.repair()
@@ -228,13 +228,13 @@
if(istype(X.species, /datum/species/xenos))
if(src.density)
visible_message(span_alium("\The [user] begins forcing \the [src] open!"))
- if(do_after(user, 15 SECONDS,src))
+ if(do_after(user, 15 SECONDS, target = src))
playsound(src, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
visible_message(span_danger("\The [user] forces \the [src] open!"))
force_open(1)
else
visible_message(span_alium("\The [user] begins forcing \the [src] closed!"))
- if(do_after(user, 5 SECONDS,src))
+ if(do_after(user, 5 SECONDS, target = src))
playsound(src, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
visible_message(span_danger("\The [user] forces \the [src] closed!"))
force_close(1)
@@ -252,12 +252,12 @@
user.set_AI_busy(TRUE) // If the mob doesn't have an AI attached, this won't do anything.
if(src.density)
visible_message(span_danger("\The [user] starts forcing \the [src] open!"))
- if(do_after(user, 5 SECONDS, src))
+ if(do_after(user, 5 SECONDS, target = src))
visible_message(span_danger("\The [user] forces \the [src] open!"))
force_open(1)
else
visible_message(span_danger("\The [user] starts forcing \the [src] closed!"))
- if(do_after(user, 2 SECONDS, src))
+ if(do_after(user, 2 SECONDS, target = src))
visible_message(span_danger("\The [user] forces \the [src] closed!"))
force_close(1)
user.set_AI_busy(FALSE)
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index f1fcf8be38..760be0f817 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -237,7 +237,7 @@
to_chat(user, span_notice("You start to fix dents and repair \the [src]."))
playsound(src, welder.usesound, 50, 1)
var/repairtime = maxhealth - health //Since we're not using materials anymore... We'll just calculate how much damage there is to repair.
- if(do_after(user, repairtime * welder.toolspeed) && welder && welder.isOn())
+ if(do_after(user, repairtime * welder.toolspeed, target = src) && welder && welder.isOn())
to_chat(user, span_notice("You finish repairing the damage to \the [src]."))
health = maxhealth
update_icon()
diff --git a/code/game/machinery/doors/door_vr.dm b/code/game/machinery/doors/door_vr.dm
index c58948c5f8..3f70adcb67 100644
--- a/code/game/machinery/doors/door_vr.dm
+++ b/code/game/machinery/doors/door_vr.dm
@@ -87,7 +87,7 @@
if(welder.remove_fuel(0,user))
to_chat(user, span_notice("You start welding the plasteel into place."))
playsound(src, welder.usesound, 50, 1)
- if(do_after(user, 10 * welder.toolspeed) && welder && welder.isOn())
+ if(do_after(user, 1 SECOND * welder.toolspeed, target = src) && welder && welder.isOn())
to_chat(user, span_notice("You finish reinforcing \the [src]."))
heat_proof = 1
update_icon()
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 026e36dfb8..f6d9c8cdc2 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -200,14 +200,14 @@
if(istype(X.species, /datum/species/xenos))
if(src.blocked)
visible_message(span_alium("\The [user] begins digging into \the [src] internals!"))
- if(do_after(user,5 SECONDS,src))
+ if(do_after(user, 5 SECONDS, target = src))
playsound(src, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
src.blocked = 0
update_icon()
open(1)
else if(src.density)
visible_message(span_alium("\The [user] begins forcing \the [src] open!"))
- if(do_after(user, 2 SECONDS,src))
+ if(do_after(user, 2 SECONDS, target = src))
playsound(src, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
visible_message(span_danger("\The [user] forces \the [src] open!"))
open(1)
@@ -226,7 +226,7 @@
if(src.density)
visible_message(span_danger("\The [user] starts forcing \the [src] open!"))
user.set_AI_busy(TRUE) // If the mob doesn't have an AI attached, this won't do anything.
- if(do_after(user, time_to_force, src))
+ if(do_after(user, time_to_force, target = src))
visible_message(span_danger("\The [user] forces \the [src] open!"))
src.blocked = 0
open(1)
@@ -235,7 +235,7 @@
time_to_force = (time_to_force / 2)
visible_message(span_danger("\The [user] starts forcing \the [src] closed!"))
user.set_AI_busy(TRUE) // If the mob doesn't have an AI attached, this won't do anything.
- if(do_after(user, time_to_force, src))
+ if(do_after(user, time_to_force, target = src))
visible_message(span_danger("\The [user] forces \the [src] closed!"))
close(1)
user.set_AI_busy(FALSE)
@@ -282,7 +282,7 @@
else
user.visible_message(span_danger("[user] is removing the electronics from \the [src]."),
"You start to remove the electronics from [src].")
- if(do_after(user,30))
+ if(do_after(user, 3 SECONDS, target = src))
if(blocked && density && hatch_open)
playsound(src, C.usesound, 50, 1)
user.visible_message(span_danger("[user] has removed the electronics from \the [src]."),
@@ -331,7 +331,7 @@
prying = 1
update_icon()
playsound(src, C.usesound, 100, 1)
- if(do_after(user,30 * C.toolspeed))
+ if(do_after(user,3 SECONDS * C.toolspeed, target = src))
if(C.has_tool_quality(TOOL_CROWBAR))
if(stat & (BROKEN|NOPOWER) || !density)
user.visible_message(span_danger("\The [user] forces \the [src] [density ? "open" : "closed"] with \a [C]!"),\
diff --git a/code/game/machinery/doors/firedoor_assembly.dm b/code/game/machinery/doors/firedoor_assembly.dm
index 58265e9879..46cec2675d 100644
--- a/code/game/machinery/doors/firedoor_assembly.dm
+++ b/code/game/machinery/doors/firedoor_assembly.dm
@@ -26,7 +26,7 @@
to_chat(user, span_warning("You need one length of coil to wire \the [src]."))
return
user.visible_message("[user] wires \the [src].", "You start to wire \the [src].")
- if(do_after(user, 40) && !wired && anchored)
+ if(do_after(user, 4 SECONDS, target = src) && !wired && anchored)
if (cable.use(1))
wired = 1
to_chat(user, span_notice("You wire \the [src]."))
@@ -35,7 +35,7 @@
playsound(src, C.usesound, 100, 1)
user.visible_message("[user] cuts the wires from \the [src].", "You start to cut the wires from \the [src].")
- if(do_after(user, 40))
+ if(do_after(user, 4 SECONDS, target = src))
if(!src) return
to_chat(user, span_notice("You cut the wires!"))
new/obj/item/stack/cable_coil(src.loc, 1)
@@ -67,7 +67,7 @@
if(glass)
user.visible_message(span_warning("[user] welds the glass panel out of \the [src]."),
span_notice("You start to weld the glass panel out of \the [src]."))
- if(do_after(user, 40 * WT.toolspeed, src) && WT.isOn())
+ if(do_after(user, 4 SECONDS * WT.toolspeed, target = src) && WT.isOn())
to_chat(user, span_notice("You welded the glass panel out!"))
new /obj/item/stack/material/glass/reinforced(drop_location())
glass = FALSE
@@ -75,7 +75,7 @@
return
if(!anchored)
user.visible_message(span_warning("[user] dissassembles \the [src]."), "You start to dissassemble \the [src].")
- if(do_after(user, 40 * WT.toolspeed, src) && WT.isOn())
+ if(do_after(user, 4 SECONDS * WT.toolspeed, target = src) && WT.isOn())
user.visible_message(span_warning("[user] has dissassembled \the [src]."),
"You have dissassembled \the [src].")
new /obj/item/stack/material/steel(drop_location(), 2)
@@ -89,7 +89,7 @@
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message(span_info("[user] adds [S.name] to \the [src]."),
span_notice("You start to install [S.name] into \the [src]."))
- if(do_after(user, 40, src) && !glass && S.use(1))
+ if(do_after(user, 4 SECONDS, target = src) && !glass && S.use(1))
to_chat(user, span_notice("You installed reinforced glass windows into \the [src]."))
glass = TRUE
update_icon()
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index aeaad5e5e7..c3a40867d6 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -207,7 +207,7 @@
if(WT.remove_fuel(1 ,user))
to_chat(user, span_notice("You begin repairing [src]..."))
playsound(src, WT.usesound, 50, 1)
- if(do_after(user, 40 * WT.toolspeed, target = src))
+ if(do_after(user, 4 SECONDS * WT.toolspeed, target = src))
health = maxhealth
update_icon()
to_chat(user, span_notice("You repair [src]."))
@@ -230,7 +230,7 @@
if (!density && I.has_tool_quality(TOOL_CROWBAR))
playsound(src, I.usesound, 50, 1)
user.visible_message("[user] begins prying the windoor out of the frame.", "You start to pry the windoor out of the frame.")
- if (do_after(user,40 * I.toolspeed))
+ if (do_after(user, 4 SECONDS * I.toolspeed, target = src))
to_chat(user,span_notice("You pried the windoor out of the frame!"))
var/obj/structure/windoor_assembly/wa = new/obj/structure/windoor_assembly(src.loc)
diff --git a/code/game/machinery/floor_light.dm b/code/game/machinery/floor_light.dm
index c1bde9ad35..fb8ef26151 100644
--- a/code/game/machinery/floor_light.dm
+++ b/code/game/machinery/floor_light.dm
@@ -46,7 +46,7 @@ var/list/floor_light_cache = list()
to_chat(user, span_warning("\The [src] must be on to complete this task."))
return
playsound(src, WT.usesound, 50, 1)
- if(!do_after(user, 20 * WT.toolspeed))
+ if(!do_after(user, 2 SECONDS * WT.toolspeed, target = src))
return
if(!src || !WT.isOn())
return
diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm
index c8f239869d..9c7398980b 100644
--- a/code/game/machinery/frame.dm
+++ b/code/game/machinery/frame.dm
@@ -354,7 +354,7 @@ GLOBAL_LIST(construction_frame_floor)
if(state == FRAME_PLACED && !anchored)
to_chat(user, span_notice("You start to wrench the frame into place."))
playsound(src, P.usesound, 50, 1)
- if(do_after(user, 20 * P.toolspeed))
+ if(do_after(user, 2 SECONDS * P.toolspeed, target = src))
anchored = TRUE
if(!need_circuit && circuit)
state = FRAME_FASTENED
@@ -366,7 +366,7 @@ GLOBAL_LIST(construction_frame_floor)
else if(state == FRAME_PLACED && anchored)
playsound(src, P.usesound, 50, 1)
- if(do_after(user, 20 * P.toolspeed))
+ if(do_after(user, 2 SECONDS * P.toolspeed, target = src))
to_chat(user, span_notice("You unfasten the frame."))
anchored = FALSE
@@ -375,7 +375,7 @@ GLOBAL_LIST(construction_frame_floor)
var/obj/item/weldingtool/WT = P.get_welder()
if(WT.remove_fuel(0, user))
playsound(src, P.usesound, 50, 1)
- if(do_after(user, 20 * P.toolspeed))
+ if(do_after(user, 2 SECONDS * P.toolspeed, target = src))
if(src && WT.isOn())
to_chat(user, span_notice("You deconstruct the frame."))
new /obj/item/stack/material/steel(src.loc, frame_type.frame_size)
@@ -551,7 +551,7 @@ GLOBAL_LIST(construction_frame_floor)
return
to_chat(user, span_notice("You start to add cables to the frame."))
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 20) && state == FRAME_FASTENED)
+ if(do_after(user, 2 SECONDS, target = src) && state == FRAME_FASTENED)
if(C.use(5))
to_chat(user, span_notice("You add cables to the frame."))
state = FRAME_WIRED
@@ -611,7 +611,7 @@ GLOBAL_LIST(construction_frame_floor)
return
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, span_notice("You start to put in the glass panel."))
- if(do_after(user, 20) && state == FRAME_WIRED)
+ if(do_after(user, 2 SECONDS, target = src) && state == FRAME_WIRED)
if(G.use(2))
to_chat(user, span_notice("You put in the glass panel."))
state = FRAME_PANELED
@@ -623,7 +623,7 @@ GLOBAL_LIST(construction_frame_floor)
return
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, span_notice("You start to put in the glass panel."))
- if(do_after(user, 20) && state == FRAME_WIRED)
+ if(do_after(user, 2 SECONDS, target = src) && state == FRAME_WIRED)
if(G.use(2))
to_chat(user, span_notice("You put in the glass panel."))
state = FRAME_PANELED
diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm
index 8814b138f5..d8a38b356c 100644
--- a/code/game/machinery/iv_drip.dm
+++ b/code/game/machinery/iv_drip.dm
@@ -69,7 +69,7 @@
if(W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You start to dismantle the IV drip."))
- if(do_after(user, 15))
+ if(do_after(user, 15, target = src))
to_chat(user, span_notice("You dismantle the IV drip."))
new /obj/item/stack/rods(src.loc, 6)
if(beaker)
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index cb2f0eb51a..5b4c8aee6c 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -401,7 +401,7 @@ Class Procs:
return 0
to_chat(user, span_notice("You start disconnecting the monitor."))
playsound(src, S.usesound, 50, 1)
- if(do_after(user, 20 * S.toolspeed))
+ if(do_after(user, 2 SECONDS * S.toolspeed, target = src))
if(stat & BROKEN)
to_chat(user, span_notice("The broken glass falls out."))
new /obj/item/material/shard(src.loc)
diff --git a/code/game/machinery/medical_kiosk.dm b/code/game/machinery/medical_kiosk.dm
index 590cac122d..b576e435cb 100644
--- a/code/game/machinery/medical_kiosk.dm
+++ b/code/game/machinery/medical_kiosk.dm
@@ -104,7 +104,7 @@
// Service begins, delay
visible_message(span_bold("\The [src]") + " scans [user] thoroughly!")
flick("kiosk_active", src)
- if(!do_after(user, 5 SECONDS, src) || inoperable())
+ if(!do_after(user, 5 SECONDS, target = src) || inoperable())
suspend()
return
diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm
index a5961110b5..6f8553c262 100644
--- a/code/game/machinery/nuclear_bomb.dm
+++ b/code/game/machinery/nuclear_bomb.dm
@@ -105,7 +105,7 @@ GLOBAL_VAR(bomb_set)
user.visible_message("[user] starts cutting loose the anchoring bolt covers on [src].", "You start cutting loose the anchoring bolt covers with [O]...")
- if(do_after(user,40 * WT.toolspeed))
+ if(do_after(user, 4 SECONDS * WT.toolspeed, target = src))
if(!src || !user || !WT.remove_fuel(5, user)) return
user.visible_message("[user] cuts through the bolt covers on [src].", "You cut through the bolt cover.")
removal_stage = 1
@@ -116,7 +116,7 @@ GLOBAL_VAR(bomb_set)
user.visible_message("[user] starts forcing open the bolt covers on [src].", "You start forcing open the anchoring bolt covers with [O]...")
playsound(src, O.usesound, 50, 1)
- if(do_after(user,15 * O.toolspeed))
+ if(do_after(user,15 * O.toolspeed, target = src))
if(!src || !user) return
user.visible_message("[user] forces open the bolt covers on [src].", "You force open the bolt covers.")
removal_stage = 2
@@ -133,7 +133,7 @@ GLOBAL_VAR(bomb_set)
user.visible_message("[user] starts cutting apart the anchoring system sealant on [src].", "You start cutting apart the anchoring system's sealant with [O]...")
playsound(src, WT.usesound, 50, 1)
- if(do_after(user,40 * WT.toolspeed))
+ if(do_after(user, 4 SECONDS * WT.toolspeed, target = src))
if(!src || !user || !WT.remove_fuel(5, user)) return
user.visible_message("[user] cuts apart the anchoring system sealant on [src].", "You cut apart the anchoring system's sealant.")
removal_stage = 3
@@ -144,7 +144,7 @@ GLOBAL_VAR(bomb_set)
user.visible_message("[user] begins unwrenching the anchoring bolts on [src].", "You begin unwrenching the anchoring bolts...")
playsound(src, O.usesound, 50, 1)
- if(do_after(user,50 * O.toolspeed))
+ if(do_after(user, 5 SECONDS * O.toolspeed, target = src))
if(!src || !user) return
user.visible_message("[user] unwrenches the anchoring bolts on [src].", "You unwrench the anchoring bolts.")
removal_stage = 4
@@ -155,7 +155,7 @@ GLOBAL_VAR(bomb_set)
user.visible_message("[user] begins lifting [src] off of the anchors.", "You begin lifting the device off the anchors...")
playsound(src, O.usesound, 50, 1)
- if(do_after(user,80 * O.toolspeed))
+ if(do_after(user, 8 SECONDS * O.toolspeed, target = src))
if(!src || !user) return
user.visible_message("[user] crowbars [src] off of the anchors. It can now be moved.", "You jam the crowbar under the nuclear device and lift it off its anchors. You can now move it!")
anchored = FALSE
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index 95bfe9ec34..70a10bea87 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -120,7 +120,7 @@
if (unwrenched==0)
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to unfasten \the [src] from the floor..."))
- if (do_after(user, 40 * W.toolspeed))
+ if (do_after(user, 4 SECONDS * W.toolspeed, target = src))
user.visible_message( \
span_notice("[user] unfastens \the [src]."), \
span_notice("You have unfastened \the [src]. Now it can be pulled somewhere else."), \
@@ -133,7 +133,7 @@
else /*if (unwrenched==1)*/
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to fasten \the [src] to the floor..."))
- if (do_after(user, 20 * W.toolspeed))
+ if (do_after(user, 2 SECONDS * W.toolspeed, target = src))
user.visible_message( \
span_notice("[user] fastens \the [src]."), \
span_notice("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 67f4e25701..182bfa9858 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -485,7 +485,7 @@
//If the turret is destroyed, you can remove it with a crowbar to
//try and salvage its components
to_chat(user, span_notice("You begin prying the metal coverings off."))
- if(do_after(user, 20))
+ if(do_after(user, 2 SECONDS, target = src))
if(can_salvage && prob(70))
to_chat(user, span_notice("You remove the turret and salvage some components."))
if(installation)
@@ -517,7 +517,7 @@
)
wrenching = TRUE
- if(do_after(user, 50 * I.toolspeed))
+ if(do_after(user, 5 SECONDS * I.toolspeed, target = src))
//This code handles moving the turret around. After all, it's a portable turret!
if(!anchored)
playsound(src, I.usesound, 100, 1)
@@ -976,7 +976,7 @@
return
playsound(src, I.usesound, 50, 1)
- if(do_after(user, 20 * I.toolspeed))
+ if(do_after(user, 2 SECONDS * I.toolspeed, target = src))
if(!src || !WT.remove_fuel(5, user)) return
build_step = 1
to_chat(user, "You remove the turret's interior metal armor.")
@@ -1052,7 +1052,7 @@
to_chat(user, span_notice("You need more fuel to complete this task."))
playsound(src, WT.usesound, 50, 1)
- if(do_after(user, 30 * WT.toolspeed))
+ if(do_after(user, 3 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.remove_fuel(5, user))
return
build_step = 8
diff --git a/code/game/machinery/suit_storage/suit_cycler.dm b/code/game/machinery/suit_storage/suit_cycler.dm
index 1e2bd9dd04..6dcdf53778 100644
--- a/code/game/machinery/suit_storage/suit_cycler.dm
+++ b/code/game/machinery/suit_storage/suit_cycler.dm
@@ -162,7 +162,7 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache)
visible_message(span_notice("[user] starts putting [G.affecting.name] into the suit cycler."), 3)
- if(do_after(user, 20))
+ if(do_after(user, 2 SECONDS, target = src))
if(!G || !G.affecting) return
var/mob/M = G.affecting
if(M.client)
diff --git a/code/game/machinery/suit_storage/suit_storage.dm b/code/game/machinery/suit_storage/suit_storage.dm
index 1cbf72a107..a96a3ebd8c 100644
--- a/code/game/machinery/suit_storage/suit_storage.dm
+++ b/code/game/machinery/suit_storage/suit_storage.dm
@@ -365,7 +365,7 @@
to_chat(usr, span_warning("It's too cluttered inside for you to fit in!"))
return
visible_message(span_info("[usr] starts squeezing into the suit storage unit!"), 3)
- if(do_after(usr, 10))
+ if(do_after(usr, 1 SECOND, target = src))
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
@@ -405,7 +405,7 @@
to_chat(user, span_warning("The unit's storage area is too cluttered."))
return
visible_message(span_notice("[user] starts putting [G.affecting.name] into the Suit Storage Unit."), 3)
- if(do_after(user, 20))
+ if(do_after(user, 2 SECONDS, target = src))
if(!G || !G.affecting) return //derpcheck
var/mob/M = G.affecting
if(M.client)
diff --git a/code/game/machinery/supplybeacon.dm b/code/game/machinery/supplybeacon.dm
index ebfa67a196..7f75bc5e93 100644
--- a/code/game/machinery/supplybeacon.dm
+++ b/code/game/machinery/supplybeacon.dm
@@ -13,7 +13,7 @@
/obj/item/supply_beacon/attack_self(var/mob/user)
user.visible_message(span_infoplain(span_bold("\The [user]") + " begins setting up \the [src]."))
- if(!do_after(user, deploy_time))
+ if(!do_after(user, deploy_time, target = src))
return
var/obj/S = new deploy_path(get_turf(user))
user.visible_message(span_infoplain(span_bold("\The [user]") + " deploys \the [S]."))
diff --git a/code/game/machinery/virtual_reality/vr_console.dm b/code/game/machinery/virtual_reality/vr_console.dm
index c7a1e8dcd5..e8072a952f 100644
--- a/code/game/machinery/virtual_reality/vr_console.dm
+++ b/code/game/machinery/virtual_reality/vr_console.dm
@@ -181,7 +181,7 @@
else
visible_message("\The [user] starts putting [M] into \the [src].")
- if(do_after(user, 20))
+ if(do_after(user, 2 SECONDS, target = src))
if(occupant)
to_chat(user, span_warning("\The [src] is already occupied."))
return
diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm
index 45fb756b92..52b008076c 100644
--- a/code/game/machinery/washing_machine.dm
+++ b/code/game/machinery/washing_machine.dm
@@ -87,7 +87,7 @@
set category = "Object"
set src in usr.loc
- if((state in list(1,3,6)) && do_after(usr, 20))
+ if((state in list(1,3,6)) && do_after(usr, 2 SECONDS, target = src))
usr.loc = src.loc
/obj/machinery/washing_machine/update_icon()
diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm
index 1cc9a92848..9cd53b65d0 100644
--- a/code/game/mecha/combat/combat.dm
+++ b/code/game/mecha/combat/combat.dm
@@ -46,17 +46,8 @@
playsound(src, 'sound/weapons/heavysmash.ogg', 50, 1)
if(damage_type == BRUTE)
step_away(M,src,15)
- /*
- if(M.stat>1)
- M.gib()
- melee_can_hit = 0
- if(do_after(melee_cooldown))
- melee_can_hit = 1
- return
- */
if(ishuman(T))
var/mob/living/carbon/human/H = T
- // if (M.health <= 0) return
var/obj/item/organ/external/temp = H.get_organ(pick(BP_TORSO, BP_TORSO, BP_TORSO, BP_HEAD))
if(temp)
@@ -104,7 +95,7 @@
src.visible_message("[src] pushes [T] out of the way.")
melee_can_hit = 0
- if(do_after(melee_cooldown))
+ if(do_after_action(melee_cooldown))
melee_can_hit = 1
return
@@ -124,7 +115,7 @@
melee_can_hit = 0
- if(do_after(melee_cooldown))
+ if(do_after_action(melee_cooldown))
melee_can_hit = 1
return
diff --git a/code/game/mecha/components/_component.dm b/code/game/mecha/components/_component.dm
index 9cbdcec2e2..b561189830 100644
--- a/code/game/mecha/components/_component.dm
+++ b/code/game/mecha/components/_component.dm
@@ -140,7 +140,7 @@
if(integrity < max_integrity)
to_chat(user, span_notice("You start to repair damage to \the [src]."))
while(integrity < max_integrity && NP)
- if(do_after(user, 1 SECOND, src))
+ if(do_after(user, 1 SECOND, target = src))
NP.use(1)
adjust_integrity(NP.mech_repair)
diff --git a/code/game/mecha/equipment/tools/clamp.dm b/code/game/mecha/equipment/tools/clamp.dm
index d71ba88ae1..8c7e16ec97 100644
--- a/code/game/mecha/equipment/tools/clamp.dm
+++ b/code/game/mecha/equipment/tools/clamp.dm
@@ -32,7 +32,7 @@
var/obj/machinery/door/firedoor/FD = O
if(FD.blocked)
FD.visible_message(span_danger("\The [chassis] begins prying on \the [FD]!"))
- if(do_after(chassis.occupant,10 SECONDS,FD))
+ if(do_after(chassis.occupant, 10 SECONDS, target = FD))
playsound(FD, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
FD.blocked = 0
FD.update_icon()
@@ -40,7 +40,7 @@
FD.visible_message(span_warning("\The [chassis] tears \the [FD] open!"))
else if(FD.density)
FD.visible_message(span_warning("\The [chassis] begins forcing \the [FD] open!"))
- if(do_after(chassis.occupant, 5 SECONDS,FD))
+ if(do_after(chassis.occupant, 5 SECONDS, target = FD))
playsound(FD, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
FD.visible_message(span_danger("\The [chassis] forces \the [FD] open!"))
FD.open(1)
@@ -54,7 +54,7 @@
else if(!AD.operating)
if(AD.welded)
AD.visible_message(span_warning("\The [chassis] begins prying on \the [AD]!"))
- if(do_after(chassis.occupant, 15 SECONDS,AD) && chassis.Adjacent(AD))
+ if(do_after(chassis.occupant, 15 SECONDS, target = AD) && chassis.Adjacent(AD))
AD.welded = FALSE
AD.update_icon()
playsound(AD, 'sound/machines/door/airlock_creaking.ogg', 100, 1)
diff --git a/code/game/mecha/equipment/tools/jetpack.dm b/code/game/mecha/equipment/tools/jetpack.dm
index 4c36ed42ec..7b65b4de31 100644
--- a/code/game/mecha/equipment/tools/jetpack.dm
+++ b/code/game/mecha/equipment/tools/jetpack.dm
@@ -81,7 +81,7 @@
chassis.float_direction = direction
chassis.start_process(MECHA_PROC_MOVEMENT)
chassis.log_message(span_warning("Movement control lost. Inertial movement started."))
- if(chassis.do_after(get_step_delay()))
+ if(chassis.do_after_action(get_step_delay()))
chassis.can_move = 1
return 1
return 0
diff --git a/code/game/mecha/equipment/tools/orescanner.dm b/code/game/mecha/equipment/tools/orescanner.dm
index 71f91d2240..02018347a2 100644
--- a/code/game/mecha/equipment/tools/orescanner.dm
+++ b/code/game/mecha/equipment/tools/orescanner.dm
@@ -30,7 +30,7 @@
var/datum/beam/ScanBeam = chassis.Beam(target, "g_beam", 'icons/effects/beam.dmi', 2 SECONDS, 10, /obj/effect/ebeam, 2)
- if(do_after(chassis.occupant, 2 SECONDS))
+ if(do_after(chassis.occupant, 2 SECONDS, target))
my_scanner.ScanTurf(target, chassis.occupant, exact_scan)
QDEL_NULL(ScanBeam)
diff --git a/code/game/mecha/equipment/tools/passenger.dm b/code/game/mecha/equipment/tools/passenger.dm
index 1771207889..e09ee9bcda 100644
--- a/code/game/mecha/equipment/tools/passenger.dm
+++ b/code/game/mecha/equipment/tools/passenger.dm
@@ -26,7 +26,7 @@
if (chassis)
chassis.visible_message(span_notice("[user] starts to climb into [chassis]."))
- if(do_after(user, 40))
+ if(do_after(user, 4 SECONDS, target = src))
if(!src.occupant)
user.forceMove(src)
occupant = user
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index adecd56942..2fd4304ddb 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -481,7 +481,7 @@
radio.icon_state = icon_state
radio.subspace_transmission = 1
-/obj/mecha/proc/do_after(delay as num)
+/obj/mecha/proc/do_after_action(delay as num) //This is literally just a sleep disguised as a proc. Fucking bullshit.
sleep(delay)
if(src)
return 1
@@ -873,7 +873,7 @@
float_direction = direction
start_process(MECHA_PROC_MOVEMENT)
src.log_message(span_warning("Movement control lost. Inertial movement started."))
- if(do_after(get_step_delay()))
+ if(do_after_action(get_step_delay()))
can_move = 1
return 1
return 0
@@ -1588,7 +1588,7 @@
else if(C.integrity < C.max_integrity)
to_chat(user, span_notice("You start to repair damage to \the [C]."))
while(C.integrity < C.max_integrity && NP)
- if(do_after(user, 1 SECOND, src))
+ if(do_after(user, 1 SECOND, target = src))
NP.use(1)
C.adjust_integrity(NP.mech_repair)
@@ -2619,7 +2619,7 @@
var/mob/occupant = P.occupant
user.visible_message(span_infoplain(span_bold("\The [user]") + " begins opening the hatch on \the [P]..."), span_notice("You begin opening the hatch on \the [P]..."))
- if (!do_after(user, 40))
+ if (!do_after(user, 4 SECONDS, target = src))
return
user.visible_message(span_infoplain(span_bold("\The [user]") + " opens the hatch on \the [P] and removes [occupant]!"), span_notice("You open the hatch on \the [P] and remove [occupant]!"))
@@ -2659,7 +2659,7 @@
src.occupant_message("Recalibrating coordination system.")
src.log_message("Recalibration of coordination system started.")
var/T = src.loc
- if(do_after(100))
+ if(do_after_action(100))
if(T == src.loc)
src.clearInternalDamage(MECHA_INT_CONTROL_LOST)
src.occupant_message(span_blue("Recalibration successful."))
diff --git a/code/game/mecha/micro/micro.dm b/code/game/mecha/micro/micro.dm
index fcd0282ed1..4d7811462b 100644
--- a/code/game/mecha/micro/micro.dm
+++ b/code/game/mecha/micro/micro.dm
@@ -80,7 +80,7 @@
src.visible_message("[src] pushes [target] out of the way.")
melee_can_hit = 0
- if(do_after(melee_cooldown))
+ if(do_after_action(melee_cooldown))
melee_can_hit = 1
return
@@ -95,7 +95,7 @@
else
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
melee_can_hit = 0
- if(do_after(melee_cooldown))
+ if(do_after_action(melee_cooldown))
melee_can_hit = 1
break
return
diff --git a/code/game/objects/effects/decals/Cleanable/misc.dm b/code/game/objects/effects/decals/Cleanable/misc.dm
index dbf4dd59c0..7db48b0935 100644
--- a/code/game/objects/effects/decals/Cleanable/misc.dm
+++ b/code/game/objects/effects/decals/Cleanable/misc.dm
@@ -204,5 +204,5 @@
/obj/effect/decal/cleanable/confetti/attack_hand(mob/user)
to_chat(user, span_notice("You start to meticulously pick up the confetti."))
- if(do_after(user, 60))
+ if(do_after(user, 6 SECONDS, target = src))
qdel(src)
diff --git a/code/game/objects/effects/decals/posters/posters.dm b/code/game/objects/effects/decals/posters/posters.dm
index 6b90e2c3d3..2d74ef69fa 100644
--- a/code/game/objects/effects/decals/posters/posters.dm
+++ b/code/game/objects/effects/decals/posters/posters.dm
@@ -78,7 +78,7 @@
var/obj/structure/sign/poster/P = new poster_type(user.loc, get_dir(user, W), src)
- if(do_after(user, 17)) //Let's check if everything is still there
+ if(do_after(user, 17, target = src)) //Let's check if everything is still there
to_chat(user, span_notice("You place the poster!"))
qdel(src)
return TRUE
diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm
index 5657af1cdc..6bea3714c6 100644
--- a/code/game/objects/effects/mines.dm
+++ b/code/game/objects/effects/mines.dm
@@ -331,7 +331,7 @@
add_fingerprint(user)
msg_admin_attack("[key_name_admin(user)] primed \a [src]")
user.visible_message("[user] starts priming \the [src.name].", "You start priming \the [src.name]. Hold still!")
- if(do_after(user, 10 SECONDS))
+ if(do_after(user, 10 SECONDS, target = src))
playsound(src, 'sound/weapons/armbomb.ogg', 75, 1, -3)
prime(user)
else
@@ -342,7 +342,7 @@
/obj/item/mine/attackby(obj/item/W as obj, mob/living/user as mob)
if(W.has_tool_quality(TOOL_SCREWDRIVER) && trap)
to_chat(user, span_notice("You begin removing \the [trap]."))
- if(do_after(user, 10 SECONDS))
+ if(do_after(user, 10 SECONDS, target = src))
to_chat(user, span_notice("You finish disconnecting the mine's trigger."))
trap.forceMove(get_turf(src))
trap = null
diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm
index 3276b3de86..56ba5a2656 100644
--- a/code/game/objects/effects/overlays.dm
+++ b/code/game/objects/effects/overlays.dm
@@ -69,7 +69,7 @@
/obj/effect/overlay/snow/attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/shovel))
user.visible_message(span_notice("[user] begins to shovel away \the [src]."))
- if(do_after(user, 40))
+ if(do_after(user, 4 SECONDS, target = src))
to_chat(user, span_notice("You have finished shoveling!"))
qdel(src)
return
diff --git a/code/game/objects/items/bells.dm b/code/game/objects/items/bells.dm
index e906c0713d..c25eef8006 100644
--- a/code/game/objects/items/bells.dm
+++ b/code/game/objects/items/bells.dm
@@ -88,7 +88,7 @@
if(!istype(W))
return
if(W.has_tool_quality(TOOL_WRENCH) && isturf(loc))
- if(do_after(5))
+ if(do_after(user, 5, target = src))
if(!src) return
to_chat(user, span_notice("You dissasemble the desk bell"))
new /obj/item/stack/material/steel(get_turf(src), 1)
diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm
index 0971ca95a6..1fe3fa99b9 100644
--- a/code/game/objects/items/crayons.dm
+++ b/code/game/objects/items/crayons.dm
@@ -98,7 +98,7 @@
if(!drawtype || get_dist(target, user) > 1 || !(user.z == target.z))
return
to_chat(user, "You start drawing an arrow on the [target.name].")
- if(instant || do_after(user, 50))
+ if(instant || do_after(user, 5 SECONDS, target = src))
var/list/mouse_control = params2list(click_parameters)
var/p_x = 0
var/p_y = 0
diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm
index f42b9bd025..749c551eaf 100644
--- a/code/game/objects/items/devices/aicard.dm
+++ b/code/game/objects/items/devices/aicard.dm
@@ -114,7 +114,7 @@
user.visible_message("\The [user] starts transferring \the [ai] into \the [src]...", "You start transferring \the [ai] into \the [src]...")
show_message(span_critical("\The [user] is transferring you into \the [src]!"))
- if(do_after(user, 100))
+ if(do_after(user, 10 SECONDS, target = src))
if(carded_ai)
to_chat(user, span_danger("Transfer failed:") + " Existing AI found on remote device. Remove existing AI to install a new one.")
return 0
diff --git a/code/game/objects/items/devices/body_snatcher_vr.dm b/code/game/objects/items/devices/body_snatcher_vr.dm
index eab9ab5bda..33861f3bed 100644
--- a/code/game/objects/items/devices/body_snatcher_vr.dm
+++ b/code/game/objects/items/devices/body_snatcher_vr.dm
@@ -45,7 +45,7 @@
else
log_and_message_admins("attempted to body swap with [key_name(M)].")
user.visible_message(span_warning("[user] pushes the device up their forehead and [M]'s head, the device beginning to let out a series of light beeps!"),span_notice("You begin swap minds with [M]!"))
- if(do_after(user,35 SECONDS,M))
+ if(do_after(user,35 SECONDS, target = M))
if(user.mind && M.mind && M.stat != DEAD && user.stat != DEAD)
log_and_message_admins("[user.ckey] used a Bodysnatcher to swap bodies with [M.ckey]", user)
to_chat(user,span_notice("Your minds have been swapped! Have a nice day."))
diff --git a/code/game/objects/items/devices/defib.dm b/code/game/objects/items/devices/defib.dm
index e2560472dd..c09536ded2 100644
--- a/code/game/objects/items/devices/defib.dm
+++ b/code/game/objects/items/devices/defib.dm
@@ -397,7 +397,7 @@
//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(span_warning("\The [user] begins to place [src] on [H]'s chest."), span_warning("You begin to place [src] on [H]'s chest..."))
- if(!do_after(user, 30, H))
+ if(!do_after(user, 3 SECONDS, target = H))
return
user.visible_message(span_infoplain(span_bold("\The [user]") + " places [src] on [H]'s chest."), span_warning("You place [src] on [H]'s chest."))
playsound(src, 'sound/machines/defib_charge.ogg', 50, 0)
@@ -412,7 +412,7 @@
make_announcement("buzzes, \"Warning - Patient is in hypovolemic shock.\"", "warning") //also includes heart damage
//placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
- if(!do_after(user, chargetime, H))
+ if(!do_after(user, chargetime, target = H))
return
//deduct charge here, in case the base unit was EMPed or something during the delay time
@@ -467,7 +467,7 @@
playsound(src, 'sound/machines/defib_charge.ogg', 50, 0)
audible_message(span_warning("\The [src] lets out a steadily rising hum..."), runemessage = "whines")
- if(!do_after(user, chargetime, H))
+ if(!do_after(user, chargetime, target = H))
return
//deduct charge here, in case the base unit was EMPed or something during the delay time
diff --git a/code/game/objects/items/devices/e_beacon.dm b/code/game/objects/items/devices/e_beacon.dm
index 656acbe534..ca8e200ddb 100644
--- a/code/game/objects/items/devices/e_beacon.dm
+++ b/code/game/objects/items/devices/e_beacon.dm
@@ -36,7 +36,7 @@
var/answer = tgui_alert(user, "Would you like to activate this personal emergency beacon?","\The [src]", list("Yes", "No"))
if(answer != "Yes")
return
- else if(do_after(user, (3 SECONDS))) //short delay, so they can still abort if they want to
+ else if(do_after(user, 3 SECONDS, target = src)) //short delay, so they can still abort if they want to
user.visible_message(span_warning("[user] activates \the [src]!"),span_warning("You activate \the [src], spiking it into the ground!"))
beacon_active = TRUE
icon_state = "e_beacon_active"
diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm
index 39a03667a7..45e4c7aea6 100644
--- a/code/game/objects/items/devices/flash.dm
+++ b/code/game/objects/items/devices/flash.dm
@@ -47,7 +47,7 @@
return
user.visible_message(span_infoplain(span_bold("\The [user]") + " starts trying to repair \the [src]'s bulb."))
repairing = TRUE
- if(do_after(user, (40 SECONDS + rand(0, 20 SECONDS)) * W.toolspeed) && can_repair)
+ if(do_after(user, (40 SECONDS + rand(0, 20 SECONDS)) * W.toolspeed, target = src) && can_repair)
if(prob(30))
user.visible_message(span_notice("\The [user] successfully repairs \the [src]!"))
broken = FALSE
diff --git a/code/game/objects/items/devices/hacktool.dm b/code/game/objects/items/devices/hacktool.dm
index 0012e3f587..f67fd9bd0b 100644
--- a/code/game/objects/items/devices/hacktool.dm
+++ b/code/game/objects/items/devices/hacktool.dm
@@ -80,7 +80,7 @@
var/obj/structure/closet/crate/secure/A = target
if(A.locked)
to_chat(user, span_notice("Overriding access. Stand by."))
- if(do_after(user, (((5 SECONDS + rand(0, 5 SECONDS) + rand(0, 5 SECONDS))*hackspeed))))
+ if(do_after(user, (((5 SECONDS + rand(0, 5 SECONDS) + rand(0, 5 SECONDS))*hackspeed)), target = src))
to_chat(user, span_notice("Override successful!"))
A.locked = FALSE
A.update_icon()
@@ -92,7 +92,7 @@
var/obj/structure/closet/secure_closet/A = target
if(A.locked)
to_chat(user, span_notice("Overriding access. Stand by."))
- if(do_after(user, (((5 SECONDS + rand(0, 5 SECONDS) + rand(0, 5 SECONDS))*hackspeed))))
+ if(do_after(user, (((5 SECONDS + rand(0, 5 SECONDS) + rand(0, 5 SECONDS))*hackspeed)), target = src))
to_chat(user, span_notice("Override successful!"))
A.locked = FALSE
A.update_icon()
diff --git a/code/game/objects/items/devices/paicard_vr.dm b/code/game/objects/items/devices/paicard_vr.dm
index 443681b060..fb3f0e6726 100644
--- a/code/game/objects/items/devices/paicard_vr.dm
+++ b/code/game/objects/items/devices/paicard_vr.dm
@@ -17,7 +17,7 @@ GLOBAL_LIST_EMPTY(paikeys)
user.visible_message(span_notice("\The [user] secured \the [src]'s maintenance panel."))
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
else if(pai)
- if(do_after(user, 3 SECONDS))
+ if(do_after(user, 3 SECONDS, target = src))
panel_open = TRUE
user.visible_message(span_warning("\The [user] opened \the [src]'s maintenance panel."))
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
@@ -154,7 +154,7 @@ GLOBAL_LIST_EMPTY(paikeys)
if(istype(I,/obj/item/paiparts/cell))
if(cell == PP_MISSING)
- if(do_after(user, 3 SECONDS))
+ if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("\The [user] installs \the [I] into \the [src]."),span_notice("You install \the [I] into \the [src]."))
cell = PP_FUNCTIONAL
user.drop_from_inventory(I)
@@ -163,7 +163,7 @@ GLOBAL_LIST_EMPTY(paikeys)
to_chat(user, span_warning("You would need to remove the installed [I] first!"))
if(istype(I,/obj/item/paiparts/processor))
if(processor == PP_MISSING)
- if(do_after(user, 3 SECONDS))
+ if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("\The [user] installs \the [I] into \the [src]."),span_notice("You install \the [I] into \the [src]."))
processor = PP_FUNCTIONAL
user.drop_from_inventory(I)
@@ -172,7 +172,7 @@ GLOBAL_LIST_EMPTY(paikeys)
to_chat(user, span_warning("You would need to remove the installed [I] first!"))
if(istype(I,/obj/item/paiparts/board))
if(board == PP_MISSING)
- if(do_after(user, 3 SECONDS))
+ if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("\The [user] installs \the [I] into \the [src]."),span_notice("You install \the [I] into \the [src]."))
board = PP_FUNCTIONAL
user.drop_from_inventory(I)
@@ -181,7 +181,7 @@ GLOBAL_LIST_EMPTY(paikeys)
to_chat(user, span_warning("You would need to remove the installed [I] first!"))
if(istype(I,/obj/item/paiparts/capacitor))
if(capacitor == PP_MISSING)
- if(do_after(user, 3 SECONDS))
+ if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("\The [user] installs \the [I] into \the [src]."),span_notice("You install \the [I] into \the [src]."))
capacitor = PP_FUNCTIONAL
user.drop_from_inventory(I)
@@ -190,7 +190,7 @@ GLOBAL_LIST_EMPTY(paikeys)
to_chat(user, span_warning("You would need to remove the installed [I] first!"))
if(istype(I,/obj/item/paiparts/projector))
if(projector == PP_MISSING)
- if(do_after(user, 3 SECONDS))
+ if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("\The [user] installs \the [I] into \the [src]."),span_notice("You install \the [I] into \the [src]."))
projector = PP_FUNCTIONAL
user.drop_from_inventory(I)
@@ -199,7 +199,7 @@ GLOBAL_LIST_EMPTY(paikeys)
to_chat(user, span_warning("You would need to remove the installed [I] first!"))
if(istype(I,/obj/item/paiparts/emitter))
if(emitter == PP_MISSING)
- if(do_after(user, 3 SECONDS))
+ if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("\The [user] installs \the [I] into \the [src]."),span_notice("You install \the [I] into \the [src]."))
emitter = PP_FUNCTIONAL
user.drop_from_inventory(I)
@@ -208,7 +208,7 @@ GLOBAL_LIST_EMPTY(paikeys)
to_chat(user, span_warning("You would need to remove the installed [I] first!"))
if(istype(I,/obj/item/paiparts/speech_synthesizer))
if(speech_synthesizer == PP_MISSING)
- if(do_after(user, 3 SECONDS))
+ if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("\The [user] installs \the [I] into \the [src]."),span_notice("You install \the [I] into \the [src]."))
speech_synthesizer = PP_FUNCTIONAL
user.drop_from_inventory(I)
@@ -241,7 +241,7 @@ GLOBAL_LIST_EMPTY(paikeys)
playsound(src, 'sound/items/pickup/component.ogg', vary = TRUE)
else
return
- if(!do_after(user, 3 SECONDS))
+ if(!do_after(user, 3 SECONDS, target = src))
return
switch(choice)
if("cell")
diff --git a/code/game/objects/items/devices/scanners/gene.dm b/code/game/objects/items/devices/scanners/gene.dm
index 7471f545d4..e0f1c11569 100644
--- a/code/game/objects/items/devices/scanners/gene.dm
+++ b/code/game/objects/items/devices/scanners/gene.dm
@@ -19,7 +19,7 @@
playsound(src, 'sound/misc/bloop.ogg', 50, 1)
flick("health2", src)
- if(do_after(user,6 SECONDS,AM))
+ if(do_after(user, 6 SECONDS, target = AM))
scan_genes(AM,user)
/obj/item/gene_scanner/proc/scan_genes(atom/movable/AM,mob/user)
diff --git a/code/game/objects/items/devices/scanners/sleevemate.dm b/code/game/objects/items/devices/scanners/sleevemate.dm
index 6cfd97de7a..d616f76d02 100644
--- a/code/game/objects/items/devices/scanners/sleevemate.dm
+++ b/code/game/objects/items/devices/scanners/sleevemate.dm
@@ -219,7 +219,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
persist_nif_data(H)
usr.visible_message("[usr] begins scanning [target]'s mind.",span_notice("You begin scanning [target]'s mind."))
- if(do_after(usr,8 SECONDS,target))
+ if(do_after(usr, 8 SECONDS, target))
our_db.m_backup(target.mind,nif,one_time = TRUE)
to_chat(usr,span_notice("Mind backed up!"))
else
@@ -235,7 +235,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
var/mob/living/carbon/human/H = target
usr.visible_message("[usr] begins scanning [target]'s body.",span_notice("You begin scanning [target]'s body."))
- if(do_after(usr,8 SECONDS,target))
+ if(do_after(usr, 8 SECONDS, target))
var/datum/transhuman/body_record/BR = new()
BR.init_from_mob(H, TRUE, TRUE, database_key = db_key)
to_chat(usr,span_notice("Body scanned!"))
@@ -257,7 +257,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
if(choice == "Continue" && usr.get_active_hand() == src && usr.Adjacent(target))
usr.visible_message(span_warning("[usr] begins downloading [target]'s mind!"),span_notice("You begin downloading [target]'s mind!"))
- if(do_after(usr,35 SECONDS,target)) //This is powerful, yo.
+ if(do_after(usr, 35 SECONDS, target)) //This is powerful, yo.
if(!stored_mind && target.mind)
get_mind(target)
to_chat(usr,span_notice("Mind downloaded!"))
@@ -308,7 +308,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
return
usr.visible_message(span_warning("[usr] begins uploading someone's mind into [target]!"),span_notice("You begin uploading a mind into [target]!"))
- if(do_after(usr,35 SECONDS,target))
+ if(do_after(usr, 35 SECONDS, target))
if(!stored_mind)
to_chat(usr,span_warning("\The [src] no longer has a stored mind."))
return
diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm
index a572211a9b..d2ff1a05d6 100644
--- a/code/game/objects/items/devices/taperecorder.dm
+++ b/code/game/objects/items/devices/taperecorder.dm
@@ -426,7 +426,7 @@
if(ruined && I.has_tool_quality(TOOL_SCREWDRIVER))
to_chat(user, span_notice("You start winding the tape back in..."))
playsound(src, I.usesound, 50, 1)
- if(do_after(user, 120 * I.toolspeed, target = src))
+ if(do_after(user, 12 SECONDS * I.toolspeed, target = src))
to_chat(user, span_notice("You wound the tape back in."))
fix()
return
diff --git a/code/game/objects/items/devices/translocator_vr.dm b/code/game/objects/items/devices/translocator_vr.dm
index eb91b0da38..ff5d969686 100644
--- a/code/game/objects/items/devices/translocator_vr.dm
+++ b/code/game/objects/items/devices/translocator_vr.dm
@@ -262,7 +262,7 @@ This device records all warnings given and teleport events for admin review in c
if(L.a_intent != I_HELP || L.has_AI())
to_chat(user, span_notice("[L] is resisting your attempt to teleport them with \the [src]."))
to_chat(L, span_danger(" [user] is trying to teleport you with \the [src]!"))
- if(!do_after(user, 30, L))
+ if(!do_after(user, 3 SECONDS, target = L))
return
//Bzzt.
@@ -413,7 +413,7 @@ GLOBAL_LIST_BOILERPLATE(premade_tele_beacons, /obj/item/perfect_tele_beacon/stat
var/obj/belly/bellychoice = tgui_input_list(user, "Which belly?","Select A Belly", L.vore_organs)
if(bellychoice)
user.visible_message(span_warning("[user] is trying to stuff \the [src] into [user.gender == MALE ? "his" : user.gender == FEMALE ? "her" : "their"] [bellychoice.name]!"),span_notice("You begin putting \the [src] into your [bellychoice.name]!"))
- if(do_after(user,5 SECONDS,src))
+ if(do_after(user, 5 SECONDS, target = src))
user.unEquip(src)
forceMove(bellychoice)
user.visible_message(span_warning("[user] eats a telebeacon!"),"You eat the the beacon!")
@@ -479,7 +479,7 @@ GLOBAL_LIST_BOILERPLATE(premade_tele_beacons, /obj/item/perfect_tele_beacon/stat
user.visible_message(span_notice("[user] opens \the [src] and starts pumping the handle."), \
span_notice("You open \the [src] and start pumping the handle."))
while(recharging)
- if(!do_after(user, 10, src))
+ if(!do_after(user, 1 SECOND, target = src))
break
playsound(src,'sound/items/change_drill.ogg',25,1)
if(power_source.give(phase_power) < phase_power)
diff --git a/code/game/objects/items/lockpicks.dm b/code/game/objects/items/lockpicks.dm
index de8f31e29c..3eeb50aa09 100644
--- a/code/game/objects/items/lockpicks.dm
+++ b/code/game/objects/items/lockpicks.dm
@@ -28,7 +28,7 @@
else //finally, we can assume that they do match
to_chat(user, span_notice("You start to [pick_verb] the lock on \the [D]..."))
playsound(src, D.keysound,100, 1)
- if(do_after(user, pick_time * D.lock_difficulty))
+ if(do_after(user, pick_time * D.lock_difficulty, target = src))
to_chat(user, span_notice("Success!"))
D.locked = FALSE
if(istype(A, /obj/structure/fence/door))
@@ -45,7 +45,7 @@
else //finally, we can assume that they do match
to_chat(user, span_notice("You start to [pick_verb] the lock on \the [D]..."))
playsound(src, D.keysound,100, 1)
- if(do_after(user, pick_time * D.lock_difficulty))
+ if(do_after(user, pick_time * D.lock_difficulty, target = src))
to_chat(user, span_notice("Success!"))
D.locked = FALSE
else if(ishuman(A)) //you can pick your friends, and you can pick your nose, but you can't pick your friend's nose
diff --git a/code/game/objects/items/poi_items.dm b/code/game/objects/items/poi_items.dm
index c17e1e16aa..27a4199087 100644
--- a/code/game/objects/items/poi_items.dm
+++ b/code/game/objects/items/poi_items.dm
@@ -238,7 +238,7 @@
message += "Looks like there's a printer without any paper in it."
- if(do_after(user, delay = 5 SECONDS))
+ if(do_after(user, delay = 5 SECONDS, target = src))
to_chat(user, message)
diff --git a/code/game/objects/items/soap.dm b/code/game/objects/items/soap.dm
index 8d22474d29..bc7c5bb61d 100644
--- a/code/game/objects/items/soap.dm
+++ b/code/game/objects/items/soap.dm
@@ -40,7 +40,7 @@
if(ishuman(target) && user.zone_sel.selecting == O_MOUTH)
if(target == user)
to_chat(user, span_warning("You raise the soap to your mouth and prepare to take a bite..."))
- if(do_after(user, 5)) //Mercy against accidental chomps
+ if(do_after(user, 5, target = target)) //Mercy against accidental chomps
user.visible_message(span_notice("[user] takes a bite out of [src]!"), span_notice("You gnaw on [src]! This can't be good for you..."))
var/mob/living/carbon/C = user
playsound(get_turf(C), 'sound/items/eatfood.ogg', 25, 0)
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index bf7f174744..0b13e86362 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -413,7 +413,7 @@
balloon_alert(user, "you can't apply a splint to the arm you're using!")
return
user.balloon_alert_visible("[user] starts to apply \the [src] to their [limb].", "applying \the [src] to your [limb].", "You hear something being wrapped.")
- if(do_after(user, 50, M))
+ if(do_after(user, 5 SECONDS, target = M))
if(affecting.splinted)
balloon_alert(user, "[M]'s [limb] is already splinted!")
return
diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm
index 8a0d57f541..81542d566b 100644
--- a/code/game/objects/items/stacks/nanopaste.dm
+++ b/code/game/objects/items/stacks/nanopaste.dm
@@ -17,7 +17,7 @@
if (istype(M,/mob/living/silicon/robot)) //Repairing cyborgs
var/mob/living/silicon/robot/R = M
if (R.getBruteLoss() || R.getFireLoss())
- if(do_after(user, 7 * toolspeed, R))
+ if(do_after(user, 7 * toolspeed, target = R))
R.adjustBruteLoss(-15)
R.adjustFireLoss(-15)
R.updatehealth()
@@ -51,9 +51,9 @@
else if(can_use(1))
user.setClickCooldown(user.get_attack_speed(src))
if(S.open >= 2)
- if(do_after(user, 5 * toolspeed, S))
+ if(do_after(user, 5 * toolspeed, target = S))
S.heal_damage(restoration_internal, restoration_internal, robo_repair = 1)
- else if(do_after(user, 5 * toolspeed, S))
+ else if(do_after(user, 5 * toolspeed, target = S))
S.heal_damage(restoration_external,restoration_external, robo_repair =1)
H.updatehealth()
use(1)
diff --git a/code/game/objects/items/stacks/sandbags.dm b/code/game/objects/items/stacks/sandbags.dm
index aa370dc766..f8f62ea090 100644
--- a/code/game/objects/items/stacks/sandbags.dm
+++ b/code/game/objects/items/stacks/sandbags.dm
@@ -69,7 +69,7 @@
if (recipe.time)
to_chat(user, span_notice("Building [recipe.title] ..."))
- if (!do_after(user, recipe.time))
+ if (!do_after(user, recipe.time, target = src))
return
if (use(required))
@@ -139,7 +139,7 @@
color = M.icon_colour
/obj/item/stack/emptysandbag/attack_self(var/mob/user)
- while(do_after(user, 1 SECOND) && can_use(1) && istype(get_turf(src), /turf/simulated/floor/outdoors))
+ while(do_after(user, 1 SECOND, target = src) && can_use(1) && istype(get_turf(src), /turf/simulated/floor/outdoors))
use(1)
var/obj/item/stack/sandbags/SB = new (get_turf(src), 1, bag_material)
SB.color = color
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index ff61bf820e..069d31e2a6 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -186,7 +186,7 @@
if (recipe.time)
to_chat(user, span_notice("Building [recipe.title] ..."))
is_building = TRUE
- if (!do_after(user, recipe.time))
+ if (!do_after(user, recipe.time, target = src))
is_building = FALSE
return
diff --git a/code/game/objects/items/toys/toys.dm b/code/game/objects/items/toys/toys.dm
index 1b5f70591a..78f9cc484e 100644
--- a/code/game/objects/items/toys/toys.dm
+++ b/code/game/objects/items/toys/toys.dm
@@ -716,7 +716,7 @@
if(stored_item && opened && !searching)
searching = TRUE
- if(do_after(user, 10))
+ if(do_after(user, 1 SECOND, target = src))
to_chat(user, "You find [icon2html(stored_item, user.client)] [stored_item] in [src]!")
stored_item.forceMove(get_turf(src))
stored_item = null
@@ -824,7 +824,7 @@
/obj/item/toy/plushie/attack_self(mob/user as mob)
if(stored_item && opened && !searching)
searching = TRUE
- if(do_after(user, 10))
+ if(do_after(user, 1 SECOND, target = src))
to_chat(user, "You find [icon2html(stored_item, user.client)] [stored_item] in [src]!")
stored_item.forceMove(get_turf(src))
stored_item = null
diff --git a/code/game/objects/items/toys/toys_vr.dm b/code/game/objects/items/toys/toys_vr.dm
index cccf7a7733..b6781eceff 100644
--- a/code/game/objects/items/toys/toys_vr.dm
+++ b/code/game/objects/items/toys/toys_vr.dm
@@ -654,7 +654,7 @@
/obj/item/toy/minigibber/attackby(obj/O, mob/user, params)
if(istype(O,/obj/item/toy/figure) || istype(O,/obj/item/toy/character) && O.loc == user)
to_chat(user, span_notice("You start feeding \the [O] [icon2html(O, user.client)] into \the [src]'s mini-input."))
- if(do_after(user, 10, target = src))
+ if(do_after(user, 1 SECOND, target = src))
if(O.loc != user)
to_chat(user, span_warning("\The [O] is too far away to feed into \the [src]!"))
else
diff --git a/code/game/objects/items/uav.dm b/code/game/objects/items/uav.dm
index 0349f1ff07..3a429f1989 100644
--- a/code/game/objects/items/uav.dm
+++ b/code/game/objects/items/uav.dm
@@ -99,7 +99,7 @@
if("(Dis)Assemble")
if(can_transition_to(state == UAV_PACKED ? UAV_OFF : UAV_PACKED, user))
user.visible_message(span_infoplain(span_bold("[user]") + " starts [state == UAV_PACKED ? "unpacking" : "packing"] [src]."), span_info("You start [state == UAV_PACKED ? "unpacking" : "packing"] [src]."))
- if(do_after(user, 10 SECONDS, src))
+ if(do_after(user, 10 SECONDS, target = src))
return toggle_packed(user)
// Can toggle power from on and off
if("Toggle Power")
@@ -119,7 +119,7 @@
toggle_pairing()
else if(I.has_tool_quality(TOOL_SCREWDRIVER) && cell)
- if(do_after(user, 3 SECONDS, src))
+ if(do_after(user, 3 SECONDS, target = src))
to_chat(user, span_notice("You remove [cell] into [nickname]."))
playsound(src, I.usesound, 50, 1)
power_down()
@@ -127,7 +127,7 @@
cell = null
else if(istype(I, /obj/item/cell) && !cell)
- if(do_after(user, 3 SECONDS, src))
+ if(do_after(user, 3 SECONDS, target = src))
to_chat(user, span_notice("You insert [I] into [nickname]."))
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
power_down()
diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm
index 64ca92f3b4..f59f6fb602 100644
--- a/code/game/objects/items/weapons/AI_modules.dm
+++ b/code/game/objects/items/weapons/AI_modules.dm
@@ -105,7 +105,7 @@ AI MODULES
R.visible_message(span_danger("\The [user] slides a law module into \the [R]."))
to_chat(R, span_danger("Local law upload in progress."))
to_chat(user, span_notice("Uploading laws from board. This will take a moment..."))
- if(do_after(user, 10 SECONDS))
+ if(do_after(user, 10 SECONDS, target = src))
transmitInstructions(R, user)
to_chat(R, "These are your laws now:")
R.show_laws()
diff --git a/code/game/objects/items/weapons/RMS.dm b/code/game/objects/items/weapons/RMS.dm
index 50b4061b26..1e6521c448 100644
--- a/code/game/objects/items/weapons/RMS.dm
+++ b/code/game/objects/items/weapons/RMS.dm
@@ -96,7 +96,7 @@ var/list/RMS_random_malfunction = list(/obj/item/fbp_backup_cell,
to_chat(user, span_notice("The battery has no charge."))
else
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
- if(do_after(user, 2,target = C))
+ if(do_after(user, 2, target = C))
stored_charge += C.charge
if(C.charge > charge_needed) //We only drain what we need!
C.use(charge_needed)
diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm
index 7d869217b6..8e8f702668 100644
--- a/code/game/objects/items/weapons/cosmetics.dm
+++ b/code/game/objects/items/weapons/cosmetics.dm
@@ -57,7 +57,7 @@
else
user.visible_message(span_warning("[user] begins to do [H]'s lips with \the [src]."), \
span_notice("You begin to apply \the [src]."))
- if(do_after(user, 20, H)) //user needs to keep their active hand, H does not.
+ if(do_after(user, 2 SECONDS, target = H)) //user needs to keep their active hand, H does not.
user.visible_message(span_notice("[user] does [H]'s lips with \the [src]."), \
span_notice("You apply \the [src]."))
H.lip_style = colour
diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm
index f37bc175bb..c9570ef986 100644
--- a/code/game/objects/items/weapons/dna_injector.dm
+++ b/code/game/objects/items/weapons/dna_injector.dm
@@ -129,7 +129,7 @@
//addtimer(VARSET_CALLBACK(src, in_use , FALSE), 5 SECONDS, TIMER_DELETE_ME) //Leaving this for reference of how to do the timer here if do_after wasn't present.
- if(!do_after(user,50))
+ if(!do_after(user, 5 SECONDS, target = src))
in_use = FALSE
return
diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm
index 7a8c86188d..a99e639722 100644
--- a/code/game/objects/items/weapons/explosives.dm
+++ b/code/game/objects/items/weapons/explosives.dm
@@ -53,7 +53,7 @@
to_chat(user, "Planting explosives...")
user.do_attack_animation(target)
- if(do_after(user, 50) && in_range(user, target))
+ if(do_after(user, 5 SECONDS, target = target) && in_range(user, target))
user.drop_item()
src.target = target
loc = null
diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm
index 2ed9431c3f..8248dfad8b 100644
--- a/code/game/objects/items/weapons/handcuffs.dm
+++ b/code/game/objects/items/weapons/handcuffs.dm
@@ -79,7 +79,7 @@
user.visible_message(span_danger("\The [user] is attempting to put [cuff_type] on \the [H]!"))
- if(!do_after(user,use_time))
+ if(!do_after(user, use_time, target = src))
return 0
if(!can_place(target, user)) //victim may have resisted out of the grab in the meantime
@@ -256,7 +256,7 @@ var/last_chew = 0
user.visible_message(span_danger("\The [user] is attempting to put [cuff_type] on \the [H]!"))
- if(!do_after(user,use_time))
+ if(!do_after(user, use_time, target = src))
return 0
if(!can_place(target, user)) //victim may have resisted out of the grab in the meantime
diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm
index f14547655f..509b0dfb39 100644
--- a/code/game/objects/items/weapons/implants/implanter.dm
+++ b/code/game/objects/items/weapons/implants/implanter.dm
@@ -54,7 +54,7 @@
user.do_attack_animation(M)
var/turf/T1 = get_turf(M)
- if (T1 && ((M == user) || do_after(user, 50)))
+ if (T1 && ((M == user) || do_after(user, 5 SECONDS, target = M)))
if(user && M && (get_turf(M) == T1) && src && src.imp)
M.visible_message(span_warning("[M] has been implanted by [user]."))
diff --git a/code/game/objects/items/weapons/material/chainsaw.dm b/code/game/objects/items/weapons/material/chainsaw.dm
index 1d463348d7..e3373d863c 100644
--- a/code/game/objects/items/weapons/material/chainsaw.dm
+++ b/code/game/objects/items/weapons/material/chainsaw.dm
@@ -30,12 +30,12 @@
visible_message("You start pulling the string on \the [src].", "[user] starts pulling the string on the [src].")
if(max_fuel <= 0)
- if(do_after(user, 15))
+ if(do_after(user, 15, target = src))
to_chat(user, "\The [src] won't start!")
else
to_chat(user, "You fumble with the string.")
else
- if(do_after(user, 15))
+ if(do_after(user, 15, target = src))
visible_message("You start \the [src] up with a loud grinding!", "[user] starts \the [src] up with a loud grinding!")
attack_verb = list("shredded", "ripped", "torn")
playsound(src, 'sound/weapons/chainsaw_startup.ogg',40,1)
@@ -89,7 +89,7 @@
Hyd.die()
if (istype(A, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,A) <= 1)
to_chat(user, span_notice("You begin filling the tank on the chainsaw."))
- if(do_after(user, 15))
+ if(do_after(user, 15, target = src))
A.reagents.trans_to_obj(src, max_fuel)
playsound(src, 'sound/effects/refill.ogg', 50, 1, -6)
to_chat(user, span_notice("Chainsaw succesfully refueled."))
diff --git a/code/game/objects/items/weapons/material/gravemarker.dm b/code/game/objects/items/weapons/material/gravemarker.dm
index ffc36d6bdb..e12a53204e 100644
--- a/code/game/objects/items/weapons/material/gravemarker.dm
+++ b/code/game/objects/items/weapons/material/gravemarker.dm
@@ -16,20 +16,20 @@
var/carving_1 = sanitizeSafe(tgui_input_text(user, "Who is \the [src.name] for?", "Gravestone Naming", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
if(carving_1)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
- if(do_after(user, material.hardness * W.toolspeed))
+ if(do_after(user, material.hardness * W.toolspeed, target = src))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
grave_name += carving_1
update_icon()
var/carving_2 = sanitizeSafe(tgui_input_text(user, "What message should \the [src.name] have?", "Epitaph Carving", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
if(carving_2)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
- if(do_after(user, material.hardness * W.toolspeed))
+ if(do_after(user, material.hardness * W.toolspeed, target = src))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
epitaph += carving_2
update_icon()
if(W.has_tool_quality(TOOL_WRENCH))
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
- if(do_after(user, material.hardness * W.toolspeed))
+ if(do_after(user, material.hardness * W.toolspeed, target = src))
material.place_dismantled_product(get_turf(src))
user.visible_message("[user] dismantles down \the [src.name].", "You dismantle \the [src.name].")
qdel(src)
@@ -66,7 +66,7 @@
return 0
else
to_chat(user, span_notice("You begin to place \the [src.name]."))
- if(!do_after(user, 10))
+ if(!do_after(user, 1 SECOND, target = src))
return 0
var/obj/structure/gravemarker/G = new /obj/structure/gravemarker/(user.loc, src.get_material())
to_chat(user, span_notice("You place \the [src.name]."))
diff --git a/code/game/objects/items/weapons/material/material_weapons.dm b/code/game/objects/items/weapons/material/material_weapons.dm
index ff5ed52c88..60d56d4ffd 100644
--- a/code/game/objects/items/weapons/material/material_weapons.dm
+++ b/code/game/objects/items/weapons/material/material_weapons.dm
@@ -128,7 +128,7 @@
if(!fragile)
if(health < initial(health))
user.visible_message("[user] begins repairing \the [src].", "You begin repairing \the [src].")
- if(do_after(user, repair_time))
+ if(do_after(user, repair_time, target = src))
user.visible_message("[user] has finished repairing \the [src]", "You finish repairing \the [src].")
health = min(health + repair_amount, initial(health))
dulled = 0
@@ -146,7 +146,7 @@
to_chat(M, "You should repair [src] first. Try using [kit] on it.")
return FALSE
M.visible_message("[M] begins to replace parts of [src] with [kit].", "You begin to replace parts of [src] with [kit].")
- if(do_after(M, sharpen_time))
+ if(do_after(M, sharpen_time, target = src))
M.visible_message("[M] has finished replacing parts of [src].", "You finish replacing parts of [src].")
src.set_material(material)
return TRUE
diff --git a/code/game/objects/items/weapons/material/misc.dm b/code/game/objects/items/weapons/material/misc.dm
index 5a1db4c540..8974b3cd22 100644
--- a/code/game/objects/items/weapons/material/misc.dm
+++ b/code/game/objects/items/weapons/material/misc.dm
@@ -93,7 +93,7 @@
user.put_in_hands(S)
else
to_chat(user, span_notice("You start compacting the snowball."))
- if(do_after(user, 2 SECONDS))
+ if(do_after(user, 2 SECONDS, target = src))
var/atom/S = new /obj/item/material/snow/snowball/reinforced(user.loc)
qdel(src)
user.put_in_hands(S)
diff --git a/code/game/objects/items/weapons/material/whetstone.dm b/code/game/objects/items/weapons/material/whetstone.dm
index c04c14c7f2..79e20b8081 100644
--- a/code/game/objects/items/weapons/material/whetstone.dm
+++ b/code/game/objects/items/weapons/material/whetstone.dm
@@ -15,7 +15,7 @@
var/obj/item/stack/material/M = I
if(M.get_amount() >= 5)
to_chat(user, "You begin to refine the [src] with [M]...")
- if(do_after(user, 70))
+ if(do_after(user, 7 SECONDS, target = src))
M.use(5)
var/obj/item/SK
SK = new /obj/item/material/sharpeningkit(get_turf(user), M.material.name)
diff --git a/code/game/objects/items/weapons/melee/shock_maul.dm b/code/game/objects/items/weapons/melee/shock_maul.dm
index 1f138733a3..e39ec9cc58 100644
--- a/code/game/objects/items/weapons/melee/shock_maul.dm
+++ b/code/game/objects/items/weapons/melee/shock_maul.dm
@@ -198,7 +198,7 @@
if(!user.IsAdvancedToolUser())
return
if(!status && bcell && bcell.charge >= hitcost)
- if(do_after(user, charge_time))
+ if(do_after(user, charge_time, target = src))
status = 1
user.visible_message(span_warning("[user] charges \the [src]!"),span_warning("You charge \the [src]. It's hammer time!"))
playsound(src, "sparks", 75, 1, -1)
diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm
index b32080f19e..157c0b8548 100644
--- a/code/game/objects/items/weapons/mop.dm
+++ b/code/game/objects/items/weapons/mop.dm
@@ -31,7 +31,7 @@ GLOBAL_LIST_BOILERPLATE(all_mops, /obj/item/mop)
user.visible_message(span_warning("[user] begins to clean \the [get_turf(A)]."))
- if(do_after(user, 40))
+ if(do_after(user, 4 SECONDS, target = src))
var/turf/T = get_turf(A)
if(T)
T.wash(CLEAN_SCRUB)
@@ -73,7 +73,7 @@ GLOBAL_LIST_BOILERPLATE(all_mops, /obj/item/mop)
user.visible_message(span_warning("[user] begins to clean \the [get_turf(A)]."))
- if(do_after(user, 20))
+ if(do_after(user, 2 SECONDS, target = src))
var/turf/T = get_turf(A)
if(T)
T.wash(CLEAN_SCRUB)
diff --git a/code/game/objects/items/weapons/mop_deploy.dm b/code/game/objects/items/weapons/mop_deploy.dm
index d756f7f142..fb42b0b87a 100644
--- a/code/game/objects/items/weapons/mop_deploy.dm
+++ b/code/game/objects/items/weapons/mop_deploy.dm
@@ -38,7 +38,7 @@
if(istype(A, /turf) || istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay) || istype(A, /obj/effect/rune))
user.visible_message(span_warning("[user] begins to clean \the [get_turf(A)]."))
- if(do_after(user, 40))
+ if(do_after(user, 4 SECONDS, target = src))
var/turf/T = get_turf(A)
if(T)
T.clean_deploy(src)
diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm
index cc6c4ff34b..9abe18751f 100644
--- a/code/game/objects/items/weapons/storage/backpack.dm
+++ b/code/game/objects/items/weapons/storage/backpack.dm
@@ -536,7 +536,7 @@
H.visible_message(span_infoplain(span_bold("\The [H]") + " starts to pack \the [src]!"), \
span_notice("You start to pack \the [src]!"), \
span_infoplain("You hear the shuffling of cloth."))
- if(do_after(H, 50))
+ if(do_after(H, 5 SECONDS, target = src))
H.visible_message(span_infoplain(span_bold("\The [H]") + " finishes packing \the [src]!"), \
span_notice("You finish packing \the [src]!"), \
span_infoplain("You hear the shuffling of cloth."))
@@ -549,7 +549,7 @@
H.visible_message(span_infoplain(span_bold("\The [src]") + " starts to unpack \the [src]!"), \
span_notice("You start to unpack \the [src]!"), \
span_infoplain("You hear the shuffling of cloth."))
- if(do_after(H, 25))
+ if(do_after(H, 25, target = src))
H.visible_message(span_infoplain(span_bold("\The [src]") + " finishes unpacking \the [src]!"), \
span_notice("You finish unpacking \the [src]!"), \
span_infoplain("You hear the shuffling of cloth."))
diff --git a/code/game/objects/items/weapons/storage/egg_vr.dm b/code/game/objects/items/weapons/storage/egg_vr.dm
index 7f9c9a5c2a..d037b070dd 100644
--- a/code/game/objects/items/weapons/storage/egg_vr.dm
+++ b/code/game/objects/items/weapons/storage/egg_vr.dm
@@ -29,7 +29,7 @@
/obj/item/storage/vore_egg/proc/hatch(mob/living/user as mob)
visible_message(span_danger("\The [src] begins to shake as something pushes out from within!"))
animate_shake()
- if(do_after(user, 50))
+ if(do_after(user, 5 SECONDS, target = src))
if(use_sound)
playsound(src, src.use_sound, 50, 0, -5)
animate_shake()
diff --git a/code/game/objects/items/weapons/storage/pouches.dm b/code/game/objects/items/weapons/storage/pouches.dm
index f9228e7d2a..11b937b3aa 100644
--- a/code/game/objects/items/weapons/storage/pouches.dm
+++ b/code/game/objects/items/weapons/storage/pouches.dm
@@ -23,7 +23,7 @@
if(user.get_active_hand() == src || user.get_inactive_hand() == src)
return TRUE // Skip delay
- if(insert_delay && !do_after(user, insert_delay, src))
+ if(insert_delay && !do_after(user, insert_delay, target = src))
return FALSE // Moved while there is a delay
return TRUE //Now we're allowed to put the item in the pouch
@@ -33,7 +33,7 @@
if(user.get_active_hand() == src || user.get_inactive_hand() == src)
return TRUE // Skip delay
- if(remove_delay && !do_after(user, remove_delay, src))
+ if(remove_delay && !do_after(user, remove_delay, target = src))
return FALSE // Moved while there is a delay
if(W in src)
diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm
index e3776dbaef..5e72b13186 100644
--- a/code/game/objects/items/weapons/storage/secure.dm
+++ b/code/game/objects/items/weapons/storage/secure.dm
@@ -44,7 +44,7 @@
return
if (W.has_tool_quality(TOOL_SCREWDRIVER))
- if (do_after(user, 20 * W.toolspeed))
+ if (do_after(user, 2 SECONDS * W.toolspeed, target = src))
src.open =! src.open
playsound(src, W.usesound, 50, 1)
user.show_message(span_notice("You [src.open ? "open" : "close"] the service panel."))
@@ -52,7 +52,7 @@
if (istype(W, /obj/item/multitool) && (src.open == 1)&& (!src.l_hacking))
user.show_message(span_notice("Now attempting to reset internal memory, please hold."), 1)
src.l_hacking = 1
- if (do_after(user, 100))
+ if (do_after(user, 10 SECONDS, target = src))
if (prob(40))
src.l_setshort = 1
src.l_set = 0
diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm
index 887b4d2301..9da5ebb6a9 100644
--- a/code/game/objects/items/weapons/tanks/tanks.dm
+++ b/code/game/objects/items/weapons/tanks/tanks.dm
@@ -134,7 +134,7 @@ var/list/global/tank_gauge_cache = list()
if(wired && src.proxyassembly.assembly)
to_chat(user, span_notice("You carefully begin clipping the wires that attach to the tank."))
- if(do_after(user, 100,src))
+ if(do_after(user, 10 SECONDS, target = src))
wired = 0
cut_overlay("bomb_assembly")
to_chat(user, span_notice("You cut the wire and remove the device."))
@@ -161,7 +161,7 @@ var/list/global/tank_gauge_cache = list()
src.proxyassembly.receive_signal()
else if(wired)
- if(do_after(user, 10, src))
+ if(do_after(user, 1 SECOND, target = src))
to_chat(user, span_notice("You quickly clip the wire from the tank."))
wired = 0
cut_overlay("bomb_assembly")
@@ -174,7 +174,7 @@ var/list/global/tank_gauge_cache = list()
if(istype(W, /obj/item/assembly_holder))
if(wired)
to_chat(user, span_notice("You begin attaching the assembly to \the [src]."))
- if(do_after(user, 50, src))
+ if(do_after(user, 5 SECONDS, target = src))
to_chat(user, span_notice("You finish attaching the assembly to \the [src]."))
GLOB.bombers += "[key_name(user)] attached an assembly to a wired [src]. Temp: [src.air_contents.temperature-T0C]"
message_admins("[key_name_admin(user)] attached an assembly to a wired [src]. Temp: [src.air_contents.temperature-T0C]")
@@ -190,7 +190,7 @@ var/list/global/tank_gauge_cache = list()
if(WT.remove_fuel(1,user))
if(!valve_welded)
to_chat(user, span_notice("You begin welding the \the [src] emergency pressure relief valve."))
- if(do_after(user, 40,src))
+ if(do_after(user, 4 SECONDS, target = src))
to_chat(user, span_notice("You carefully weld \the [src] emergency pressure relief valve shut.") + " " + span_warning("\The [src] may now rupture under pressure!"))
src.valve_welded = 1
src.leaking = 0
diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm
index 1799332a2c..af3c3a2891 100644
--- a/code/game/objects/items/weapons/tape.dm
+++ b/code/game/objects/items/weapons/tape.dm
@@ -43,7 +43,7 @@
return
user.visible_message(span_danger("\The [user] begins taping over \the [H]'s eyes!"))
- if(!do_after(user, 30))
+ if(!do_after(user, 3 SECONDS, target = src))
return
if(!can_place(H, user))
@@ -72,7 +72,7 @@
return
user.visible_message(span_danger("\The [user] begins taping up \the [H]'s mouth!"))
- if(!do_after(user, 30))
+ if(!do_after(user, 3 SECONDS, target = src))
return
if(!can_place(H, user))
diff --git a/code/game/objects/items/weapons/traps.dm b/code/game/objects/items/weapons/traps.dm
index 16cee9deea..75993643b5 100644
--- a/code/game/objects/items/weapons/traps.dm
+++ b/code/game/objects/items/weapons/traps.dm
@@ -35,7 +35,7 @@
"You hear the slow creaking of a spring."
)
- if (do_after(user, 60))
+ if (do_after(user, 6 SECONDS, target = src))
user.visible_message(
span_danger("[user] has deployed \the [src]."),
span_danger("You have deployed \the [src]!"),
@@ -55,7 +55,7 @@
span_notice("[user] begins freeing [victim] from \the [src]."),
span_notice("You carefully begin to free [victim] from \the [src]."),
)
- if(do_after(user, 60))
+ if(do_after(user, 6 SECONDS, target = src))
user.visible_message(span_notice("[victim] has been freed from \the [src] by [user]."))
for(var/A in buckled_mobs)
unbuckle_mob(A)
@@ -68,7 +68,7 @@
)
playsound(src, 'sound/machines/click.ogg', 50, 1)
- if(do_after(user, 60))
+ if(do_after(user, 6 SECONDS, target = src))
user.visible_message(
span_danger("[user] has disarmed \the [src]."),
span_notice("You have disarmed \the [src]!")
@@ -202,7 +202,7 @@
)
playsound(src, 'sound/machines/click.ogg', 50, 1)
- if(do_after(user, health))
+ if(do_after(user, health, target = src))
user.visible_message(
span_danger("[user] has collected \the [src]."),
span_notice("You have collected \the [src]!")
@@ -221,7 +221,7 @@
"You hear the rustling of [material.name]."
)
- if (do_after(user, 60))
+ if (do_after(user, 6 SECONDS, target = src))
user.visible_message(
span_danger("[user] has deployed \the [src]."),
span_danger("You have deployed \the [src]!"),
diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm
index 9b87dc441b..071b0d6d65 100644
--- a/code/game/objects/items/weapons/weaponry.dm
+++ b/code/game/objects/items/weapons/weaponry.dm
@@ -121,7 +121,7 @@
/obj/effect/energy_net/user_unbuckle_mob(mob/living/buckled_mob, mob/user)
user.setClickCooldown(user.get_attack_speed())
visible_message(span_danger("[user] begins to tear at \the [src]!"))
- if(do_after(user, escape_time, src, timed_action_flags = IGNORE_INCAPACITATED))
+ if(do_after(user, escape_time, target = src, timed_action_flags = IGNORE_INCAPACITATED))
if(!has_buckled_mobs())
return
visible_message(span_danger("[user] manages to tear \the [src] apart!"))
diff --git a/code/game/objects/micro_structures.dm b/code/game/objects/micro_structures.dm
index de5e07bc74..6fa2e7829f 100644
--- a/code/game/objects/micro_structures.dm
+++ b/code/game/objects/micro_structures.dm
@@ -145,7 +145,7 @@ GLOBAL_LIST_EMPTY(micro_tunnels)
if(!choice)
return
to_chat(user,span_notice("You begin moving..."))
- if(!do_after(user, 10 SECONDS))
+ if(!do_after(user, 10 SECONDS, target = src))
return
user.forceMove(choice)
user.cancel_camera()
@@ -179,7 +179,7 @@ GLOBAL_LIST_EMPTY(micro_tunnels)
if(!can_enter(user))
user.visible_message(span_warning("\The [user] reaches into \the [src]. . ."),span_warning("You reach into \the [src]. . ."))
- if(!do_after(user, 3 SECONDS))
+ if(!do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("\The [user] pulls their hand out of \the [src]."),span_warning("You pull your hand out of \the [src]"))
return
if(!src.contents.len)
@@ -218,7 +218,7 @@ GLOBAL_LIST_EMPTY(micro_tunnels)
return
user.visible_message(span_notice("\The [user] begins climbing into \the [src]!"))
- if(!do_after(user, 10 SECONDS))
+ if(!do_after(user, 10 SECONDS, target = src))
to_chat(user, span_warning("You didn't go into \the [src]!"))
return
@@ -245,7 +245,7 @@ GLOBAL_LIST_EMPTY(micro_tunnels)
var/mob/living/k = M
k.visible_message(span_notice("\The [k] begins climbing into \the [src]!"))
- if(!do_after(k, 3 SECONDS))
+ if(!do_after(k, 3 SECONDS, target = src))
to_chat(k, span_warning("You didn't go into \the [src]!"))
return
@@ -337,7 +337,7 @@ GLOBAL_LIST_EMPTY(micro_tunnels)
if(!choice)
return
to_chat(usr,span_notice("You begin moving..."))
- if(!do_after(usr, 10 SECONDS))
+ if(!do_after(usr, 10 SECONDS, target = src))
return
if(QDELETED(src))
return
@@ -375,7 +375,7 @@ GLOBAL_LIST_EMPTY(micro_tunnels)
if(!(usr.mob_size <= MOB_TINY || usr.get_effective_size(TRUE) <= micro_accepted_scale))
usr.visible_message(span_warning("\The [usr] reaches into \the [src]. . ."),span_warning("You reach into \the [src]. . ."))
- if(!do_after(usr, 3 SECONDS))
+ if(!do_after(usr, 3 SECONDS, target = src))
usr.visible_message(span_notice("\The [usr] pulls their hand out of \the [src]."),span_warning("You pull your hand out of \the [src]"))
return
@@ -416,7 +416,7 @@ GLOBAL_LIST_EMPTY(micro_tunnels)
return
usr.visible_message(span_notice("\The [usr] begins climbing into \the [src]!"))
- if(!do_after(usr, 10 SECONDS))
+ if(!do_after(usr, 10 SECONDS, target = src))
to_chat(usr, span_warning("You didn't go into \the [src]!"))
return
diff --git a/code/game/objects/structures/barricades.dm b/code/game/objects/structures/barricades.dm
index 46ff726786..dff366af44 100644
--- a/code/game/objects/structures/barricades.dm
+++ b/code/game/objects/structures/barricades.dm
@@ -37,7 +37,7 @@
to_chat(user, span_warning("You need one sheet of [material.display_name] to repair \the [src]."))
return
visible_message(span_notice("[user] begins to repair \the [src]."))
- if(do_after(user,20) && health < maxhealth)
+ if(do_after(user, 2 SECONDS, target = src) && health < maxhealth)
if(D.use(1))
health = maxhealth
visible_message(span_notice("[user] repairs \the [src]."))
diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm
index f5b73905c5..05d9e82a94 100644
--- a/code/game/objects/structures/bedsheet_bin.dm
+++ b/code/game/objects/structures/bedsheet_bin.dm
@@ -34,7 +34,7 @@ LINEN BINS
/obj/item/bedsheet/attackby(obj/item/I, mob/user)
if(is_sharp(I))
user.visible_message(span_infoplain(span_bold("\The [user]") + " begins cutting up [src] with [I]."), span_notice("You begin cutting up [src] with [I]."))
- if(do_after(user, 50))
+ if(do_after(user, 5 SECONDS, target = src))
to_chat(user, span_notice("You cut [src] into pieces!"))
for(var/i in 1 to rand(2,5))
new /obj/item/reagent_containers/glass/rag(drop_location())
diff --git a/code/game/objects/structures/bonfire.dm b/code/game/objects/structures/bonfire.dm
index 9464606e1d..168abf2d0e 100644
--- a/code/game/objects/structures/bonfire.dm
+++ b/code/game/objects/structures/bonfire.dm
@@ -88,7 +88,7 @@
/obj/structure/bonfire/proc/dismantle(mob/user)
if(!burning)
user.visible_message("[user] starts dismantling \the [src].", "You start dismantling \the [src].")
- if(do_after(user, 5 SECONDS))
+ if(do_after(user, 5 SECONDS, target = src))
for(var/i = 1 to 5)
material.place_dismantled_product(get_turf(src))
user.visible_message("[user] dismantles down \the [src].", "You dismantle \the [src].")
diff --git a/code/game/objects/structures/catwalk.dm b/code/game/objects/structures/catwalk.dm
index 64216fd0a0..4b5cdc69fa 100644
--- a/code/game/objects/structures/catwalk.dm
+++ b/code/game/objects/structures/catwalk.dm
@@ -113,7 +113,7 @@
if(istype(C, /obj/item/stack/tile/floor) && !plated_tile)
var/obj/item/stack/tile/floor/ST = C
to_chat(user, span_notice("Placing tile..."))
- if (!do_after(user, 10))
+ if (!do_after(user, 1 SECOND, target = src))
return
if(!ST.use(1))
return
diff --git a/code/game/objects/structures/crates_lockers/__closets.dm b/code/game/objects/structures/crates_lockers/__closets.dm
index 15971965a4..a0238777d8 100644
--- a/code/game/objects/structures/crates_lockers/__closets.dm
+++ b/code/game/objects/structures/crates_lockers/__closets.dm
@@ -278,7 +278,7 @@
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
else
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
- if(do_after(user, 20 * W.toolspeed))
+ if(do_after(user, 2 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You [anchored? "un" : ""]secured \the [src]!"))
anchored = !anchored
@@ -336,7 +336,7 @@
else
to_chat(user, span_notice("You need more welding fuel to complete this task."))
return
- if(do_after(user, 20 * S.toolspeed))
+ if(do_after(user, 2 SECONDS * S.toolspeed, target = src))
if(opened) //ChompEDIT - cancel weld if opened mid-progress to prevent welder-traps
return //ChompEDIT
playsound(src, S.usesound, 50)
@@ -449,7 +449,7 @@
breakout = 1 //can't think of a better way to do this right now.
for(var/i in 1 to (6*breakout_time * 2)) //minutes * 6 * 5seconds * 2
- if(!do_after(escapee, 50)) //5 seconds
+ if(!do_after(escapee, 5 SECONDS, target = src)) //5 seconds
breakout = 0
return
if(!escapee || escapee.incapacitated() || escapee.loc != src)
diff --git a/code/game/objects/structures/crates_lockers/closets/coffin.dm b/code/game/objects/structures/crates_lockers/closets/coffin.dm
index 33a3a0bf03..99988ce1c3 100644
--- a/code/game/objects/structures/crates_lockers/closets/coffin.dm
+++ b/code/game/objects/structures/crates_lockers/closets/coffin.dm
@@ -27,7 +27,7 @@
if(opened)
visible_message(span_notice("[user] starts to climb into \the [src.name]."), \
span_notice("You start to lower yourself into \the [src.name]."))
- if(do_after(user, 50))
+ if(do_after(user, 5 SECONDS, target = src))
user.forceMove(src.loc)
visible_message(span_notice("[user] climbs into \the [src.name]."), \
span_notice("You climb into \the [src.name]."))
@@ -72,7 +72,7 @@
user.visible_message(span_notice("[user] piles dirt into \the [src.name]."), \
span_notice("You start to pile dirt into \the [src.name]."), \
span_notice("You hear dirt being moved."))
- if(do_after(user, 40 * W.toolspeed))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
user.visible_message(span_notice("[user] pats down the dirt on top of \the [src.name]."), \
span_notice("You finish filling in \the [src.name]."))
close()
@@ -109,7 +109,7 @@
user.visible_message(span_notice("[user] begins to smoothe out the dirt of \the [src.name]."), \
span_notice("You start to smoothe out the dirt of \the [src.name]."), \
span_notice("You hear dirt being moved."))
- if(do_after(user, 40 * W.toolspeed))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
user.visible_message(span_notice("[user] finishes smoothing out \the [src.name]."), \
span_notice("You finish smoothing out \the [src.name]."))
if(LAZYLEN(contents))
@@ -125,7 +125,7 @@
user.visible_message(span_notice("[user] begins to unearth \the [src.name]."), \
span_notice("You start to unearth \the [src.name]."), \
span_notice("You hear dirt being moved."))
- if(do_after(user, 40 * W.toolspeed))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
user.visible_message(span_notice("[user] reaches the bottom of \the [src.name]."), \
span_notice("You finish digging out \the [src.name]."))
break_open()
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
index a6667eb254..b557acf5fd 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
@@ -61,7 +61,7 @@
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
else
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
- if(do_after(user, 20 * W.toolspeed))
+ if(do_after(user, 2 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You [anchored? "un" : ""]secured \the [src]!"))
anchored = !anchored
diff --git a/code/game/objects/structures/crates_lockers/vehiclecage.dm b/code/game/objects/structures/crates_lockers/vehiclecage.dm
index 33faadd36c..85d38ca189 100644
--- a/code/game/objects/structures/crates_lockers/vehiclecage.dm
+++ b/code/game/objects/structures/crates_lockers/vehiclecage.dm
@@ -31,11 +31,11 @@
var/turf/T = get_turf(src)
if(!T)
to_chat(user, span_notice("You can't open this here!"))
- if(W.has_tool_quality(TOOL_WRENCH) && do_after(user, 60 * W.toolspeed, src))
+ if(W.has_tool_quality(TOOL_WRENCH) && do_after(user, 6 SECONDS * W.toolspeed, target = src))
playsound(src, W.usesound, 50, 1)
disassemble(W, user)
user.visible_message(span_notice("[user] begins loosening \the [src]'s bolts."))
- if(W.has_tool_quality(TOOL_WIRECUTTER) && do_after(user, 70 * W.toolspeed, src))
+ if(W.has_tool_quality(TOOL_WIRECUTTER) && do_after(user, 7 SECONDS * W.toolspeed, target = src))
playsound(src, W.usesound, 50, 1)
disassemble(W, user)
user.visible_message(span_notice("[user] begins cutting \the [src]'s bolts."))
diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm
index 8336d0f373..2c6fcee089 100644
--- a/code/game/objects/structures/curtains.dm
+++ b/code/game/objects/structures/curtains.dm
@@ -49,7 +49,7 @@
if(P.has_tool_quality(TOOL_WIRECUTTER))
playsound(src, P.usesound, 50, 1)
to_chat(user, span_notice("You start to cut the shower curtains."))
- if(do_after(user, 10))
+ if(do_after(user, 1 SECOND, target = src))
to_chat(user, span_notice("You cut the shower curtains."))
new /obj/item/stack/material/plastic(src.loc, 3)
qdel(src)
diff --git a/code/game/objects/structures/dancepole_vr.dm b/code/game/objects/structures/dancepole_vr.dm
index dbadf757e0..aca81a5a69 100644
--- a/code/game/objects/structures/dancepole_vr.dm
+++ b/code/game/objects/structures/dancepole_vr.dm
@@ -18,7 +18,7 @@
if(O.has_tool_quality(TOOL_WRENCH))
playsound(src, O.usesound, 50, 1)
to_chat(user, span_notice("Now disassembling \the [src]..."))
- if(do_after(user, 30 * O.toolspeed))
+ if(do_after(user, 3 SECONDS * O.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You dissasembled \the [src]!"))
new /obj/item/stack/material/steel(src.loc, 1)
diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm
index b24664e859..889002e94e 100644
--- a/code/game/objects/structures/door_assembly.dm
+++ b/code/game/objects/structures/door_assembly.dm
@@ -177,7 +177,7 @@
playsound(src, WT.usesound, 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, 4 SECONDS * WT.toolspeed, src))
+ if(do_after(user, 4 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, span_notice("You welded the [glass] plating off!"))
var/M = text2path("/obj/item/stack/material/[glass]")
@@ -185,14 +185,14 @@
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, 4 SECONDS * WT.toolspeed, src))
+ if(do_after(user, 4 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, span_notice("You welded the glass panel out!"))
new /obj/item/stack/material/glass/reinforced(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, 4 SECONDS * WT.toolspeed, src))
+ if(do_after(user, 4 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, span_notice("You dissasembled the airlock assembly!"))
new /obj/item/stack/material/steel(src.loc, 4)
@@ -208,7 +208,7 @@
else
user.visible_message("[user] begins securing the airlock assembly to the floor.", "You starts securing the airlock assembly to the floor.")
- if(do_after(user, 4 SECONDS * W.toolspeed, src))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You [anchored? "un" : ""]secured the airlock assembly!"))
anchored = !anchored
@@ -219,7 +219,7 @@
to_chat(user, span_warning("You need one length of coil to wire the airlock assembly."))
return
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
- if(do_after(user, 4 SECONDS, src) && state == 0 && anchored)
+ if(do_after(user, 4 SECONDS, target = src) && state == 0 && anchored)
if (C.use(1))
src.state = 1
to_chat(user, span_notice("You wire the airlock."))
@@ -228,7 +228,7 @@
playsound(src, W.usesound, 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, 4 SECONDS * W.toolspeed, src))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You cut the airlock wires.!"))
new/obj/item/stack/cable_coil(src.loc, 1)
@@ -238,7 +238,7 @@
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
- if(do_after(user, 4 SECONDS, src))
+ if(do_after(user, 4 SECONDS, target = src))
if(!src) return
user.drop_item()
W.loc = src
@@ -256,7 +256,7 @@
playsound(src, W.usesound, 100, 1)
user.visible_message("\The [user] starts removing the electronics from the airlock assembly.", "You start removing the electronics from the airlock assembly.")
- if(do_after(user, 4 SECONDS * W.toolspeed, src))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You removed the airlock electronics!"))
src.state = 1
@@ -271,7 +271,7 @@
if(material_name == MAT_RGLASS)
playsound(src, '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, 4 SECONDS, src) && !glass)
+ if(do_after(user, 4 SECONDS, target = src) && !glass)
if (S.use(1))
to_chat(user, span_notice("You installed reinforced glass windows into the airlock assembly."))
glass = 1
@@ -283,7 +283,7 @@
if(S.get_amount() >= 2)
playsound(src, '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, 4 SECONDS, src) && !glass)
+ if(do_after(user, 4 SECONDS, target = src) && !glass)
if (S.use(2))
to_chat(user, span_notice("You installed [material_display_name(material_name)] plating into the airlock assembly."))
glass = material_name
@@ -292,7 +292,7 @@
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now finishing the airlock."))
- if(do_after(user, 4 SECONDS * W.toolspeed, src))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You finish the airlock!"))
var/path
diff --git a/code/game/objects/structures/droppod.dm b/code/game/objects/structures/droppod.dm
index 50a7f09c82..27f1a8f114 100644
--- a/code/game/objects/structures/droppod.dm
+++ b/code/game/objects/structures/droppod.dm
@@ -120,7 +120,7 @@
if(O.has_tool_quality(TOOL_WRENCH))
if(finished)
to_chat(user, span_notice("You start breaking down \the [src]."))
- if(do_after(user, 10 SECONDS, src))
+ if(do_after(user, 10 SECONDS, target = src))
new /obj/item/stack/material/plasteel(loc, 10)
playsound(user, O.usesound, 50, 1)
qdel(src)
diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm
index f7e342f19e..fbe5da91d8 100644
--- a/code/game/objects/structures/extinguisher.dm
+++ b/code/game/objects/structures/extinguisher.dm
@@ -35,7 +35,7 @@
if(!has_extinguisher)
to_chat(user, span_notice("You start to unwrench the extinguisher cabinet."))
playsound(src, O.usesound, 50, 1)
- if(do_after(user, 15 * O.toolspeed))
+ if(do_after(user, 15 * O.toolspeed, target = src))
to_chat(user, span_notice("You unwrench the extinguisher cabinet."))
new /obj/item/frame/extinguisher_cabinet( src.loc )
qdel(src)
diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm
index c7ea2a0303..4e0dafc9ac 100644
--- a/code/game/objects/structures/fence.dm
+++ b/code/game/objects/structures/fence.dm
@@ -195,7 +195,7 @@
else
to_chat(user, span_notice("You start to [L.pick_verb] the lock on \the [src]..."))
playsound(src, keysound,100, 1)
- if(do_after(user, L.pick_time * lock_difficulty))
+ if(do_after(user, L.pick_time * lock_difficulty, target = src))
to_chat(user, span_notice("Success!"))
locked = FALSE
return
diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm
index fefc8acfc0..befcc7fec9 100644
--- a/code/game/objects/structures/fireaxe.dm
+++ b/code/game/objects/structures/fireaxe.dm
@@ -36,7 +36,7 @@
if(istype(O, /obj/item/multitool))
to_chat(user, span_warning("Resetting circuitry..."))
playsound(src, 'sound/machines/lockreset.ogg', 50, 1)
- if(do_after(user, 20 * O.toolspeed))
+ if(do_after(user, 2 SECONDS * O.toolspeed, target = src))
locked = 0
to_chat(user, span_warning("You disable the locking modules."))
update_icon()
@@ -87,7 +87,7 @@
else
to_chat(user, span_warning("Resetting circuitry..."))
playsound(src, 'sound/machines/lockenable.ogg', 50, 1)
- if(do_after(user,20 * O.toolspeed))
+ if(do_after(user, 2 SECONDS * O.toolspeed, target = src))
locked = 1
to_chat(user, span_warning("You re-enable the locking modules."))
return
diff --git a/code/game/objects/structures/fitness.dm b/code/game/objects/structures/fitness.dm
index dc585f9472..a9d45530db 100644
--- a/code/game/objects/structures/fitness.dm
+++ b/code/game/objects/structures/fitness.dm
@@ -63,7 +63,7 @@
playsound(src, 'sound/effects/weightlifter.ogg', 50, 1)
user.set_dir(SOUTH)
flick("[icon_state]_[weight]", src)
- if(do_after(user, 30 + (weight * 10))) //CHOMPEdit Set timer to be similar to the machines in fitness_machines_vr.dm
+ if(do_after(user, 3 SECONDS + (weight * 10), target = src)) //CHOMPEdit Set timer to be similar to the machines in fitness_machines_vr.dm
playsound(src, 'sound/effects/weightdrop.ogg', 25, 1)
user.adjust_nutrition(weight * -10)
var/weightloss_enhanced = weightloss_power * (weight * 0.5)
diff --git a/code/game/objects/structures/flora/flora.dm b/code/game/objects/structures/flora/flora.dm
index 57e6dd0ec5..72668192ac 100644
--- a/code/game/objects/structures/flora/flora.dm
+++ b/code/game/objects/structures/flora/flora.dm
@@ -65,7 +65,7 @@
if(removal_tool && istype(W, removal_tool))
to_chat(user, span_warning("You start uprooting \the [src]..."))
- if(do_after(user, 30))
+ if(do_after(user, 3 SECONDS, target = src))
visible_message(span_notice("\The [user] uproots and discards \the [src]!"))
qdel(src)
return
@@ -286,7 +286,7 @@
to_chat(user, span_notice("[I] is too big to fit inside [src]."))
return
- if(do_after(user, 10))
+ if(do_after(user, 1 SECOND, target = src))
user.drop_from_inventory(I, src)
I.forceMove(src)
stored_item = I
@@ -300,7 +300,7 @@
if(!stored_item)
to_chat(user, span_filter_notice(span_bold("You see nothing of interest in [src]...")))
else
- if(do_after(user, 10))
+ if(do_after(user, 1 SECOND, target = src))
to_chat(user, span_filter_notice("You find [icon2html(stored_item, user.client)] [stored_item] in [src]!"))
stored_item.forceMove(get_turf(src))
stored_item = null
diff --git a/code/game/objects/structures/flora/trees.dm b/code/game/objects/structures/flora/trees.dm
index 334ee23fe6..2f2d369084 100644
--- a/code/game/objects/structures/flora/trees.dm
+++ b/code/game/objects/structures/flora/trees.dm
@@ -46,7 +46,7 @@
if(is_stump)
if(istype(W,/obj/item/shovel))
- if(do_after(user, 5 SECONDS))
+ if(do_after(user, 5 SECONDS, target = src))
visible_message(span_infoplain(span_bold("\The [user]") + " digs up \the [src] stump with \the [W]."))
qdel(src)
return
diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm
index eb6aa12be5..8a44dee8fe 100644
--- a/code/game/objects/structures/girders.dm
+++ b/code/game/objects/structures/girders.dm
@@ -152,20 +152,20 @@
if(anchored && !reinf_material)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now disassembling the girder..."))
- if(do_after(user,(35 + round(max_health/50)) * W.toolspeed))
+ if(do_after(user,(35 + round(max_health/50)) * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You dissasembled the girder!"))
dismantle()
else if(!anchored)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now securing the girder..."))
- if(do_after(user, 40 * W.toolspeed, src))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
to_chat(user, span_notice("You secured the girder!"))
reset_girder()
else if(istype(W, /obj/item/pickaxe/plasmacutter))
to_chat(user, span_notice("Now slicing apart the girder..."))
- if(do_after(user,30 * W.toolspeed))
+ if(do_after(user, 3 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You slice apart the girder!"))
dismantle()
@@ -178,7 +178,7 @@
if(state == 2)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now unsecuring support struts..."))
- if(do_after(user,40 * W.toolspeed))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You unsecured the support struts!"))
state = 1
@@ -190,7 +190,7 @@
else if(W.has_tool_quality(TOOL_WIRECUTTER) && state == 1)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now removing support struts..."))
- if(do_after(user,40 * W.toolspeed))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You removed the support struts!"))
reinf_material.place_dismantled_product(get_turf(src))
@@ -200,7 +200,7 @@
else if(W.has_tool_quality(TOOL_CROWBAR) && state == 0 && anchored)
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now dislodging the girder..."))
- if(do_after(user, 40 * W.toolspeed))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You dislodged the girder!"))
displace()
@@ -251,7 +251,7 @@
to_chat(user, span_notice("You begin adding the plating..."))
- if(!do_after(user,time_to_reinforce) || !S.use(amount_to_use))
+ if(!do_after(user, time_to_reinforce, target = src) || !S.use(amount_to_use))
return TRUE //once we've gotten this far don't call parent attackby()
if(anchored)
@@ -285,7 +285,7 @@
return 0
to_chat(user, span_notice("Now reinforcing..."))
- if (!do_after(user,40) || !S.use(1))
+ if (!do_after(user, 4 SECONDS, target = src) || !S.use(1))
return 1 //don't call parent attackby() past this point
to_chat(user, span_notice("You added reinforcement!"))
@@ -351,13 +351,13 @@
if(W.has_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 100, 1)
to_chat(user, span_notice("Now disassembling the girder..."))
- if(do_after(user,40 * W.toolspeed))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
to_chat(user, span_notice("You dissasembled the girder!"))
dismantle()
else if(istype(W, /obj/item/pickaxe/plasmacutter))
to_chat(user, span_notice("Now slicing apart the girder..."))
- if(do_after(user,30 * W.toolspeed))
+ if(do_after(user, 3 SECONDS * W.toolspeed, target = src))
to_chat(user, span_notice("You slice apart the girder!"))
dismantle()
diff --git a/code/game/objects/structures/gravemarker.dm b/code/game/objects/structures/gravemarker.dm
index 05c81c61d6..533db6dfa1 100644
--- a/code/game/objects/structures/gravemarker.dm
+++ b/code/game/objects/structures/gravemarker.dm
@@ -55,21 +55,21 @@
var/carving_1 = sanitizeSafe(tgui_input_text(user, "Who is \the [src.name] for?", "Gravestone Naming", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
if(carving_1)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
- if(do_after(user, material.hardness * W.toolspeed))
+ if(do_after(user, material.hardness * W.toolspeed, target = src))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
grave_name += carving_1
update_icon()
var/carving_2 = sanitizeSafe(tgui_input_text(user, "What message should \the [src.name] have?", "Epitaph Carving", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
if(carving_2)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
- if(do_after(user, material.hardness * W.toolspeed))
+ if(do_after(user, material.hardness * W.toolspeed, target = src))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
epitaph += carving_2
update_icon()
return
if(W.has_tool_quality(TOOL_WRENCH))
user.visible_message("[user] starts taking down \the [src.name].", "You start taking down \the [src.name].")
- if(do_after(user, material.hardness * W.toolspeed))
+ if(do_after(user, material.hardness * W.toolspeed, target = src))
user.visible_message("[user] takes down \the [src.name].", "You take down \the [src.name].")
dismantle()
..()
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 5dfd1fb905..9961199dcf 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -136,7 +136,7 @@
to_chat(user, span_notice("There is already a window facing this way there."))
return
to_chat(user, span_notice("You start placing the window."))
- if(do_after(user,20))
+ if(do_after(user, 2 SECONDS, target = src))
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.
to_chat(user, span_notice("There is already a window facing this way there."))
diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm
index d89cf47f7e..78b28a7064 100644
--- a/code/game/objects/structures/janicart.dm
+++ b/code/game/objects/structures/janicart.dm
@@ -181,7 +181,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
else if (!has_items)
if (I.has_tool_quality(TOOL_WRENCH))
- if (do_after(user, 5 SECONDS, src))
+ if (do_after(user, 5 SECONDS, target = src))
dismantle(user)
return
..()
diff --git a/code/game/objects/structures/loot_piles.dm b/code/game/objects/structures/loot_piles.dm
index 87b4da65c9..a29ea3c2e0 100644
--- a/code/game/objects/structures/loot_piles.dm
+++ b/code/game/objects/structures/loot_piles.dm
@@ -45,7 +45,7 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh
//Do the searching
busy = TRUE
- if(do_after(user,rand(4 SECONDS,6 SECONDS),src))
+ if(do_after(user, rand(4 SECONDS,6 SECONDS), target = src))
SEND_SIGNAL(src,COMSIG_LOOT_REWARD,L,searchedby)
busy = FALSE
else
diff --git a/code/game/objects/structures/low_wall.dm b/code/game/objects/structures/low_wall.dm
index 3a974c52f1..d5b4f789fb 100644
--- a/code/game/objects/structures/low_wall.dm
+++ b/code/game/objects/structures/low_wall.dm
@@ -96,7 +96,7 @@
return
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
to_chat(user, span_notice("Now disassembling the low wall..."))
- if(do_after(user, 40, src))
+ if(do_after(user, 4 SECONDS, target = src))
to_chat(user, span_notice("You dissasembled the low wall!"))
dismantle()
return
@@ -172,7 +172,7 @@
to_chat(user, span_warning("You need at least two rods to do this."))
return
to_chat(user, span_notice("Assembling grille..."))
- if(!do_after(user, 1 SECONDS, R))
+ if(!do_after(user, 1 SECONDS, target = R))
return
if(!R.use(2))
return
@@ -192,7 +192,7 @@
to_chat(user, span_warning("You need at least four sheets of glass to do this."))
return
to_chat(user, span_notice("Assembling window..."))
- if(!do_after(user, 4 SECONDS, G))
+ if(!do_after(user, 4 SECONDS, target = G))
return
if(!G.use(4))
return
diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm
index ab6271fcb1..d44fa6e232 100644
--- a/code/game/objects/structures/mirror.dm
+++ b/code/game/objects/structures/mirror.dm
@@ -59,7 +59,7 @@
if(I.has_tool_quality(TOOL_WRENCH))
if(!glass)
playsound(src, I.usesound, 50, 1)
- if(do_after(user, 20 * I.toolspeed))
+ if(do_after(user, 2 SECONDS * I.toolspeed, target = src))
to_chat(user, span_notice("You unfasten the frame."))
new /obj/item/frame/mirror( src.loc )
qdel(src)
@@ -86,7 +86,7 @@
to_chat(user, span_warning("You need two sheets of glass to add them to the frame."))
return
to_chat(user, span_notice("You start to add the glass to the frame."))
- if(do_after(user, 20))
+ if(do_after(user, 2 SECONDS, target = src))
if (G.use(2))
shattered = 0
glass = 1
diff --git a/code/game/objects/structures/pillows.dm b/code/game/objects/structures/pillows.dm
index 78a3c6bb4c..77cb0e7ecd 100644
--- a/code/game/objects/structures/pillows.dm
+++ b/code/game/objects/structures/pillows.dm
@@ -64,7 +64,7 @@
/obj/structure/bed/pillowpile/attack_hand(mob/user)
to_chat(user, span_notice("Now disassembling the large pillow pile..."))
- if(do_after(user, 30))
+ if(do_after(user, 3 SECONDS, target = src))
if(!src) return
to_chat(user, span_notice("You dissasembled the large pillow pile!"))
new sourcepillow(src.loc)
@@ -72,7 +72,7 @@
/obj/structure/bed/pillowpilefront/attack_hand(mob/user)
to_chat(user, span_notice("Now disassembling the front of the pillow pile..."))
- if(do_after(user, 30))
+ if(do_after(user, 3 SECONDS, target = src))
if(!src) return
to_chat(user, span_notice("You dissasembled the the front of the pillow pile!"))
new sourcepillow(src.loc)
diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm
index d4cf97f017..66bdb1fe83 100644
--- a/code/game/objects/structures/plasticflaps.dm
+++ b/code/game/objects/structures/plasticflaps.dm
@@ -20,7 +20,7 @@
if(P.has_tool_quality(TOOL_WIRECUTTER))
playsound(src, P.usesound, 50, 1)
to_chat(user, span_notice("You start to cut the plastic flaps."))
- if(do_after(user, 10 * P.toolspeed))
+ if(do_after(user, 1 SECOND * P.toolspeed, target = src))
to_chat(user, span_notice("You cut the plastic flaps."))
new /obj/item/stack/material/plastic(src.loc, 4)
qdel(src)
diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm
index 55b1e95f4b..d5e85b9580 100644
--- a/code/game/objects/structures/railing.dm
+++ b/code/game/objects/structures/railing.dm
@@ -199,7 +199,7 @@
// Dismantle
if(W.has_tool_quality(TOOL_WRENCH) && !anchored)
playsound(src, W.usesound, 50, 1)
- if(do_after(user, 20, src))
+ if(do_after(user, 2 SECONDS, target = src))
user.visible_message(span_infoplain(span_bold("\The [user]") + " dismantles \the [src]."), span_notice("You dismantle \the [src]."))
new /obj/item/stack/material/steel(get_turf(user), 2)
qdel(src)
@@ -210,7 +210,7 @@
var/obj/item/weldingtool/F = W.get_welder()
if(F.welding)
playsound(src, F.usesound, 50, 1)
- if(do_after(user, 20, src))
+ if(do_after(user, 2 SECONDS, target = src))
user.visible_message(span_infoplain(span_bold("\The [user]") + " repairs some damage to \the [src]."), span_notice("You repair some damage to \the [src]."))
health = min(health+(maxhealth/5), maxhealth) // 20% repair per application
return
@@ -219,7 +219,7 @@
if(W.has_tool_quality(TOOL_SCREWDRIVER))
user.visible_message(span_info((anchored ? (span_bold("\The [user]") + " begins unscrewing \the [src].") : (span_bold("\The [user]") + "begins fasten \the [src]."))))
playsound(src, W.usesound, 75, 1)
- if(do_after(user, 10, src))
+ if(do_after(user, 1 SECOND, target = src))
to_chat(user, (anchored ? span_notice("You have unfastened \the [src] from the floor.") : span_notice("You have fastened \the [src] to the floor.")))
anchored = !anchored
update_icon()
diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm
index 1e8fab64f0..40bbfb1580 100644
--- a/code/game/objects/structures/signs.dm
+++ b/code/game/objects/structures/signs.dm
@@ -1674,7 +1674,7 @@
..()
if(istype(W, /obj/item/flame/lighter) || istype(W, /obj/item/weldingtool))
visible_message(span_warning("\The [user] starts to burn \the [src] down!"))
- if(!do_after(user, 2 SECONDS))
+ if(!do_after(user, 2 SECONDS, target = src))
return FALSE
visible_message(span_warning("\The [user] burns \the [src] down!"))
playsound(src.loc, 'sound/items/cigs_lighters/cig_light.ogg', 100, 1)
diff --git a/code/game/objects/structures/simple_doors.dm b/code/game/objects/structures/simple_doors.dm
index 8b8e89c20d..a7f0a4ddca 100644
--- a/code/game/objects/structures/simple_doors.dm
+++ b/code/game/objects/structures/simple_doors.dm
@@ -173,7 +173,7 @@
if(istype(W,/obj/item/pickaxe) && breakable)
var/obj/item/pickaxe/digTool = W
visible_message(span_danger("[user] starts digging [src]!"))
- if(do_after(user,digTool.digspeed*hardness) && src)
+ if(do_after(user,digTool.digspeed*hardness, target = src) && src)
visible_message(span_danger("[user] finished digging [src]!"))
Dismantle()
else if(istype(W,/obj/item) && breakable) //not sure, can't not just weapons get passed to this proc?
diff --git a/code/game/objects/structures/stasis_cage.dm b/code/game/objects/structures/stasis_cage.dm
index 6b83ec29f7..445e345591 100644
--- a/code/game/objects/structures/stasis_cage.dm
+++ b/code/game/objects/structures/stasis_cage.dm
@@ -61,7 +61,7 @@
usr.visible_message("[usr] begins stuffing \the [src] into \the [over_object].", "You begin stuffing \the [src] into \the [over_object].")
Bumped(usr)
- if(do_after(usr, 20, over_object))
+ if(do_after(usr, 2 SECONDS, target = over_object))
usr.visible_message("[usr] has stuffed \the [src] into \the [over_object].", "You have stuffed \the [src] into \the [over_object].")
over_object.contain(src)
else
diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
index 97f6c96ac8..8ec16b623d 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
@@ -147,7 +147,7 @@
to_chat(user, span_notice("\The [src] already has someone buckled to it."))
return
user.visible_message(span_notice("[user] attempts to buckle [affecting] into \the [src]!"))
- if(do_after(user, 20, G.affecting))
+ if(do_after(user, 2 SECONDS, G.affecting, target = src))
affecting.loc = loc
spawn(0)
if(buckle_mob(affecting))
@@ -409,7 +409,7 @@
else
user.visible_message("[user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
- if(do_after(user, 20 * W.toolspeed))
+ if(do_after(user, 2 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You [anchored? "un" : ""]secured \the [src]!"))
anchored = !anchored
diff --git a/code/game/objects/structures/trash_pile_vr.dm b/code/game/objects/structures/trash_pile_vr.dm
index da85d3cb92..76706c040d 100644
--- a/code/game/objects/structures/trash_pile_vr.dm
+++ b/code/game/objects/structures/trash_pile_vr.dm
@@ -120,7 +120,7 @@
//Do the searching
busy = TRUE
- if(do_after(user,rand(4 SECONDS,6 SECONDS),src))
+ if(do_after(user, rand(4 SECONDS,6 SECONDS), target = src))
if(hider && prob(50))
//If there was a hider, chance to reveal them
to_chat(hider,span_danger("You've been discovered!"))
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index a7210eb7b8..ff04b13f04 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -49,7 +49,7 @@
if(I.has_tool_quality(TOOL_CROWBAR))
to_chat(user, span_notice("You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]."))
playsound(src, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
- if(do_after(user, 30))
+ if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!"), span_notice("You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!"), "You hear grinding porcelain.")
cistern = !cistern
update_icon()
@@ -69,7 +69,7 @@
if(open && !swirlie)
user.visible_message(span_danger("[user] starts to give [GM.name] a swirlie!"), span_notice("You start to give [GM.name] a swirlie!"))
swirlie = GM
- if(do_after(user, 30, GM))
+ if(do_after(user, 3 SECONDS, target = GM))
user.visible_message(span_danger("[user] gives [GM.name] a swirlie!"), span_notice("You give [GM.name] a swirlie!"), "You hear a toilet flushing.")
if(!GM.internal)
GM.adjustOxyLoss(5)
@@ -115,7 +115,7 @@
if(open && !swirlie)
user.visible_message(span_danger("[user] starts to give [GM.name] a swirlie!"), span_notice("You start to give [GM.name] a swirlie!"))
swirlie = GM
- if(do_after(user, 30, GM))
+ if(do_after(user, 3 SECONDS, target = GM))
user.visible_message(span_danger("[user] gives [GM.name] a swirlie!"), span_notice("You give [GM.name] a swirlie!"), "You hear a toilet flushing.")
if(!GM.internal)
GM.adjustOxyLoss(5)
@@ -206,7 +206,7 @@
var/newtemp = tgui_input_list(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve", temperature_settings)
to_chat(user, span_notice("You begin to adjust the temperature valve with \the [I]."))
playsound(src, I.usesound, 50, 1)
- if(do_after(user, 50 * I.toolspeed))
+ if(do_after(user, 5 SECONDS * I.toolspeed, target = src))
watertemp = newtemp
user.visible_message(span_notice("[user] adjusts the shower with \the [I]."), span_notice("You adjust the shower with \the [I]."))
add_fingerprint(user)
@@ -613,7 +613,7 @@
playsound(src, 'sound/effects/sink_long.ogg', 75, 1)
busy = 1
- if(!do_after(user, 40, src))
+ if(!do_after(user, 4 SECONDS, target = src))
busy = 0
to_chat(user, span_notice("You stop washing your hands."))
return
@@ -697,7 +697,7 @@
to_chat(user, span_notice("You start washing \the [I]."))
busy = 1
- if(!do_after(user, 40, src))
+ if(!do_after(user, 4 SECONDS, target = src))
busy = 0
to_chat(user, span_notice("You stop washing \the [I]."))
return
diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm
index d591f83f08..f398d40a90 100644
--- a/code/game/objects/structures/windoor_assembly.dm
+++ b/code/game/objects/structures/windoor_assembly.dm
@@ -93,7 +93,7 @@
user.visible_message("[user] disassembles the windoor assembly.", "You start to disassemble the windoor assembly.")
playsound(src, WT.usesound, 50, 1)
- if(do_after(user, 40 * WT.toolspeed))
+ if(do_after(user, 4 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user,span_notice("You disassembled the windoor assembly!"))
if(secure)
@@ -110,7 +110,7 @@
playsound(src, W.usesound, 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 * W.toolspeed))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user,span_notice("You've secured the windoor assembly!"))
src.anchored = TRUE
@@ -121,7 +121,7 @@
playsound(src, W.usesound, 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 * W.toolspeed))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user,span_notice("You've unsecured the windoor assembly!"))
src.anchored = FALSE
@@ -132,7 +132,7 @@
user.visible_message("[user] wires the windoor assembly.", "You start to wire the windoor assembly.")
var/obj/item/stack/cable_coil/CC = W
- if(do_after(user, 40))
+ if(do_after(user, 4 SECONDS, target = src))
if (CC.use(1))
to_chat(user,span_notice("You wire the windoor!"))
src.state = "02"
@@ -147,7 +147,7 @@
playsound(src, W.usesound, 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 * W.toolspeed))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user,span_notice("You cut the windoor wires.!"))
@@ -160,7 +160,7 @@
playsound(src, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
- if(do_after(user, 40))
+ if(do_after(user, 4 SECONDS, target = src))
if(!src) return
user.drop_item()
@@ -176,7 +176,7 @@
playsound(src, W.usesound, 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 * W.toolspeed))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src || !src.electronics) return
to_chat(user,span_notice("You've removed the airlock electronics!"))
step = 1
@@ -196,7 +196,7 @@
playsound(src, W.usesound, 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 * W.toolspeed))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
if(!src) return
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 58e901c5cc..7275f945a4 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -235,7 +235,7 @@
if(WT.remove_fuel(1 ,user))
to_chat(user, span_notice("You begin repairing [src]..."))
playsound(src, WT.usesound, 50, 1)
- if(do_after(user, 40 * WT.toolspeed, target = src))
+ if(do_after(user, 4 SECONDS * WT.toolspeed, target = src))
health = maxhealth
// playsound(src, 'sound/items/Welder.ogg', 50, 1)
update_icon()
@@ -313,7 +313,7 @@
span_infoplain(span_bold("\The [user]") + " begins to wire \the [src] for electrochromic tinting."), \
span_notice("You begin to wire \the [src] for electrochromic tinting."), \
"You hear sparks.")
- if(do_after(user, 20 * C.toolspeed, src) && state == 0)
+ if(do_after(user, 2 SECONDS * C.toolspeed, src) && state == 0)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
var/obj/structure/window/reinforced/polarized/P = new(loc, dir)
if(is_fulltile())
diff --git a/code/game/objects/trash_eating.dm b/code/game/objects/trash_eating.dm
index bd75c86ed6..fcfdafe84a 100644
--- a/code/game/objects/trash_eating.dm
+++ b/code/game/objects/trash_eating.dm
@@ -62,7 +62,7 @@
var/confirm = tgui_alert(user, "The PDA you're holding contains a vulnerable ID card. Will you risk it?", "Confirmation", list("Definitely", "Cancel"))
if(confirm != "Definitely")
return FALSE
- if(!do_after(user, 100, src))
+ if(!do_after(user, 10 SECONDS, target = src))
return FALSE
user.visible_message(span_warning("[user] successfully makes [src] disappear!"))
return TRUE
@@ -85,7 +85,7 @@
return FALSE
else
user.visible_message(span_warning("[user] is threatening to make [src] disappear!"))
- if(!do_after(user, 100, src))
+ if(!do_after(user, 10 SECONDS, target = src))
return FALSE
user.visible_message(span_warning("[user] successfully makes [src] disappear!"))
return TRUE
diff --git a/code/game/turfs/simulated/floor_attackby.dm b/code/game/turfs/simulated/floor_attackby.dm
index 23db53cfb4..1d04556368 100644
--- a/code/game/turfs/simulated/floor_attackby.dm
+++ b/code/game/turfs/simulated/floor_attackby.dm
@@ -113,7 +113,7 @@
to_chat(user, span_warning("You require at least [use_flooring.build_cost] [S.name] to complete the [use_flooring.descriptor]."))
return
// Stay still and focus...
- if(use_flooring.build_time && !do_after(user, use_flooring.build_time))
+ if(use_flooring.build_time && !do_after(user, use_flooring.build_time, target = src))
return
if(!is_plating() || !S || !user || !use_flooring)
return
@@ -147,7 +147,7 @@
user.visible_message(span_warning("[user] begins cutting through [src]."), span_warning("You begin cutting through [src]."))
// This is slow because it's a potentially hostile action to just cut through places into space in the middle of the bar and such
// Presumably also the structural floor is thick?
- if(do_after(user, 10 SECONDS, src, TRUE))
+ if(do_after(user, 10 SECONDS, target = src))
if(!can_remove_plating(user))
return // Someone slapped down some flooring or cables or something
do_remove_plating(C, user, base_type)
diff --git a/code/game/turfs/simulated/outdoors/outdoors.dm b/code/game/turfs/simulated/outdoors/outdoors.dm
index 604ab5d038..719defa467 100644
--- a/code/game/turfs/simulated/outdoors/outdoors.dm
+++ b/code/game/turfs/simulated/outdoors/outdoors.dm
@@ -50,7 +50,7 @@ var/list/turf_edge_cache = list()
to_chat(user, span_notice("\The [user] begins digging into \the [src] with \the [C]."))
var/delay = (5 SECONDS * C.toolspeed)
user.setClickCooldown(delay)
- if(do_after(user, delay, src))
+ if(do_after(user, delay, target = src))
new/obj/structure/closet/grave/dirthole(src)
to_chat(user, span_notice("You dug up a hole!"))
return
@@ -58,7 +58,7 @@ var/list/turf_edge_cache = list()
to_chat(user, span_notice("\The [user] begins digging into \the [src] with \the [C]."))
var/delay = (3 SECONDS * C.toolspeed)
user.setClickCooldown(delay)
- if(do_after(user, delay, src))
+ if(do_after(user, delay, target = src))
if(!(locate(/obj/machinery/portable_atmospherics/hydroponics/soil) in contents))
var/obj/machinery/portable_atmospherics/hydroponics/soil/soil = new(src)
user.visible_message(span_notice("\The [src] digs \a [soil] into \the [src]."))
diff --git a/code/game/turfs/simulated/outdoors/snow.dm b/code/game/turfs/simulated/outdoors/snow.dm
index c1f499c50b..6a0eb3d30e 100644
--- a/code/game/turfs/simulated/outdoors/snow.dm
+++ b/code/game/turfs/simulated/outdoors/snow.dm
@@ -27,7 +27,7 @@
/turf/simulated/floor/outdoors/snow/attackby(var/obj/item/W, var/mob/user)
if(istype(W, /obj/item/shovel))
to_chat(user, span_notice("You begin to remove \the [src] with your [W]."))
- if(do_after(user, 4 SECONDS * W.toolspeed))
+ if(do_after(user, 4 SECONDS * W.toolspeed, target = src))
to_chat(user, span_notice("\The [src] has been dug up, and now lies in a pile nearby."))
new /obj/item/stack/material/snow(src, 10)
demote()
@@ -40,7 +40,7 @@
if(!Adjacent(user))
return
visible_message("[user] starts scooping up some snow.", "You start scooping up some snow.")
- if(do_after(user, 1 SECOND))
+ if(do_after(user, 1 SECOND, target = src))
var/obj/S = new /obj/item/stack/material/snow(user.loc)
user.put_in_hands(S)
visible_message("[user] scoops up a pile of snow.", "You scoop up a pile of snow.")
diff --git a/code/game/turfs/simulated/outdoors/survival_action_vr.dm b/code/game/turfs/simulated/outdoors/survival_action_vr.dm
index 0e03fea59d..95935cb27d 100644
--- a/code/game/turfs/simulated/outdoors/survival_action_vr.dm
+++ b/code/game/turfs/simulated/outdoors/survival_action_vr.dm
@@ -9,7 +9,7 @@ var/static/list/has_rocks = list("dirt5", "dirt6", "dirt7", "dirt8", "dirt9")
return ..()
if(icon_state in has_rocks)
user.visible_message("[user] loosens rocks from \the [src]...", "You loosen rocks from \the [src]...")
- if(do_after(user, 5 SECONDS))
+ if(do_after(user, 5 SECONDS, target = src))
var/obj/item/stack/material/flint/R = new(get_turf(src), rand(1,4))
R.pixel_x = rand(-6,6)
R.pixel_y = rand(-6,6)
@@ -23,7 +23,7 @@ var/static/list/has_rocks = list("dirt5", "dirt6", "dirt7", "dirt8", "dirt9")
if(!choice||choice=="No")
return
user.visible_message("[user] starts piling up \the [src]...", "You start piling up \the [src]...")
- if(do_after(user, 5 SECONDS))
+ if(do_after(user, 5 SECONDS, target = src))
new /obj/machinery/portable_atmospherics/hydroponics/soil(src)
/turf/simulated/floor/outdoors
@@ -34,7 +34,7 @@ var/static/list/has_rocks = list("dirt5", "dirt6", "dirt7", "dirt8", "dirt9")
to_chat(user, span_notice("The [name] isn't clear."))
return
user.visible_message("[user] starts digging around in \the [src]...", "You start digging around in \the [src]...")
- if(do_after(user, 5 SECONDS))
+ if(do_after(user, 5 SECONDS, target = src))
if(prob(rock_chance))
var/obj/item/stack/material/flint/R = new(get_turf(src), rand(1,4))
to_chat(user, span_notice("You found some [R]"))
@@ -73,7 +73,7 @@ var/static/list/has_rocks = list("dirt5", "dirt6", "dirt7", "dirt8", "dirt9")
/obj/structure/flora/tree/attack_hand(mob/user)
if(sticks)
user.visible_message("[user] searches \the [src] for loose sticks...", "You search \the [src] for loose sticks...")
- if(do_after(user, 5 SECONDS))
+ if(do_after(user, 5 SECONDS, target = src))
var/obj/item/stack/material/stick/S = new(get_turf(user), rand(1,3))
S.pixel_x = rand(-6,6)
S.pixel_y = rand(-6,6)
diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm
index da01dd625e..a1b8d4ca3b 100644
--- a/code/game/turfs/simulated/wall_attacks.dm
+++ b/code/game/turfs/simulated/wall_attacks.dm
@@ -240,7 +240,7 @@
if(WT.remove_fuel(0,user))
to_chat(user, span_notice("You start repairing the damage to [src]."))
playsound(src, WT.usesound, 100, 1)
- if(do_after(user, max(5, damage / 5) * WT.toolspeed) && WT && WT.isOn())
+ if(do_after(user, max(5, damage / 5) * WT.toolspeed, target = src) && WT && WT.isOn())
to_chat(user, span_notice("You finish repairing the damage to [src]."))
take_damage(-damage)
else
@@ -287,7 +287,7 @@
if(cut_delay < 0)
cut_delay = 0
- if(!do_after(user,cut_delay * W.toolspeed))
+ if(!do_after(user, cut_delay * W.toolspeed, target = src))
return
to_chat(user, span_notice("You remove the outer plating."))
@@ -310,7 +310,7 @@
if (W.has_tool_quality(TOOL_SCREWDRIVER))
to_chat(user, span_notice("You begin removing the support lines."))
playsound(src, W.usesound, 100, 1)
- if(!do_after(user,40 * W.toolspeed) || !istype(src, /turf/simulated/wall) || construction_stage != 5)
+ if(!do_after(user, 4 SECONDS * W.toolspeed, target = src) || !istype(src, /turf/simulated/wall) || construction_stage != 5)
return
construction_stage = 4
user.update_examine_panel(src)
@@ -340,7 +340,7 @@
if(cut_cover)
to_chat(user, span_notice("You begin slicing through the metal cover."))
playsound(src, W.usesound, 100, 1)
- if(!do_after(user, 60 * W.toolspeed) || !istype(src, /turf/simulated/wall) || construction_stage != 4)
+ if(!do_after(user, 6 SECONDS * W.toolspeed, target = src) || !istype(src, /turf/simulated/wall) || construction_stage != 4)
return
construction_stage = 3
user.update_examine_panel(src)
@@ -350,7 +350,7 @@
else if (W.has_tool_quality(TOOL_SCREWDRIVER))
to_chat(user, span_notice("You begin screwing down the support lines."))
playsound(src, W.usesound, 100, 1)
- if(!do_after(user,40 * W.toolspeed) || !istype(src, /turf/simulated/wall) || construction_stage != 4)
+ if(!do_after(user, 4 SECONDS * W.toolspeed, target = src) || !istype(src, /turf/simulated/wall) || construction_stage != 4)
return
construction_stage = 5
user.update_examine_panel(src)
@@ -361,7 +361,7 @@
if (W.has_tool_quality(TOOL_CROWBAR))
to_chat(user, span_notice("You struggle to pry off the cover."))
playsound(src, W.usesound, 100, 1)
- if(!do_after(user,100 * W.toolspeed) || !istype(src, /turf/simulated/wall) || construction_stage != 3)
+ if(!do_after(user, 10 SECONDS * W.toolspeed, target = src) || !istype(src, /turf/simulated/wall) || construction_stage != 3)
return
construction_stage = 2
user.update_examine_panel(src)
@@ -372,7 +372,7 @@
if (W.has_tool_quality(TOOL_WRENCH))
to_chat(user, span_notice("You start loosening the anchoring bolts which secure the support rods to their frame."))
playsound(src, W.usesound, 100, 1)
- if(!do_after(user,40 * W.toolspeed) || !istype(src, /turf/simulated/wall) || construction_stage != 2)
+ if(!do_after(user, 4 SECONDS * W.toolspeed, target = src) || !istype(src, /turf/simulated/wall) || construction_stage != 2)
return
construction_stage = 1
user.update_examine_panel(src)
@@ -393,7 +393,7 @@
if(cut_cover)
to_chat(user, span_notice("You begin slicing through the support rods."))
playsound(src, W.usesound, 100, 1)
- if(!do_after(user,70 * W.toolspeed) || !istype(src, /turf/simulated/wall) || construction_stage != 1)
+ if(!do_after(user, 7 SECONDS * W.toolspeed, target = src) || !istype(src, /turf/simulated/wall) || construction_stage != 1)
return
construction_stage = 0
user.update_examine_panel(src)
@@ -404,7 +404,7 @@
if(W.has_tool_quality(TOOL_CROWBAR))
to_chat(user, span_notice("You struggle to pry off the outer sheath."))
playsound(src, W.usesound, 100, 1)
- if(!do_after(user,100 * W.toolspeed) || !istype(src, /turf/simulated/wall) || !user || !W || !T )
+ if(!do_after(user, 10 SECONDS * W.toolspeed, target = src) || !istype(src, /turf/simulated/wall) || !user || !W || !T )
return
if(user.loc == T && user.get_active_hand() == W )
to_chat(user, span_notice("You pry off the outer sheath."))
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index 5c90f38c91..2df61717b7 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -223,7 +223,7 @@
return
if(isanimal(user) && O != user)
return
- if (do_after(user, 25 + (5 * user.weakened)) && !(user.stat))
+ if (do_after(user, 25 + (5 * user.weakened), target = O) && !(user.stat))
step_towards(O, src)
if(ismob(O))
animate(O, transform = turn(O.transform, 20), time = 2)
@@ -387,7 +387,7 @@
vandal.visible_message(span_warning("\The [vandal] begins carving something into \the [src]."))
- if(!do_after(vandal, max(20, length(message)), src))
+ if(!do_after(vandal, max(2 SECONDS, length(message)), target = src))
return FALSE
vandal.visible_message(span_danger("\The [vandal] carves some graffiti into \the [src]."))
diff --git a/code/modules/artifice/cursedform.dm b/code/modules/artifice/cursedform.dm
index 19d9dd8ada..ca236f3794 100644
--- a/code/modules/artifice/cursedform.dm
+++ b/code/modules/artifice/cursedform.dm
@@ -20,7 +20,7 @@
user.visible_message("[user] holds \the [P] up to \the [src], it looks like [TU.hes] trying to burn it!", \
"You hold \the [P] up to \the [src], burning it slowly.")
- if(do_after(user, 2 SECONDS, src) && P.lit)
+ if(do_after(user, 2 SECONDS, target = src) && P.lit)
user.visible_message("[user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.", \
"You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.")
diff --git a/code/modules/awaymissions/redgate.dm b/code/modules/awaymissions/redgate.dm
index 82a872f6e8..1f1f02f866 100644
--- a/code/modules/awaymissions/redgate.dm
+++ b/code/modules/awaymissions/redgate.dm
@@ -1543,7 +1543,7 @@
//set the verb based on matching (or mismatching) outfits, and teleport the flag back to base if it was touched by the owning team
if(grabbing_team == laser_team)
user.visible_message(span_warning("[user] is returning \the [src]!"))
- if(do_after(user,flag_return_delay)) //channel return, rather than instant
+ if(do_after(user, flag_return_delay, target = src)) //channel return, rather than instant
user.drop_from_inventory(src)
src.loc = src.start_pos
GLOB.global_announcer.autosay("[capitalize(laser_team)] flag returned by [user]!","Laserdome Announcer","Entertainment")
diff --git a/code/modules/casino/slots.dm b/code/modules/casino/slots.dm
index f107676b48..02bd5d3590 100644
--- a/code/modules/casino/slots.dm
+++ b/code/modules/casino/slots.dm
@@ -68,7 +68,7 @@
else
user.visible_message("[user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
- if(do_after(user, 20 * W.toolspeed))
+ if(do_after(user, 2 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You [anchored? "un" : ""]secured \the [src]!"))
anchored = !anchored
@@ -300,7 +300,7 @@
else
user.visible_message("[user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
- if(do_after(user, 20 * W.toolspeed))
+ if(do_after(user, 2 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You [anchored? "un" : ""]secured \the [src]!"))
anchored = !anchored
diff --git a/code/modules/client/stored_item.dm b/code/modules/client/stored_item.dm
index d38d5d56a5..252efd4d3f 100644
--- a/code/modules/client/stored_item.dm
+++ b/code/modules/client/stored_item.dm
@@ -96,7 +96,7 @@
busy_bank = FALSE
icon_state = "item_bank"
return
- else if(!do_after(user, 10 SECONDS, src) || inoperable())
+ else if(!do_after(user, 10 SECONDS, target = src) || inoperable())
busy_bank = FALSE
icon_state = "item_bank"
return
@@ -145,7 +145,7 @@
return
user.visible_message(span_notice("\The [user] begins storing \the [O] in \the [src]."),span_notice("You begin storing \the [O] in \the [src]."))
icon_state = "item_bank_o"
- if(!do_after(user, 10 SECONDS, src) || inoperable())
+ if(!do_after(user, 10 SECONDS, target = src) || inoperable())
busy_bank = FALSE
icon_state = "item_bank"
return
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 282a59c68d..80e8ebf8ab 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -878,7 +878,7 @@
return
if(!istype(macro))
to_chat(micro, span_notice("You start to climb out of [src]!"))
- if(do_after(micro, 50, src))
+ if(do_after(micro, 5 SECONDS, target = src))
to_chat(micro, span_notice("You climb out of [src]!"))
micro.forceMove(loc)
return
@@ -893,7 +893,7 @@
to_chat(micro, span_notice("[escape_message_micro]"))
to_chat(macro, span_danger("[escape_message_macro]"))
- if(!do_after(micro, escape_time, macro))
+ if(!do_after(micro, escape_time, target = macro))
to_chat(micro, span_danger("You're pinned underfoot!"))
to_chat(macro, span_danger("You pin the escapee underfoot!"))
return
diff --git a/code/modules/clothing/glasses/glasses_vr.dm b/code/modules/clothing/glasses/glasses_vr.dm
index d219a630d4..6849cc14e4 100644
--- a/code/modules/clothing/glasses/glasses_vr.dm
+++ b/code/modules/clothing/glasses/glasses_vr.dm
@@ -37,7 +37,7 @@
to_chat(user, span_warning("You need to build a prescription from someone first! Use the kit on someone."))
return
- if(do_after(user,5 SECONDS))
+ if(do_after(user, 5 SECONDS, target = target))
G.prescribe(user)
scrip_loaded = 0
@@ -49,7 +49,7 @@
return
T.visible_message("[user] begins making measurements for prescription lenses for [target].","[user] begins measuring your eyes. Hold still!")
- if(do_after(user,5 SECONDS,T))
+ if(do_after(user, 5 SECONDS, target = T))
T.flash_eyes()
scrip_loaded = 1
T.visible_message("[user] finishes making prescription lenses for [target].",span_warning("Gah, that's bright!"))
diff --git a/code/modules/clothing/gloves/antagonist.dm b/code/modules/clothing/gloves/antagonist.dm
index 0c436a706a..5c20ab6707 100644
--- a/code/modules/clothing/gloves/antagonist.dm
+++ b/code/modules/clothing/gloves/antagonist.dm
@@ -85,6 +85,6 @@
return 1
/obj/item/clothing/gloves/sterile/thieves/Touch(var/atom/A, var/proximity)
- if(proximity && ishuman(usr) && do_after(usr, 1 SECOND, A))
+ if(proximity && ishuman(usr) && do_after(usr, 1 SECOND, target = A))
return pickpocket(usr, A, proximity)
return 0
diff --git a/code/modules/clothing/spacesuits/rig/modules/modules.dm b/code/modules/clothing/spacesuits/rig/modules/modules.dm
index 521fdd483e..07ef7ce2df 100644
--- a/code/modules/clothing/spacesuits/rig/modules/modules.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/modules.dm
@@ -75,7 +75,7 @@
to_chat(user, "You start mending the damaged portions of \the [src]...")
- if(!do_after(user,30) || !W || !src)
+ if(!do_after(user, 3 SECONDS, target = src) || !W || !src)
return
var/obj/item/stack/nanopaste/paste = W
@@ -100,7 +100,7 @@
return
to_chat(user, "You start mending the damaged portions of \the [src]...")
- if(!do_after(user,30) || !W || !src)
+ if(!do_after(user, 3 SECONDS, target = src) || !W || !src)
return
damage = 1
diff --git a/code/modules/clothing/spacesuits/rig/modules/specific/pat_module_vr.dm b/code/modules/clothing/spacesuits/rig/modules/specific/pat_module_vr.dm
index 02f2414a99..5e89131092 100644
--- a/code/modules/clothing/spacesuits/rig/modules/specific/pat_module_vr.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/specific/pat_module_vr.dm
@@ -80,7 +80,7 @@
return 0
H.visible_message(span_warning("[H] begins overriding the airlock!"),span_notice("You begin overriding the airlock!"))
- if(do_after(H,6 SECONDS,A) && A.density)
+ if(do_after(H, 6 SECONDS, target = A) && A.density)
A.open()
var/username = FindNameFromID(H) || "Unknown"
diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm
index 6610cd9f1e..5530eab821 100644
--- a/code/modules/clothing/spacesuits/rig/rig.dm
+++ b/code/modules/clothing/spacesuits/rig/rig.dm
@@ -320,7 +320,7 @@
if(!instant)
M.visible_message(span_notice("[M]'s suit emits a quiet hum as it begins to adjust its seals."),span_notice("With a quiet hum, the suit begins running checks and adjusting components."))
- if(seal_delay && !do_after(M,seal_delay))
+ if(seal_delay && !do_after(M, seal_delay, target = src))
if(M)
to_chat(M, span_warning("You must remain still while the suit is adjusting the components."))
playsound(src, 'sound/machines/rig/rigerror.ogg', 20, FALSE)
@@ -346,7 +346,7 @@
if(!failed_to_seal && (M.back == src || M.belt == src) && piece == compare_piece)
- if(seal_delay && !instant && !do_after(M,seal_delay,timed_action_flags = IGNORE_SLOWDOWNS))
+ if(seal_delay && !instant && !do_after(M, seal_delay, target = src))
failed_to_seal = 1
piece.icon_state = "[suit_state][!seal_target ? "_sealed" : ""]"
@@ -682,7 +682,7 @@
if(seal_delay > 0 && istype(M) && (M.back == src || M.belt == src))
M.visible_message(span_notice("[M] starts putting on \the [src]..."), span_notice("You start putting on \the [src]..."))
- if(!do_after(M,seal_delay))
+ if(!do_after(M, seal_delay, target = src))
if(M && (M.back == src || M.belt == src))
if(!M.unEquip(src))
return
diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm
index ef06081927..3bd01a5b14 100644
--- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm
+++ b/code/modules/clothing/spacesuits/rig/rig_attackby.dm
@@ -80,7 +80,7 @@
var/obj/item/rig_module/mod = W
to_chat(user, "You begin installing \the [mod] into \the [src].")
- if(!do_after(user,40))
+ if(!do_after(user, 4 SECONDS, target = src))
return
if(!user || !W)
return
diff --git a/code/modules/detectivework/microscope/microscope.dm b/code/modules/detectivework/microscope/microscope.dm
index 62185b7538..a8746df16f 100644
--- a/code/modules/detectivework/microscope/microscope.dm
+++ b/code/modules/detectivework/microscope/microscope.dm
@@ -32,7 +32,7 @@
to_chat(user, span_notice("The microscope whirrs as you examine \the [sample]."))
- if(!do_after(user, 2 SECONDS) || !sample)
+ if(!do_after(user, 2 SECONDS, target = sample) || !sample)
to_chat(user, span_notice("You stop examining \the [sample]."))
return
diff --git a/code/modules/detectivework/tools/rag.dm b/code/modules/detectivework/tools/rag.dm
index 2de7bdedb1..7d92f9d73e 100644
--- a/code/modules/detectivework/tools/rag.dm
+++ b/code/modules/detectivework/tools/rag.dm
@@ -84,7 +84,7 @@
var/target_text = trans_dest? "\the [trans_dest]" : "\the [user.loc]"
user.visible_message(span_danger("\The [user] begins to wring out [src] over [target_text]."), span_notice("You begin to wring out [src] over [target_text]."))
- if(do_after(user, reagents.total_volume*5)) //50 for a fully soaked rag
+ if(do_after(user, reagents.total_volume*5, target = src)) //50 for a fully soaked rag
if(trans_dest)
reagents.trans_to(trans_dest, reagents.total_volume)
else
@@ -98,7 +98,7 @@
else
user.visible_message("[user] starts to wipe [A] with [src].")
update_name()
- if(do_after(user,30))
+ if(do_after(user, 3 SECONDS, target = src))
user.visible_message("[user] finishes wiping [A]!")
A.on_rag_wipe(src)
diff --git a/code/modules/detectivework/tools/scanner.dm b/code/modules/detectivework/tools/scanner.dm
index 57b525c074..07dbe0684e 100644
--- a/code/modules/detectivework/tools/scanner.dm
+++ b/code/modules/detectivework/tools/scanner.dm
@@ -63,7 +63,7 @@
add_fingerprint(user)
- if(!(do_after(user, 1 SECOND)))
+ if(!(do_after(user, 1 SECOND, target = src)))
to_chat(user, span_warning("You must remain still for the device to complete its work."))
return 0
@@ -112,7 +112,7 @@
if(A.forensic_data?.has_fibres())
to_chat(user,span_notice("Fibers/Materials detected.[reveal_fibers ? " Analysing..." : " Acquisition of fibers for H.R.F.S. analysis advised."]"))
flick("[icon_state]1",src)
- if(reveal_fibers && do_after(user, 5 SECONDS))
+ if(reveal_fibers && do_after(user, 5 SECONDS, target = src))
to_chat(user, span_notice("Apparel samples scanned:"))
for(var/sample in A.forensic_data.get_fibres())
to_chat(user, " - " + span_notice("[sample]"))
@@ -120,7 +120,7 @@
//Blood
if (A.forensic_data?.has_blooddna())
to_chat(user, span_notice("Blood detected.[reveal_blood ? " Analysing..." : " Acquisition of swab for H.R.F.S. analysis advised."]"))
- if(reveal_blood && do_after(user, 5 SECONDS))
+ if(reveal_blood && do_after(user, 5 SECONDS, target = src))
flick("[icon_state]1",src)
var/list/blood_data = A.forensic_data.get_blooddna()
for(var/blood in blood_data)
@@ -152,7 +152,7 @@
/obj/item/detective_scanner/proc/display_data(var/mob/user)
if(user && stored && stored.len)
for(var/objref in stored)
- if(!do_after(user, 1 SECOND)) // So people can move and stop the spam, if they refuse to wipe data.
+ if(!do_after(user, 1 SECOND, target = src)) // So people can move and stop the spam, if they refuse to wipe data.
break
var/datum/data/record/forensic/F = stored[objref]
diff --git a/code/modules/economy/cash_register.dm b/code/modules/economy/cash_register.dm
index 9159ee9a7a..72ccf7f88c 100644
--- a/code/modules/economy/cash_register.dm
+++ b/code/modules/economy/cash_register.dm
@@ -497,7 +497,7 @@
user.visible_message(span_warning("\The [user] begins unsecuring \the [src] from the floor."),
"You begin unsecuring \the [src] from the floor.")
playsound(src, W.usesound, 50, 1)
- if(!do_after(user, 20 * W.toolspeed))
+ if(!do_after(user, 2 SECONDS * W.toolspeed, target = src))
manipulating = 0
return
if(!anchored)
diff --git a/code/modules/economy/mint.dm b/code/modules/economy/mint.dm
index fc20a5eb49..24b2a10ff3 100644
--- a/code/modules/economy/mint.dm
+++ b/code/modules/economy/mint.dm
@@ -19,7 +19,7 @@
user.visible_message("[user] starts to feed a sheet of [M.default_type] into \the [src].")
while(M.amount > 0)
icon_state = "coinpress1"
- if(do_after(user, 2 SECONDS, src))
+ if(do_after(user, 2 SECONDS, target = src))
M.amount--
while(coinsToProduce-- > 0)
new M.coin_type(user.loc)
diff --git a/code/modules/economy/vending.dm b/code/modules/economy/vending.dm
index 0dcc699d5e..9f6937d173 100644
--- a/code/modules/economy/vending.dm
+++ b/code/modules/economy/vending.dm
@@ -249,7 +249,7 @@ GLOBAL_LIST_EMPTY(vending_products)
else
user.visible_message(span_filter_notice("[user] begins securing \the [src] to the floor."), span_filter_notice("You start securing \the [src] to the floor."))
- if(do_after(user, 20 * W.toolspeed))
+ if(do_after(user, 2 SECONDS * W.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You [anchored? "un" : ""]secured \the [src]!"))
anchored = !anchored
diff --git a/code/modules/entrepreneur/entrepreneur_items.dm b/code/modules/entrepreneur/entrepreneur_items.dm
index f2dfd654f2..7d9084894e 100644
--- a/code/modules/entrepreneur/entrepreneur_items.dm
+++ b/code/modules/entrepreneur/entrepreneur_items.dm
@@ -294,7 +294,7 @@
if(M.nutrition <= 100)
to_chat(user, span_notice("You are too hungry to exercise right now."))
return 0
- if(!do_after(user, 3 SECONDS, src))
+ if(!do_after(user, 3 SECONDS, target = src))
return 0
M.adjust_nutrition(-10)
to_chat(user, span_notice("You successfully perform a [src] exercise!"))
@@ -362,7 +362,7 @@
to_chat(user, span_notice("You need some sort of glass, bottle or cup to contact the spirit world."))
return 0
var/result = 0
- if(!do_after(user, 3 SECONDS, src))
+ if(!do_after(user, 3 SECONDS, target = src))
return 0
if(next_result)
result = next_result
diff --git a/code/modules/eventkit/collector_event/blockers.dm b/code/modules/eventkit/collector_event/blockers.dm
index a005700704..b35db0d84c 100644
--- a/code/modules/eventkit/collector_event/blockers.dm
+++ b/code/modules/eventkit/collector_event/blockers.dm
@@ -116,7 +116,7 @@
if(active_repair_steps.len >= 1)
if(O.has_tool_quality(active_repair_steps[active_repair_steps.len]))
if(!pre_repair_handling(O,active_repair_steps[active_repair_steps.len],user)) return
- if(do_after(user, 2 SECONDS))
+ if(do_after(user, 2 SECONDS, target = src))
post_repair_handling(O,active_repair_steps[active_repair_steps.len],user)
to_chat(usr,span_notice(fix_descs[active_repair_steps[active_repair_steps.len]]))
active_repair_steps.len = active_repair_steps.len - 1
diff --git a/code/modules/eventkit/collector_event/event_collector.dm b/code/modules/eventkit/collector_event/event_collector.dm
index abf6dad33b..d953f19c3b 100644
--- a/code/modules/eventkit/collector_event/event_collector.dm
+++ b/code/modules/eventkit/collector_event/event_collector.dm
@@ -220,7 +220,7 @@ GLOBAL_LIST_INIT(event_collector_blockers,list()) //ditto
//put it in
user.visible_message("[user] begins to [pick(step_initiation_verbs)] \The [O] into \The [src]")
- if(do_after(user, step_insertion_time, src)) //wait a second or two
+ if(do_after(user, step_insertion_time, target = src)) //wait a second or two
user.visible_message("[user] [pick(step_insertion_verbs)] \The [O] into \The [src]!")
if(ishuman(user)) //should always be?
var/mob/living/carbon/human/h = user
diff --git a/code/modules/eventkit/generic_objects/generic_item.dm b/code/modules/eventkit/generic_objects/generic_item.dm
index f496c35b13..d60c7132da 100644
--- a/code/modules/eventkit/generic_objects/generic_item.dm
+++ b/code/modules/eventkit/generic_objects/generic_item.dm
@@ -21,7 +21,7 @@
if(activatable_hand)
if(!on)
if(delay_time)
- if(!do_after(user, delay_time, src))
+ if(!do_after(user, delay_time, target = src))
return 0
on = 1
if(icon_on)
@@ -76,7 +76,7 @@
playsound(src, sound_activated, 50, 1)
else if(togglable)
if(delay_time)
- if(!do_after(user, delay_time, src))
+ if(!do_after(user, delay_time, target = src))
return 0
on = 0
icon_state = icon_state_off
diff --git a/code/modules/eventkit/generic_objects/generic_structure.dm b/code/modules/eventkit/generic_objects/generic_structure.dm
index 123793c864..8ead25a99f 100644
--- a/code/modules/eventkit/generic_objects/generic_structure.dm
+++ b/code/modules/eventkit/generic_objects/generic_structure.dm
@@ -25,7 +25,7 @@
if(activatable_hand)
if(!on)
if(delay_time)
- if(!do_after(user, delay_time, src))
+ if(!do_after(user, delay_time, target = src))
return 0
on = 1
icon_state = icon_state_on
@@ -88,7 +88,7 @@
playsound(src, sound_activated, 50, 1)
else if(togglable)
if(delay_time)
- if(!do_after(user, delay_time, src))
+ if(!do_after(user, delay_time, target = src))
return 0
on = 0
icon_state = icon_state_off
diff --git a/code/modules/events/meteor_strike_vr.dm b/code/modules/events/meteor_strike_vr.dm
index 8c45b8259b..12c271c987 100644
--- a/code/modules/events/meteor_strike_vr.dm
+++ b/code/modules/events/meteor_strike_vr.dm
@@ -100,7 +100,7 @@
var/obj/item/pickaxe/P = I
M.visible_message(span_warning("[M] starts [P.drill_verb] \the [src]."), span_warning("You start [P.drill_verb] \the [src]."))
- if(!do_after(M, P.digspeed*3))
+ if(!do_after(M, P.digspeed*3, target = src))
return
M.visible_message(span_warning("[M] breaks apart \the [src]."), span_warning("You break apart \the [src]."))
diff --git a/code/modules/fishing/fishing.dm b/code/modules/fishing/fishing.dm
index 3496d8738c..97666bee8a 100644
--- a/code/modules/fishing/fishing.dm
+++ b/code/modules/fishing/fishing.dm
@@ -134,7 +134,7 @@ GLOBAL_LIST_INIT(generic_fishing_chance_list, list(FISHING_RARE = 5, FISHING_UNC
being_fished = TRUE
R.cast = TRUE
var/fishing_time = rand(min_fishing_time SECONDS,max_fishing_time SECONDS) * R.toolspeed
- if(do_after(user,fishing_time,user))
+ if(do_after(user, fishing_time, target = user))
playsound(src, 'sound/effects/slosh.ogg', 5, 1, 5)
to_chat(user,span_notice("You feel a tug and begin pulling!"))
if(world.time >= last_fished + fishing_cooldown)
diff --git a/code/modules/fishing/fishing_rod.dm b/code/modules/fishing/fishing_rod.dm
index eeb291c7d4..daf6833c49 100644
--- a/code/modules/fishing/fishing_rod.dm
+++ b/code/modules/fishing/fishing_rod.dm
@@ -61,7 +61,7 @@
if(C.get_amount() < 5)
to_chat(user, span_warning("You do not have enough length in \the [C] to string this!"))
return
- if(do_after(user, rand(10 SECONDS, 20 SECONDS)))
+ if(do_after(user, rand(10 SECONDS, 20 SECONDS), target = src))
C.use(5)
strung = TRUE
to_chat(user, span_notice("You string \the [src]!"))
diff --git a/code/modules/food/drinkingglass/extras.dm b/code/modules/food/drinkingglass/extras.dm
index 3a913af7c4..2f818c697a 100644
--- a/code/modules/food/drinkingglass/extras.dm
+++ b/code/modules/food/drinkingglass/extras.dm
@@ -96,7 +96,7 @@
return
user.visible_message(span_infoplain(span_bold("[user]") + " starts sipping on [victim] with [src]!"), span_info("You start sipping on [victim] with [src]."))
- if(!do_after(user, 3 SECONDS, victim))
+ if(!do_after(user, 3 SECONDS, target = victim))
return
user.visible_message(span_infoplain(span_bold("[user]") + " sips some of [victim] with [src]!"), span_info("You take a sip of [victim] with [src]. Yum!"))
diff --git a/code/modules/food/food/superfoods.dm b/code/modules/food/food/superfoods.dm
index cc4b9fb761..5de26d03bd 100644
--- a/code/modules/food/food/superfoods.dm
+++ b/code/modules/food/food/superfoods.dm
@@ -310,7 +310,7 @@
/obj/structure/theonepizza/attackby(var/obj/item/W, var/mob/living/user)
if(istype(W,/obj/item/material/knife))
user.visible_message(span_infoplain(span_bold("\The [user]") + " starts to slowly cut through The One Pizza."), span_notice("You start to slowly cut through The One Pizza."))
- if(do_after(user, slicetime))
+ if(do_after(user, slicetime, target = src))
if(!src)
return // We got disappeared already
user.visible_message(span_infoplain(span_bold("\The [user]") + " successfully cuts The One Pizza."), span_notice("You successfully cut The One Pizza."))
diff --git a/code/modules/food/kitchen/gibber.dm b/code/modules/food/kitchen/gibber.dm
index a6dd2df7ef..e6e8bed632 100644
--- a/code/modules/food/kitchen/gibber.dm
+++ b/code/modules/food/kitchen/gibber.dm
@@ -151,7 +151,7 @@
user.visible_message(span_danger("[user] starts to put [victim] into the gibber!"))
src.add_fingerprint(user)
- if(do_after(user, 30) && victim.Adjacent(src) && user.Adjacent(src) && victim.Adjacent(user) && !occupant)
+ if(do_after(user, 3 SECONDS, target = src) && victim.Adjacent(src) && user.Adjacent(src) && victim.Adjacent(user) && !occupant)
user.visible_message(span_danger("[user] stuffs [victim] into the gibber!"))
if(victim.client)
victim.client.perspective = EYE_PERSPECTIVE
diff --git a/code/modules/food/kitchen/microwave.dm b/code/modules/food/kitchen/microwave.dm
index a863cc9ea6..87c92942c5 100644
--- a/code/modules/food/kitchen/microwave.dm
+++ b/code/modules/food/kitchen/microwave.dm
@@ -77,7 +77,7 @@
span_notice("You start to fix part of the microwave.") \
)
playsound(src, O.usesound, 50, 1)
- if (do_after(user,20 * O.toolspeed))
+ if (do_after(user, 2 SECONDS * O.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " fixes part of the microwave."), \
span_notice("You have fixed part of the microwave.") \
@@ -88,7 +88,7 @@
span_infoplain(span_bold("\The [user]") + " starts to fix part of the microwave."), \
span_notice("You start to fix part of the microwave.") \
)
- if (do_after(user,20 * O.toolspeed))
+ if (do_after(user, 2 SECONDS * O.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " fixes the microwave."), \
span_notice("You have fixed the microwave.") \
@@ -107,7 +107,7 @@
span_infoplain(span_bold("\The [user]") + " starts to clean the microwave."), \
span_notice("You start to clean the microwave.") \
)
- if (do_after(user,20))
+ if (do_after(user, 2 SECONDS, target = src))
user.visible_message( \
span_notice("\The [user] has cleaned the microwave."), \
span_notice("You have cleaned the microwave.") \
@@ -199,7 +199,7 @@
span_notice("\The [user] begins [src.anchored ? "unsecuring" : "securing"] the microwave."), \
span_notice("You attempt to [src.anchored ? "unsecure" : "secure"] the microwave.")
)
- if (do_after(user,20/O.toolspeed))
+ if (do_after(user, (2 SECONDS)/O.toolspeed, target = src))
user.visible_message( \
span_notice("\The [user] [src.anchored ? "unsecures" : "secures"] the microwave."), \
span_notice("You [src.anchored ? "unsecure" : "secure"] the microwave.")
@@ -560,7 +560,7 @@
span_notice("You try to open [src] and remove its contents.")
)
- if(!do_after(usr, 1 SECONDS, target = src))
+ if(!do_after(usr, 1 SECOND, target = src))
return
if(operating)
diff --git a/code/modules/hydroponics/beekeeping/beehive.dm b/code/modules/hydroponics/beekeeping/beehive.dm
index f692068db4..ddcccf865f 100644
--- a/code/modules/hydroponics/beekeeping/beehive.dm
+++ b/code/modules/hydroponics/beekeeping/beehive.dm
@@ -120,7 +120,7 @@
return
to_chat(user, span_notice("You start dismantling \the [src]..."))
playsound(src, I.usesound, 50, 1)
- if(do_after(user, 30))
+ if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("[user] dismantles \the [src]."), span_notice("You dismantle \the [src]."))
new /obj/item/beehive_assembly(loc)
qdel(src)
@@ -135,7 +135,7 @@
to_chat(user, span_notice("The bees won't let you take the honeycombs out like this, smoke them first."))
return
user.visible_message(span_notice("[user] starts taking the honeycombs out of \the [src]."), span_notice("You start taking the honeycombs out of \the [src]..."))
- while(honeycombs >= 100 && length(frames) && do_after(user, 30))
+ while(honeycombs >= 100 && length(frames) && do_after(user, 3 SECONDS, target = src))
var/obj/item/honey_frame/H = pop(frames)
H.honey = 20
honeycombs -= 100
@@ -292,7 +292,7 @@
/obj/item/beehive_assembly/attack_self(var/mob/user)
to_chat(user, span_notice("You start assembling \the [src]..."))
- if(do_after(user, 30))
+ if(do_after(user, 3 SECONDS, target = src))
user.visible_message(span_notice("[user] constructs a beehive."), span_notice("You construct a beehive."))
new /obj/machinery/beehive(get_turf(user))
user.drop_from_inventory(src)
diff --git a/code/modules/hydroponics/trays/tray_soil.dm b/code/modules/hydroponics/trays/tray_soil.dm
index d3e719951c..73a0ede0b8 100644
--- a/code/modules/hydroponics/trays/tray_soil.dm
+++ b/code/modules/hydroponics/trays/tray_soil.dm
@@ -16,7 +16,7 @@
if(!choice||choice=="No")
return
user.visible_message("[user] starts dispersing the [src]...", runemessage = "disperses the [src]")
- if(do_after(user, 5 SECONDS))
+ if(do_after(user, 5 SECONDS, target = src))
qdel(src)
else
to_chat(user, span_notice("There is something growing here."))
@@ -35,7 +35,7 @@
/obj/machinery/portable_atmospherics/hydroponics/soil/attackby(obj/item/O, mob/user)
if(istype(O, /obj/item/shovel) && user.a_intent == I_HURT)
user.visible_message(span_notice("\The [user] begins filling in \the [src]."))
- if(do_after(user, 3 SECONDS) && !QDELETED(src))
+ if(do_after(user, 3 SECONDS, target = src) && !QDELETED(src))
user.visible_message(span_notice("\The [user] fills in \the [src]."))
qdel(src)
return
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index 02b4ae1fb6..7ecb025761 100644
--- a/code/modules/library/lib_items.dm
+++ b/code/modules/library/lib_items.dm
@@ -46,7 +46,7 @@
else if(O.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, O.usesound, 75, 1)
to_chat(user, span_notice("You begin dismantling \the [src]."))
- if(do_after(user,25 * O.toolspeed))
+ if(do_after(user, 25 * O.toolspeed, target = src))
to_chat(user, span_notice("You dismantle \the [src]."))
new /obj/item/stack/material/wood(get_turf(src), 3)
for(var/obj/item/book/b in contents)
@@ -287,7 +287,7 @@ Book Cart End
else if(istype(W, /obj/item/material/knife) || W.has_tool_quality(TOOL_WIRECUTTER))
if(carved) return
to_chat(user, span_notice("You begin to carve out [title]."))
- if(do_after(user, 30))
+ if(do_after(user, 3 SECONDS, target = src))
to_chat(user, span_notice("You carve out the pages from [title]! You didn't want to read it anyway."))
playsound(src, 'sound/bureaucracy/papercrumple.ogg', 50, 1)
new /obj/item/shreddedp(get_turf(src))
diff --git a/code/modules/materials/materials/organic/resin.dm b/code/modules/materials/materials/organic/resin.dm
index 0925e78810..8162418d8f 100644
--- a/code/modules/materials/materials/organic/resin.dm
+++ b/code/modules/materials/materials/organic/resin.dm
@@ -30,7 +30,7 @@
if(istype(M) && locate(/obj/item/organ/internal/xenos/hivenode) in M.internal_organs)
to_chat(M, "\The [W] shudders under your touch, starting to become porous.")
playsound(W, 'sound/effects/attackblob.ogg', 50, 1)
- if(!do_after(L, 5 SECONDS))
+ if(!do_after(L, 5 SECONDS, target = W))
return FALSE
playsound(W, 'sound/effects/attackblob.ogg', 100, 1)
W.dismantle_wall()
@@ -38,7 +38,7 @@
if(istype(M) && locate(/obj/item/organ/internal/xenos/resinspinner/replicant) in M.internal_organs)
to_chat(M, "\The [W] shudders under your touch, starting to become porous.")
playsound(W, 'sound/effects/attackblob.ogg', 50, 1)
- if(!do_after(L, 5 SECONDS))
+ if(!do_after(L, 5 SECONDS, target = W))
return FALSE
playsound(W, 'sound/effects/attackblob.ogg', 100, 1)
W.dismantle_wall()
diff --git a/code/modules/materials/sheets/metals/rods.dm b/code/modules/materials/sheets/metals/rods.dm
index f36295ff40..81525231e8 100644
--- a/code/modules/materials/sheets/metals/rods.dm
+++ b/code/modules/materials/sheets/metals/rods.dm
@@ -96,7 +96,7 @@
return
to_chat(user, span_notice("Assembling grille..."))
in_use = 1
- if (!do_after(user, 10))
+ if (!do_after(user, 1 SECOND, target = src))
in_use = 0
return
var/obj/structure/grille/F = new /obj/structure/grille/ ( user.loc )
diff --git a/code/modules/materials/sheets/organic/wood.dm b/code/modules/materials/sheets/organic/wood.dm
index b1968a4431..f3af059f97 100644
--- a/code/modules/materials/sheets/organic/wood.dm
+++ b/code/modules/materials/sheets/organic/wood.dm
@@ -53,7 +53,7 @@
if(W.sharp && W.edge)
var/time = (3 SECONDS / max(W.force / 10, 1)) * W.toolspeed
user.setClickCooldown(time)
- if(do_after(user, time, src) && use(1))
+ if(do_after(user, time, target = src) && use(1))
to_chat(user, span_notice("You cut up a log into planks."))
playsound(src, 'sound/effects/woodcutting.ogg', 50, 1)
var/obj/item/stack/material/wood/existing_wood = null
diff --git a/code/modules/mining/drilling/scanner.dm b/code/modules/mining/drilling/scanner.dm
index fdaf168ab4..4312768690 100644
--- a/code/modules/mining/drilling/scanner.dm
+++ b/code/modules/mining/drilling/scanner.dm
@@ -14,7 +14,7 @@
to_chat(user, span_notice("You begin sweeping \the [src] about, scanning for metal deposits."))
playsound(src, 'sound/items/goggles_charge.ogg', 50, 1, -6)
- if(!do_after(user, scan_time))
+ if(!do_after(user, scan_time, target = src))
return
ScanTurf(get_turf(user), user)
diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm
index cc20ee7bd0..e1971702ea 100644
--- a/code/modules/mining/fulton.dm
+++ b/code/modules/mining/fulton.dm
@@ -56,7 +56,7 @@
if(A.anchored)
return
to_chat(user, span_notice("You start attaching the pack to [A]..."))
- if(do_after(user,50,target=A))
+ if(do_after(user, 5 SECONDS, target = A))
to_chat(user, span_notice("You attach the pack to [A] and activate it."))
/* No components, sorry. No convienence for you!
if(loc == user && istype(user.back, /obj/item/storage/backpack))
@@ -143,7 +143,9 @@
icon_state = "extraction_pointoff"
/obj/item/fulton_core/attack_self(mob/user)
- if(do_after(user,15,target = user) && !QDELETED(src))
+ var/turf/T = get_turf(user)
+ var/outdoors = T.is_outdoors()
+ if(do_after(user, 15, target = user) && !QDELETED(src) && outdoors)
new /obj/structure/extraction_point(get_turf(user))
qdel(src)
diff --git a/code/modules/mining/mine_outcrops.dm b/code/modules/mining/mine_outcrops.dm
index 6affd44b10..c24ff2c5c1 100644
--- a/code/modules/mining/mine_outcrops.dm
+++ b/code/modules/mining/mine_outcrops.dm
@@ -91,7 +91,7 @@
/obj/structure/outcrop/attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/pickaxe))
to_chat(user, span_notice("[user] begins to hack away at \the [src]."))
- if(do_after(user,40))
+ if(do_after(user, 4 SECONDS, target = src))
to_chat(user, span_notice("You have finished digging!"))
for(var/i=0;i<(rand(mindrop,upperdrop));i++)
new outcropdrop(get_turf(src))
diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm
index 44843259a3..2c67beb857 100644
--- a/code/modules/mining/mine_turfs.dm
+++ b/code/modules/mining/mine_turfs.dm
@@ -403,7 +403,7 @@ var/list/mining_overlay_cache = list()
to_chat(user, span_notice("You start digging."))
playsound(user, 'sound/effects/rustle1.ogg', 50, 1)
- if(!do_after(user,digspeed)) return
+ if(!do_after(user, digspeed, target = src)) return
to_chat(user, span_notice("You dug a hole."))
GetDrilled()
@@ -448,7 +448,7 @@ var/list/mining_overlay_cache = list()
if (istype(W, /obj/item/measuring_tape))
var/obj/item/measuring_tape/P = W
user.visible_message(span_infoplain(span_bold("\The [user]") + " extends \a [P] towards \the [src]."),span_notice("You extend \the [P] towards \the [src]."))
- if(do_after(user, 15))
+ if(do_after(user, 15, target = src))
to_chat(user, span_notice("\The [src] has been excavated to a depth of [excavation_level]cm."))
return
@@ -458,7 +458,7 @@ var/list/mining_overlay_cache = list()
C.depth_scanner.scan_atom(user, src)
else
user.visible_message(span_infoplain(span_bold("\The [user]") + " extends \the [C] over \the [src], a flurry of red beams scanning \the [src]'s surface!"), span_notice("You extend \the [C] over \the [src], a flurry of red beams scanning \the [src]'s surface!"))
- if(do_after(user, 15))
+ if(do_after(user, 15, target = src))
to_chat(user, span_notice("\The [src] has been excavated to a depth of [excavation_level]cm."))
return
@@ -528,7 +528,7 @@ var/list/mining_overlay_cache = list()
wreckfinds(P.destroy_artefacts)
to_chat(user, span_notice("You start [P.drill_verb][fail_message]."))
- if(do_after(user,P.digspeed))
+ if(do_after(user, P.digspeed, target = src))
if(finds && finds.len)
var/datum/find/F = finds[1]
diff --git a/code/modules/mining/shelter_atoms_vr.dm b/code/modules/mining/shelter_atoms_vr.dm
index cdd27fa7aa..c0d3daed5b 100644
--- a/code/modules/mining/shelter_atoms_vr.dm
+++ b/code/modules/mining/shelter_atoms_vr.dm
@@ -307,7 +307,7 @@ GLOBAL_LIST_EMPTY(unique_deployable)
if(I.has_tool_quality(TOOL_WRENCH))
user.visible_message(span_warning("[user] disassembles [src]."),
span_notice("You start to disassemble [src]..."), "You hear clanking and banging noises.")
- if(do_after(user,4 SECONDS,src))
+ if(do_after(user, 4 SECONDS, target = src))
new /obj/item/gps(loc)
qdel(src)
return TRUE
@@ -383,7 +383,7 @@ GLOBAL_LIST_EMPTY(unique_deployable)
if(I.has_tool_quality(TOOL_WRENCH))
user.visible_message(span_warning("[user] disassembles [src]."),
span_notice("You start to disassemble [src]..."), "You hear clanking and banging noises.")
- if(do_after(user,4 SECONDS,src))
+ if(do_after(user, 4 SECONDS, target = src))
deconstruct()
return TRUE
diff --git a/code/modules/mob/living/bot/SLed209bot.dm b/code/modules/mob/living/bot/SLed209bot.dm
index 69a41457b5..d181a4ea15 100644
--- a/code/modules/mob/living/bot/SLed209bot.dm
+++ b/code/modules/mob/living/bot/SLed209bot.dm
@@ -132,7 +132,7 @@
to_chat(user, span_warning("You need one coil of wire to wire [src]."))
return
to_chat(user, span_notice("You start to wire [src]."))
- if(do_after(user, 40) && build_step == 6)
+ if(do_after(user, 4 SECONDS, target = src) && build_step == 6)
if(C.use(1))
build_step++
to_chat(user, span_notice("You wire the ED-209 assembly."))
diff --git a/code/modules/mob/living/bot/bot.dm b/code/modules/mob/living/bot/bot.dm
index ff9d2ba0d7..b310c99f66 100644
--- a/code/modules/mob/living/bot/bot.dm
+++ b/code/modules/mob/living/bot/bot.dm
@@ -170,7 +170,7 @@
else if(O.has_tool_quality(TOOL_CROWBAR))
if(open && paicard)
to_chat(user, span_notice("You are attempting to remove the pAI.."))
- if(do_after(user,10 * O.toolspeed))
+ if(do_after(user, 1 SECOND * O.toolspeed, target = src))
ejectpai(user)
else
..()
diff --git a/code/modules/mob/living/bot/cleanbot.dm b/code/modules/mob/living/bot/cleanbot.dm
index be21ba4ecb..19899fc5eb 100644
--- a/code/modules/mob/living/bot/cleanbot.dm
+++ b/code/modules/mob/living/bot/cleanbot.dm
@@ -120,7 +120,7 @@
cleantime = istype(D, /obj/effect/decal/cleanable/dirt) ? 10 : 50
if(prob(20))
automatic_custom_emote(AUDIBLE_MESSAGE, "begins to clean up \the [D]")
- if(do_after(src, cleantime * cTimeMult))
+ if(do_after(src, cleantime * cTimeMult, target = D))
if(istype(loc, /turf/simulated))
var/turf/simulated/f = loc
f.dirt = 0
@@ -139,7 +139,7 @@
if(cleantime != 0)
if(prob(20))
automatic_custom_emote(AUDIBLE_MESSAGE, "begins to clean up \the [loc]")
- if(do_after(src, cleantime * cTimeMult))
+ if(do_after(src, cleantime * cTimeMult, target = loc))
if(blood)
wash(CLEAN_TYPE_BLOOD)
if(istype(loc, /turf/simulated))
diff --git a/code/modules/mob/living/bot/ed209bot.dm b/code/modules/mob/living/bot/ed209bot.dm
index 34bf29466e..95a31893ff 100644
--- a/code/modules/mob/living/bot/ed209bot.dm
+++ b/code/modules/mob/living/bot/ed209bot.dm
@@ -152,7 +152,7 @@
to_chat(user, span_warning("You need one coil of wire to wire [src]."))
return
to_chat(user, span_notice("You start to wire [src]."))
- if(do_after(user, 40) && build_step == 6)
+ if(do_after(user, 4 SECONDS, target = src) && build_step == 6)
if(C.use(1))
build_step++
to_chat(user, span_notice("You wire the ED-209 assembly."))
diff --git a/code/modules/mob/living/bot/edCLNbot.dm b/code/modules/mob/living/bot/edCLNbot.dm
index 7fedd5332d..04521dd836 100644
--- a/code/modules/mob/living/bot/edCLNbot.dm
+++ b/code/modules/mob/living/bot/edCLNbot.dm
@@ -176,7 +176,7 @@
to_chat(user, span_warning("You need one coil of wire to wire \the [src]."))
return
to_chat(user, span_notice("You start to wire \the [src]."))
- if(do_after(user, 40))
+ if(do_after(user, 4 SECONDS, target = src))
if(C.use(1))
build_step++
to_chat(user, span_notice("You wire the ED-CLN assembly."))
@@ -198,7 +198,7 @@
playsound(src, W.usesound, 100, 1)
var/turf/T = get_turf(user)
to_chat(user, span_notice("Attatching the mop to the frame..."))
- if(do_after(user, 40) && get_turf(user) == T)
+ if(do_after(user, 4 SECONDS, target = src) && get_turf(user) == T)
build_step++
name = "mopped ED-CLN assembly"
to_chat(user, span_notice("Mop attached."))
diff --git a/code/modules/mob/living/bot/farmbot.dm b/code/modules/mob/living/bot/farmbot.dm
index 8df34a82e5..0b427ba0ed 100644
--- a/code/modules/mob/living/bot/farmbot.dm
+++ b/code/modules/mob/living/bot/farmbot.dm
@@ -191,7 +191,7 @@
visible_message(span_notice("[src] starts [T.dead? "removing the plant from" : "harvesting"] \the [A]."))
busy = 1
- if(do_after(src, 30, A))
+ if(do_after(src, 3 SECONDS, target = A))
visible_message(span_notice("[src] [T.dead? "removes the plant from" : "harvests"] \the [A]."))
T.attack_hand(src)
if(FARMBOT_WATER)
@@ -200,7 +200,7 @@
visible_message(span_notice("[src] starts watering \the [A]."))
busy = 1
- if(do_after(src, 30, A))
+ if(do_after(src, 3 SECONDS, target = A))
playsound(src, 'sound/effects/slosh.ogg', 25, 1)
visible_message(span_notice("[src] waters \the [A]."))
tank.reagents.trans_to(T, 100 - T.waterlevel)
@@ -210,7 +210,7 @@
visible_message(span_notice("[src] starts uprooting the weeds in \the [A]."))
busy = 1
- if(do_after(src, 30))
+ if(do_after(src, 3 SECONDS, target = A))
visible_message(span_notice("[src] uproots the weeds in \the [A]."))
T.weedlevel = 0
if(FARMBOT_NUTRIMENT)
@@ -219,7 +219,7 @@
visible_message(span_notice("[src] starts fertilizing \the [A]."))
busy = 1
- if(do_after(src, 30, A))
+ if(do_after(src, 3 SECONDS, target = A))
visible_message(span_notice("[src] fertilizes \the [A]."))
T.reagents.add_reagent(REAGENT_ID_AMMONIA, 10)
@@ -236,7 +236,7 @@
visible_message(span_notice("[src] starts refilling its tank from \the [A]."))
busy = 1
- while(do_after(src, 10) && tank.reagents.total_volume < tank.reagents.maximum_volume)
+ while(do_after(src, 1 SECOND, target = A) && tank.reagents.total_volume < tank.reagents.maximum_volume)
tank.reagents.add_reagent("water", 100) //VOREStation Edit
if(prob(5))
playsound(src, 'sound/effects/slosh.ogg', 25, 1)
diff --git a/code/modules/mob/living/bot/floorbot.dm b/code/modules/mob/living/bot/floorbot.dm
index d674ff95e6..22280a4866 100644
--- a/code/modules/mob/living/bot/floorbot.dm
+++ b/code/modules/mob/living/bot/floorbot.dm
@@ -209,12 +209,12 @@
update_icons()
if(F.flooring)
visible_message(span_warning("\The [src] begins to tear the floor tile from the floor!"))
- if(do_after(src, 50))
+ if(do_after(src, 5 SECONDS, target = A))
F.break_tile_to_plating()
addTiles(1)
else
visible_message(span_danger("\The [src] begins to tear through the floor!"))
- if(do_after(src, 150)) // Extra time because this can and will kill.
+ if(do_after(src, 15 SECONDS, target = A)) // Extra time because this can and will kill.
F.ReplaceWithLattice()
addTiles(1)
target = null
@@ -229,7 +229,7 @@
busy = 1
update_icons()
visible_message(span_infoplain(span_bold("\The [src]") + " begins to repair the hole."))
- if(do_after(src, 50))
+ if(do_after(src, 5 SECONDS, target = A))
if(A && (locate(/obj/structure/lattice, A) && building == 1 || !locate(/obj/structure/lattice, A) && building == 2)) // Make sure that it still needs repairs
var/obj/item/I
if(building == 1)
@@ -246,7 +246,7 @@
busy = 1
update_icons()
visible_message(span_infoplain(span_bold("\The [src]") + " begins to remove the broken floor."))
- if(do_after(src, 50, F))
+ if(do_after(src, 5 SECONDS, target = F))
if(F.broken || F.burnt)
F.make_plating()
target = null
@@ -256,7 +256,7 @@
busy = 1
update_icons()
visible_message(span_infoplain(span_bold("\The [src]") + " begins to improve the floor."))
- if(do_after(src, 50))
+ if(do_after(src, 5 SECONDS, target = F))
if(!F.flooring)
F.set_flooring(get_flooring_data(floor_build_type))
addTiles(-1)
@@ -268,7 +268,7 @@
visible_message(span_infoplain(span_bold("\The [src]") + " begins to collect tiles."))
busy = 1
update_icons()
- if(do_after(src, 20))
+ if(do_after(src, 2 SECONDS, target = T))
if(T)
var/eaten = min(maxAmount - amount, T.get_amount())
T.use(eaten)
@@ -282,7 +282,7 @@
visible_message(span_infoplain(span_bold("\The [src]") + " begins to make tiles."))
busy = 1
update_icons()
- if(do_after(50))
+ if(do_after(src, 5 SECONDS, target = A))
if(M)
M.use(1)
addTiles(4)
diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm
index 7026bca930..379fcf0409 100644
--- a/code/modules/mob/living/bot/medbot.dm
+++ b/code/modules/mob/living/bot/medbot.dm
@@ -207,12 +207,12 @@
say(message)
playsound(src, messagevoice[message], 70, FALSE)
- if(do_after(H, 3 SECONDS, target=src))
+ if(do_after(H, 3 SECONDS, target = src))
tip_over(H)
else if(istype(H) && H.a_intent == I_HELP && is_tipped)
H.visible_message(span_notice("[H] begins righting [src]."), span_notice("You begin righting [src]..."))
- if(do_after(H, 3 SECONDS, target=src))
+ if(do_after(H, 3 SECONDS, target = src))
set_right(H)
else
tgui_interact(H)
diff --git a/code/modules/mob/living/butchering.dm b/code/modules/mob/living/butchering.dm
index 22ab08c48b..11524a04ce 100644
--- a/code/modules/mob/living/butchering.dm
+++ b/code/modules/mob/living/butchering.dm
@@ -16,7 +16,7 @@
/mob/living/proc/harvest(var/mob/user, var/obj/item/I)
if(meat_type && meat_amount>0 && (stat == DEAD) && !being_butchered)
being_butchered = TRUE
- while(meat_amount > 0 && do_after(user, 0.5 SECONDS * (mob_size / 10), src))
+ while(meat_amount > 0 && do_after(user, 0.5 SECONDS * (mob_size / 10), target = src))
var/obj/item/meat = new meat_type(get_turf(src))
if(name_the_meat)
meat.name = "[src.name] [meat.name]"
@@ -36,7 +36,7 @@
return FALSE
/mob/living/proc/handle_butcher(var/mob/user, var/obj/item/I)
- if(!user || do_after(user, 2 SECONDS * mob_size / 10, src))
+ if(!user || do_after(user, 2 SECONDS * mob_size / 10, target = src))
if(LAZYLEN(butchery_loot))
if(LAZYLEN(butchery_loot))
for(var/path in butchery_loot)
diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm
index 7679d3cd38..bde449d04b 100644
--- a/code/modules/mob/living/carbon/carbon_defense.dm
+++ b/code/modules/mob/living/carbon/carbon_defense.dm
@@ -61,7 +61,7 @@
user.visible_message(span_danger("\The [user] begins to slit [src]'s throat with \the [W]!"))
user.next_move = world.time + 20 //also should prevent user from triggering this repeatedly
- if(!do_after(user, 20))
+ if(!do_after(user, 2 SECONDS, target = src))
return 0
if(!(G && G.assailant == user && G.affecting == src)) //check that we still have a grab
return 0
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 2c1129af4b..12d81a2f88 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -1546,7 +1546,7 @@
else
to_chat(U, span_warning("You begin to relocate [S]'s [current_limb.joint]..."))
- if(!do_after(U, 30))
+ if(!do_after(U, 3 SECONDS, target = src))
return
if(!current_limb || !S || !U)
return
diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm
index f9bd220d86..53aae1ed56 100644
--- a/code/modules/mob/living/carbon/human/human_attackhand.dm
+++ b/code/modules/mob/living/carbon/human/human_attackhand.dm
@@ -138,7 +138,7 @@
H.visible_message(span_danger("\The [H] is trying to perform CPR on \the [src]!"))
- if(!do_after(H, 30))
+ if(!do_after(H, 3 SECONDS, target = src))
return FALSE
H.visible_message(span_danger("\The [H] performs CPR on \the [src]!"))
@@ -461,7 +461,7 @@
return FALSE
user.visible_message(span_warning("[user] begins to dislocate [src]'s [organ.joint]!"))
- if(do_after(user, 100))
+ if(do_after(user, 10 SECONDS, target = src))
organ.dislocate(1)
src.visible_message(span_danger("[src]'s [organ.joint] [pick("gives way","caves in","crumbles","collapses")]!"))
return TRUE
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index f173b1b56d..eb7351bdcd 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -672,7 +672,7 @@ emp_act
organ_chance = 75
user.next_move = world.time + 20
user.visible_message(span_danger("\The [user] begins to twist \the [W] around inside [src]'s [chest]!"))
- if(!do_after(user, 20))
+ if(!do_after(user, 2 SECONDS, target = src))
return 0
if(!(G && G.assailant == user && G.affecting == src)) //check that we still have a grab
return 0
diff --git a/code/modules/mob/living/carbon/human/human_modular_limbs.dm b/code/modules/mob/living/carbon/human/human_modular_limbs.dm
index a5c6d007eb..7b8e8fcc61 100644
--- a/code/modules/mob/living/carbon/human/human_modular_limbs.dm
+++ b/code/modules/mob/living/carbon/human/human_modular_limbs.dm
@@ -157,7 +157,7 @@
var/obj/item/organ/external/E = get_active_hand()
if(!check_can_attach_modular_limb(E))
return FALSE
- if(!do_after(src, 2 SECONDS, src))
+ if(!do_after(src, 2 SECONDS, target = src))
return FALSE
if(!check_can_attach_modular_limb(E))
return FALSE
@@ -190,7 +190,7 @@
var/obj/item/organ/external/E = tgui_input_list(src, "Which limb do you wish to detach?", "Limb Removal", detachable_limbs)
if(!check_can_detach_modular_limb(E))
return FALSE
- if(!do_after(src, 2 SECONDS, src))
+ if(!do_after(src, 2 SECONDS, target = src))
return FALSE
if(!check_can_detach_modular_limb(E))
return FALSE
diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm
index e32f61eebd..15ceba1171 100644
--- a/code/modules/mob/living/carbon/human/human_powers.dm
+++ b/code/modules/mob/living/carbon/human/human_powers.dm
@@ -290,7 +290,7 @@
src.visible_message(span_filter_notice(span_bold("[src]") + "'s flesh begins to mend..."))
var/delay_length = round(active_regen_delay * species.active_regen_mult)
- if(do_after(src,delay_length))
+ if(do_after(src, delay_length, target = src))
adjust_nutrition(-200)
for(var/obj/item/organ/I in internal_organs)
diff --git a/code/modules/mob/living/carbon/human/human_powers_vr.dm b/code/modules/mob/living/carbon/human/human_powers_vr.dm
index c10ed8a6d6..8484553730 100644
--- a/code/modules/mob/living/carbon/human/human_powers_vr.dm
+++ b/code/modules/mob/living/carbon/human/human_powers_vr.dm
@@ -176,7 +176,7 @@
var/score2 = (scale2 * strength2)
var/competition = pick(score1;player1, score2;player2)
- if(!do_after(player1, 50, player2))
+ if(!do_after(player1, 5 SECONDS, target = player2))
player2.visible_message(span_notice("The players cancelled their competition!"))
return 0
if(!hand_games_check(player1,player2))
@@ -223,7 +223,7 @@
var/score2 = (scale2 * strength2)
var/competition = pick(score1;player1, score2;player2)
- if(!do_after(player1, 10, player2))
+ if(!do_after(player1, 1 SECOND, target = player2))
player2.visible_message(span_notice("The players cancelled their competition!"))
return 0
if(!hand_games_check(player1,player2))
@@ -248,7 +248,7 @@
if(!hand_games_check(player1,player2))
return
player1.visible_message(span_notice("[player1] challenges [player2] to a thumb war!"))
- if(!do_after(player1, 50, player2))
+ if(!do_after(player1, 5 SECONDS, target = player2))
player2.visible_message(span_notice("The players cancelled their thumb war!"))
return 0
if(!hand_games_check(player1,player2))
diff --git a/code/modules/mob/living/carbon/human/human_resist.dm b/code/modules/mob/living/carbon/human/human_resist.dm
index 4b3bc3964f..db860f7939 100644
--- a/code/modules/mob/living/carbon/human/human_resist.dm
+++ b/code/modules/mob/living/carbon/human/human_resist.dm
@@ -51,7 +51,7 @@
span_warning("You gnaw on \the [SJ]. (This will take around [round(breakouttime / 600)] minutes and you need to stand still.)")
)
- if(do_after(src, breakouttime, timed_action_flags = IGNORE_INCAPACITATED))
+ if(do_after(src, breakouttime, target = src, timed_action_flags = IGNORE_INCAPACITATED))
if(!wear_suit)
return
visible_message(
@@ -74,7 +74,7 @@
span_warning("You attempt to rip your [wear_suit.name] apart. (This will take around 5 seconds and you need to stand still)")
)
- if(do_after(src, 20 SECONDS, timed_action_flags = IGNORE_INCAPACITATED)) // Same scaling as breaking cuffs, 5 seconds to 120 seconds, 20 seconds to 480 seconds.
+ if(do_after(src, 20 SECONDS, target = src, timed_action_flags = IGNORE_INCAPACITATED)) // Same scaling as breaking cuffs, 5 seconds to 120 seconds, 20 seconds to 480 seconds.
if(!wear_suit || buckled)
return
diff --git a/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm b/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm
index c04db56ee1..8a22fffffc 100644
--- a/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm
+++ b/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm
@@ -145,7 +145,7 @@
return
else
visible_message(span_infoplain(span_bold("\The [src]") + " begins to change the form of \the [I]."))
- if(!do_after(src, 10 SECONDS, I))
+ if(!do_after(src, 10 SECONDS, target = I))
visible_message(span_infoplain(span_bold("\The [src]") + " leaves \the [I] in its original form."))
return 0
visible_message(span_infoplain(span_bold("\The [src]") + " transmutes \the [I] into \the [transmute_product.name]."))
@@ -185,7 +185,7 @@
if(species.lleill_energy < energy_cost_spawn)
to_chat(src, span_warning("You do not have enough energy to do that!"))
return
- if(!do_after(src, 10 SECONDS, src))
+ if(!do_after(src, 10 SECONDS, target = src))
src.visible_message(span_infoplain(span_bold("\The [src]") + " begins to form white rings on the ground."))
return 0
to_chat(src, span_warning("You place a new glamour ring at your feet."))
@@ -315,7 +315,7 @@
src.visible_message(span_infoplain(span_bold("\The [src]") + " boops [chosen_target] on the nose."))
if(contact_type == "Custom")
src.visible_message(span_infoplain("[custom_text]"))
- if(!do_after(src, 10 SECONDS, chosen_target))
+ if(!do_after(src, 10 SECONDS, target = chosen_target))
src.visible_message(span_infoplain(span_bold("\The [src]") + " and \the [chosen_target] break contact before energy has been transferred."))
return
src.visible_message(span_infoplain(span_bold("\The [src]") + " and \the [chosen_target] complete their contact."))
@@ -366,7 +366,7 @@
return
else
visible_message(span_infoplain(span_bold("\The [src]") + " begins to change the form of \the [I]."))
- if(!do_after(src, 10 SECONDS, I))
+ if(!do_after(src, 10 SECONDS, target = I))
visible_message(span_infoplain(span_bold("\The [src]") + " leaves \the [I] in its original form."))
return 0
visible_message(span_infoplain(span_bold("\The [src]") + " transmutes \the [I] into \the [transmute_product.name]."))
@@ -457,7 +457,7 @@
return
visible_message(span_infoplain(span_bold("\The [src]") + " begins significantly shifting their form."))
- if(!do_after(src, 10 SECONDS, src))
+ if(!do_after(src, 10 SECONDS, target = src))
visible_message(span_infoplain(span_bold("\The [src]") + " ceases shifting their form."))
return 0
@@ -548,7 +548,7 @@
return
visible_message(span_infoplain(span_bold("\The [src]") + " begins significantly shifting their form."))
- if(!do_after(src, 10 SECONDS, src))
+ if(!do_after(src, 10 SECONDS, target = src))
visible_message(span_infoplain(span_bold("\The [src]") + " ceases shifting their form."))
return 0
visible_message(span_infoplain(span_bold("\The [src]") + " has reverted to their original form."))
@@ -666,7 +666,7 @@
return
visible_message(span_infoplain(span_bold("\The [src]") + " begins significantly shifting their form."))
- if(!do_after(src, 10 SECONDS, src))
+ if(!do_after(src, 10 SECONDS, target = src))
visible_message(span_infoplain(span_bold("\The [src]") + " ceases shifting their form."))
return 0
diff --git a/code/modules/mob/living/carbon/human/species/lleill/lleill_items.dm b/code/modules/mob/living/carbon/human/species/lleill/lleill_items.dm
index f67e39b9b4..fb453f0c1e 100644
--- a/code/modules/mob/living/carbon/human/species/lleill/lleill_items.dm
+++ b/code/modules/mob/living/carbon/human/species/lleill/lleill_items.dm
@@ -255,7 +255,7 @@
if(m_action == "Yes")
to_chat(M, span_warning("You begin to break the lines of the glamour ring."))
- if(!do_after(M, 10 SECONDS, src))
+ if(!do_after(M, 10 SECONDS, target = src))
to_chat(M, span_warning("You leave the glamour ring alone."))
return
to_chat(M, span_warning("You have destroyed \the [src]."))
@@ -270,7 +270,7 @@
if(LL.ring_cooldown + 10 MINUTES > world.time)
to_chat(M, span_warning("You must wait a while before drawing energy from the glamour again."))
return
- if(!do_after(M, 10 SECONDS, src))
+ if(!do_after(M, 10 SECONDS, target = src))
to_chat(M, span_warning("You stop drawing energy."))
return
LL.lleill_energy = min((LL.lleill_energy + 75),LL.lleill_energy_max)
diff --git a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm
index 176db45c6a..a3898f4fc2 100644
--- a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm
+++ b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm
@@ -595,7 +595,7 @@ var/list/wrapped_species_by_ref = list()
oocnotes = 1
to_chat(character, span_notify("You begin to reform. You will need to remain still."))
character.visible_message(span_notify("[character] rapidly contorts and shifts!"), span_danger("You begin to reform."))
- if(do_after(character, 40))
+ if(do_after(character, 4 SECONDS, target = src))
if(character.client.prefs) //Make sure we didn't d/c
character.client.prefs.vanity_copy_to(src, FALSE, flavour, oocnotes, FALSE, FALSE)
character.visible_message(span_notify("[character] adopts a new form!"), span_danger("You have reformed."))
@@ -653,7 +653,7 @@ var/list/wrapped_species_by_ref = list()
to_chat(character, span_notify("You begin to reassemble into [victim]. You will need to remain still."))
character.visible_message(span_notify("[character] rapidly contorts and shifts!"), span_danger("You begin to reassemble into [victim]."))
- if(do_after(character, 40))
+ if(do_after(character, 4 SECONDS, target = victim))
checking = FALSE
for(var/obj/item/grab/G in character)
if(G.affecting == victim && G.state >= GRAB_AGGRESSIVE)
diff --git a/code/modules/mob/living/carbon/human/species/station/protean/protean_blob.dm b/code/modules/mob/living/carbon/human/species/station/protean/protean_blob.dm
index 04ad81c68f..3534a28c32 100644
--- a/code/modules/mob/living/carbon/human/species/station/protean/protean_blob.dm
+++ b/code/modules/mob/living/carbon/human/species/station/protean/protean_blob.dm
@@ -442,7 +442,7 @@
to_chat(src,span_warning("You can't change forms while inside something."))
return
to_chat(src, span_notice("You rapidly disassociate your form."))
- if(force || do_after(src,20))
+ if(force || do_after(src, 2 SECONDS, target = src))
handle_grasp() //It's possible to blob out before some key parts of the life loop. This results in things getting dropped at null. TODO: Fix the code so this can be done better.
remove_micros(src, src) //Living things don't fare well in roblobs.
if(buckled)
@@ -556,7 +556,7 @@
to_chat(blob,span_warning("You can't change forms while inside something."))
return
to_chat(src, span_notice("You rapidly reassemble your form."))
- if(force || do_after(blob,20))
+ if(force || do_after(blob, 2 SECONDS, target = src))
if(buckled)
buckled.unbuckle_mob()
if(LAZYLEN(buckled_mobs))
diff --git a/code/modules/mob/living/carbon/human/species/station/protean/protean_powers.dm b/code/modules/mob/living/carbon/human/species/station/protean/protean_powers.dm
index 82493331b6..933bb4d7ef 100644
--- a/code/modules/mob/living/carbon/human/species/station/protean/protean_powers.dm
+++ b/code/modules/mob/living/carbon/human/species/station/protean/protean_powers.dm
@@ -53,7 +53,7 @@
else
blob = temporary_form
active_regen = 1
- if(do_after(blob,50))
+ if(do_after(blob, 5 SECONDS, target = src))
var/list/limblist = species.has_limbs[choice]
var/limbpath = limblist["path"]
var/obj/item/organ/external/new_eo = new limbpath(src)
@@ -106,7 +106,7 @@
var/obj/item/organ/internal/nano/refactory/refactory = nano_get_refactory()
if(refactory.get_stored_material(MAT_STEEL) >= 10000)
to_chat(protie, span_notify("You begin to rebuild. You will need to remain still."))
- if(do_after(protie, 400))
+ if(do_after(protie, 40 SECONDS, target = src))
if(species?:OurRig) //Unsafe, but we should only ever be using this with a Protean
species?:OurRig?:make_alive(src,1) //Re-using this proc
refactory.use_stored_material(MAT_STEEL,refactory.get_stored_material(MAT_STEEL)) //Use all of our steel
@@ -129,7 +129,7 @@
oocnotes = 1
to_chat(protie, span_notify("You begin to reassemble. You will need to remain still."))
protie.visible_message(span_notify("[protie] rapidly contorts and shifts!"), span_danger("You begin to reassemble."))
- if(do_after(protie, 40))
+ if(do_after(protie, 4 SECONDS, target = src))
if(protie.client.prefs) //Make sure we didn't d/c
var/obj/item/rig/protean/Rig = species?:OurRig
protie.client.prefs.vanity_copy_to(src, FALSE, flavour, oocnotes, TRUE, FALSE)
@@ -191,7 +191,7 @@
to_chat(protie, span_notify("You begin to reassemble into [victim]. You will need to remain still."))
protie.visible_message(span_notify("[protie] rapidly contorts and shifts!"), span_danger("You begin to reassemble into [victim]."))
- if(do_after(protie, 40))
+ if(do_after(protie, 4 SECONDS, target = src))
checking = FALSE
for(var/obj/item/grab/G in protie)
if(G.affecting == victim && G.state >= GRAB_AGGRESSIVE)
@@ -327,7 +327,7 @@
to_chat(protie, span_warning("You need to be repaired first before you can act!"))
return
to_chat(protie, span_notice("You rapidly condense into your module."))
- if(forced || do_after(protie,20))
+ if(forced || do_after(protie, 2 SECONDS, target = src))
if(!temporary_form) //If you're human, force you into blob form before rig'ing
nano_blobform(forced)
spawn(2)
@@ -702,7 +702,7 @@
return
if(G.loc == protie && G.state >= GRAB_AGGRESSIVE)
protie.visible_message(span_warning("[protie] is attempting to latch onto [target]!"), span_danger("You attempt to latch onto [target]!"))
- if(do_after(protie, 50, target))
+ if(do_after(protie, 5 SECONDS, target))
if(G.loc == protie && G.state >= GRAB_AGGRESSIVE)
target.drop_from_inventory(target.back)
protie.visible_message(span_danger("[protie] latched onto [target]!"), span_danger("You latch yourself onto [target]!"))
diff --git a/code/modules/mob/living/carbon/human/species/station/protean/protean_rig.dm b/code/modules/mob/living/carbon/human/species/station/protean/protean_rig.dm
index 82adc95354..67cb9296a6 100644
--- a/code/modules/mob/living/carbon/human/species/station/protean/protean_rig.dm
+++ b/code/modules/mob/living/carbon/human/species/station/protean/protean_rig.dm
@@ -250,13 +250,13 @@
if(1)
if(W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
- if(do_after(user,50,src))
+ if(do_after(user, 5 SECONDS, target = src))
to_chat(user, span_notice("You unscrew the maintenace panel on the [src]."))
dead +=1
return
if(2)
if(istype(W, /obj/item/protean_reboot))//placeholder
- if(do_after(user,50,src))
+ if(do_after(user, 5 SECONDS, target = src))
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, span_notice("You carefully slot [W] in the [src]."))
dead +=1
@@ -264,7 +264,7 @@
return
if(3)
if(istype(W, /obj/item/stack/nanopaste))
- if(do_after(user,50,src))
+ if(do_after(user, 5 SECONDS, target = src))
playsound(src, 'sound/effects/ointment.ogg', 50, 1)
to_chat(user, span_notice("You slather the interior confines of the [src] with the [W]."))
dead +=1
@@ -274,9 +274,9 @@
if(istype(W, /obj/item/shockpaddles))
if(W?:can_use(user))
to_chat(user, span_notice("You hook up the [W] to the contact points in the maintenance assembly"))
- if(do_after(user,50,src))
+ if(do_after(user, 5 SECONDS, target = src))
playsound(src, 'sound/machines/defib_charge.ogg', 50, 0)
- if(do_after(user,10,src))
+ if(do_after(user, 1 SECOND, target = src))
playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1)
playsound(src, 'sound/machines/defib_success.ogg', 50, 0)
new /obj/effect/gibspawner/robot(src.loc)
@@ -311,7 +311,7 @@
var/obj/item/rig_module/mod = W
to_chat(user, "You begin installing \the [mod] into \the [src].")
- if(!do_after(user,40))
+ if(!do_after(user, 4 SECONDS, target = src))
return
if(!user || !W)
return
diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_abilities.dm b/code/modules/mob/living/carbon/human/species/station/station_special_abilities.dm
index ab6869763e..5430c17690 100644
--- a/code/modules/mob/living/carbon/human/species/station/station_special_abilities.dm
+++ b/code/modules/mob/living/carbon/human/species/station/station_special_abilities.dm
@@ -117,7 +117,7 @@
to_chat(src, span_warning("This is going to cause [B] to keep bleeding!"))
to_chat(B, span_danger("You are going to keep bleeding from this bite!"))
- if(do_after(src, 300, B)) //Thrirty seconds.
+ if(do_after(src, 30 SECONDS, target = B))
if(!Adjacent(B)) return
if(noise)
src.visible_message(span_infoplain(span_red(span_bold("[src] suddenly extends their fangs and plunges them down into [B]'s neck!"))))
@@ -493,7 +493,7 @@
last_special = world.time + vore_shred_time
visible_message(span_danger("[src] appears to be preparing to do something to [T]!")) //Let everyone know that bad times are ahead
- if(do_after(src, vore_shred_time, T)) //Ten seconds. You have to be in a neckgrab for this, so you're already in a bad position.
+ if(do_after(src, vore_shred_time, target = T)) //Ten seconds. You have to be in a neckgrab for this, so you're already in a bad position.
if(can_shred(T) != T)
to_chat(src,span_warning("Looks like you lost your chance..."))
return
@@ -634,7 +634,7 @@
to_chat(src, span_warning("You can't do that in your current state."))
return
- if(do_after(src, 25))
+ if(do_after(src, 25, target = src))
var/obj/item/storage/vore_egg/bugcocoon/C = new(loc)
forceMove(C)
@@ -726,7 +726,7 @@
to_chat(target, span_critical("Something begins to circle around you in the water!")) //Dun dun...
var/starting_loc = target.loc
- if(do_after(src, 50))
+ if(do_after(src, 5 SECONDS, target))
if(target.loc != starting_loc)
to_chat(target, span_warning("You got away from whatever that was..."))
to_chat(src, span_notice("They got away."))
@@ -1159,7 +1159,7 @@
visible_message(span_warning("[src] is preparing to [trait_injection_verb] [target]!"))
- if(do_after(src, 50, target)) //A decent enough timer.
+ if(do_after(src, 5 SECONDS, target)) //A decent enough timer.
add_attack_logs(src,target,"Injection trait ([trait_injection_selected], [trait_injection_amount])")
if(target.reagents && (trait_injection_amount > 0) && !synth)
target.reagents.add_reagent(trait_injection_selected, trait_injection_amount)
@@ -1224,7 +1224,7 @@
src.visible_message(span_bolddanger("[src] moves their head next to [T]'s neck, seemingly looking for something!"))
- if(do_after(src, 300, T)) //Thrirty seconds.
+ if(do_after(src, 30 SECONDS, target = T)) //Thrirty seconds.
if(choice == REAGENT_APHRODISIAC)
src.show_message(span_warning("You sink your fangs into [T] and inject your aphrodisiac!"))
src.visible_message(span_red("[src] sinks their fangs into [T]!"))
@@ -1318,7 +1318,7 @@ var/eggs = 0
if(!choice)
return
- if(do_after(src, 300)) //Thrirty seconds.
+ if(do_after(src, 30 SECONDS, target = src)) //Thrirty seconds.
if(choice == "Make a Egg")
src.show_message(span_warning("You feel your belly bulging a bit, you made an egg!"))
C.nutrition -=150
diff --git a/code/modules/mob/living/carbon/human/stripping.dm b/code/modules/mob/living/carbon/human/stripping.dm
index fcb68f3e08..bb38de60d4 100644
--- a/code/modules/mob/living/carbon/human/stripping.dm
+++ b/code/modules/mob/living/carbon/human/stripping.dm
@@ -13,22 +13,22 @@
// Handle things that are part of this interface but not removing/replacing a given item.
if("pockets")
visible_message(span_danger("\The [user] is trying to empty \the [src]'s pockets!"))
- if(do_after(user,HUMAN_STRIP_DELAY,src))
+ if(do_after(user, HUMAN_STRIP_DELAY, target = src))
empty_pockets(user)
return
if("splints")
visible_message(span_danger("\The [user] is trying to remove \the [src]'s splints!"))
- if(do_after(user,HUMAN_STRIP_DELAY,src))
+ if(do_after(user, HUMAN_STRIP_DELAY, target = src))
remove_splints(user)
return
if("sensors")
visible_message(span_danger("\The [user] is trying to set \the [src]'s sensors!"))
- if(do_after(user,HUMAN_STRIP_DELAY,src))
+ if(do_after(user, HUMAN_STRIP_DELAY, target = src))
toggle_sensors(user)
return
if("internals")
visible_message(span_danger("\The [user] is trying to set \the [src]'s internals!"))
- if(do_after(user,HUMAN_STRIP_DELAY,src))
+ if(do_after(user, HUMAN_STRIP_DELAY, target = src))
toggle_internals(user)
return
if("tie")
@@ -40,7 +40,7 @@
return
visible_message(span_danger("\The [user] is trying to remove \the [src]'s [A.name]!"))
- if(!do_after(user,HUMAN_STRIP_DELAY,src))
+ if(!do_after(user, HUMAN_STRIP_DELAY, target = src))
return
if(!A || suit.loc != src || !(A in suit.accessories))
@@ -104,7 +104,7 @@
else
visible_message(span_danger("\The [user] is trying to put \a [wrapped] on \the [src]!"))
- if(!do_after(user,HUMAN_STRIP_DELAY,src))
+ if(!do_after(user, HUMAN_STRIP_DELAY, target = src))
return
if(!stripping)
diff --git a/code/modules/mob/living/carbon/resist.dm b/code/modules/mob/living/carbon/resist.dm
index 6f39910694..c3e1a0ee65 100644
--- a/code/modules/mob/living/carbon/resist.dm
+++ b/code/modules/mob/living/carbon/resist.dm
@@ -87,7 +87,7 @@
span_warning("You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)")
)
- if(do_after(src, 2 MINUTES, timed_action_flags = IGNORE_INCAPACITATED))
+ if(do_after(src, 2 MINUTES, target = src, timed_action_flags = IGNORE_INCAPACITATED))
if(!buckled)
return
visible_message(span_danger("[src] manages to unbuckle themself!"),
diff --git a/code/modules/mob/living/living_powers.dm b/code/modules/mob/living/living_powers.dm
index 5e4cdc08ae..b1b651a373 100644
--- a/code/modules/mob/living/living_powers.dm
+++ b/code/modules/mob/living/living_powers.dm
@@ -117,7 +117,7 @@
return
visible_message(span_warning("[src] begins chargin' their lazor!"))
- if(!do_after(src, 5 SECONDS, chosen_target))
+ if(!do_after(src, 5 SECONDS, target = chosen_target))
return
if(chosen_target.z != src.z || get_dist(src,chosen_target) > 7)
return
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index c9b4aa09e6..7d82d60e8e 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -797,7 +797,7 @@ var/list/ai_verbs_default = list(
if(anchored)
playsound(src, W.usesound, 50, 1)
user.visible_message(span_notice("\The [user] starts to unbolt \the [src] from the plating..."))
- if(!do_after(user,40 * W.toolspeed))
+ if(!do_after(user, 4 SECONDS * W.toolspeed, target = src))
user.visible_message(span_notice("\The [user] decides not to unbolt \the [src]."))
return
user.visible_message(span_notice("\The [user] finishes unfastening \the [src]!"))
@@ -806,7 +806,7 @@ var/list/ai_verbs_default = list(
else
playsound(src, W.usesound, 50, 1)
user.visible_message(span_notice("\The [user] starts to bolt \the [src] to the plating..."))
- if(!do_after(user,40 * W.toolspeed))
+ if(!do_after(user, 4 SECONDS * W.toolspeed, target = src))
user.visible_message(span_notice("\The [user] decides not to bolt \the [src]."))
return
user.visible_message(span_notice("\The [user] finishes fastening down \the [src]!"))
diff --git a/code/modules/mob/living/silicon/pai/pai_vr.dm b/code/modules/mob/living/silicon/pai/pai_vr.dm
index 5346d96c35..efe5d01ded 100644
--- a/code/modules/mob/living/silicon/pai/pai_vr.dm
+++ b/code/modules/mob/living/silicon/pai/pai_vr.dm
@@ -38,13 +38,13 @@
if(stat == DEAD)
healths.icon_state = "health7"
-/mob/living/silicon/pai/proc/full_restore()
+/mob/living/silicon/pai/proc/full_restore() //This is using do_after all kinds of weird...
adjustBruteLoss(- bruteloss)
adjustFireLoss(- fireloss)
- do_after(src, 1 SECONDS)
+ do_after(src, 1 SECONDS, target = src)
card.setEmotion(16)
stat = CONSCIOUS
- do_after(src, 5 SECONDS)
+ do_after(src, 5 SECONDS, target = src)
var/mob/observer/dead/ghost = src.get_ghost()
if(ghost)
ghost.notify_revive("Someone is trying to revive you. Re-enter your body if you want to be revived!", 'sound/effects/pai-restore.ogg', source = card)
diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_defense_modules.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_defense_modules.dm
index f46e35809f..89c38a6514 100644
--- a/code/modules/mob/living/silicon/robot/dogborg/dog_defense_modules.dm
+++ b/code/modules/mob/living/silicon/robot/dogborg/dog_defense_modules.dm
@@ -66,7 +66,7 @@
if(!R.use_direct_power(power_tick, 500)) //We don't want to drain ourselves too far down during exploration
to_chat(R, span_warning("Not enough power to initialize the repair system."))
return
- if(do_after(R, tick_delay))
+ if(do_after(R, tick_delay, target = R))
if(!C)
return
C.brute_damage -= min(C.brute_damage, heal_per_tick)
diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_modules.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_modules.dm
index 63a6deb6f8..8bb6279323 100644
--- a/code/modules/mob/living/silicon/robot/dogborg/dog_modules.dm
+++ b/code/modules/mob/living/silicon/robot/dogborg/dog_modules.dm
@@ -321,7 +321,7 @@
return
to_chat(user, span_filter_notice("It has [uses] lights remaining. Attempting to fabricate a replacement. Please stand still."))
cooldown = 1
- if(do_after(user, 50))
+ if(do_after(user, 5 SECONDS, target = src))
glass.use_charge(125)
add_uses(1)
cooldown = 0
@@ -354,7 +354,7 @@
return
busy = TRUE
to_chat(user, span_notice("You begin to attach \the [C] to \the [A]..."))
- if(do_after(user, 30))
+ if(do_after(user, 3 SECONDS, target = src))
to_chat(user, span_notice("You have attached \the [src] to \the [A]."))
var/obj/machinery/clamp/clamp = new/obj/machinery/clamp(A.loc, A)
clamps.Add(clamp)
@@ -364,7 +364,7 @@
else
busy = TRUE
to_chat(user, span_notice("You begin to remove \the [C] from \the [A]..."))
- if(do_after(user, 30))
+ if(do_after(user, 3 SECONDS, target = src))
to_chat(user, span_notice("You have removed \the [src] from \the [A]."))
clamps.Remove(C)
qdel(C)
diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm
index 10501233a9..a99dae7fc0 100644
--- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm
+++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm
@@ -90,7 +90,7 @@
to_chat(user, span_warning("\The [target] is too large to fit into your [src.name]"))
return
user.visible_message(span_warning("[hound.name] is ingesting [target.name] into their [src.name]."), span_notice("You start ingesting [target] into your [src.name]..."))
- if(do_after(user, 30, target) && length(contents) < max_item_count)
+ if(do_after(user, 3 SECONDS, target) && length(contents) < max_item_count)
target.forceMove(src)
user.visible_message(span_warning("[hound.name]'s [src.name] groans lightly as [target.name] slips inside."), span_notice("Your [src.name] groans lightly as [target] slips inside."))
playsound(src, gulpsound, vol = 60, vary = 1, falloff = 0.1, preference = /datum/preference/toggle/eating_noises)
@@ -103,7 +103,7 @@
if(istype(target, /mob/living/simple_mob/animal/passive/mouse)) //Edible mice, dead or alive whatever. Mostly for carcass picking you cruel bastard :v
var/mob/living/simple_mob/trashmouse = target
user.visible_message(span_warning("[hound.name] is ingesting [trashmouse] into their [src.name]."), span_notice("You start ingesting [trashmouse] into your [src.name]..."))
- if(do_after(user, 30, trashmouse) && length(contents) < max_item_count)
+ if(do_after(user, 3 SECONDS, target = trashmouse) && length(contents) < max_item_count)
trashmouse.forceMove(src)
trashmouse.reset_view(src)
user.visible_message(span_warning("[hound.name]'s [src.name] groans lightly as [trashmouse] slips inside."), span_notice("Your [src.name] groans lightly as [trashmouse] slips inside."))
@@ -123,7 +123,7 @@
to_chat(user, span_warning("[trashman] is buckled and can not be put into your [src.name]."))
return
user.visible_message(span_warning("[hound.name] is ingesting [trashman] into their [src.name]."), span_notice("You start ingesting [trashman] into your [src.name]..."))
- if(do_after(user, 30, trashman) && !patient && !trashman.buckled && length(contents) < max_item_count)
+ if(do_after(user, 3 SECONDS, target = trashman) && !patient && !trashman.buckled && length(contents) < max_item_count)
trashman.forceMove(src)
trashman.reset_view(src)
START_PROCESSING(SSobj, 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 3d080e6972..66cb6bad9d 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm
@@ -47,7 +47,7 @@
to_chat(D, span_danger("You begin decompiling [M]."))
- if(!do_after(D,50))
+ if(!do_after(D, 5 SECONDS, target = src))
to_chat(D, span_danger("You need to remain still while decompiling such a large object."))
return
diff --git a/code/modules/mob/living/silicon/robot/drone/swarm_items.dm b/code/modules/mob/living/silicon/robot/drone/swarm_items.dm
index e1b98dd1ad..b551e0380e 100644
--- a/code/modules/mob/living/silicon/robot/drone/swarm_items.dm
+++ b/code/modules/mob/living/silicon/robot/drone/swarm_items.dm
@@ -41,7 +41,7 @@
to_chat(D, span_danger("You begin decompiling [M]."))
- if(!do_after(D,50))
+ if(!do_after(D, 5 SECONDS, target = src))
to_chat(D, span_danger("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 2c7fefcd2a..47ea652a73 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -776,7 +776,7 @@
if(bolt)
to_chat(user,span_filter_notice("You begin removing \the [bolt]."))
- if(do_after(user, 2 SECONDS, src))
+ if(do_after(user, 2 SECONDS, target = src))
bolt.forceMove(get_turf(src))
bolt = null
diff --git a/code/modules/mob/living/silicon/robot/subtypes/thinktank/thinktank_storage.dm b/code/modules/mob/living/silicon/robot/subtypes/thinktank/thinktank_storage.dm
index 563fedaf73..8019980b9e 100644
--- a/code/modules/mob/living/silicon/robot/subtypes/thinktank/thinktank_storage.dm
+++ b/code/modules/mob/living/silicon/robot/subtypes/thinktank/thinktank_storage.dm
@@ -100,7 +100,7 @@
LAZYREMOVE(stored_atoms, remove_ref)
else
user.visible_message(span_infoplain(span_bold("\The [user]") + " begins unloading \the [removing] from \the [src]'s cargo compartment."))
- if(do_after(user, 3 SECONDS, src) && !QDELETED(removing) && removing.loc == src)
+ if(do_after(user, 3 SECONDS, target = src) && !QDELETED(removing) && removing.loc == src)
drop_stored_atom(removing, user)
return TRUE
@@ -127,7 +127,7 @@
visible_message(span_infoplain(span_bold("\The [src]") + " begins loading \the [dropping] into its cargo compartment."))
else
user.visible_message(span_infoplain(span_bold("\The [user]") + " begins loading \the [dropping] into \the [src]'s cargo compartment."))
- if(do_after(user, 3 SECONDS, src) && can_mouse_drop(dropping, user) && can_store_atom(dropping, user))
+ if(do_after(user, 3 SECONDS, target = src) && can_mouse_drop(dropping, user) && can_store_atom(dropping, user))
store_atom(dropping, user)
return FALSE
diff --git a/code/modules/mob/living/simple_mob/combat.dm b/code/modules/mob/living/simple_mob/combat.dm
index f981b235e3..ebecd5017d 100644
--- a/code/modules/mob/living/simple_mob/combat.dm
+++ b/code/modules/mob/living/simple_mob/combat.dm
@@ -163,7 +163,7 @@
set waitfor = FALSE
set_AI_busy(TRUE)
- if(do_after(src, reload_time))
+ if(do_after(src, reload_time, target = src))
if(reload_sound)
playsound(src, reload_sound, 70, 1)
reload_count = 0
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/stardog.dm b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/stardog.dm
index 4a4b845f8b..15e22e6874 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/stardog.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/stardog.dm
@@ -92,7 +92,7 @@
if(!that_one)
return ..()
to_chat(that_one, span_danger("\The [user]'s hand reaches toward you!!!"))
- if(!do_after(user, 3 SECONDS, src))
+ if(!do_after(user, 3 SECONDS, target = src))
return ..()
if(!istype(that_one.loc,/turf/simulated/floor/outdoors/fur))
to_chat(user, span_warning("\The [that_one] got away..."))
@@ -266,7 +266,7 @@
to_chat(src, span_notice("You begin to eat \the [E]..."))
- if(!do_after(src, 20 SECONDS, E))
+ if(!do_after(src, 20 SECONDS, target = E))
return
to_chat(src, span_notice("[msg]"))
if(nut || aff)
@@ -332,7 +332,7 @@
to_chat(src, span_warning("You decide not to transition."))
return
to_chat(src, span_notice("You begin to transition down to \the [our_dest], stay still..."))
- if(!do_after(src, 15 SECONDS))
+ if(!do_after(src, 15 SECONDS, target = src))
to_chat(src, span_warning("You were interrupted."))
return
visible_message(span_warning("\The [src] disappears!!!"))
@@ -343,7 +343,7 @@
else
to_chat(src, span_notice("You begin to transition back to space, stay still..."))
- if(!do_after(src, 15 SECONDS))
+ if(!do_after(src, 15 SECONDS, target = src))
to_chat(src, span_warning("You were interrupted."))
return
@@ -1059,7 +1059,7 @@
to_chat(user, span_warning("You can see \the [controller] inside! Tendrils of nerves seem to have attached themselves to \the [controller]! There's no room for you right now!"))
return
user.visible_message(span_notice("\The [user] reaches out to touch \the [src]..."),span_notice("You reach out to touch \the [src]..."))
- if(!do_after(user, 10 SECONDS, src))
+ if(!do_after(user, 10 SECONDS, target = src))
user.visible_message(span_warning("\The [user] pulls back from \the [src]."),span_warning("You pull back from \the [src]."))
return
if(controller) //got busy while you were waiting, get rekt
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_powers.dm b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_powers.dm
index 4115978c47..ad11e46ba9 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_powers.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_powers.dm
@@ -88,7 +88,7 @@
to_chat(M, "Something slimy begins probing at the opening of your ear canal...")
to_chat(src, span_warning("You slither up [M] and begin probing at their ear canal..."))
- if(!do_after(src,30))
+ if(!do_after(src, 3 SECONDS, target = M))
to_chat(src, span_warning("As [M] moves away, you are dislodged and fall to the ground."))
return
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka.dm
index f4813a2d49..e12e9a9bd5 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka.dm
@@ -470,7 +470,7 @@ GLOBAL_LIST_EMPTY(wounds_being_tended_by_drakes)
global.wounds_being_tended_by_drakes[friend_ref] = world.time + (8 SECONDS)
set_AI_busy(TRUE)
- if(!do_after(src, 8 SECONDS, friend) || QDELETED(friend) || friend.has_modifier_of_type(/datum/modifier/sifsap_salve) || incapacitated() || !spend_sap(10))
+ if(!do_after(src, 8 SECONDS, target = friend) || QDELETED(friend) || friend.has_modifier_of_type(/datum/modifier/sifsap_salve) || incapacitated() || !spend_sap(10))
global.wounds_being_tended_by_drakes -= friend_ref
set_AI_busy(FALSE)
return TRUE
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm
index f930b29e92..6fa0ef3012 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm
@@ -304,7 +304,7 @@
M.take_damage(damage_to_apply)
if(prob(3))
visible_message(span_critical("\The [src] begins digging its claws into \the [M]'s hatch!"))
- if(do_after(src, 1 SECOND))
+ if(do_after(src, 1 SECOND, target = M))
visible_message(span_critical("\The [src] rips \the [M]'s access hatch open, dragging [M.occupant] out!"))
M.go_out()
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm
index b2796040d1..ed5394e5b0 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm
@@ -279,7 +279,7 @@
to_chat(user, span_notice("We cannot get through that host's protective gear."))
return
- if(!do_after(src,2))
+ if(!do_after(src, 2, target))
to_chat(user, span_notice("As [M] moves away, we are dislodged and fall to the ground."))
return
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/space/worm.dm b/code/modules/mob/living/simple_mob/subtypes/animal/space/worm.dm
index c3f04429c4..8ede4d6fa9 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/space/worm.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/space/worm.dm
@@ -244,12 +244,12 @@
/mob/living/simple_mob/animal/space/space_worm/proc/AttemptToEat(var/atom/target)
if(istype(target,/turf/simulated/wall))
var/turf/simulated/wall/W = target
- if((!W.reinf_material && do_after(src, 5 SECONDS)) || do_after(src, 10 SECONDS)) // 10 seconds for an R-wall, 5 seconds for a normal one.
+ if((!W.reinf_material && do_after(src, 5 SECONDS, target)) || do_after(src, 10 SECONDS, target)) // 10 seconds for an R-wall, 5 seconds for a normal one.
if(target)
W.dismantle_wall()
return 1
else if(istype(target,/atom/movable))
- if(istype(target,/mob) || do_after(src, 5)) // 5 ticks to eat stuff like tables.
+ if(istype(target,/mob) || do_after(src, 5, target)) // 5 ticks to eat stuff like tables.
var/atom/movable/objectOrMob = target
if(istype(objectOrMob, /obj/machinery/door)) // Doors and airlocks take time based on their durability and our damageo.
var/obj/machinery/door/D = objectOrMob
@@ -261,7 +261,7 @@
objectOrMob = null
break
- if(do_after(src, 5))
+ if(do_after(src, 5, target))
D.visible_message(span_danger("Something crashes against \the [D]!"))
D.take_damage(2 * melee_damage_upper)
else
@@ -279,7 +279,7 @@
EF.visible_message(span_danger("Something begins forcing itself through \the [EF]!"))
else
EF.visible_message(span_danger("\The [src] begins forcing itself through \the [EF]!"))
- if(do_after(src, EF.strength * 5))
+ if(do_after(src, EF.strength * 5, target))
EF.adjust_strength(rand(-8, -10))
EF.visible_message(span_danger("\The [src] crashes through \the [EF]!"))
else
diff --git a/code/modules/mob/living/simple_mob/subtypes/glamour/ddraig.dm b/code/modules/mob/living/simple_mob/subtypes/glamour/ddraig.dm
index 757b8034e5..6ed4b7cb64 100644
--- a/code/modules/mob/living/simple_mob/subtypes/glamour/ddraig.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/glamour/ddraig.dm
@@ -464,7 +464,7 @@
return
visible_message("\The [src] begins significantly shifting their form.")
- if(!do_after(src, 10 SECONDS, src))
+ if(!do_after(src, 10 SECONDS, target = src))
visible_message("\The [src] ceases shifting their form.")
return 0
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/dominated_brain.dm b/code/modules/mob/living/simple_mob/subtypes/vore/dominated_brain.dm
index a19ad3d882..36350b06ff 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/dominated_brain.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/dominated_brain.dm
@@ -86,7 +86,7 @@
to_chat(src, span_danger("You begin to resist \the [prey_name]'s control!!!"))
to_chat(pred_body, span_danger("You feel the captive mind of [src] begin to resist your control."))
- if(do_after(src, 10 SECONDS))
+ if(do_after(src, 10 SECONDS, target = prey_name))
restore_control()
else
to_chat(src, span_notice("Your attempt to regain control has been interrupted..."))
@@ -243,7 +243,7 @@
to_chat(pred, span_warning("You can feel the will of another overwriting your own, control of your body being sapped away from you..."))
to_chat(prey, span_warning("You can feel the will of your host diminishing as you exert your will over them!"))
- if(!do_after(prey, 10 SECONDS))
+ if(!do_after(prey, 10 SECONDS, target = pred))
to_chat(prey, span_notice("Your attempt to regain control has been interrupted..."))
to_chat(pred, span_notice("The dominant sensation fades away..."))
return
@@ -338,7 +338,7 @@
to_chat(src, span_danger("You begin to resist \the [prey_name]'s control!!!"))
to_chat(pred_body, span_danger("You feel the captive mind of [src] begin to resist your control."))
- if(do_after(src, 10 SECONDS))
+ if(do_after(src, 10 SECONDS, target = prey_name))
restore_control()
else
to_chat(src, span_notice("Your attempt to regain control has been interrupted..."))
@@ -394,7 +394,7 @@
if(istype(G) && M == G.affecting)
src.visible_message(span_danger("[src] seems to be doing something to [M], resulting in [M]'s body looking increasingly drowsy with every passing moment!"))
- if(!do_after(src, 10 SECONDS))
+ if(!do_after(src, 10 SECONDS, target = M))
to_chat(M, span_notice("The alien presence fades, and you are left along in your body..."))
to_chat(src, span_notice("Your attempt to gather [M]'s mind has been interrupted."))
return
@@ -443,9 +443,9 @@
set desc = "If your body is inside of your predator still, attempts to re-insert yourself into it."
if(prey_body && prey_body.loc.loc == pred_body)
- to_chat(src, span_notice("You exert your will and attempt to return to yout body!!!"))
+ to_chat(src, span_notice("You exert your will and attempt to return to your body!!!"))
to_chat(pred_body, span_warning("\The [src] resists your hold and attempts to return to their body!"))
- if(do_after(src, 10 SECONDS))
+ if(do_after(src, 10 SECONDS, target = pred_body))
if(prey_body && prey_body.loc.loc == pred_body)
prey_body.ckey = prey_ckey
@@ -512,7 +512,7 @@
return
to_chat(pred, span_warning("You diminish your will, reducing it and allowing will of your prey to take over..."))
to_chat(prey, span_warning("You can feel the will of your host diminishing as you are given control over them!"))
- if(!do_after(pred, 10 SECONDS))
+ if(!do_after(pred, 10 SECONDS, target = prey))
to_chat(pred, span_notice("Your attempt to share control has been interrupted..."))
to_chat(prey, span_notice("The dominant sensation fades away..."))
return
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/macrophage.dm b/code/modules/mob/living/simple_mob/subtypes/vore/macrophage.dm
index 2fca03f641..c19a9a8c10 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/macrophage.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/macrophage.dm
@@ -79,7 +79,7 @@
EXTRAPOLATOR_ACT_ADD_DISEASES(., base_disease)
// Still no idea why extrapolator == src, but I'll leave this for later if I find out.
// if(!dry_run && !EXTRAPOLATOR_ACT_CHECK(., EXTRAPOLATOR_ACT_PRIORITY_SPECIAL) && extrapolator.create_culture(user, base_disease))
- if(do_after(user, 2 SECONDS))
+ if(do_after(user, 2 SECONDS, target = src))
user.visible_message(span_danger("[user] stabs [src] with [extrapolator], sucking it up!"), \
span_danger("You stab [src] with [extrapolator]'s probe, destroying it!"))
death()
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/plants/pitcher.dm b/code/modules/mob/living/simple_mob/subtypes/vore/plants/pitcher.dm
index 6fe815f026..056b4c6b0f 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/plants/pitcher.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/plants/pitcher.dm
@@ -211,7 +211,7 @@ GLOBAL_LIST_INIT(pitcher_plant_lure_messages, list(
var/N = 0
for(H in vore_selected.contents) //Only works for carbons, RIP mice. Should pick the first human the code finds.
user.visible_message(span_infoplain("[user] uses a loop of wire to try fishing someone out of \the [src]."), span_infoplain("You use a loop of wire to try snagging someone trapped in \the [src]..."))
- if(do_after(user, rand(3 SECONDS, 7 SECONDS))) //You can just spam click to stack attempts if you feel like abusing it.
+ if(do_after(user, rand(3 SECONDS, 7 SECONDS), target = src)) //You can just spam click to stack attempts if you feel like abusing it.
if(prob(15))
user.visible_message(span_notice("[user] pulls a sticky [H] free from \the [src]."), span_infoplain("You heft [H] free from \the [src]."))
LAZYSET(prey_excludes, H, world.time)
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/rakshasa_trap.dm b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/rakshasa_trap.dm
index 64a1117fc7..8143f807c2 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/rakshasa_trap.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/rakshasa_trap.dm
@@ -30,7 +30,7 @@
span_notice("[user] begins freeing [victim] from \the [src]."),
span_notice("You carefully begin to free [victim] from \the [src]."),
)
- if(do_after(user, 5))
+ if(do_after(user, 5, target = src))
user.visible_message(span_notice("[victim] has been freed from \the [src] by [user]."))
for(var/A in buckled_mobs)
unbuckle_mob(A)
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/slug.dm b/code/modules/mob/living/simple_mob/subtypes/vore/slug.dm
index c41aea0d02..19ccd6985d 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/slug.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/slug.dm
@@ -242,7 +242,7 @@
escape_time = 0.5 * base_escape_time
else
escape_time = base_escape_time //Admeme size scale
- if(do_after(user, escape_time, src, timed_action_flags = IGNORE_INCAPACITATED))
+ if(do_after(user, escape_time, target = src, timed_action_flags = IGNORE_INCAPACITATED))
if(!has_buckled_mobs())
return
to_chat(user, "You tug free of the tacky, rubbery strands!")
diff --git a/code/modules/mob/living/simple_mob/taming.dm b/code/modules/mob/living/simple_mob/taming.dm
index e24b675c5b..2b997c4e4c 100644
--- a/code/modules/mob/living/simple_mob/taming.dm
+++ b/code/modules/mob/living/simple_mob/taming.dm
@@ -30,7 +30,7 @@
return FALSE
/mob/living/simple_mob/proc/unique_tame_check(var/obj/O, var/mob/user)
- if(do_after(user, 0.5 SECONDS, src))
+ if(do_after(user, 0.5 SECONDS, target = src))
return TRUE
return FALSE
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index a3b4942024..445a572e12 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -939,7 +939,7 @@
else
to_chat(U, span_warning("You attempt to get a good grip on [selection] in [S]'s body."))
- if(!do_after(U, 30))
+ if(!do_after(U, 3 SECONDS, target = src))
return
if(!selection || !S || !U)
return
diff --git a/code/modules/mob/mob_grab_specials.dm b/code/modules/mob/mob_grab_specials.dm
index ed3313d1d0..438634ac1c 100644
--- a/code/modules/mob/mob_grab_specials.dm
+++ b/code/modules/mob/mob_grab_specials.dm
@@ -135,7 +135,7 @@
return
attacker.visible_message(span_danger("[attacker] starts forcing [target] to the ground!"))
- if(do_after(attacker, 20) && target)
+ if(do_after(attacker, 2 SECONDS, target) && target)
last_action = world.time
attacker.visible_message(span_danger("[attacker] forces [target] to the ground!"))
apply_pinning(target, attacker)
diff --git a/code/modules/modular_computers/computers/modular_computer/interaction.dm b/code/modules/modular_computers/computers/modular_computer/interaction.dm
index 9e9e56156f..f7d1044402 100644
--- a/code/modules/modular_computers/computers/modular_computer/interaction.dm
+++ b/code/modules/modular_computers/computers/modular_computer/interaction.dm
@@ -166,7 +166,7 @@
return
to_chat(user, "You begin repairing damage to \the [src]...")
- if(WT.remove_fuel(round(damage/75)) && do_after(user, damage/10))
+ if(WT.remove_fuel(round(damage/75)) && do_after(user, damage/10, target = src))
damage = 0
to_chat(user, "You repair \the [src].")
return
diff --git a/code/modules/multiz/ladder_assembly_vr.dm b/code/modules/multiz/ladder_assembly_vr.dm
index 8eea4d29f2..c07cfcdd79 100644
--- a/code/modules/multiz/ladder_assembly_vr.dm
+++ b/code/modules/multiz/ladder_assembly_vr.dm
@@ -51,7 +51,7 @@
user.visible_message("\The [user] starts to weld \the [src] to the floor.", \
"You start to weld \the [src] to the floor.", \
"You hear welding")
- if(do_after(user, 2 SECONDS))
+ if(do_after(user, 2 SECONDS, target = src))
if(QDELETED(src) || !WT.isOn()) return
state = LADDER_CONSTRUCTION_WELDED
to_chat(user, "You weld \the [src] to the floor.")
@@ -64,7 +64,7 @@
user.visible_message("\The [user] starts to cut \the [src] free from the floor.", \
"You start to cut \the [src] free from the floor.", \
"You hear welding")
- if(do_after(user, 2 SECONDS))
+ if(do_after(user, 2 SECONDS, target = src))
if(QDELETED(src) || !WT.isOn()) return
state = LADDER_CONSTRUCTION_WRENCHED
to_chat(user, "You cut \the [src] free from the floor.")
diff --git a/code/modules/multiz/ladders.dm b/code/modules/multiz/ladders.dm
index 1b9642f90e..226441bcb6 100644
--- a/code/modules/multiz/ladders.dm
+++ b/code/modules/multiz/ladders.dm
@@ -51,7 +51,7 @@
user.visible_message("\The [user] starts to deconstruct \the [src].", \
"You start to deconstruct \the [src].", \
"You hear welding")
- if(do_after(user, 2 SECONDS))
+ if(do_after(user, 2 SECONDS, target = src))
if(QDELETED(src) || !WT.isOn()) return
var/obj/structure/ladder_assembly/A
to_chat(user, "You deconstruct \the [src].")
@@ -143,7 +143,7 @@
var/mob/living/carbon/human/MS = M
climb_modifier = MS.species.climb_mult
- if(do_after(M, (climb_time * climb_modifier), src))
+ if(do_after(M, (climb_time * climb_modifier), target = src))
var/turf/T = get_turf(target_ladder)
for(var/atom/A in T)
if(!A.CanPass(M, M.loc, 1.5, 0))
diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm
index bef8826a05..41f7c46fec 100644
--- a/code/modules/multiz/movement.dm
+++ b/code/modules/multiz/movement.dm
@@ -59,7 +59,7 @@
var/pull_up_time = max((3 SECONDS + (src.movement_delay() * 10) * swim_modifier), 1)
to_chat(src, span_notice("You start diving underwater..."))
src.audible_message(span_notice("[src] begins to dive under the water."), runemessage = "splish splosh")
- if(do_after(src, pull_up_time))
+ if(do_after(src, pull_up_time, target = src))
to_chat(src, span_notice("You reach the sea floor."))
else
to_chat(src, span_warning("You stopped swimming downwards."))
@@ -84,7 +84,7 @@
var/pull_up_time = max((5 SECONDS + (src.movement_delay() * 10) * climb_modifier), 1)
to_chat(src, span_notice("You grab \the [lattice] and start pulling yourself upward..."))
src.audible_message(span_notice("[src] begins climbing up \the [lattice]."), runemessage = "clank clang")
- if(do_after(src, pull_up_time))
+ if(do_after(src, pull_up_time, target = src))
to_chat(src, span_notice("You pull yourself up."))
else
to_chat(src, span_warning("You gave up on pulling yourself up."))
@@ -94,7 +94,7 @@
var/pull_up_time = max((5 SECONDS + (src.movement_delay() * 10) * swim_modifier), 1)
to_chat(src, span_notice("You start swimming upwards..."))
src.audible_message(span_notice("[src] begins to swim towards the surface."), runemessage = "splish splosh")
- if(do_after(src, pull_up_time))
+ if(do_after(src, pull_up_time, target = src))
to_chat(src, span_notice("You reach the surface."))
else
to_chat(src, span_warning("You stopped swimming upwards."))
@@ -109,7 +109,7 @@
to_chat(src, span_notice("There's something in the way up above in that direction, try another."))
return 0
src.audible_message(span_notice("[src] begins climbing up \the [lattice]."), runemessage = "clank clang")
- if(do_after(src, pull_up_time))
+ if(do_after(src, pull_up_time, target = src))
to_chat(src, span_notice("You pull yourself up."))
else
to_chat(src, span_warning("You gave up on pulling yourself up."))
@@ -130,7 +130,7 @@
var/fly_time = max(7 SECONDS + (H.movement_delay() * 10), 1) //So it's not too useful for combat. Could make this variable somehow, but that's down the road.
to_chat(src, span_notice("You begin to fly upwards..."))
H.audible_message(span_notice("[H] begins to flap \his wings, preparing to move upwards!"), runemessage = "flap flap")
- if(do_after(H, fly_time) && H.flying)
+ if(do_after(H, fly_time, target = src) && H.flying)
to_chat(src, span_notice("You fly upwards."))
else
to_chat(src, span_warning("You stopped flying upwards."))
diff --git a/code/modules/multiz/movement_vr.dm b/code/modules/multiz/movement_vr.dm
index 603a9cfe20..d220eef751 100644
--- a/code/modules/multiz/movement_vr.dm
+++ b/code/modules/multiz/movement_vr.dm
@@ -193,7 +193,7 @@
var/oops_time = world.time
var/grace_time = 4 SECONDS
to_chat(L, span_warning("If you get interrupted after [(grace_time / (1 SECOND))] seconds of climbing, you will fall and hurt yourself, beware!"))
- if(do_after(L,climb_time))
+ if(do_after(L, climb_time, target = src))
if(prob(fall_chance))
L.forceMove(above_mob)
L.visible_message(message = span_infoplain(span_bold("[L]") + " falls off " + span_bold("\The [src]")), self_message = span_danger("You slipped off " + span_bold("\The [src]")), \
@@ -316,7 +316,7 @@
var/oops_time = world.time
var/grace_time = 3 SECONDS
to_chat(src, span_warning("If you get interrupted after [(grace_time / (1 SECOND))] seconds of climbing, you will fall and hurt yourself, beware!"))
- if(do_after(src,climb_time))
+ if(do_after(src, climb_time, target = src))
if(prob(fall_chance))
src.forceMove(front_of_us)
src.visible_message(message = span_infoplain(span_bold("[src]") + " falls off " + span_bold("\The [below_wall]")), \
diff --git a/code/modules/nifsoft/nif.dm b/code/modules/nifsoft/nif.dm
index c4ff51621e..628c546cd7 100644
--- a/code/modules/nifsoft/nif.dm
+++ b/code/modules/nifsoft/nif.dm
@@ -232,7 +232,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
//Attackby proc, for maintenance
/obj/item/nif/attackby(obj/item/W, mob/user as mob)
if(open == 0 && W.has_tool_quality(TOOL_SCREWDRIVER))
- if(do_after(user, 4 SECONDS, src) && open == 0)
+ if(do_after(user, 4 SECONDS, target = src) && open == 0)
user.visible_message("[user] unscrews and pries open \the [src].",span_notice("You unscrew and pry open \the [src]."))
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
open = 1
@@ -247,18 +247,18 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
open = 3
update_icon()
return
- if(do_after(user, 6 SECONDS, src) && open == 1 && C.use(3))
+ if(do_after(user, 6 SECONDS, target = src) && open == 1 && C.use(3))
user.visible_message("[user] replaces some wiring in \the [src].",span_notice("You replace any burned out wiring in \the [src]."))
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
open = 2
update_icon()
else if(open == 2 && istype(W,/obj/item/multitool))
- if(do_after(user, 8 SECONDS, src) && open == 2)
+ if(do_after(user, 8 SECONDS, target = src) && open == 2)
user.visible_message("[user] resets several circuits in \the [src].",span_notice("You find and repair any faulty circuits in \the [src]."))
open = 3
update_icon()
else if(open == 3 && W.has_tool_quality(TOOL_SCREWDRIVER))
- if(do_after(user, 3 SECONDS, src) && open == 3)
+ if(do_after(user, 3 SECONDS, target = src) && open == 3)
user.visible_message("[user] closes up \the [src].",span_notice("You re-seal \the [src] for use once more."))
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
open = FALSE
diff --git a/code/modules/nifsoft/nifsoft.dm b/code/modules/nifsoft/nifsoft.dm
index 70de8870e8..e7280e2154 100644
--- a/code/modules/nifsoft/nifsoft.dm
+++ b/code/modules/nifsoft/nifsoft.dm
@@ -221,14 +221,14 @@
icon_state = "[initial(icon_state)]-animate" //makes it play the item animation upon using on a valid target
update_icon()
- if(A == user && do_after(Hu,1 SECONDS,Ht))
+ if(A == user && do_after(Hu, 1 SECONDS, target = Ht))
if(Ht.isSynthetic())
new stored_synthetic(Ht.nif,extra)
qdel(src)
else
new stored_organic(Ht.nif,extra)
qdel(src)
- else if(A != user && do_after(Hu,10 SECONDS,Ht))
+ else if(A != user && do_after(Hu, 10 SECONDS, target = Ht))
if(Ht.isSynthetic())
new stored_synthetic(Ht.nif,extra)
qdel(src)
diff --git a/code/modules/overmap/ships/computers/sensors.dm b/code/modules/overmap/ships/computers/sensors.dm
index 92e0350ac8..a6ee328427 100644
--- a/code/modules/overmap/ships/computers/sensors.dm
+++ b/code/modules/overmap/ships/computers/sensors.dm
@@ -155,7 +155,7 @@
if(WT.remove_fuel(0,user))
to_chat(user, span_notice("You start repairing the damage to [src]."))
playsound(src, 'sound/items/Welder.ogg', 100, 1)
- if(do_after(user, max(5, damage / 5), src) && WT && WT.isOn())
+ if(do_after(user, max(5, damage / 5), target = src) && WT && WT.isOn())
to_chat(user, span_notice("You finish repairing the damage to [src]."))
take_damage(-damage)
else
diff --git a/code/modules/overmap/ships/ship_vr.dm b/code/modules/overmap/ships/ship_vr.dm
index 213faf4e34..630ae84b95 100644
--- a/code/modules/overmap/ships/ship_vr.dm
+++ b/code/modules/overmap/ships/ship_vr.dm
@@ -19,7 +19,7 @@
var/obj/belly/bellychoice = tgui_input_list(L, "Which belly?","Select A Belly", L.vore_organs)
if(bellychoice)
L.visible_message(span_warning("[L] is trying to stuff \the [src] into [L.gender == MALE ? "his" : L.gender == FEMALE ? "her" : "their"] [bellychoice]!"),span_notice("You begin putting \the [src] into your [bellychoice]!"))
- if(do_after(L, 5 SECONDS, src))
+ if(do_after(L, 5 SECONDS, target = src))
forceMove(bellychoice)
SSskybox.rebuild_skyboxes(map_z)
L.visible_message(span_warning("[L] eats a spaceship! This is totally normal."),"You eat the the spaceship! Yum, metal.")
diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm
index 95628381b8..48d9aa7273 100644
--- a/code/modules/paperwork/filingcabinet.dm
+++ b/code/modules/paperwork/filingcabinet.dm
@@ -46,7 +46,7 @@
else if(P.has_tool_quality(TOOL_SCREWDRIVER))
to_chat(user, span_notice("You begin taking the [name] apart."))
playsound(src, P.usesound, 50, 1)
- if(do_after(user, 10 * P.toolspeed))
+ if(do_after(user, 1 SECOND * P.toolspeed, target = src))
playsound(src, P.usesound, 50, 1)
to_chat(user, span_notice("You take the [name] apart."))
new /obj/item/stack/material/steel( src.loc, 4 )
diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm
index ab6aa28f94..234c67008e 100644
--- a/code/modules/paperwork/paper.dm
+++ b/code/modules/paperwork/paper.dm
@@ -214,39 +214,21 @@
span_notice(" [user] holds up a paper and shows it to [M]. "))
M.examinate(src)
- else if(user.zone_sel.selecting == O_MOUTH) // lipstick wiping and paper eating
+ else if(user.zone_sel.selecting == O_MOUTH) // lipstick wiping
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H == user)
- if(icon_state == "scrap" && H.check_has_mouth()) //YW Edit Start
- to_chat(user, span_warning("You begin to stuff \the [src] into your mouth!"))
- if(do_after(user, 30))
- to_chat(user, span_warning("You stuff \the [src] into your mouth!"))
- H.ingested.add_reagent("paper", 10)
- H.adjustOxyLoss(10)
- qdel(src)
- else
- to_chat(user, span_notice("You wipe off the lipstick with [src]."))
+ to_chat(user, span_notice("You wipe off the lipstick with [src]."))
+ H.lip_style = null
+ H.update_icons_body()
+ else
+ user.visible_message(span_warning("[user] begins to wipe [H]'s lipstick off with \the [src]."), \
+ span_notice("You begin to wipe off [H]'s lipstick."))
+ if(do_after(user, 1 SECOND, target = H) && do_after(H, 1 SECONDS, target = user)) //user needs to keep their active hand, H does not.
+ user.visible_message(span_notice("[user] wipes [H]'s lipstick off with \the [src]."), \
+ span_notice("You wipe off [H]'s lipstick."))
H.lip_style = null
H.update_icons_body()
- else
- if(icon_state == "scrap" && H.check_has_mouth())
- user.visible_message(span_warning("[user] begins to stuff \the [src] into [H]'s mouth!"), \
- span_warning("You begin to stuff \the [src] into [H]'s mouth!"),)
- if(do_after(user, 30, H))
- user.visible_message(span_warning("[user] stuffs \the [src] into [H]'s mouth!"),\
- span_warning("You stuff \the [src] into [H]'s mouth!"))
- H.ingested.add_reagent("paper", 10)
- H.adjustOxyLoss(10)
- qdel(src)
- else
- user.visible_message(span_warning("[user] begins to wipe [H]'s lipstick off with \the [src]."), \
- span_notice("You begin to wipe off [H]'s lipstick."))
- if(do_after(user, 10, H))
- user.visible_message(span_notice("[user] wipes [H]'s lipstick off with \the [src]."), \
- span_notice("You wipe off [H]'s lipstick."))
- H.lip_style = null
- H.update_icons_body() //YW Edit End
/obj/item/paper/proc/set_content(text,title)
if(title)
diff --git a/code/modules/paperwork/papershredder.dm b/code/modules/paperwork/papershredder.dm
index 671ae2cc0d..835e6f36d6 100644
--- a/code/modules/paperwork/papershredder.dm
+++ b/code/modules/paperwork/papershredder.dm
@@ -171,7 +171,7 @@
return
user.visible_message(span_warning("\The [user] holds \the [P] up to \the [src]. It looks like [TU.he] [TU.is] trying to burn it!"), \
span_warning("You hold \the [P] up to \the [src], burning it slowly."))
- if(!do_after(user,20))
+ if(!do_after(user, 2 SECONDS, target = src))
to_chat(user, span_warning("You must hold \the [P] steady to burn \the [src]."))
return
user.visible_message(span_danger("\The [user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap."), \
diff --git a/code/modules/persistence/graffiti.dm b/code/modules/persistence/graffiti.dm
index 435f2974a8..83c611feaf 100644
--- a/code/modules/persistence/graffiti.dm
+++ b/code/modules/persistence/graffiti.dm
@@ -45,7 +45,7 @@
/obj/effect/decal/writing/attackby(var/obj/item/thing, var/mob/user)
if(thing.has_tool_quality(TOOL_WELDER))
var/obj/item/weldingtool/welder = thing.get_welder()
- if(welder.isOn() && welder.remove_fuel(0,user) && do_after(user, 5, src) && !QDELETED(src))
+ if(welder.isOn() && welder.remove_fuel(0,user) && do_after(user, 5, target = src) && !QDELETED(src))
playsound(src.loc, welder.usesound, 50, 1)
user.visible_message(span_infoplain(span_bold("\The [user]") + " clears away some graffiti."))
qdel(src)
@@ -58,7 +58,7 @@
var/_message = tgui_input_text(user, "Enter an additional message to engrave.", "Graffiti", "", MAX_MESSAGE_LEN)
if(_message && loc && user && !user.incapacitated() && user.Adjacent(loc) && thing.loc == user)
user.visible_message(span_warning("\The [user] begins carving something into \the [loc]."))
- if(do_after(user, max(20, length(_message)), src) && loc)
+ if(do_after(user, max(2 SECONDS, length(_message)), target = src) && loc)
user.visible_message(span_danger("\The [user] carves some graffiti into \the [loc]."))
message = "[message] [_message]"
author = user.ckey
diff --git a/code/modules/persistence/noticeboard.dm b/code/modules/persistence/noticeboard.dm
index 0151d8bd79..9dbd7ff4b1 100644
--- a/code/modules/persistence/noticeboard.dm
+++ b/code/modules/persistence/noticeboard.dm
@@ -84,7 +84,7 @@
else if(I.has_tool_quality(TOOL_WRENCH))
visible_message(span_warning("[user] begins dismantling [src]."))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, 50, src))
+ if(do_after(user, 5 SECONDS, target = src))
visible_message(span_danger("[user] has dismantled [src]!"))
dismantle()
return
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 4cf8c32272..d705aeaf94 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -474,7 +474,7 @@ GLOBAL_LIST_EMPTY(apcs)
return
playsound(src, W.usesound, 50, 1)
to_chat(user, "You begin to remove the power control board...") //lpeters - fixed grammar issues //Ner - grrrrrr
- if(do_after(user, 50 * W.toolspeed))
+ if(do_after(user, 5 SECONDS * W.toolspeed, target = src))
if(has_electronics == APC_HAS_ELECTRONICS_WIRED)
has_electronics = APC_HAS_ELECTRONICS_NONE
if((stat & BROKEN))
@@ -558,7 +558,7 @@ GLOBAL_LIST_EMPTY(apcs)
user.visible_message(span_warning("[user.name] adds cables to the APC frame."), \
"You start adding cables to the APC frame...")
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 2 SECONDS, target = src))
if(C.get_amount() >= 10 && !terminal && opened && has_electronics != APC_HAS_ELECTRONICS_SECURED)
var/obj/structure/cable/N = T.get_cable_node()
if(prob(50) && electrocute_mob(user, N, N))
@@ -581,7 +581,7 @@ GLOBAL_LIST_EMPTY(apcs)
user.visible_message(span_warning("[user.name] starts dismantling the [src]'s power terminal."), \
"You begin to cut the cables...")
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 50 * W.toolspeed))
+ if(do_after(user, 5 SECONDS * W.toolspeed, target = src))
if(terminal && opened && has_electronics != APC_HAS_ELECTRONICS_SECURED)
if(prob(50) && electrocute_mob(user, terminal.powernet, terminal))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
@@ -596,7 +596,7 @@ GLOBAL_LIST_EMPTY(apcs)
user.visible_message(span_warning("[user.name] inserts the power control board into [src]."), \
"You start to insert the power control board into the frame...")
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 10))
+ if(do_after(user, 1 SECOND, target = src))
if(has_electronics == APC_HAS_ELECTRONICS_NONE)
has_electronics = APC_HAS_ELECTRONICS_WIRED
reboot()
@@ -614,7 +614,7 @@ GLOBAL_LIST_EMPTY(apcs)
"You start welding the APC frame...", \
"You hear welding.")
playsound(src, WT.usesound, 25, 1)
- if(do_after(user, 50 * WT.toolspeed))
+ if(do_after(user, 5 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.remove_fuel(3, user)) return
if(emagged || (stat & BROKEN) || opened==2)
new /obj/item/stack/material/steel(loc)
@@ -637,7 +637,7 @@ GLOBAL_LIST_EMPTY(apcs)
return
user.visible_message(span_warning("[user.name] begins replacing the damaged APC cover with a new one."),\
"You begin to replace the damaged APC cover...")
- if(do_after(user, 50))
+ if(do_after(user, 5 SECONDS, target = src))
user.visible_message(span_notice("[user.name] has replaced the damaged APC cover with a new one."),\
"You replace the damaged APC cover with a new one.")
qdel(W)
@@ -652,7 +652,7 @@ GLOBAL_LIST_EMPTY(apcs)
return
user.visible_message(span_warning("[user.name] connects their [W.name] to the APC and begins resetting it."),\
"You begin resetting the APC...")
- if(do_after(user, 50))
+ if(do_after(user, 5 SECONDS, target = src))
user.visible_message(span_notice("[user.name] resets the APC with a beep from their [W.name]."),\
"You finish resetting the APC.")
playsound(src, 'sound/machines/chime.ogg', 25, 1)
@@ -713,7 +713,7 @@ GLOBAL_LIST_EMPTY(apcs)
to_chat(user, "The [src] isn't working.")
else
flick("apc-spark", src)
- if(do_after(user,6))
+ if(do_after(user, 6, target = src))
emagged = 1
locked = 0
to_chat(user, span_notice("You emag the APC interface."))
diff --git a/code/modules/power/batteryrack_vr.dm b/code/modules/power/batteryrack_vr.dm
index 223a31abd5..348090a02c 100644
--- a/code/modules/power/batteryrack_vr.dm
+++ b/code/modules/power/batteryrack_vr.dm
@@ -13,7 +13,7 @@
/obj/item/module/power_control/attackby(var/obj/item/I, var/mob/user)
if(I.has_tool_quality(TOOL_MULTITOOL))
to_chat(user, span_notice("You begin tweaking the power control circuits to support a power cell rack."))
- if(do_after(user, 50 * I.toolspeed))
+ if(do_after(user, 5 SECONDS * I.toolspeed, target = src))
var/obj/item/newcircuit = new/obj/item/circuitboard/batteryrack(get_turf(user))
qdel(src)
user.put_in_hands(newcircuit)
diff --git a/code/modules/power/breaker_box.dm b/code/modules/power/breaker_box.dm
index f82f925b22..566f0baa67 100644
--- a/code/modules/power/breaker_box.dm
+++ b/code/modules/power/breaker_box.dm
@@ -62,7 +62,7 @@
busy = 1
to_chat(user, span_green("Updating power settings..."))
- if(do_after(user, 50))
+ if(do_after(user, 5 SECONDS, target = src))
set_state(!on)
to_chat(user, span_green("Update Completed. New setting:[on ? "on": "off"]"))
update_locked = 1
@@ -84,7 +84,7 @@
for(var/mob/O in viewers(user))
O.show_message(span_red(text("[user] started reprogramming [src]!")), 1)
- if(do_after(user, 50))
+ if(do_after(user, 5 SECONDS, target = src))
set_state(!on)
user.visible_message(\
span_notice("[user.name] [on ? "enabled" : "disabled"] the breaker box!"),\
diff --git a/code/modules/power/cable_heavyduty.dm b/code/modules/power/cable_heavyduty.dm
index 06d09eb526..f5df287513 100644
--- a/code/modules/power/cable_heavyduty.dm
+++ b/code/modules/power/cable_heavyduty.dm
@@ -32,7 +32,7 @@
return
playsound(src, WT.usesound, 50, 1)
- if(do_after(user, 250 * WT.toolspeed)) // Meant to be an obnoxiously long time due to these being intended as "mapper placed indestructable cables". However explosions can already break them if they turf change.
+ if(do_after(user, 25 SECONDS * WT.toolspeed, target = src)) // Meant to be an obnoxiously long time due to these being intended as "mapper placed indestructable cables". However explosions can already break them if they turf change.
var/obj/item/stack/cable_coil/heavyduty/CC
if(src.d1) // 0-X cables are 1 unit, X-X cables are 2 units long
CC = new/obj/item/stack/cable_coil/heavyduty(T, 2, color)
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index a8d90ef659..ddf7aad0d5 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -103,7 +103,7 @@ GLOBAL_LIST_EMPTY(light_type_cache)
if (src.stage == 1)
playsound(src, W.usesound, 75, 1)
to_chat(user, "You begin deconstructing [src].")
- if (!do_after(user, 30 * W.toolspeed))
+ if (!do_after(user, 3 SECONDS * W.toolspeed, target = src))
return
new /obj/item/stack/material/steel( get_turf(src.loc), sheets_refunded )
user.visible_message("[user.name] deconstructs [src].", \
diff --git a/code/modules/power/lightswitch_vr.dm b/code/modules/power/lightswitch_vr.dm
index e4268a83ce..9995b6e457 100644
--- a/code/modules/power/lightswitch_vr.dm
+++ b/code/modules/power/lightswitch_vr.dm
@@ -93,7 +93,7 @@
user.visible_message( \
span_warning("\The [user] begins deconstructing \the [src]."), \
span_notice("You start deconstructing \the [src]."))
- if(do_after(user, 20 * WT.toolspeed, target = src) && WT.isOn())
+ if(do_after(user, 2 SECONDS * WT.toolspeed, target = src) && WT.isOn())
new /obj/item/stack/material/steel(get_turf(src), 2)
user.visible_message( \
span_warning("\The [user] has deconstructed \the [src]."), \
diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm
index b68c0c2a00..64fbc6fdcd 100644
--- a/code/modules/power/singularity/emitter.dm
+++ b/code/modules/power/singularity/emitter.dm
@@ -196,7 +196,7 @@
user.visible_message("[user.name] starts to weld [src] to the floor.", \
"You start to weld [src] to the floor.", \
"You hear welding")
- if (do_after(user,20 * WT.toolspeed))
+ if (do_after(user, 2 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
state = 2
to_chat(user, "You weld [src] to the floor.")
@@ -209,7 +209,7 @@
user.visible_message("[user.name] starts to cut [src] free from the floor.", \
"You start to cut [src] free from the floor.", \
"You hear welding")
- if (do_after(user,20 * WT.toolspeed))
+ if (do_after(user, 2 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
state = 1
to_chat(user, "You cut [src] free from the floor.")
@@ -229,7 +229,7 @@
to_chat(user, span_warning("You don't have enough sheets to repair this! You need at least [amt] sheets."))
return
to_chat(user, span_notice("You begin repairing \the [src]..."))
- if(do_after(user, 30))
+ if(do_after(user, 3 SECONDS, target = src))
if(P.use(amt))
to_chat(user, span_notice("You have repaired \the [src]."))
integrity = initial(integrity)
diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm
index 9dda3dd16c..7e91ac5bc0 100644
--- a/code/modules/power/singularity/field_generator.dm
+++ b/code/modules/power/singularity/field_generator.dm
@@ -147,7 +147,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 * WT.toolspeed))
+ if (do_after(user, 2 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
state = 2
to_chat(user, "You weld the field generator to the floor.")
@@ -159,7 +159,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 * WT.toolspeed))
+ if (do_after(user, 2 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
state = 1
to_chat(user, "You cut the [src] free from the floor.")
diff --git a/code/modules/power/singularity/generator.dm b/code/modules/power/singularity/generator.dm
index 647492e49d..bac43c7aba 100644
--- a/code/modules/power/singularity/generator.dm
+++ b/code/modules/power/singularity/generator.dm
@@ -40,16 +40,16 @@
panel_open = !panel_open
playsound(src, W.usesound, 50, 1)
visible_message(span_infoplain(span_bold("\The [user]") + " adjusts \the [src]'s mechanisms."))
- if(panel_open && do_after(user, 30))
+ if(panel_open && do_after(user, 3 SECONDS, target = src))
to_chat(user, span_notice("\The [src] looks like it could be modified."))
- if(panel_open && do_after(user, 80 * W.toolspeed)) // We don't have skills, so a delayed hint for engineers will have to do for now. (Panel open check for sanity)
+ if(panel_open && do_after(user, 8 SECONDS * W.toolspeed, target = src)) // We don't have skills, so a delayed hint for engineers will have to do for now. (Panel open check for sanity)
playsound(src, W.usesound, 50, 1)
to_chat(user, span_cult("\The [src] looks like it could be adapted to forge advanced materials via particle acceleration, somehow.."))
else
to_chat(user, span_notice("\The [src]'s mechanisms look secure."))
if(istype(W, /obj/item/smes_coil/super_io) && panel_open)
visible_message(span_infoplain(span_bold("\The [user]") + " begins to modify \the [src] with \the [W]."))
- if(do_after(user, 300))
+ if(do_after(user, 30 SECONDS, target = src))
user.drop_from_inventory(W)
visible_message(span_infoplain(span_bold("\The [user]") + " installs \the [W] onto \the [src]."))
qdel(W)
diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm
index 0b25956304..890b9943cc 100644
--- a/code/modules/power/smes.dm
+++ b/code/modules/power/smes.dm
@@ -295,7 +295,7 @@ GLOBAL_LIST_EMPTY(smeses)
if(check_terminal_exists(tempLoc, user, tempDir))
return 1
to_chat(user, span_filter_notice(span_notice("You start adding cable to the [src].")))
- if(do_after(user, 50))
+ if(do_after(user, 5 SECONDS, target = src))
if(check_terminal_exists(tempLoc, user, tempDir))
return 1
var/obj/machinery/power/terminal/term = new/obj/machinery/power/terminal(tempLoc)
@@ -349,7 +349,7 @@ GLOBAL_LIST_EMPTY(smeses)
if(!damage)
to_chat(user, span_filter_notice("\The [src] is already fully repaired."))
return FALSE
- if(WT.remove_fuel(0,user) && do_after(user, damage, src))
+ if(WT.remove_fuel(0,user) && do_after(user, damage, target = src))
to_chat(user, span_filter_notice("You repair all structural damage to \the [src]"))
damage = 0
return FALSE
@@ -391,7 +391,7 @@ GLOBAL_LIST_EMPTY(smeses)
else
to_chat(user, span_filter_notice(span_notice("You begin to cut the cables...")))
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 50 * W.toolspeed))
+ if(do_after(user, 5 SECONDS * W.toolspeed, target = src))
if (prob(50) && electrocute_mob(user, term.powernet, term))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
diff --git a/code/modules/power/smes_construction.dm b/code/modules/power/smes_construction.dm
index 4ef720448d..958a1d078d 100644
--- a/code/modules/power/smes_construction.dm
+++ b/code/modules/power/smes_construction.dm
@@ -341,7 +341,7 @@
playsound(src, W.usesound, 50, 1)
to_chat(user, span_warning("You begin to disassemble the [src]!"))
- if (do_after(user, (100 * cur_coils) * W.toolspeed)) // More coils = takes longer to disassemble. It's complex so largest one with 5 coils will take 50s with a normal crowbar
+ if (do_after(user, (10 SECONDS * cur_coils) * W.toolspeed, target = src)) // More coils = takes longer to disassemble. It's complex so largest one with 5 coils will take 50s with a normal crowbar
if (failure_probability && prob(failure_probability))
total_system_failure(failure_probability, user)
diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm
index 729e9747ed..296a2220ed 100644
--- a/code/modules/power/solar.dm
+++ b/code/modules/power/solar.dm
@@ -62,7 +62,7 @@ GLOBAL_LIST_EMPTY(solars_list)
if(W.has_tool_quality(TOOL_CROWBAR))
playsound(src, 'sound/machines/click.ogg', 50, 1)
user.visible_message(span_notice("[user] begins to take the glass off the solar panel."))
- if(do_after(user, 50))
+ if(do_after(user, 5 SECONDS, target = src))
var/obj/item/solar_assembly/S = new(loc)
S.anchored = TRUE
new glass_type(loc, 2)
@@ -416,7 +416,7 @@ GLOBAL_LIST_EMPTY(solars_list)
/obj/machinery/power/solar_control/attackby(obj/item/I, user as mob)
if(I.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, I.usesound, 50, 1)
- if(do_after(user, 20))
+ if(do_after(user, 2 SECONDS, target = src))
if (src.stat & BROKEN)
to_chat(user, span_blue("The broken glass falls out."))
var/obj/structure/frame/A = new /obj/structure/frame/computer( src.loc )
diff --git a/code/modules/power/tracker.dm b/code/modules/power/tracker.dm
index f503bfab9d..dbdce45969 100644
--- a/code/modules/power/tracker.dm
+++ b/code/modules/power/tracker.dm
@@ -56,7 +56,7 @@
if(W.has_tool_quality(TOOL_CROWBAR))
playsound(src, 'sound/machines/click.ogg', 50, 1)
user.visible_message(span_notice("[user] begins to take the glass off the solar tracker."))
- if(do_after(user, 50))
+ if(do_after(user, 5 SECONDS, target = src))
var/obj/item/solar_assembly/S = new(loc)
S.tracker = TRUE
S.anchored = TRUE
diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm
index c69f74421f..bdf44da1c3 100644
--- a/code/modules/projectiles/ammunition.dm
+++ b/code/modules/projectiles/ammunition.dm
@@ -64,7 +64,7 @@
if(box.caliber == bullet.caliber && bullet.BB)
if (boolets < 1)
to_chat(user, span_notice("You start collecting shells.")) // Say it here so it doesn't get said if we don't find anything useful.
- if(do_after(user,5,box))
+ if(do_after(user, 5, target = box))
if(box.stored_ammo.len >= box.max_ammo) // Double check because these can change during the wait.
break
if(bullet.loc != floor)
diff --git a/code/modules/projectiles/ammunition/smartmag.dm b/code/modules/projectiles/ammunition/smartmag.dm
index 8493df4851..72421fc13a 100644
--- a/code/modules/projectiles/ammunition/smartmag.dm
+++ b/code/modules/projectiles/ammunition/smartmag.dm
@@ -79,7 +79,7 @@
return
else
to_chat(user, "You begin inserting \the [I] into \the [src].")
- if(do_after(user, 25))
+ if(do_after(user, 25, target = src))
user.drop_item()
I.forceMove(src)
attached_cell = I
@@ -90,7 +90,7 @@
else if(I.has_tool_quality(TOOL_SCREWDRIVER))
if(attached_cell)
to_chat(user, "You begin removing \the [attached_cell] from \the [src].")
- if(do_after(user, 10)) // Faster than doing it by hand
+ if(do_after(user, 1 SECOND, target = src)) // Faster than doing it by hand
attached_cell.update_icon()
attached_cell.forceMove(get_turf(src.loc))
attached_cell = null
@@ -113,7 +113,7 @@
if(user.get_inactive_hand() == src)
if(attached_cell)
to_chat(user, "You struggle to remove \the [attached_cell] from \the [src].")
- if(do_after(user, 40))
+ if(do_after(user, 4 SECONDS, target = src))
attached_cell.update_icon()
user.put_in_hands(attached_cell)
attached_cell = null
diff --git a/code/modules/projectiles/broken.dm b/code/modules/projectiles/broken.dm
index fcbf149573..7c6bb22692 100644
--- a/code/modules/projectiles/broken.dm
+++ b/code/modules/projectiles/broken.dm
@@ -28,7 +28,7 @@
if(get_dist(get_turf(user),get_turf(src)) <= 1)
to_chat(user, span_notice("You begin inspecting \the [src]."))
- if(do_after(user, 5 SECONDS))
+ if(do_after(user, 5 SECONDS, target = src))
to_chat(user, span_notice("\The [src] can possibly be restored with:"))
for(var/obj/item/res as anything in material_needs)
if(material_needs[res] > 0)
@@ -89,7 +89,7 @@
/obj/item/broken_gun/attackby(obj/item/W as obj, mob/user as mob)
if(can_repair_with(W, user))
- if(do_after(user, (rand() * 10 SECONDS) + 5 SECONDS))
+ if(do_after(user, (rand() * 10 SECONDS + 5 SECONDS), target = src))
repair_with(W, user)
return
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index 5963915f77..8d8f9b8a9e 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -305,7 +305,7 @@
if(dna_lock && attached_lock && !attached_lock.controller_lock)
to_chat(user, span_notice("You begin removing \the [attached_lock] from \the [src]."))
playsound(src, A.usesound, 50, 1)
- if(do_after(user, 25 * A.toolspeed))
+ if(do_after(user, 25 * A.toolspeed, target = src))
to_chat(user, span_notice("You remove \the [attached_lock] from \the [src]."))
user.put_in_hands(attached_lock)
dna_lock = 0
@@ -731,7 +731,7 @@
mouthshoot = 1
M.visible_message(span_red("[user] sticks their gun in their mouth, ready to pull the trigger..."))
- if(!do_after(user, 40))
+ if(!do_after(user, 4 SECONDS, target = src))
M.visible_message(span_blue("[user] decided life was worth living"))
mouthshoot = 0
return
diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm
index d5002977f8..249ebc2f07 100644
--- a/code/modules/projectiles/guns/energy.dm
+++ b/code/modules/projectiles/guns/energy.dm
@@ -135,7 +135,7 @@
to_chat(user, span_notice("[src] already has a power cell."))
else
user.visible_message("[user] is reloading [src].", span_notice("You start to insert [P] into [src]."))
- if(do_after(user, reload_time * P.w_class))
+ if(do_after(user, reload_time * P.w_class, target = src))
user.remove_from_mob(P)
power_supply = P
P.loc = src
diff --git a/code/modules/projectiles/guns/energy/particle.dm b/code/modules/projectiles/guns/energy/particle.dm
index 8c75273d6e..19cffd45ea 100644
--- a/code/modules/projectiles/guns/energy/particle.dm
+++ b/code/modules/projectiles/guns/energy/particle.dm
@@ -145,7 +145,7 @@
if(istype(A, /obj/item/tool/screwdriver))
if(safetycatch && attached_safety)
to_chat(user, span_notice("You begin removing \the [attached_safety] from \the [src]."))
- if(do_after(user, 25))
+ if(do_after(user, 25, target = src))
to_chat(user, span_notice("You remove \the [attached_safety] from \the [src]."))
user.put_in_hands(attached_safety)
safetycatch = 0
diff --git a/code/modules/projectiles/guns/energy/pump.dm b/code/modules/projectiles/guns/energy/pump.dm
index 4616133803..4788b8e94c 100644
--- a/code/modules/projectiles/guns/energy/pump.dm
+++ b/code/modules/projectiles/guns/energy/pump.dm
@@ -88,7 +88,7 @@
user.visible_message(span_notice("[user] opens \the [src] and starts pumping the handle."), \
span_notice("You open \the [src] and start pumping the handle."))
while(recharging)
- if(!do_after(user, 10, src))
+ if(!do_after(user, 1 SECOND, target = src))
break
playsound(src,'sound/items/change_drill.ogg',25,1)
user.hud_used.update_ammo_hud(user, src)
diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm
index 1d110df8ea..5a5bba14f7 100644
--- a/code/modules/projectiles/guns/energy/special.dm
+++ b/code/modules/projectiles/guns/energy/special.dm
@@ -299,7 +299,7 @@
user.visible_message(span_cult("[user] aims \the [src] at \the [A]."))
if(power_supply && power_supply.charge >= charge_cost) //Do a delay for pointblanking too.
power_cycle = TRUE
- if(do_after(user, 30))
+ if(do_after(user, 3 SECONDS, target = src))
if(A.loc == target_turf)
..(A, user, def_zone)
else
@@ -329,7 +329,7 @@
if(!power_cycle)
power_cycle = TRUE
- if(do_after(user, 30))
+ if(do_after(user, 3 SECONDS, target = src))
if(A.loc == target_turf)
..(A, user, adjacent, params)
else
diff --git a/code/modules/projectiles/guns/energy/special_vr.dm b/code/modules/projectiles/guns/energy/special_vr.dm
index 58f7e0843b..9713403c65 100644
--- a/code/modules/projectiles/guns/energy/special_vr.dm
+++ b/code/modules/projectiles/guns/energy/special_vr.dm
@@ -57,7 +57,7 @@
update_icon()
user.visible_message(span_notice("[user] starts charging the [src]!"), \
span_notice("You start charging the [src]!"))
- if(do_after(user, 8, src))
+ if(do_after(user, 8, target = src))
spinning_up = FALSE
..()
else
diff --git a/code/modules/projectiles/guns/launcher/bows.dm b/code/modules/projectiles/guns/launcher/bows.dm
index 648214c2c6..4450354796 100644
--- a/code/modules/projectiles/guns/launcher/bows.dm
+++ b/code/modules/projectiles/guns/launcher/bows.dm
@@ -95,7 +95,7 @@
current_user = user
user.visible_message(span_infoplain(span_bold("[user]") + " begins to draw back the string of [src]."),span_notice("You begin to draw back the string of [src]."))
- if(do_after(user, 25, src))
+ if(do_after(user, 25, target = src))
drawn = TRUE
user.visible_message(span_infoplain(span_bold("[user]") + "draws the string on [src] back fully!"), span_infoplain("You draw the string on [src] back fully!"))
update_icon()
diff --git a/code/modules/projectiles/guns/launcher/crossbow.dm b/code/modules/projectiles/guns/launcher/crossbow.dm
index ae7566a81e..5e44be2c2c 100644
--- a/code/modules/projectiles/guns/launcher/crossbow.dm
+++ b/code/modules/projectiles/guns/launcher/crossbow.dm
@@ -112,7 +112,7 @@
tension = 1
while(bolt && tension && loc == current_user)
- if(!do_after(user, 25)) //crossbow strings don't just magically pull back on their own.
+ if(!do_after(user, 25, target = src)) //crossbow strings don't just magically pull back on their own.
user.visible_message("[user] stops drawing and relaxes the string of [src].",span_warning("You stop drawing back and relax the string of [src]."))
tension = 0
update_icon()
diff --git a/code/modules/projectiles/guns/magnetic/bore.dm b/code/modules/projectiles/guns/magnetic/bore.dm
index 54b8f9aaa0..073a224b7d 100644
--- a/code/modules/projectiles/guns/magnetic/bore.dm
+++ b/code/modules/projectiles/guns/magnetic/bore.dm
@@ -125,7 +125,7 @@
to_chat(user, span_warning("\The [src] cannot hold more [ammo_material]."))
return
loading = TRUE
- while(mat_storage + SHEET_MATERIAL_AMOUNT <= max_mat_storage && do_after(user,1.5 SECONDS))
+ while(mat_storage + SHEET_MATERIAL_AMOUNT <= max_mat_storage && do_after(user,1.5 SECONDS, target = src))
mat_storage += SHEET_MATERIAL_AMOUNT
playsound(src, 'sound/effects/phasein.ogg', 15, 1)
M.use(1)
diff --git a/code/modules/projectiles/guns/modular_guns.dm b/code/modules/projectiles/guns/modular_guns.dm
index 0e91415c19..d3c6508e67 100644
--- a/code/modules/projectiles/guns/modular_guns.dm
+++ b/code/modules/projectiles/guns/modular_guns.dm
@@ -138,7 +138,7 @@
to_chat(user, span_notice("[src] already has a power cell."))
else
user.visible_message("[user] is reloading [src].", span_notice("You start to insert [P] into [src]."))
- if(do_after(user, 10))
+ if(do_after(user, 1 SECOND, target = src))
user.remove_from_mob(P)
power_supply = P
P.loc = src
diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm
index a2b6fabf14..fbed5c0315 100644
--- a/code/modules/projectiles/guns/projectile.dm
+++ b/code/modules/projectiles/guns/projectile.dm
@@ -127,7 +127,7 @@
if(ammo_magazine)
to_chat(user, span_warning("[src] already has a magazine loaded.")) //already a magazine here
return
- if(do_after(user, reload_time * AM.w_class))
+ if(do_after(user, reload_time * AM.w_class, target = src))
user.remove_from_mob(AM)
AM.loc = src
ammo_magazine = AM
@@ -148,7 +148,7 @@
AM.stored_ammo -= C //should probably go inside an ammo_magazine proc, but I guess less proc calls this way...
count++
user.hud_used.update_ammo_hud(user, src)
- if(do_after(user, reload_time * AM.w_class))
+ if(do_after(user, reload_time * AM.w_class, target = src))
if(count)
user.visible_message("[user] reloads [src].", span_notice("You load [count] round\s into [src]."))
user.hud_used.update_ammo_hud(user, src)
@@ -162,7 +162,7 @@
to_chat(user, span_warning("[src] is full."))
return
- if(do_after(user, reload_time * C.w_class))
+ if(do_after(user, reload_time * C.w_class, target = src))
user.remove_from_mob(C)
C.loc = src
loaded.Insert(1, C) //add to the head of the list
diff --git a/code/modules/projectiles/guns/projectile/boltaction.dm b/code/modules/projectiles/guns/projectile/boltaction.dm
index 0974e92e1d..846eda525f 100644
--- a/code/modules/projectiles/guns/projectile/boltaction.dm
+++ b/code/modules/projectiles/guns/projectile/boltaction.dm
@@ -78,7 +78,7 @@
playsound(src, fire_sound, 50, 1)
user.visible_message(span_danger("[src] goes off!"), span_danger("The rifle goes off in your face!"))
return
- if(do_after(user, 30))
+ if(do_after(user, 3 SECONDS, target = src))
if(sawn_off)
return
icon_state = "sawn_rifle"
diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm
index 08b9f724a1..fdea2ae864 100644
--- a/code/modules/projectiles/guns/projectile/shotgun.dm
+++ b/code/modules/projectiles/guns/projectile/shotgun.dm
@@ -194,7 +194,7 @@
user.hud_used.update_ammo_hud(user, src) // TGMC Ammo HUD Port
burst = burstsetting
return
- if(do_after(user, 30)) // SHIT IS STEALTHY EYYYYY
+ if(do_after(user, 3 SECONDS, target = src)) // SHIT IS STEALTHY EYYYYY
if(sawn_off)
return
// if(unique_reskin) //CHOMP Remove
diff --git a/code/modules/projectiles/guns/projectile/sniper/collapsible_sniper.dm b/code/modules/projectiles/guns/projectile/sniper/collapsible_sniper.dm
index d99f7d5601..698fb1e1b0 100644
--- a/code/modules/projectiles/guns/projectile/sniper/collapsible_sniper.dm
+++ b/code/modules/projectiles/guns/projectile/sniper/collapsible_sniper.dm
@@ -17,7 +17,7 @@
/obj/item/gun/projectile/heavysniper/proc/collapse_rifle(mob/user)
to_chat(user, span_warning("You begin removing \the [src]'s barrel."))
- if(do_after(user, 40))
+ if(do_after(user, 4 SECONDS, target = src))
if(user.unEquip(src, force=1))
to_chat(user, span_warning("You remove \the [src]'s barrel."))
qdel(src)
@@ -75,7 +75,7 @@
return
to_chat(user, span_notice("You start disassembling \the [src]."))
- if(!do_after(user, 40))
+ if(!do_after(user, 4 SECONDS, target = src))
return
to_chat(user, span_notice("You disassemble \the [src]."))
@@ -95,7 +95,7 @@
/obj/item/sniper_rifle_part/attackby(var/obj/item/sniper_rifle_part/A as obj, mob/user as mob)
to_chat(user, span_notice("You begin adding \the [A] to \the [src]."))
- if(!do_after(user, 30))
+ if(!do_after(user, 3 SECONDS, target = src))
return
diff --git a/code/modules/reagents/machinery/dispenser/dispenser2.dm b/code/modules/reagents/machinery/dispenser/dispenser2.dm
index accf20bad4..de992b6a09 100644
--- a/code/modules/reagents/machinery/dispenser/dispenser2.dm
+++ b/code/modules/reagents/machinery/dispenser/dispenser2.dm
@@ -99,7 +99,7 @@
if(W.has_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin to [anchored ? "un" : ""]fasten \the [src]."))
- if (do_after(user, 20 * W.toolspeed))
+ if (do_after(user, 2 SECONDS * W.toolspeed, target = src))
user.visible_message(
span_notice("\The [user] [anchored ? "un" : ""]fastens \the [src]."),
span_notice("You have [anchored ? "un" : ""]fastened \the [src]."),
diff --git a/code/modules/reagents/machinery/dispenser/reagent_tank.dm b/code/modules/reagents/machinery/dispenser/reagent_tank.dm
index 48b7dcd3ab..8dac03a337 100644
--- a/code/modules/reagents/machinery/dispenser/reagent_tank.dm
+++ b/code/modules/reagents/machinery/dispenser/reagent_tank.dm
@@ -202,7 +202,7 @@
/obj/structure/reagent_dispensers/fueltank/attack_hand(mob/user)
if (rig)
user.visible_message("[user] begins to detach [rig] from \the [src].", "You begin to detach [rig] from \the [src]")
- if(do_after(user, 20))
+ if(do_after(user, 2 SECONDS, target = src))
user.visible_message(span_notice("[user] detaches [rig] from \the [src]."), span_notice("You detach [rig] from \the [src]"))
rig.loc = get_turf(user)
rig = null
@@ -224,7 +224,7 @@
to_chat(user, span_warning("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, 2 SECONDS, target = src))
user.visible_message(span_notice("[user] rigs [W] to \the [src]."), span_notice("You rig [W] to \the [src]"))
var/obj/item/assembly_holder/H = W
@@ -384,7 +384,7 @@
src.add_fingerprint(user)
if(bottle)
playsound(src, I.usesound, 50, 1)
- if(do_after(user, 20) && bottle)
+ if(do_after(user, 2 SECONDS, target = src) && bottle)
to_chat(user, span_notice("You unfasten the jug."))
var/obj/item/reagent_containers/glass/cooler_bottle/G = new /obj/item/reagent_containers/glass/cooler_bottle( src.loc )
for(var/datum/reagent/R in reagents.reagent_list)
@@ -398,7 +398,7 @@
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
else
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
- if(do_after(user, 20 * I.toolspeed, src))
+ if(do_after(user, 2 SECONDS * I.toolspeed, target = src))
if(!src) return
to_chat(user, span_notice("You [anchored? "un" : ""]secured \the [src]!"))
anchored = !anchored
@@ -420,7 +420,7 @@
if(!bottle && !cupholder)
playsound(src, I.usesound, 50, 1)
to_chat(user, span_notice("You start taking the water-cooler apart."))
- if(do_after(user, 20 * I.toolspeed) && !bottle && !cupholder)
+ if(do_after(user, 2 SECONDS * I.toolspeed, target = src) && !bottle && !cupholder)
to_chat(user, span_notice("You take the water-cooler apart."))
new /obj/item/stack/material/plastic( src.loc, 4 )
qdel(src)
@@ -432,7 +432,7 @@
if(anchored)
var/obj/item/reagent_containers/glass/cooler_bottle/G = I
to_chat(user, span_notice("You start to screw the bottle onto the water-cooler."))
- if(do_after(user, 20) && !bottle && anchored)
+ if(do_after(user, 2 SECONDS, target = src) && !bottle && anchored)
bottle = 1
update_icon()
to_chat(user, span_notice("You screw the bottle onto the water-cooler!"))
@@ -453,7 +453,7 @@
src.add_fingerprint(user)
to_chat(user, span_notice("You start to attach a cup dispenser onto the water-cooler."))
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
- if(do_after(user, 20) && !cupholder && anchored)
+ if(do_after(user, 2 SECONDS, target = src) && !cupholder && anchored)
if (P.use(1))
to_chat(user, span_notice("You attach a cup dispenser onto the water-cooler."))
cupholder = 1
diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm
index 18c9e0c2dd..52cfde8cdd 100644
--- a/code/modules/reagents/reagent_containers/hypospray.dm
+++ b/code/modules/reagents/reagent_containers/hypospray.dm
@@ -56,7 +56,7 @@
if(H != user && prototype)
balloon_alert(user, "injecting [H] with \the [src]")
balloon_alert(H, "[user] is trying to inject you with \the [src]")
- if(!do_after(user, 30, H))
+ if(!do_after(user, 3 SECONDS, target = H))
return
//VOREstation Add End
else if(!H.stat && !prototype)
@@ -64,7 +64,7 @@
if(H.a_intent != I_HELP)
balloon_alert(user, "[H] resists your attempt to inject them with \the [src].")
balloon_alert(H, "[user] is trying to inject you with \the [src]")
- if(!do_after(user, 30, H))
+ if(!do_after(user, 3 SECONDS, target = H))
return
do_injection(H, user)
@@ -132,7 +132,7 @@
if(istype(W, /obj/item/reagent_containers/glass/beaker/vial))
if(!loaded_vial)
balloon_alert_visible("[user] begins loading [W] into \the [src].", "loading [W] into \the [src].")
- if(!do_after(user,30) || loaded_vial || !(W in user))
+ if(!do_after(user, 3 SECONDS, target = src) || loaded_vial || !(W in user))
return 0
if(W.is_open_container())
W.flags ^= OPENCONTAINER
diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm
index e9466749b1..e1de9e4fdf 100644
--- a/code/modules/reagents/reagent_containers/syringes.dm
+++ b/code/modules/reagents/reagent_containers/syringes.dm
@@ -251,7 +251,7 @@
//The warmup
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
- if(!do_after(user,warmup_time,target))
+ if(!do_after(user, warmup_time, target))
return
var/trans = 0
@@ -260,7 +260,7 @@
while(reagents.total_volume)
trans += reagents.trans_to_mob(target, amount_per_transfer_from_this, CHEM_BLOOD)
update_icon()
- if(!reagents.total_volume || !do_after(user,cycle_time,target))
+ if(!reagents.total_volume || !do_after(user, cycle_time, target))
break
else
trans += reagents.trans_to_obj(target, amount_per_transfer_from_this)
diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm
index b96b2c10db..3bff936cfa 100644
--- a/code/modules/recycling/conveyor2.dm
+++ b/code/modules/recycling/conveyor2.dm
@@ -306,7 +306,7 @@
to_chat(user, "The welding tool must be on to complete this task.")
return
playsound(src, WT.usesound, 50, 1)
- if(do_after(user, 20 * WT.toolspeed))
+ if(do_after(user, 2 SECONDS * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, span_notice("You deconstruct the frame."))
new /obj/item/stack/material/steel( src.loc, 2 )
diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm
index a0a00181e4..788d7d229d 100644
--- a/code/modules/recycling/disposal-construction.dm
+++ b/code/modules/recycling/disposal-construction.dm
@@ -307,7 +307,7 @@
if(W.remove_fuel(0,user))
playsound(src, W.usesound, 100, 1)
to_chat(user, "Welding the [nicetype] in place.")
- if(do_after(user, 20 * W.toolspeed))
+ if(do_after(user, 2 SECONDS * W.toolspeed, target = src))
if(!src || !W.isOn()) return
to_chat(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 f58183a1fa..1e7d13dd37 100644
--- a/code/modules/recycling/disposal.dm
+++ b/code/modules/recycling/disposal.dm
@@ -79,7 +79,7 @@
playsound(src, W.usesound, 100, 1)
to_chat(user, "You start slicing the floorweld off the disposal unit.")
- if(do_after(user,20 * W.toolspeed))
+ if(do_after(user, 2 SECONDS * W.toolspeed, target = src))
if(!src || !W.isOn()) return
to_chat(user, "You sliced the floorweld off the disposal unit.")
var/obj/structure/disposalconstruct/C = new (src.loc)
@@ -123,7 +123,7 @@
var/mob/GM = G.affecting
for (var/mob/V in viewers(user))
V.show_message("[user] starts putting [GM.name] into the disposal.", 3)
- if(do_after(user, 20))
+ if(do_after(user, 2 SECONDS, target = src))
if (GM.client)
GM.client.perspective = EYE_PERSPECTIVE
GM.client.eye = src
@@ -175,7 +175,7 @@
if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis)
if(target.anchored) return
V.show_message("[user] starts stuffing [target.name] into the disposal.", 3)
- if(!do_after(user, 20))
+ if(!do_after(user, 2 SECONDS, target))
return
if(target_loc != target.loc)
return
@@ -920,7 +920,7 @@
if(W.remove_fuel(0,user))
playsound(src, W.usesound, 100, 1)
to_chat(user, "You start slicing [src]....")
- if(do_after(user, 20 * W.toolspeed))
+ if(do_after(user, 2 SECONDS * W.toolspeed, target = src))
if(!src || !W.isOn()) return
to_chat(user, "You slice [src]")
welded()
@@ -1552,7 +1552,7 @@
if(W.remove_fuel(0,user))
playsound(src, W.usesound, 100, 1)
to_chat(user, "You start slicing the floorweld off the disposal outlet.")
- if(do_after(user,20 * W.toolspeed))
+ if(do_after(user, 2 SECONDS * W.toolspeed, target = src))
if(!src || !W.isOn()) return
to_chat(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 53e640a2ba..1258a73f37 100755
--- a/code/modules/recycling/sortingmachinery.dm
+++ b/code/modules/recycling/sortingmachinery.dm
@@ -478,7 +478,7 @@
return
playsound(src, W.usesound, 50, 1)
to_chat(user, "You start slicing the floorweld off the delivery chute.")
- if(do_after(user,20 * W.toolspeed))
+ if(do_after(user, 2 SECONDS * W.toolspeed, target = src))
if(!src || !W.isOn()) return
to_chat(user, "You sliced the floorweld off the delivery chute.")
var/obj/structure/disposalconstruct/C = new (src.loc)
diff --git a/code/modules/research/tg/experisci/experiment/handlers/experiment_handler.dm b/code/modules/research/tg/experisci/experiment/handlers/experiment_handler.dm
index 3a827e5b19..ddf2d3c192 100644
--- a/code/modules/research/tg/experisci/experiment/handlers/experiment_handler.dm
+++ b/code/modules/research/tg/experisci/experiment/handlers/experiment_handler.dm
@@ -124,7 +124,7 @@
if(!(config_flags & EXPERIMENT_CONFIG_SILENT_FAIL))
to_chat(user, span_notice("You do not have an experiment selected!"))
return
- if(!(config_flags & EXPERIMENT_CONFIG_IMMEDIATE_ACTION) && !do_after(user, 1 SECONDS, target = target))
+ if(!(config_flags & EXPERIMENT_CONFIG_IMMEDIATE_ACTION) && !do_after(user, 1 SECOND, target = target))
return
if(action_experiment(source, target))
playsound(user, 'sound/machines/ping.ogg', 25)
diff --git a/code/modules/research/tg/machinery/mech_prosfab.dm b/code/modules/research/tg/machinery/mech_prosfab.dm
index edbecec5e5..9594d4baa5 100644
--- a/code/modules/research/tg/machinery/mech_prosfab.dm
+++ b/code/modules/research/tg/machinery/mech_prosfab.dm
@@ -90,7 +90,7 @@
to_chat(user, span_warning("This disk seems to be corrupted!"))
else
to_chat(user, span_notice("Installing blueprint files for [D.company]..."))
- if(do_after(user,50,src))
+ if(do_after(user, 5 SECONDS, target = src))
var/datum/robolimb/R = GLOB.all_robolimbs[D.company]
R.unavailable_to_build = 0
to_chat(user, span_notice("Installed [D.company] blueprints!"))
@@ -103,7 +103,7 @@
to_chat(user, span_warning("This disk seems to be corrupted!"))
else
to_chat(user, span_notice("Uploading modification files for [D.species]..."))
- if(do_after(user,50,src))
+ if(do_after(user, 5 SECONDS, target = src))
species_types |= D.species
to_chat(user, span_notice("Uploaded [D.species] files!"))
qdel(I)
diff --git a/code/modules/resleeving/implant.dm b/code/modules/resleeving/implant.dm
index bb5ed40cab..39d9e75282 100644
--- a/code/modules/resleeving/implant.dm
+++ b/code/modules/resleeving/implant.dm
@@ -116,7 +116,7 @@
user.do_attack_animation(M)
var/turf/T1 = get_turf(M)
- if (T1 && ((M == user) || do_after(user, 5 SECONDS, M)))
+ if (T1 && ((M == user) || do_after(user, 5 SECONDS, target = M)))
if(user && M && (get_turf(M) == T1) && src && src.imps.len)
M.visible_message(span_notice("[M] has been backup implanted by [user]."))
diff --git a/code/modules/resleeving/sleevecard.dm b/code/modules/resleeving/sleevecard.dm
index 93d97051dd..32ee751c93 100644
--- a/code/modules/resleeving/sleevecard.dm
+++ b/code/modules/resleeving/sleevecard.dm
@@ -18,7 +18,7 @@
var/datum/transcore_db/db = SStranscore.db_by_mind_name(M.name)
if(db)
to_chat(user, span_notice("You begin uploading [M.name] into \the [src]."))
- if(do_after(user,8 SECONDS,src))
+ if(do_after(user, 8 SECONDS, target = src))
var/datum/transhuman/mind_record/record = db.backed_up[M.name]
to_chat(user, span_notice("You have successfully uploaded [M.name] into \the [src]"))
sleeveInto(record)
diff --git a/code/modules/samples/samples.dm b/code/modules/samples/samples.dm
index bcd577871e..7ceba17f5e 100644
--- a/code/modules/samples/samples.dm
+++ b/code/modules/samples/samples.dm
@@ -180,7 +180,7 @@
H.drop_from_inventory(src, get_turf(H))
return
- else if(do_after(user,3 SECONDS)) //short delay, so you can abort/cancel if you misclick
+ else if(do_after(user, 3 SECONDS, target = src)) //short delay, so you can abort/cancel if you misclick
H.visible_message(span_notice("[H] crushes \the [src], stabilizing its anomalous properties and rendering it into a pile of assorted minerals."))
var/i = rand(min_ore,max_ore)
while(i>1)
@@ -211,7 +211,7 @@
if(istype(P, /obj/item/cataloguer))
to_chat(user, span_notice("You start to scan \the [src] with \the [P]..."))
- if(do_after(user, 2 SECONDS))
+ if(do_after(user, 2 SECONDS, target = src))
to_chat(user, span_notice("\The [src] seems to have [origin_tech[1]] properties?"))
/obj/item/research_sample/common
diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm
index 19150ba2de..5eb9177515 100644
--- a/code/modules/security levels/keycard authentication.dm
+++ b/code/modules/security levels/keycard authentication.dm
@@ -45,7 +45,7 @@
if(W.has_tool_quality(TOOL_SCREWDRIVER))
to_chat(user, "You begin removing the faceplate from the [src]")
playsound(src, W.usesound, 50, 1)
- if(do_after(user, 10 * W.toolspeed))
+ if(do_after(user, 1 SECOND * W.toolspeed, target = src))
to_chat(user, "You remove the faceplate from the [src]")
var/obj/structure/frame/A = new /obj/structure/frame(loc)
var/obj/item/circuitboard/M = new circuit(A)
diff --git a/code/modules/shieldgen/emergency_shield.dm b/code/modules/shieldgen/emergency_shield.dm
index e278475b0e..bd6d01ba7f 100644
--- a/code/modules/shieldgen/emergency_shield.dm
+++ b/code/modules/shieldgen/emergency_shield.dm
@@ -293,7 +293,7 @@
var/obj/item/stack/cable_coil/coil = W
to_chat(user, span_notice("You begin to replace the wires."))
//if(do_after(user, min(60, round( ((getMaxHealth()/health)*10)+(malfunction*10) ))) //Take longer to repair heavier damage
- if(do_after(user, 30))
+ if(do_after(user, 3 SECONDS, target = src))
if (coil.use(1))
health = max_health
malfunction = 0
diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm
index 40160b3002..fe8a4d4adb 100644
--- a/code/modules/surgery/surgery.dm
+++ b/code/modules/surgery/surgery.dm
@@ -180,7 +180,7 @@
if(M == user) // Once we determine if we can actually do a step at all, give a slight delay to self-surgery to confirm attempts.
to_chat(user, span_critical("You focus on attempting to perform surgery upon yourself."))
- if(!do_after(user, 3 SECONDS, M))
+ if(!do_after(user, 3 SECONDS, target = M))
return 0
var/datum/surgery_step/selected_surgery
@@ -196,7 +196,7 @@
if(istype(selected_surgery,/datum/surgery_step/generic/amputate))
var/obj/item/organ/external/affected = M.get_organ(zone)
to_chat(user, span_danger("You are preparing to amputate \the [M]'s [affected.name]!"))
- if(!do_after(user, 3 SECONDS, M))
+ if(!do_after(user, 3 SECONDS, target = M))
to_chat(user, span_warning("You reconsider performing an amputation..."))
return 0
// VOREstation edit end
diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm
index e53a435543..787563fb86 100644
--- a/code/modules/tables/tables.dm
+++ b/code/modules/tables/tables.dm
@@ -148,7 +148,7 @@ var/list/table_icon_cache = list()
if(F.welding)
to_chat(user, span_notice("You begin reparing damage to \the [src]."))
playsound(src, F.usesound, 50, 1)
- if(!do_after(user, 20 * F.toolspeed) || !F.remove_fuel(1, user))
+ if(!do_after(user, 2 SECONDS * F.toolspeed, target = src) || !F.remove_fuel(1, user))
return
user.visible_message(span_infoplain(span_bold("\The [user]") + " repairs some damage to \the [src]."),
span_notice("You repair some damage to \the [src]."))
@@ -238,7 +238,7 @@ var/list/table_icon_cache = list()
if(manipulating) return M
manipulating = 1
to_chat(user, span_notice("You begin [verb]ing \the [src] with [M.display_name]."))
- if(!do_after(user, 20) || !S.use(1))
+ if(!do_after(user, 2 SECONDS, target = src) || !S.use(1))
manipulating = 0
return null
user.visible_message(span_notice("\The [user] [verb]es \the [src] with [M.display_name]."), span_notice("You finish [verb]ing \the [src]."))
@@ -257,7 +257,7 @@ var/list/table_icon_cache = list()
span_notice("You begin removing the [type_holding] holding \the [src]'s [M.display_name] [what] in place."))
if(sound)
playsound(src, sound, 50, 1)
- if(!do_after(user, delay))
+ if(!do_after(user, delay, target = src))
manipulating = 0
return M
user.visible_message(span_infoplain(span_bold("\The [user]") + " removes the [M.display_name] [what] from \the [src]."),
@@ -278,7 +278,7 @@ var/list/table_icon_cache = list()
user.visible_message(span_infoplain(span_bold("\The [user]") + " begins dismantling \the [src]."),
span_notice("You begin dismantling \the [src]."))
playsound(src, W.usesound, 50, 1)
- if(!do_after(user, 20 * W.toolspeed))
+ if(!do_after(user, 2 SECONDS * W.toolspeed, target = src))
manipulating = 0
return
user.visible_message(span_infoplain(span_bold("\The [user]") + " dismantles \the [src]."),
diff --git a/code/modules/vehicles/construction.dm b/code/modules/vehicles/construction.dm
index a7a201a783..b2b9b333c0 100644
--- a/code/modules/vehicles/construction.dm
+++ b/code/modules/vehicles/construction.dm
@@ -50,7 +50,7 @@
to_chat(user, span_warning("You need eight sheets of plastic to add tires to \the [src]."))
return
to_chat(user, span_notice("You start to add tires to [src]."))
- if(do_after(user, 40) && build_stage == 0)
+ if(do_after(user, 4 SECONDS, target = src) && build_stage == 0)
if(P.use(8))
to_chat(user, span_notice("You add tires to \the [src]."))
increase_step("wheeled [initial(name)]")
@@ -75,7 +75,7 @@
var/obj/item/stack/material/steel/S = W
if(S.get_amount() < 5)
to_chat(user, span_warning("You need five sheets of steel to convert \the [src] into a trailer."))
- if(do_after(user, 80) && build_stage == 2)
+ if(do_after(user, 8 SECONDS, target = src) && build_stage == 2)
if(S.use(5))
var/obj/item/vehicle_assembly/quadtrailer/Trailer = new(src)
Trailer.forceMove(get_turf(src))
@@ -92,7 +92,7 @@
to_chat(user, span_warning("You need two coils of wire to wire [src]."))
return
to_chat(user, span_notice("You start to wire [src]."))
- if(do_after(user, 40) && build_stage == 3)
+ if(do_after(user, 4 SECONDS, target = src) && build_stage == 3)
if(C.use(2))
to_chat(user, span_notice("You wire \the [src]."))
increase_step("wired [initial(name)]")
@@ -122,7 +122,7 @@
to_chat(user, span_warning("You need two sheets of plasteel to add reinforcement to \the [src]."))
return
to_chat(user, span_notice("You start to add reinforcement to [src]."))
- if(do_after(user, 40) && build_stage == 6)
+ if(do_after(user, 4 SECONDS, target = src) && build_stage == 6)
if(PL.use(2))
to_chat(user, span_notice("You add reinforcement to \the [src]."))
increase_step("reinforced [initial(name)]")
@@ -132,7 +132,7 @@
if(W.has_tool_quality(TOOL_WRENCH) || W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin your finishing touches on \the [src]."))
- if(do_after(user, 20) && build_stage == 7)
+ if(do_after(user, 2 SECONDS, target = src) && build_stage == 7)
playsound(src, W.usesound, 30, 1)
var/obj/vehicle/train/engine/quadbike/built/product = new(src)
to_chat(user, span_notice("You finish \the [product]"))
@@ -172,7 +172,7 @@
to_chat(user, span_warning("You need two coils of wire to wire [src]."))
return
to_chat(user, span_notice("You start to wire [src]."))
- if(do_after(user, 40) && build_stage == 1)
+ if(do_after(user, 4 SECONDS, target = src) && build_stage == 1)
if(C.use(2))
to_chat(user, span_notice("You wire \the [src]."))
increase_step("wired [initial(name)]")
@@ -215,7 +215,7 @@
to_chat(user, span_warning("You need two coils of wire to wire [src]."))
return
to_chat(user, span_notice("You start to wire [src]."))
- if(do_after(user, 40) && build_stage == 1)
+ if(do_after(user, 4 SECONDS, target = src) && build_stage == 1)
if(C.use(2))
to_chat(user, span_notice("You wire \the [src]."))
increase_step("wired [initial(name)]")
@@ -228,7 +228,7 @@
to_chat(user, span_warning("You need three sheets of plastic to add a seat to \the [src]."))
return
to_chat(user, span_notice("You start to add a seat to [src]."))
- if(do_after(user, 40) && build_stage == 2)
+ if(do_after(user, 4 SECONDS, target = src) && build_stage == 2)
if(P.use(3))
to_chat(user, span_notice("You add a seat to \the [src]."))
increase_step("seated [initial(name)]")
@@ -263,7 +263,7 @@
if(W.has_tool_quality(TOOL_WRENCH) || W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin your finishing touches on \the [src]."))
- if(do_after(user, 20) && build_stage == 6)
+ if(do_after(user, 2 SECONDS, target = src) && build_stage == 6)
playsound(src, W.usesound, 30, 1)
var/obj/vehicle/bike/built/product = new(src)
to_chat(user, span_notice("You finish \the [product]"))
@@ -294,7 +294,7 @@
to_chat(user, span_warning("You need six sheets of steel to add treads to \the [src]."))
return
to_chat(user, span_notice("You start to add treads to [src]."))
- if(do_after(user, 40) && build_stage == 0)
+ if(do_after(user, 4 SECONDS, target = src) && build_stage == 0)
if(S.use(6))
to_chat(user, span_notice("You add treads to \the [src]."))
increase_step("tracked [initial(name)]")
@@ -323,7 +323,7 @@
to_chat(user, span_warning("You need two coils of wire to wire [src]."))
return
to_chat(user, span_notice("You start to wire [src]."))
- if(do_after(user, 40) && build_stage == 3)
+ if(do_after(user, 4 SECONDS, target = src) && build_stage == 3)
if(C.use(2))
to_chat(user, span_notice("You wire \the [src]."))
increase_step("wired [initial(name)]")
@@ -353,7 +353,7 @@
to_chat(user, span_warning("You need two sheets of plasteel to add reinforcement to \the [src]."))
return
to_chat(user, span_notice("You start to add reinforcement to [src]."))
- if(do_after(user, 40) && build_stage == 6)
+ if(do_after(user, 4 SECONDS, target = src) && build_stage == 6)
if(PL.use(2))
to_chat(user, span_notice("You add reinforcement to \the [src]."))
increase_step("reinforced [initial(name)]")
@@ -363,7 +363,7 @@
if(W.has_tool_quality(TOOL_WRENCH) || W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
to_chat(user, span_notice("You begin your finishing touches on \the [src]."))
- if(do_after(user, 20) && build_stage == 7)
+ if(do_after(user, 2 SECONDS, target = src) && build_stage == 7)
playsound(src, W.usesound, 30, 1)
var/obj/vehicle/train/engine/quadbike/snowmobile/built/product = new(src)
to_chat(user, span_notice("You finish \the [product]"))
diff --git a/code/modules/ventcrawl/ventcrawl.dm b/code/modules/ventcrawl/ventcrawl.dm
index ea7e05d971..4fc368b4e0 100644
--- a/code/modules/ventcrawl/ventcrawl.dm
+++ b/code/modules/ventcrawl/ventcrawl.dm
@@ -209,7 +209,7 @@ var/list/ventcrawl_machinery = list(
prepping_to_ventcrawl = 1
spawn(50)
prepping_to_ventcrawl = 0
- if(!do_after(src, 45, vent_found, 1, 1))
+ if(!do_after(src, 45, target = src))
return
if(!can_ventcrawl())
return
diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm
index 95d84ba1f9..ab932178cd 100644
--- a/code/modules/vore/eating/belly_obj_vr.dm
+++ b/code/modules/vore/eating/belly_obj_vr.dm
@@ -1285,7 +1285,7 @@
to_chat(R, escape_attempt_prey_message)
to_chat(owner, escape_attempt_owner_message)
- if(do_after(R, escapetime, owner, timed_action_flags = IGNORE_INCAPACITATED))
+ if(do_after(R, escapetime, owner, target = src, timed_action_flags = IGNORE_INCAPACITATED))
if((owner.stat || escapable)) //Can still escape?
if(C)
release_specific_contents(C)
@@ -1332,7 +1332,7 @@
if(prob(escapechance)) //Let's have it check to see if the prey escapes first.
to_chat(R, escape_attempt_prey_message)
to_chat(owner, escape_attempt_owner_message)
- if(do_after(R, escapetime))
+ if(do_after(R, escapetime, target = src))
if(escapable && C)
var/escape_item_owner_message = span_vwarning(belly_format_string(escape_item_messages_owner, R, item = C))
var/escape_item_prey_message = span_vwarning(belly_format_string(escape_item_messages_prey, R, item = C))
@@ -1479,7 +1479,7 @@
to_chat(R, escape_attempt_absorbed_prey_message)
to_chat(owner, escape_attempt_absorbed_owner_message)
- if(do_after(R, escapetime))
+ if(do_after(R, escapetime, target = src))
if((escapable || owner.stat) && (R.loc == src) && prob(escapechance_absorbed)) //Does the escape attempt succeed?
var/escape_absorbed_owner_message = span_vwarning(belly_format_string(escape_absorbed_messages_owner, R))
var/escape_absorbed_prey_message = span_vwarning(belly_format_string(escape_absorbed_messages_prey, R))
diff --git a/code/modules/vore/eating/contaminate_vr.dm b/code/modules/vore/eating/contaminate_vr.dm
index 5b85791ee1..71cbab975b 100644
--- a/code/modules/vore/eating/contaminate_vr.dm
+++ b/code/modules/vore/eating/contaminate_vr.dm
@@ -51,7 +51,7 @@ var/list/gurgled_overlays = list(
to_chat(user, span_notice("You start washing [I]."))
busy = TRUE
- if(do_after(user, 40, src))
+ if(do_after(user, 4 SECONDS, target = src))
I.wash(CLEAN_SCRUB)
user.visible_message(span_notice("[user] washes [I] using [src]."),
span_notice("You wash [I] using [src]."))
diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm
index c9cf374411..3acd91e67e 100644
--- a/code/modules/vore/eating/living_vr.dm
+++ b/code/modules/vore/eating/living_vr.dm
@@ -174,7 +174,7 @@
return TRUE
visible_message(span_warning("[user] is trying to stuff a beacon into [src]'s [B.get_belly_name()]!"),
span_warning("[user] is trying to stuff a beacon into you!"))
- if(do_after(user,30,src))
+ if(do_after(user, 3 SECONDS, target = src))
user.drop_item()
I.forceMove(B)
return TRUE
@@ -938,7 +938,7 @@
playsound(src, 'sound/items/eatfood.ogg', rand(10,50), 1)
var/T = (istype(M) ? M.hardness/40 : 1) SECONDS //1.5 seconds to eat a sheet of metal. 2.5 for durasteel and diamond & 1 by default (applies to some ores like raw carbon, slag, etc.
to_chat(src, span_notice("You start crunching on [I] with your powerful jaws, attempting to tear it apart..."))
- if(do_after(feeder, T, timed_action_flags = IGNORE_USER_LOC_CHANGE)) //Eat on the move, but not multiple things at once.
+ if(do_after(feeder, T, target = src, timed_action_flags = IGNORE_USER_LOC_CHANGE)) //Eat on the move, but not multiple things at once.
if(feeder != src)
to_chat(feeder, span_notice("You feed [I] to [src]."))
log_admin("VORE: [feeder] fed [src] [I].")
diff --git a/code/modules/vore/eating/silicon_vr.dm b/code/modules/vore/eating/silicon_vr.dm
index 5b3174ff44..c4decb6b41 100644
--- a/code/modules/vore/eating/silicon_vr.dm
+++ b/code/modules/vore/eating/silicon_vr.dm
@@ -56,7 +56,7 @@
hologram.visible_message("[hologram] starts engulfing [prey] in hardlight holograms!")
to_chat(src, span_vnotice("You begin engulfing [prey] in hardlight holograms.")) //Can't be part of the above, because the above is from the hologram.
- if(do_after(user = eyeobj,delay = 50,target = prey) && holo && hologram) //Didn't move and still projecting and effect exists and no other bellied people
+ if(do_after(user = eyeobj, delay = 5 SECONDS, target = prey) && holo && hologram) //Didn't move and still projecting and effect exists and no other bellied people
feed_grabbed_to_self(src, prey)
/mob/living/AIShiftClick(var/mob/user) //Shift-click as AI overridden on mobs to examine.
diff --git a/code/modules/vore/eating/vertical_nom_vr.dm b/code/modules/vore/eating/vertical_nom_vr.dm
index 1d344a5fb5..479321dd98 100644
--- a/code/modules/vore/eating/vertical_nom_vr.dm
+++ b/code/modules/vore/eating/vertical_nom_vr.dm
@@ -34,7 +34,7 @@
to_chat(target, span_vwarning("You feel yourself being pulled up by something... Or someone?!"))
var/starting_loc = target.loc
- if(do_after(src, 50))
+ if(do_after(src, 5 SECONDS, target = target))
if(target.loc != starting_loc)
to_chat(target, span_vwarning("You have interrupted whatever that was..."))
to_chat(src, span_vnotice("They got away."))
diff --git a/code/modules/vore/eating/vore_procs.dm b/code/modules/vore/eating/vore_procs.dm
index 23977a4f07..0f91547dbb 100644
--- a/code/modules/vore/eating/vore_procs.dm
+++ b/code/modules/vore/eating/vore_procs.dm
@@ -57,7 +57,7 @@
//Timer and progress bar
if(!user.client && prey.weakened > 0) // stop crwaling instantly break swallow attempt for mobvore
prey.Stun(min(prey.weakened, 2)) // stop crawling instantly break swallow attempt for mobvore
- if(!do_after(user, swallow_time, prey, hidden = TRUE))
+ if(!do_after(user, swallow_time, target = prey, hidden = TRUE))
return FALSE // Prey escaped (or user disabled) before timer expired.
// If we got this far, nom successful! Announce it and move the prey!
diff --git a/code/modules/vore/fluffstuff/custom_clothes_vr.dm b/code/modules/vore/fluffstuff/custom_clothes_vr.dm
index 76bd68e1c8..2457b7603f 100644
--- a/code/modules/vore/fluffstuff/custom_clothes_vr.dm
+++ b/code/modules/vore/fluffstuff/custom_clothes_vr.dm
@@ -1981,7 +1981,7 @@ Departamental Swimsuits, for general use
translocator_unequip(translocator, usr)
/obj/item/clothing/head/fluff/nikki/proc/translocator_equip(var/obj/item/perfect_tele/T, var/mob/living/carbon/human/user)
- if (do_after(user, 2 SECONDS, T))
+ if (do_after(user, 2 SECONDS, target = T))
user.unEquip(T)
translocator_unequip(translocator, user)
T.forceMove(src)
diff --git a/code/modules/vore/fluffstuff/custom_items_vr.dm b/code/modules/vore/fluffstuff/custom_items_vr.dm
index ffc88c455e..a8e5ac8e39 100644
--- a/code/modules/vore/fluffstuff/custom_items_vr.dm
+++ b/code/modules/vore/fluffstuff/custom_items_vr.dm
@@ -1537,7 +1537,7 @@ End CHOMP Removal*/
/obj/item/toy/plushie/fluff/seona_mofuorb/attack_self(mob/user as mob)
if(stored_item && opened && !searching)
searching = TRUE
- if(do_after(user, 10))
+ if(do_after(user, 1 SECOND, target = src))
to_chat(user, "You find [icon2html(stored_item, user.client)] [stored_item] in [src]!")
stored_item.forceMove(get_turf(src))
stored_item = null
diff --git a/code/modules/xenoarcheaology/boulder.dm b/code/modules/xenoarcheaology/boulder.dm
index 5f36e52679..9a8562a22f 100644
--- a/code/modules/xenoarcheaology/boulder.dm
+++ b/code/modules/xenoarcheaology/boulder.dm
@@ -37,14 +37,14 @@
return
else
user.visible_message(span_bold("\The [user]") + " extends \the [C] over \the [src], a flurry of red beams scanning \the [src]'s surface!", span_notice("You extend \the [C] over \the [src], a flurry of red beams scanning \the [src]'s surface!"))
- if(do_after(user, 15))
+ if(do_after(user, 15, target = src))
to_chat(user, span_notice("\The [src] has been excavated to a depth of [2 * src.excavation_level]cm."))
return
if(istype(I, /obj/item/measuring_tape))
var/obj/item/measuring_tape/P = I
user.visible_message(span_bold("\The [user]") + " extends \the [P] towards \the [src].", span_notice("You extend \the [P] towards \the [src]."))
- if(do_after(user, 15))
+ if(do_after(user, 15, target = src))
to_chat(user, span_notice("\The [src] has been excavated to a depth of [2 * src.excavation_level]cm."))
return
@@ -57,7 +57,7 @@
to_chat(user, span_warning("You start [P.drill_verb] [src]."))
- if(!do_after(user, P.digspeed))
+ if(!do_after(user, P.digspeed, target = src))
return
to_chat(user, span_notice("You finish [P.drill_verb] [src]."))
diff --git a/code/modules/xenobio/items/weapons_vr.dm b/code/modules/xenobio/items/weapons_vr.dm
index 10160efc2d..40828395e2 100644
--- a/code/modules/xenobio/items/weapons_vr.dm
+++ b/code/modules/xenobio/items/weapons_vr.dm
@@ -111,7 +111,7 @@
var/mob/living/simple_mob/slime/S = AM
while(S.cores)
playsound(src, 'sound/machines/juicer.ogg', 25, 1)
- if(do_after(user, 15))
+ if(do_after(user, 15, target = src))
new S.coretype(get_turf(AM))
playsound(src, 'sound/effects/splat.ogg', 50, 1)
S.cores--
@@ -119,7 +119,7 @@
if(istype(AM, /mob/living/carbon/human/monkey))
playsound(src, 'sound/machines/juicer.ogg', 25, 1)
- if(do_after(user, 15))
+ if(do_after(user, 15, target = src))
var/mob/living/carbon/human/M = AM
playsound(src, 'sound/effects/splat.ogg', 50, 1)
qdel(M)
diff --git a/code/modules/xenobio2/machinery/core_extractor.dm b/code/modules/xenobio2/machinery/core_extractor.dm
index df9003b047..bbfd1a877a 100644
--- a/code/modules/xenobio2/machinery/core_extractor.dm
+++ b/code/modules/xenobio2/machinery/core_extractor.dm
@@ -74,7 +74,7 @@
user.visible_message(span_danger("[user] starts to put [victim] into the core extractor!"))
src.add_fingerprint(user)
- if(do_after(user, 30) && victim.Adjacent(src) && user.Adjacent(src) && victim.Adjacent(user) && !occupant)
+ if(do_after(user, 3 SECONDS, target = src) && victim.Adjacent(src) && user.Adjacent(src) && victim.Adjacent(user) && !occupant)
user.visible_message(span_danger("[user] stuffs [victim] into the core extractor!"))
if(victim.client)
victim.client.perspective = EYE_PERSPECTIVE
diff --git a/code/modules/xenobio2/machinery/gene_manipulators.dm b/code/modules/xenobio2/machinery/gene_manipulators.dm
index 4f9df19454..5712fce6fd 100644
--- a/code/modules/xenobio2/machinery/gene_manipulators.dm
+++ b/code/modules/xenobio2/machinery/gene_manipulators.dm
@@ -271,11 +271,11 @@
else
if(isxeno(G.affecting))
var/mob/living/simple_mob/xeno/X = G.affecting
- if(do_after(user, 30) && X.Adjacent(src) && user.Adjacent(src) && X.Adjacent(user) && !occupant)
+ if(do_after(user, 3 SECONDS, target = src) && X.Adjacent(src) && user.Adjacent(src) && X.Adjacent(user) && !occupant)
user.drop_from_inventory(G)
X.forceMove(src)
occupant = X
- to_chat(user, "You load [X] into [src]."
+ to_chat(user, "You load [X] into [src].")
else
to_chat(user, span_danger("This specimen is incompatible with the machinery!"))
return
@@ -373,7 +373,7 @@
user.visible_message(span_danger("[user] starts to put [victim] into the [src]!"))
src.add_fingerprint(user)
- if(do_after(user, 30) && victim.Adjacent(src) && user.Adjacent(src) && victim.Adjacent(user) && !occupant)
+ if(do_after(user, 3 SECONDS, target = src) && victim.Adjacent(src) && user.Adjacent(src) && victim.Adjacent(user) && !occupant)
user.visible_message(span_danger("[user] stuffs [victim] into the [src]!"))
if(victim.client)
victim.client.perspective = EYE_PERSPECTIVE
diff --git a/code/modules/xenobio2/machinery/injector.dm b/code/modules/xenobio2/machinery/injector.dm
index e784452358..db36196fb9 100644
--- a/code/modules/xenobio2/machinery/injector.dm
+++ b/code/modules/xenobio2/machinery/injector.dm
@@ -52,7 +52,7 @@
user.visible_message(span_danger("[user] starts to put [victim] into the injector!"))
src.add_fingerprint(user)
- if(do_after(user, 30) && victim.Adjacent(src) && user.Adjacent(src) && victim.Adjacent(user) && !occupant)
+ if(do_after(user, 3 SECONDS, target = src) && victim.Adjacent(src) && user.Adjacent(src) && victim.Adjacent(user) && !occupant)
user.visible_message(span_danger("[user] stuffs [victim] into the injector!"))
if(victim.client)
victim.client.perspective = EYE_PERSPECTIVE
diff --git a/maps/redgate/fantasy_items.dm b/maps/redgate/fantasy_items.dm
index 816e699435..bedddec0a1 100644
--- a/maps/redgate/fantasy_items.dm
+++ b/maps/redgate/fantasy_items.dm
@@ -86,7 +86,7 @@
to_chat(user, span_notice("\The [src] already has someone buckled to it."))
return
user.visible_message(span_notice("[user] attempts to buckle [affecting] into \the [src]!"))
- if(do_after(user, 20, G.affecting))
+ if(do_after(user, 2 SECONDS, target = G.affecting))
affecting.loc = loc
spawn(0)
if(buckle_mob(affecting))
@@ -156,7 +156,7 @@
if(open && !swirlie)
user.visible_message(span_danger("[user] starts to give [GM.name] a swirlie!"), span_notice("You start to give [GM.name] a swirlie!"))
swirlie = GM
- if(do_after(user, 30, GM))
+ if(do_after(user, 3 SECONDS, target = GM))
user.visible_message(span_danger("[user] gives [GM.name] a swirlie!"), span_notice("You give [GM.name] a swirlie!"), "You hear a toilet flushing.")
if(!GM.internal)
GM.adjustOxyLoss(5)
@@ -222,7 +222,7 @@
span_notice("You start to fix part of the cooking pot.") \
)
playsound(src, O.usesound, 50, 1)
- if (do_after(user,20 * O.toolspeed))
+ if (do_after(user, 2 SECONDS * O.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " fixes part of the cooking pot."), \
span_notice("You have fixed part of the cooking pot.") \
@@ -233,7 +233,7 @@
span_infoplain(span_bold("\The [user]") + " starts to fix part of the cooking pot."), \
span_notice("You start to fix part of the cooking pot.") \
)
- if (do_after(user,20 * O.toolspeed))
+ if (do_after(user, 2 SECONDS * O.toolspeed, target = src))
user.visible_message( \
span_infoplain(span_bold("\The [user]") + " fixes the cooking pot."), \
span_notice("You have fixed the cooking pot.") \
@@ -252,7 +252,7 @@
span_bold("\The [user]") + "starts to clean the cooking pot.", \
span_notice("You start to clean the cooking pot.") \
)
- if (do_after(user,20))
+ if (do_after(user, 2 SECONDS, target = src))
user.visible_message( \
span_notice("\The [user] has cleaned the cooking pot."), \
span_notice("You have cleaned the cooking pot.") \
@@ -340,7 +340,7 @@
span_notice("\The [user] begins [src.anchored ? "unsecuring" : "securing"] the cooking pot."), \
span_notice("You attempt to [src.anchored ? "unsecure" : "secure"] the cooking pot.")
)
- if (do_after(user,20/O.toolspeed))
+ if (do_after(user, (2 SECONDS)/O.toolspeed, target = src))
user.visible_message( \
span_notice("\The [user] [src.anchored ? "unsecures" : "secures"] the cooking pot."), \
span_notice("You [src.anchored ? "unsecure" : "secure"] the cooking pot.")
diff --git a/maps/tether/tether_shuttles.dm b/maps/tether/tether_shuttles.dm
index 4a81b02ac6..1d9e4b63a4 100644
--- a/maps/tether/tether_shuttles.dm
+++ b/maps/tether/tether_shuttles.dm
@@ -390,7 +390,7 @@
return 1
playsound(src, 'sound/items/Welder.ogg', 50, 1)
user.visible_message(span_notice("\The [user] begins \the [src] overhaul."),span_notice("You begin an overhaul of \the [src]."))
- if(!do_after(user, wear SECONDS, src))
+ if(!do_after(user, wear SECONDS, target = src))
return 1
if(!src || !WT.isOn())
return 1