Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Air Filtration CBM Useful #1439

Merged

Conversation

KheirFerrum
Copy link
Collaborator

@KheirFerrum KheirFerrum commented Apr 5, 2022

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.

@KheirFerrum KheirFerrum changed the title Make air filtration cbm useful Make Air Filtration CBM Useful Apr 5, 2022
Bionic thus didn't consume power when active
@@ -3239,7 +3239,7 @@ void item::bionic_info( std::vector<iteminfo> &info, const iteminfo_query *parts

if( !bid->env_protec.empty() ) {
info.push_back( iteminfo( "DESCRIPTION",
_( "<bold>Environmental Protection</bold>: " ),
bid->activated ? _( "<bold>Environmental Protection (activated)</bold>: " ) : _( "<bold>Environmental Protection</bold>: " ),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized it will probably only show the info for the passive version, since it's the "main" bionic here. Not a big deal and rather hard to remedy, but worth noting.

@Coolthulhu Coolthulhu self-assigned this Apr 6, 2022
@Coolthulhu Coolthulhu merged commit d8b3b31 into cataclysmbnteam:upload Apr 6, 2022
@KheirFerrum KheirFerrum deleted the Make-Air-Filtration-CBM-Useful branch April 20, 2022 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants