Files
cb87e54d93 Lung cleanup ft. minor suffocation tweak (#96659)
## About The Pull Request

### Notable changes

Before: When taking suffocation damage, 3 oxyloss damage is dealt, or
0.66 damage if below 0 health (soft crit threshold). If below 0 hp, and
you have `NOCRITDAMAGE`, gets nullified.
After: When taking suffocation damage, 3 oxyloss damage is dealt,
reduced if you had a partially successful breath (i.e. 75% of a breath =
0.25x damage) or are in soft crit or hard crit (0.22x less damage). If
in crit, and you have `NOCRITDAMAGE`, gets nullified.

Before: You skip 1 in every 4 breaths when your health is below 0 (soft
crit threshold), and skip every breath when your health is below -30
(hard crit threshold)
After: You skip 1 in every 4 breaths when in soft crit, and skip every
breath when in hard crit

Before: You don't heal from successful breaths when below 0 health (soft
crit threshold)
After: You don't heal from successful breaths when in soft or hard crit

### Other changes

- Removed `gasp` from losebreath processing, ie removed chance to gasp
twice in one tick when choking.
- Deletes `respiration_type`s
- Deletes `crit_stabilizing_reagent`
- Deletes species `breathid`, replaces it with `get_breath_type` that
checks the species' lungs

## Why It's Good For The Game

- There was a strange inconsistency where being in crit would
drastically reduce the amount of suffocation damage you were dealt, but
only if you were not breathing. If you were somehow breathing, you took
the full damage. I thought this was a little obtuse, so I wanted to
change it to be consistent: Being in crit is just a multiplier.

- Making them check for `stat` instead of `health` means they affect
people with `NO_SOFTCRIT` or `NO_HARDCRIT` nicer.

- See above.

- Really just to be cleaner, handle gasping in one place.

- I'm not sure why we have `respiration_type`. The only time they're
(practically) referred to is in reagent handling, but there are no
reagents that set it anything but `ALL`. All it does is make our oxyloss
handling made more complicated and harder to read for no purpose. So I
decided to axe it - I think anything special handing that should arise
should just have some bespoke checks instead.

- Nothing set this value to anything else. And guess what, if you
changed it, epinephrine still worked because it applies `NO_CRITDAMAGE`.

- Species de-hardcoding. Makes it easier to add new breath types. 


## Changelog

🆑 Melbert
balance: Suffocation damage is slightly more consistent now: You take 3
oxyloss per suffocation tick, reduced for partially successful breaths
and or if you are in crit. Alternatively, if you are in crit and you
have epinephrine/atropine in your system, it gets nullified entirely.
code: Cleaned up lungs a bit, particularly relating to abnormal lungs
like plasmamen or fish, report any oddities with them.
del: You no longer have a chance to gasp twice in one suffocation tick.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
2026-07-02 01:59:27 +00:00

36 lines
1.4 KiB
Plaintext

/mob/living/silicon/apply_effect(effect = 0,effecttype = EFFECT_STUN, blocked = FALSE)
return FALSE //The only effect that can hit them atm is flashes and they still directly edit so this works for now. (This was written in at least 2016. Help)
/mob/living/silicon/adjust_tox_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype) //immune to tox damage
return FALSE
/mob/living/silicon/set_tox_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
return FALSE
/mob/living/silicon/adjust_stamina_loss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype) //immune to stamina damage.
return FALSE
/mob/living/silicon/set_stamina_loss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype)
return FALSE
/mob/living/silicon/received_stamina_damage(current_level, amount_actual, amount)
return
/mob/living/silicon/adjust_organ_loss(slot, amount, maximum = 500, required_organ_flag) //immune to organ damage (no organs, duh)
return FALSE
/mob/living/silicon/set_organ_loss(slot, amount)
return FALSE
/mob/living/silicon/adjust_oxy_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype) //immune to oxygen damage
if(isAI(src)) //ais are snowflakes and use oxyloss for being in AI cards and having no battery
return ..()
return FALSE
/mob/living/silicon/set_oxy_loss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
if(isAI(src)) //ditto
return ..()
return FALSE