[MIRROR] Implements timed_action_flags for do_after-like procs (#1385)

* Implements timed_action_flags for do_after-like procs (#54409)

Originally I wanted to fix an issue where the `get_up()` `do_after()` would ignore the callback checks, because it was `uninterruptible`, so that made me refactor these procs to allow for higher granularity on checks and standardize behavior a bit more.
There's more work to be done for them, but one thing at a time.

* Removes the `uninterruptible` check in favor of the more granular `timed_action_flags`
* Cleans code on the `do_atom`, `do_after_mob`, `do_mob` and `do_after` procs to standardize them a little better.

* Implements timed_action_flags for do_after-like procs

* Update horror_form.dm

Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
SkyratBot
2020-10-21 07:06:03 +02:00
committed by GitHub
co-authored by Rohesie Azarak
parent 4299f0555f
commit f02e30a50e
43 changed files with 155 additions and 130 deletions
+2 -2
View File
@@ -215,7 +215,7 @@
return
var/datum/progressbar/progress = new(M, len, I.loc)
var/list/rejections = list()
while(do_after(M, 10, TRUE, parent, FALSE, CALLBACK(src, .proc/handle_mass_pickup, things, I.loc, rejections, progress)))
while(do_after(M, 1 SECONDS, parent, NONE, FALSE, CALLBACK(src, .proc/handle_mass_pickup, things, I.loc, rejections, progress)))
stoplag(1)
progress.end_progress()
to_chat(M, "<span class='notice'>You put everything you could [insert_preposition] [parent].</span>")
@@ -273,7 +273,7 @@
var/turf/T = get_turf(A)
var/list/things = contents()
var/datum/progressbar/progress = new(M, length(things), T)
while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress)))
while (do_after(M, 1 SECONDS, T, NONE, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress)))
stoplag(1)
progress.end_progress()
+1 -1
View File
@@ -96,7 +96,7 @@ This component is used in vat growing to swab for microbiological samples which
return
to_chat(user, "<span class='notice'>You start swabbing [target] for samples!</span>")
if(!do_after(user, 3 SECONDS, TRUE, target)) // Start swabbing boi
if(!do_after(user, 3 SECONDS, target)) // Start swabbing boi
return
LAZYINITLIST(swabbed_items) //If it isn't initialized, initialize it. As we need to pass it by reference