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
🆑
code: Chem stun reductions are now applied more consistently.
fix: Chem stun reductions should now more consistently apply to
unconsciousness.
/🆑
This commit is contained in:
Nick
2024-03-08 22:29:01 -05:00
committed by GitHub
parent d33934d2ac
commit cc63ecd65b
3 changed files with 9 additions and 20 deletions
+3
View File
@@ -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 */
@@ -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
@@ -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)