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

Display vitamins by mass in item descriptions #69235

Merged

Conversation

ehughsbaird
Copy link
Contributor

Summary

Interface "Show the mass of vitamins in food items"

Purpose of change

Use the info added in #68988 to display vitamins by mass in items.

Describe the solution

Add display of vitamin mass in addition to units/RDA for vitamins that have a weight per unit defined.
Add an option to toggle display of this.

Testing

Find some food items, look at them:
Image of pickled fish. The vitamins display shows "52 mg Calcium (5%), 2 mg Iron (14%), and 938 μg Vitamin C (1%)"
Also works in crafting:
Image of crafting a boring sandwich. The vitamins display shows "0 μg-3 g Calcium (0-289%), 0 μg-21 mg Iron (0-115%), and 0 μg-397 mg Vitamin C (0-441%)"

Option can be used to turn it off:
Image of pickled fish. The vitamins display shows "Calcium (5%), Iron (14%), and Vitamin C (1%)"
Image of crafting a boring sandwich. The vitamins display shows "Calcium (0-289%), Iron (0-115%), and Vitamin C (0-441%)"

@ehughsbaird ehughsbaird marked this pull request as ready for review November 10, 2023 15:23
@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. Code: Tests Measurement, self-control, statistics, balancing. [C++] Changes (can be) made in C++. Previously named `Code` 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 Nov 10, 2023
@Qrox
Copy link
Contributor

Qrox commented Nov 11, 2023

0 μg-3 g

I suggest showing 0 without unit and hiding the first unit if it is the same as the second.

@ehughsbaird ehughsbaird force-pushed the items-display-vitamin-mass branch from 801468f to ced4698 Compare November 11, 2023 15:09
@ehughsbaird
Copy link
Contributor Author

Crafting screen of a baked potato. The vitamins show "21-677 mg Calcium (2-68%), 0-2 mg Iron (0-8%), and 0-42mg Vitamin C (0-47%)"

Now that we have this information, we may as well display it!
@ehughsbaird ehughsbaird force-pushed the items-display-vitamin-mass branch from ced4698 to fc34b24 Compare November 11, 2023 16:15
@github-actions github-actions bot added BasicBuildPassed This PR builds correctly, label assigned by github actions and removed BasicBuildPassed This PR builds correctly, label assigned by github actions labels Nov 11, 2023
@Maleclypse Maleclypse merged commit 9a3e698 into CleverRaven:master Nov 12, 2023
25 checks passed
@ehughsbaird ehughsbaird deleted the items-display-vitamin-mass branch November 12, 2023 15:12
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. Info / User Interface Game - player communication, menus, etc. json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants