mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-14 19:51:59 +00:00
## 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. /🆑