Merge pull request #15999 from SandPoot/do_after

Implements timed_action_flags for do_after-like procs
This commit is contained in:
silicons
2023-09-14 17:59:55 -07:00
committed by GitHub
60 changed files with 210 additions and 403 deletions
+1 -1
View File
@@ -55,7 +55,7 @@
. = ..()
if(dropping == user && isliving(user))
var/mob/living/L = user
if(L.resting && do_after(L, max(10, L.getStaminaLoss()*0.5), 0, src))
if(L.resting && do_after(L, max(10, L.getStaminaLoss()*0.5), src, IGNORE_HELD_ITEM))
if(Adjacent(L, src))
step(L, get_dir(L, src))
playsound(L, "rustle", 25, 1)
+1 -1
View File
@@ -92,7 +92,7 @@
if(!istype(I, /obj/item/pickaxe/drill/jackhammer))
return FALSE
to_chat(user, "<span class='notice'>You begin to smash though [src]...</span>")
if(!do_after(user, 70, TRUE, src))
if(!do_after(user, 7 SECONDS, src))
return FALSE
I.play_tool_sound(src)
visible_message("<span class='warning'>[user] smashes through [src] with [I]!</span>", "<span class='italics'>You hear the grinding of metal.</span>")
+1 -1
View File
@@ -388,7 +388,7 @@ GLOBAL_LIST_EMPTY(station_turfs)
var/list/things = src_object.contents()
var/datum/progressbar/progress = new(user, things.len, src)
while (do_after(usr, 1 SECONDS, TRUE, src, FALSE, CALLBACK(src_object, /datum/component/storage.proc/mass_remove_from_storage, src, things, progress, TRUE, user)))
while (do_after(usr, 1 SECONDS, src, NONE, FALSE, CALLBACK(src_object, /datum/component/storage.proc/mass_remove_from_storage, src, things, progress, TRUE, user)))
stoplag(1)
progress.end_progress()