mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 20:37:34 +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:
@@ -32,7 +32,7 @@
|
||||
var/r_eyes = hex2num(copytext(new_eyes, 2, 4))
|
||||
var/g_eyes = hex2num(copytext(new_eyes, 4, 6))
|
||||
var/b_eyes = hex2num(copytext(new_eyes, 6, 8))
|
||||
if(do_after(owner, 5) && owner.change_eye_color(r_eyes, g_eyes, b_eyes))
|
||||
if(do_after(owner, 0.5 SECONDS, do_flags = DO_USER_CAN_MOVE | DO_USER_CAN_TURN) && owner.change_eye_color(r_eyes, g_eyes, b_eyes))
|
||||
owner.update_eyes()
|
||||
owner.visible_message("<span class='notice'>[owner] shifts, their eye color changing.</span>", "<span class='notice'>You shift, your eye color changing.</span>")
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
examinate(user, src)
|
||||
else
|
||||
user.visible_message(SPAN_WARNING("\The [user] starts fiddling with \the [src]..."), SPAN_NOTICE("You start fiddling with \the [src]..."))
|
||||
if(do_after(user, 30, TRUE, src))
|
||||
if(do_after(user, 30, src))
|
||||
if(src.loc != user)
|
||||
to_chat(user, SPAN_WARNING("You can only modify \the [src] if it's on your person!"))
|
||||
return
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
var/obj/item/organ/external/E = input(src, "Select a limb to detach:", "Nymph Limb Detach") as null|anything in my_nymph_limbs
|
||||
if(!istype(E))
|
||||
return
|
||||
if(!do_after(src, delay = 3 SECONDS, needhand = FALSE))
|
||||
if(!do_after(src, delay = 3 SECONDS, do_flags = DO_DEFAULT & ~DO_USER_SAME_HAND))
|
||||
return
|
||||
if(E.detach_nymph_limb() && my_nymph_limbs.len == 1)
|
||||
remove_verb(src, /mob/living/carbon/human/proc/detach_nymph_limb)
|
||||
@@ -199,7 +199,7 @@
|
||||
if(istype(E))
|
||||
to_chat(src, "You start to detach from your host.")
|
||||
to_chat(E.owner, "The nymph acting as your [E.name] starts to unattach itself.")
|
||||
if(do_after(src, delay = 3 SECONDS, needhand = FALSE))
|
||||
if(do_after(src, delay = 3 SECONDS, do_flags = DO_DEFAULT & ~DO_USER_SAME_HAND))
|
||||
E.detach_nymph_limb()
|
||||
|
||||
// Organ detach
|
||||
@@ -261,7 +261,7 @@
|
||||
if(!limb_choice)
|
||||
return
|
||||
|
||||
if(!do_after(src, delay = 3 SECONDS, needhand = FALSE))
|
||||
if(!do_after(src, delay = 3 SECONDS, do_flags = DO_DEFAULT & ~DO_USER_SAME_HAND))
|
||||
return
|
||||
|
||||
// Make new limb and put it on the host
|
||||
@@ -321,7 +321,7 @@
|
||||
if(!limb_choice)
|
||||
return
|
||||
|
||||
if(!do_after(target, delay = 3 SECONDS, needhand = TRUE))
|
||||
if(!do_after(target, delay = 3 SECONDS, do_flags = DO_DEFAULT & ~DO_USER_SAME_HAND))
|
||||
return
|
||||
|
||||
// Make new limb and put it on the host
|
||||
|
||||
Reference in New Issue
Block a user