Skip to content

Commit

Permalink
[MIRROR] Chem stun reductions now all use AdjustAllImmobility, and th…
Browse files Browse the repository at this point in the history
…e 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 <[email protected]>
  • Loading branch information
2 people authored and StealsThePRs committed Mar 9, 2024
1 parent 306f780 commit b77867a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
3 changes: 3 additions & 0 deletions code/modules/mob/living/status_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -303,20 +303,23 @@
Knockdown(amount)
Stun(amount)
Immobilize(amount)
Unconscious(amount)


/mob/living/proc/SetAllImmobility(amount)
SetParalyzed(amount)
SetKnockdown(amount)
SetStun(amount)
SetImmobilized(amount)
SetUnconscious(amount)


/mob/living/proc/AdjustAllImmobility(amount)
AdjustParalyzed(amount)
AdjustKnockdown(amount)
AdjustStun(amount)
AdjustImmobilized(amount)
AdjustUnconscious(amount)


/* UNCONSCIOUS */
Expand Down
19 changes: 4 additions & 15 deletions code/modules/reagents/chemistry/reagents/drug_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down
7 changes: 2 additions & 5 deletions code/modules/reagents/chemistry/reagents/medicine_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b77867a

Please sign in to comment.