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
+3 -3
View File
@@ -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))
+1 -1
View File
@@ -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]."))
+2 -2
View File
@@ -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].")
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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."))
+1 -1
View File
@@ -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!