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

Fix food fun reduction test not actually having any reduction #72783

Merged
merged 1 commit into from Apr 4, 2024

Conversation

RenechCDDA
Copy link
Contributor

Summary

None

Purpose of change

"fun_for_food_eaten_too_often" did not actually test anything useful. It checked if a scaling penalty was applied, but the penalty was 0.

Describe the solution

Actually check to make sure the penalty exists.

Pad the test with some more sanity checking to make sure we're doing math that makes sense.

Use a copy of the test item for the test data mod to ensure this sort of shenanigans does not occur again.

Describe alternatives you've considered

I didn't even know we had a defineable "monotony_penalty", it seems nothing actually uses a manual definition.

Kind of wanted to go muck with it and make it better across the board, but my time is due for 0.H right now.

Testing

Test passes locally

Additional context

Also updated docs to explain when monotony doesn't apply, instead of just hiding it in the item factory.

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON Items: Food / Vitamins Comestibles and drinks Code: Tests Measurement, self-control, statistics, balancing. [C++] Changes (can be) made in C++. Previously named `Code` [Markdown] Markdown issues and PRs astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Apr 2, 2024
@I-am-Erk I-am-Erk merged commit 1b74c65 into CleverRaven:master Apr 4, 2024
29 checks passed
@RenechCDDA RenechCDDA deleted the food_monotony_test branch April 4, 2024 06:25
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 [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. <Documentation> Design documents, internal info, guides and help. Items: Food / Vitamins Comestibles and drinks [JSON] Changes (can be) made in JSON 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.

None yet

2 participants