[MIRROR] Makes uses of do_after sane (#11582)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-09-07 20:02:27 -07:00
committed by GitHub
parent 2c34c93e00
commit 1b8f394a14
329 changed files with 692 additions and 716 deletions

View File

@@ -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)

View File

@@ -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()

View File

@@ -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

View File

@@ -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."))