[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

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

View File

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

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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