Skip to content

Conversation

@osuphobia
Copy link
Contributor

Summary

Bugfixes "fix focus always be a penalty when install GUNMOD with INSTALL_DIFFICULT"

Purpose of change

In gunmod_installation_odds, it is said that focus is either a penalty or bonus of at most +/-10%, but that's not how it works right now. Actually, with std::min( std::max( get_focus(), 140 ), 60 ), focus always gives you a -10% penalty.

Describe the solution

Fix it by using std::clamp( get_focus(), 60, 140 ).

Describe alternatives you've considered

Not only fix this minor issue, but also refactor gunmod_installation_odds.

Testing

TBD

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves <Bugfix> This is a fix for a bug (or closes open issue) json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Mar 10, 2025
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 <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves json-styled JSON lint passed, label assigned by github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant