Files
Bubberstation/code/modules
Bloop e41cc39888 Fixes being able to breathe in space, fixes any lingering biotype related damage issues (#73147)
## About The Pull Request

Fixes #73276

This is a followup PR from my series of biotype updates. Changed oxyloss
to default to ignoring biotype requirements. Fixes a bug in lung code
that was preventing mobs from suffocating under certain conditions.

~~Now biotype requirements for oxyloss are respected only when `forced`
is set to `FALSE`, which I have done for all applicable reagents. This
is more of a temporary fix for until the damage system gets a refactor
to better accommodate biotypes. @Time-Green and @LemonInTheDark would
know what I mean, we were just talking about this. There is a problem
with `MOB_ORGANIC` being the deafult and this is the ugly workaround.~~

Edit: I felt that oxyloss (which should be renamed to something else at
this point) should have its own flag to check what type of respiration
the mob's lungs can do. Because you can have organic mobs that breathe
different gases. It gets messy when you try to use the same flag for
everything.

So I refactored oxyloss to use a new lung flag, `respiration_type`,
which is automatically set based on the `safe_min_oxygen`,
`safe_min_plasma` etc variables within the lung code. This will allow
for individual lung types to dynamically determine whether they can take
oxyloss from reagents, or any other sources that pass the
`respiration_type` in the `adjustOxyLoss` proc.

## Why It's Good For The Game

Plasmamen can't breathe without plasma anymore. Humans can't breathe
without oxygen anymore. Etc.

Adds better handling for dealing with the 'oxyloss' damage type,
allowing it to be applied based on the type of gas being breathed by the
specific lung. The argumentless default is to apply it regardless of
respiration_type e.g. it behaves exactly as it did before.

## Changelog

🆑
fix: fixes oxyloss not being applied when there is a partial pressure of
0 (no more being able to breathe in space)
code: fixes any lingering damage-application issues related to non
MOB_ORGANIC biotypes
refactor: refactored lungs to have a respiration_type flag which is then
used by adjustOxyloss/setOxyloss to determine whether to take 'oxygen'
damage.
/🆑
2023-02-06 22:56:20 -08:00
..
2023-02-05 12:42:07 -07:00