-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Jsonize environemental protection form CBMs #32939
Conversation
ret = 5; | ||
for( const bionic &bio : *my_bionics ) { | ||
for( const auto &element : bio.info().env_protec ) { | ||
if( element.first == bp || ( bp == bp_eyes && element.first == bp_head ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why special-case the eyes? People can just add eyes as well if they mean it, right?
if( ret > 5 ) { | ||
ret = 5; | ||
for( const bionic &bio : *my_bionics ) { | ||
for( const auto &element : bio.info().env_protec ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have a std::map
here, so you shouldn't need to loop over it. Although it would be a little awkward to do the lookup if you keep the eyes special case code.
Summary
SUMMARY: Infrastructure "Jsonize Environemental protection form cbm"
Purpose of change
Jsonize Environemental protection form cbm. Bump protection from eye armor and air filtration from 2 to 7.
Describe the solution
Add
env_protec
value inbionic_data
, use this value inget_env_resist
Describe alternatives you've considered
Just changing harcoded value without json stuff.
Additional context
Did one test with environemental protection bumped to 27 for air filtration in json and walked through tear gas without coughing.
Adresses #30012, although I didn't see anything in the code about poison resistance from air filtration cbm