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

move islot_comestible::nutr to islot_comestible::kcal #28521

Merged
merged 3 commits into from Mar 11, 2019

Conversation

KorGgenT
Copy link
Member

@KorGgenT KorGgenT commented Mar 6, 2019

Summary

SUMMARY: Infrastructure "internally store kcal instead of nutr values"

Purpose of change

Since the move to Calories being the energy type derived from food, nutrition is slowly losings its meaning. i am replacing nutr with kcal as the actual value that the game uses. This is mainly because kcal is a larger number, and with it will reduce rounding errors with the various calculations that food does. The obvious change that players will see is that foods will increase in displayed calories anywhere from 0-8 kcal per food item. As of right now this does not affect hunger, but in future PRs it will.

Describe the solution

Find instances where nutr is called and substitute for kcal. some areas where nutr is used stay the same, and a new get_nutrition() function is made in itype for quick and easy translation

Additional Context

because of the change, it was necessary to make some more edits to recipes in order to pass the unit tests.

@KorGgenT KorGgenT changed the title move islot_comestible::nutr to islot_comesitble::kcal move islot_comestible::nutr to islot_comestible::kcal Mar 6, 2019
@KorGgenT KorGgenT added Items: Food / Vitamins Comestibles and drinks [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style labels Mar 6, 2019
@KorGgenT
Copy link
Member Author

KorGgenT commented Mar 6, 2019

so i sorta want #28519 to go through before i start fixing up the travis test fails, but i suppose it's not strictly required

@KorGgenT KorGgenT changed the base branch from development to master March 10, 2019 03:40
@kevingranade kevingranade merged commit 7316a46 into CleverRaven:master Mar 11, 2019
@KorGgenT KorGgenT deleted the nutr-to-kcal branch March 11, 2019 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Items: Food / Vitamins Comestibles and drinks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants