Makes uses of do_after sane (#18334)

* Prevents insta-actions

* Do_after sanity

NOTE: NUKE do_after_action

* Update bonfire.dm

* The  rest of them

Also fixes a tpyo

* no minitest :)

* .

* .

* Gets rid of the slowdown for now

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
Cameron Lennox
2025-09-08 02:25:08 +02:00
committed by GitHub
co-authored by Kashargul
parent 736fe6ef28
commit d73f6b8dbd
330 changed files with 682 additions and 690 deletions
@@ -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]."),
@@ -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