Adds macros to help with common set_- and adjust_timed_status_effect uses (#69951)

* Adds helpers for status effect application
This commit is contained in:
MrMelbert
2022-09-24 10:04:26 -05:00
committed by GitHub
parent ee7306cb5b
commit 45516f4741
89 changed files with 385 additions and 329 deletions
+2 -2
View File
@@ -199,7 +199,7 @@ at the cost of risking a vicious bite.**/
visible_message(span_warning("You start feeling nauseous..."))
for(var/mob/living/viewing_mob in viewers(7, src))
viewing_mob.blur_eyes(10)
viewing_mob.adjust_timed_status_effect(10 SECONDS, /datum/status_effect/confusion)
viewing_mob.adjust_confusion(10 SECONDS)
addtimer(CALLBACK(src, .proc/pants_stagethree), ALTAR_TIME)
/// Continues the creation, making every mob nearby dizzy
@@ -208,7 +208,7 @@ at the cost of risking a vicious bite.**/
update_icon()
visible_message(span_warning("You start feeling horrible..."))
for(var/mob/living/viewing_mob in viewers(7, src))
viewing_mob.set_timed_status_effect(20 SECONDS, /datum/status_effect/dizziness, only_if_higher = TRUE)
viewing_mob.set_dizzy_if_lower(20 SECONDS)
addtimer(CALLBACK(src, .proc/pants_create), ALTAR_TIME)
/// Finishes the creation, creating the item itself, setting the cooldowns and flashing every mob nearby.
+2 -2
View File
@@ -379,7 +379,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/sink, (-14))
if(baton.cell?.charge && baton.active)
flick("baton_active", src)
user.Paralyze(baton.knockdown_time)
user.set_timed_status_effect(baton.knockdown_time, /datum/status_effect/speech/stutter)
user.set_stutter(baton.knockdown_time)
baton.cell.use(baton.cell_hit_cost)
user.visible_message(span_warning("[user] shocks [user.p_them()]self while attempting to wash the active [baton.name]!"), \
span_userdanger("You unwisely attempt to wash [baton] while it's still on."))
@@ -628,7 +628,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/sink/kitchen, (-16))
if(baton.cell?.charge && baton.active)
flick("baton_active", src)
user.Paralyze(baton.knockdown_time)
user.set_timed_status_effect(baton.knockdown_time, /datum/status_effect/speech/stutter)
user.set_stutter(baton.knockdown_time)
baton.cell.use(baton.cell_hit_cost)
user.visible_message(span_warning("[user] shocks [user.p_them()]self while attempting to wash the active [baton.name]!"), \
span_userdanger("You unwisely attempt to wash [baton] while it's still on."))