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
+1 -1
View File
@@ -40,7 +40,7 @@
return FALSE
if(occupant_amount() >= max_occupants)
return FALSE
if(do_after(M, get_enter_delay(M), FALSE, src, TRUE))
if(do_after(M, get_enter_delay(M), src, timed_action_flags = IGNORE_HELD_ITEM))
mob_enter(M)
return TRUE
return FALSE
+1 -1
View File
@@ -47,7 +47,7 @@
if(istype(W, /obj/item/reagent_containers/food/snacks/grown/banana))
// ignore the occupants because they're presumably too distracted to notice the guy stuffing fruit into their vehicle's exhaust. do segways have exhausts? they do now!
user.visible_message("<span class='warning'>[user] begins stuffing [W] into [src]'s tailpipe.</span>", "<span class='warning'>You begin stuffing [W] into [src]'s tailpipe...</span>", ignored_mobs = occupants)
if(do_after(user, 30, TRUE, src))
if(do_after(user, 3 SECONDS, src))
if(user.transferItemToLoc(W, src))
user.visible_message("<span class='warning'>[user] stuffs [W] into [src]'s tailpipe.</span>", "<span class='warning'>You stuff [W] into [src]'s tailpipe.</span>", ignored_mobs = occupants)
eddie_murphy = W