From b77867a2250778d105e1ac44a13cf3d7a332de99 Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Fri, 8 Mar 2024 22:59:38 -0500 Subject: [PATCH] [MIRROR] Chem stun reductions now all use AdjustAllImmobility, and the AllImmobility procs now adjust unconscious (#1352) * Chem stun reductions now all use AdjustAllImmobility, and the AllImmobility procs now adjust unconscious (#81873) ## About The Pull Request Meth, maints tar, synaptizine, and nicotine now all use the `AdjustAllImmobility` to handle their stun reductions, instead of individually adjusting all 5-6 immobility effects. `AllImmobility`, `SetAllImmobility`, and `AdjustAllImmobility` now also affect the unconscious status effect as well. I'm calling this a bug/consistency issue, since every chem that didn't already use `AdjustAllImmobility` was adjusting the unconscious status effect anyway, and they are all clearly trying to do the same thing. If I missed anything that could also be replaced with `AdjustAllImmobility`, let me know and I'll fix it. ## Why It's Good For The Game Makes things more consistent, and consistency is good. ## Changelog :cl: code: Chem stun reductions are now applied more consistently. fix: Chem stun reductions should now more consistently apply to unconsciousness. /:cl: * Chem stun reductions now all use AdjustAllImmobility, and the AllImmobility procs now adjust unconscious --------- Co-authored-by: Nick <42454181+Momo8289@users.noreply.github.com> --- code/modules/mob/living/status_procs.dm | 3 +++ .../chemistry/reagents/drug_reagents.dm | 19 ++++--------------- .../chemistry/reagents/medicine_reagents.dm | 7 ++----- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index 96beb024fe9..c0e2058f23e 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -303,6 +303,7 @@ Knockdown(amount) Stun(amount) Immobilize(amount) + Unconscious(amount) /mob/living/proc/SetAllImmobility(amount) @@ -310,6 +311,7 @@ SetKnockdown(amount) SetStun(amount) SetImmobilized(amount) + SetUnconscious(amount) /mob/living/proc/AdjustAllImmobility(amount) @@ -317,6 +319,7 @@ AdjustKnockdown(amount) AdjustStun(amount) AdjustImmobilized(amount) + AdjustUnconscious(amount) /* UNCONSCIOUS */ diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm index 43a3d340831..0172c65c3d7 100644 --- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm @@ -87,11 +87,8 @@ to_chat(affected_mob, span_notice("[smoke_message]")) affected_mob.add_mood_event("smoked", /datum/mood_event/smoked) affected_mob.remove_status_effect(/datum/status_effect/jitter) - affected_mob.AdjustStun(-50 * REM * seconds_per_tick) - affected_mob.AdjustKnockdown(-50 * REM * seconds_per_tick) - affected_mob.AdjustUnconscious(-50 * REM * seconds_per_tick) - affected_mob.AdjustParalyzed(-50 * REM * seconds_per_tick) - affected_mob.AdjustImmobilized(-50 * REM * seconds_per_tick) + affected_mob.AdjustAllImmobility(-50 * REM * seconds_per_tick) + return UPDATE_MOB_HEALTH /datum/reagent/drug/nicotine/overdose_process(mob/living/affected_mob, seconds_per_tick, times_fired) @@ -177,11 +174,7 @@ if(SPT_PROB(2.5, seconds_per_tick)) to_chat(affected_mob, span_notice("[high_message]")) affected_mob.add_mood_event("tweaking", /datum/mood_event/stimulant_medium) - affected_mob.AdjustStun(-40 * REM * seconds_per_tick) - affected_mob.AdjustKnockdown(-40 * REM * seconds_per_tick) - affected_mob.AdjustUnconscious(-40 * REM * seconds_per_tick) - affected_mob.AdjustParalyzed(-40 * REM * seconds_per_tick) - affected_mob.AdjustImmobilized(-40 * REM * seconds_per_tick) + affected_mob.AdjustAllImmobility(-40 * REM * seconds_per_tick) var/need_mob_update need_mob_update = affected_mob.adjustStaminaLoss(-2 * REM * seconds_per_tick, updating_stamina = FALSE, required_biotype = affected_biotype) affected_mob.set_jitter_if_lower(4 SECONDS * REM * seconds_per_tick) @@ -459,11 +452,7 @@ /datum/reagent/drug/maint/tar/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired) . = ..() - affected_mob.AdjustStun(-10 * REM * seconds_per_tick) - affected_mob.AdjustKnockdown(-10 * REM * seconds_per_tick) - affected_mob.AdjustUnconscious(-10 * REM * seconds_per_tick) - affected_mob.AdjustParalyzed(-10 * REM * seconds_per_tick) - affected_mob.AdjustImmobilized(-10 * REM * seconds_per_tick) + affected_mob.AdjustAllImmobility(-10 * REM * seconds_per_tick) affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 1.5 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags) return UPDATE_MOB_HEALTH diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index 89721d525a5..ae99a812fcc 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -88,11 +88,8 @@ /datum/reagent/medicine/synaptizine/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired) . = ..() affected_mob.adjust_drowsiness(-10 SECONDS * REM * seconds_per_tick) - affected_mob.AdjustStun(-20 * REM * seconds_per_tick) - affected_mob.AdjustKnockdown(-20 * REM * seconds_per_tick) - affected_mob.AdjustUnconscious(-20 * REM * seconds_per_tick) - affected_mob.AdjustImmobilized(-20 * REM * seconds_per_tick) - affected_mob.AdjustParalyzed(-20 * REM * seconds_per_tick) + affected_mob.AdjustAllImmobility(-20 * REM * seconds_per_tick) + if(holder.has_reagent(/datum/reagent/toxin/mindbreaker)) holder.remove_reagent(/datum/reagent/toxin/mindbreaker, 5 * REM * seconds_per_tick) affected_mob.adjust_hallucinations(-20 SECONDS * REM * seconds_per_tick)