mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 08:29:57 +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:
@@ -226,7 +226,7 @@
|
||||
else
|
||||
user.visible_message(SPAN_WARNING("[user] begins to wipe [H]'s lipstick off with \the [src]."), \
|
||||
SPAN_NOTICE("You begin to wipe off [H]'s lipstick."))
|
||||
if(do_after(user, 10) && do_after(H, 10, 0)) //user needs to keep their active hand, H does not.
|
||||
if(do_after(user, 1 SECOND, H, do_flags = (DO_DEFAULT | DO_USER_UNIQUE_ACT) & ~DO_BOTH_CAN_TURN))
|
||||
user.visible_message(SPAN_NOTICE("[user] wipes [H]'s lipstick off with \the [src]."), \
|
||||
SPAN_NOTICE("You wipe off [H]'s lipstick."))
|
||||
H.lipstick_color = null
|
||||
|
||||
@@ -159,17 +159,13 @@
|
||||
user.visible_message(span("[class]", "[user] holds \the [P] up to \the [src], trying to burn it!"), \
|
||||
span("[class]", "You hold \the [P] up to \the [src], burning it slowly."))
|
||||
playsound(src.loc, 'sound/bureaucracy/paperburn.ogg', 50, 1)
|
||||
flick("shredp_onfire", src) //no do_after here, so people can walk n' burn at the same time. -wezzy
|
||||
flick("shredp_onfire", src)
|
||||
|
||||
spawn(20)
|
||||
if(get_dist(src, user) < 2 && user.get_active_hand() == P)
|
||||
user.visible_message(span("[class]", "[user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap."), \
|
||||
span("[class]", "You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap."))
|
||||
new /obj/effect/decal/cleanable/ash(src.loc)
|
||||
qdel(src)
|
||||
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("You must hold \the [P] steady to burn \the [src]."))
|
||||
if (do_after(user, 2 SECONDS, src, DO_UNIQUE | DO_USER_CAN_MOVE))
|
||||
user.visible_message(span("[class]", "[user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap."), \
|
||||
span("[class]", "You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap."))
|
||||
new /obj/effect/decal/cleanable/ash(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/shreddedp
|
||||
name = "shredded paper"
|
||||
|
||||
Reference in New Issue
Block a user