Transition nutrition to kcal for good #45720
Labels
[C++]
Changes (can be) made in C++. Previously named `Code`
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
(P4 - Low)
Low priority issues: things which are e.g exotic, minor and/or hard to encounter
<Suggestion / Discussion>
Talk it out before implementing
Is your feature request related to a problem? Please describe.
Cataclysm-DDA/src/character.cpp
Lines 4989 to 4993 in 90cab7a
Internally
mod_stored_nutr()
converts nutrition number to kcal before apllying the modification, but it means that values used in json, like thecost
entry of mutation are still innutrition
instead of kcal it also means that each time the code callsmod_stored_nutr()
it has to usenutrition
value to avoid conveting twice.Describe the solution you'd like
Change all json value and internal value to kcal and remvoe the convertion from
mod_stored_nutr()
Describe alternatives you've considered
Maybe introduced cal as a
unit
Additional context
This is not high priority but I think it will make the code easier to maintain.
The text was updated successfully, but these errors were encountered: