Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Added a toggleable version of Air Filtration System CBM that makes it provide protection equal to an activated gas mask.
Purpose of change
Currently the Air Filtration System CBM is basically useless. With the breaking of chance based rolls for EP the only Environmental Protection that matters is reaching the threshold values. The only threshold that the base Air Filtration System CBM reaches is that for smoke of all intensities.
Describe the solution
The base bionic is unchanged, granting 7 passive Environmental Protection. Changes were made to Character.cpp and Items.cpp to support a toggleable version of "env_protect" (Credit to Coolthulhu for the code and walking me through actually compiling the thing).
An additional active Bionic was created that is packaged into the Air Filtration CBM, this raises the EP by an additional 8 to reach 15, which reaches the immunity threshold of all known gasses last I checked. Any gas that affects the eyes will still require a mask of some sort however. This Bionic was given a 100 J active cost and a 10 J maintenance cost, upkeep is thus minimal.
Describe alternatives you've considered
Make Air Filtration CBMs provide higher Environmental Protection values and granulate the various gas hazards such that most of them can be filtered by the system (Bloated Zombies anyone?). Thus requiring a gas mask for more serious hazards like Fungal spores and the like.
Testing
Debugged a character with both 500 Power and Air Filtration CBM, checked that passive form worked by spawning in thick smoke across 9 tiles and walking through all of them. Then checked that active form wasn't toggled, and walked through spawned toxic smoke, poisoning myself. Once toxin wore off, activated active Air Filtration and walked through spawned toxic smoke unharmed.
Additional context
I do honestly want some granularity to the various gasses and EP requirements, but balancing that could be somewhat tedious. The random rolls seemed like a !!Fun!! system (especially with Fungal Haze), but I think as it stands this system will work just fine.