mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 06:54:18 +01:00
Refactored do_after to use a flag-based system for options (#17127)
* Refactored do_after to use a flag-based system for options * More flags * Ditto * Use the HAS_FLAG macro * do_after pass * Fix burning paper code * Resolve issues from Fluffy's code reviews * .
This commit is contained in:
@@ -100,7 +100,7 @@
|
||||
dipped.attempt_apply_coating(src, user)
|
||||
return
|
||||
if(!(W.flags & NOBLUDGEON) && (user.a_intent == I_HURT) && fragile && (W.force > fragile))
|
||||
if(do_after(user, 10))
|
||||
if(do_after(user, 1 SECOND, src))
|
||||
if(!QDELETED(src))
|
||||
visible_message(SPAN_WARNING("[user] smashes [src] with \a [W]!"))
|
||||
user.do_attack_animation(src)
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
LAZYADD(src.other_DNA, M.dna.unique_enzymes)
|
||||
src.other_DNA_type = "saliva"
|
||||
|
||||
while (do_after(user, 25, 5, 1))
|
||||
while (do_after(user, 25, 5))
|
||||
var/blood_taken = 0
|
||||
blood_taken = min(5, REAGENT_VOLUME(reagents, /singleton/reagent/blood)/4)
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
user.visible_message("<span class='notice'>\The [user] injects themselves with \the [src]</span>","<span class='notice'>You stick the \the [src] in your mouth and press the injection button.</span>")
|
||||
else
|
||||
user.visible_message("<span class='warning'>\The [user] attempts to administer \the [src] to \the [H]...</span>","<span class='notice'>You attempt to administer \the [src] to \the [H]...</span>")
|
||||
if (!do_after(user, 1 SECONDS, act_target = H))
|
||||
if (!do_after(user, 1 SECONDS, H))
|
||||
to_chat(user,"<span class='notice'>You and the target need to be standing still in order to inject \the [src].</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
user.visible_message("<span class='notice'>[user] sticks \the [src] in their mouth and presses the injection button.</span>","<span class='notice'>You stick \the [src] in your mouth and press the injection button.</span>")
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] attempts to administer \the [src] to [M]...</span>","<span class='notice'>You attempt to administer \the [src] to [M]...</span>")
|
||||
if (!do_after(user, 1 SECONDS, act_target = M))
|
||||
if (!do_after(user, 1 SECONDS, M))
|
||||
to_chat(user,"<span class='notice'>You and \the [M] need to be standing still in order to inject \the [src].</span>")
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user