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.
This commit is contained in:
Rohesie
2020-10-19 17:06:49 -04:00
committed by GitHub
parent 2ae02bced0
commit 29ec525147
42 changed files with 154 additions and 129 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