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

[CR] Replace environmental protection with seal integrity #74872

Closed

Conversation

zachary-kaelan
Copy link
Contributor

@zachary-kaelan zachary-kaelan commented Jul 2, 2024

Summary

Infrastructure "Replace environmental protection with seal integrity"

Purpose of change

Environmental protection is currently essentially a magic number. All values involving it are hardcoded with no explanation as to how those values were chosen. When picking the value for armor or clothing, you have zero clue what the number you're setting even does.

A few examples:

  • In iexamine::flower_poppy, you can only smell the flower if your env_resist is less than 10, and if it's less than 5 then you have a chance of falling asleep.
  • Footwear only gives acid immunity if it has env_resist >= 15 on the legs and feet.
  • If env_resist < 10 then resistances to acid and fire are multiplied by env_resist / 10.
  • A few effects like flashbangs, boomer barf, and goo traps are rolled against env_resist through add_env_effect despite there being no relevance. Swim goggles do not have integrated windshield wipers.

Describe the solution

On armor or clothing the name is changed to seal_integrity with an enum type, like breathability on materials, and on bionics and body parts it is changed to innate_seal. All hardcoded values will be changed to use the enum. Flags like WATERPROOF and GAS_PROOF will become unnecessary.

Describe alternatives you've considered

Some complicated means of automatically determining a rough environmental protection value based on things like materials, thickness, other resistances, etc.

Testing

WIP.

Additional context

Relevant PRs and issues I found include #72010, #66297, #72271, #71964, and #74680.

@github-actions github-actions bot added Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style <Documentation> Design documents, internal info, guides and help. [Markdown] Markdown issues and PRs astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Jul 2, 2024
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jul 2, 2024
@zachary-kaelan zachary-kaelan changed the title [CR] Update JSON_INFO.md to reflect terminology and field type changes [CR] Replace environmental protection with seal integrity Jul 2, 2024
@kevingranade
Copy link
Member

Nice! This overall seems like a great direction to take things in.

@Drew4484
Copy link
Contributor

What's left to do on this?

@Night-Pryanik
Copy link
Contributor

Closing as stale. If you wish to continue working on this, ping me to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style <Documentation> Design documents, internal info, guides and help. json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants