From d03542da5c8d8ffe09f417d158ef9f503db3b95a Mon Sep 17 00:00:00 2001 From: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Date: Tue, 11 Jul 2023 19:01:40 -0500 Subject: [PATCH] Dusting applies `TRAIT_FORCED_STANDING` (#76738) Being dusted applies `TRAIT_FORCED_STANDING` before calling `death()` Just makes it so the dust animation fits the body perfectly, rather than your body going horizontal while the animation plays. I could've sworn it used to look like this, but got lost at some point. --- code/modules/hallucination/fake_death.dm | 14 ++++++++++++-- code/modules/mob/living/death.dm | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/code/modules/hallucination/fake_death.dm b/code/modules/hallucination/fake_death.dm index 9492f2f2ebc..c80c54959ee 100644 --- a/code/modules/hallucination/fake_death.dm +++ b/code/modules/hallucination/fake_death.dm @@ -1,6 +1,8 @@ // This hallucinations makes us suddenly think we died, stopping us / changing our hud / sending a fake deadchat message. /datum/hallucination/death random_hallucination_weight = 1 + /// Determines whether we floor them or just immobilize them + var/floor_them = TRUE /datum/hallucination/death/Destroy() if(!QDELETED(hallucinator)) @@ -12,7 +14,11 @@ return ..() /datum/hallucination/death/start() - hallucinator.Paralyze(30 SECONDS) + if(floor_them) + hallucinator.Paralyze(30 SECONDS) + else + hallucinator.Immobilize(30 SECONDS) + hallucinator.apply_status_effect(/datum/status_effect/grouped/screwy_hud/fake_dead, REF(src)) hallucinator.add_traits(list(TRAIT_MUTE, TRAIT_EMOTEMUTE), REF(src)) @@ -72,7 +78,10 @@ /datum/hallucination/death/proc/wake_up() if(!QDELETED(hallucinator)) hallucinator.remove_status_effect(/datum/status_effect/grouped/screwy_hud/fake_dead, REF(src)) - hallucinator.SetParalyzed(0 SECONDS) + if(floor_them) + hallucinator.SetParalyzed(0 SECONDS) + else + hallucinator.SetImmobilized(0 SECONDS) hallucinator.remove_traits(list(TRAIT_MUTE, TRAIT_EMOTEMUTE), REF(src)) if(!QDELETED(src)) @@ -80,6 +89,7 @@ // A subtype of death which plays a dusted animation. /datum/hallucination/death/dust + floor_them = FALSE /// List of all images we created to convey the effect to the hallucinator (so we can remove them after) var/list/image/created_images diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm index 6bdd68a1d92..fcf1ff752a3 100644 --- a/code/modules/mob/living/death.dm +++ b/code/modules/mob/living/death.dm @@ -45,6 +45,9 @@ * * force - Should this mob be FORCABLY dusted? */ /mob/living/proc/dust(just_ash, drop_items, force) + if(body_position == STANDING_UP) + // keep us upright so the animation fits. + ADD_TRAIT(src, TRAIT_FORCED_STANDING, TRAIT_GENERIC) death(TRUE) if(drop_items)