-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Recipe display in crafting menu doesn't match resulting product. #28180
Comments
This will also help resolve the issue of a resulting recipes vitamin (and caloric) values being hardcoded regardless of the included ingredients. Continuing with Deluxe Cooked Oatmeal example:
|
Also worth noting is that the Volume and Weight Differ somewhat significantly for each of those recipes. This should likely also be remediated in some way. |
you are only looking at the values in the crafting menu. crafting the actual food will give you real values. |
So i managed to re read your issue, and i have to say that it's already implemented by #27252 |
Thanks. I tried searching for a duplicate issue but did not find yours. If this is still showing the incorrect values in the crafting menu perhaps I should update the ticket to reflect that? Seems it would make sense to fix that as well, even if it's low priority. |
So my proposed fix for this: for item results with NUTRIENT_OVERRIDE flag, no change |
Just to let people know: I am working on this issue. It's slow going, since I don't have much dev time at the moment, but I think I have a workable plan. |
Add a new nutrients struct, which consists of some calorie and vitamin info. Use this struct in food item definitions (specifically, islot_comestible) and in stomach. Turned out stomach already contained a nutrients struct, which contained the above together with water and total volume. That is renamed food_summary, and uses nutrients internally. The main advantage of this separate struct is that it simplifies the arithmetic used to compute aggregate food nutrient values based on components used to craft that food. That code was also refactored and split up to make it easier to understand and helps separate out the things which will need to be separate to fix CleverRaven#28180.
Add a new nutrients struct, which consists of some calorie and vitamin info. Use this struct in food item definitions (specifically, islot_comestible) and in stomach. Turned out stomach already contained a nutrients struct, which contained the above together with water and total volume. That is renamed food_summary, and uses nutrients internally. The main advantage of this separate struct is that it simplifies the arithmetic used to compute aggregate food nutrient values based on components used to craft that food. That code was also refactored and split up to make it easier to understand and helps separate out the things which will need to be separate to fix CleverRaven#28180. The only intended observable behaviour change from this commit is that tapeworms now consume half of the calories you ingest, as well as half the vitamins (they used to only affect vitamins).
Add a new nutrients struct, which consists of some calorie and vitamin info. Use this struct in food item definitions (specifically, islot_comestible) and in stomach. Turned out stomach already contained a nutrients struct, which contained the above together with water and total volume. That is renamed food_summary, and uses nutrients internally. The main advantage of this separate struct is that it simplifies the arithmetic used to compute aggregate food nutrient values based on components used to craft that food. That code was also refactored and split up to make it easier to understand and helps separate out the things which will need to be separate to fix CleverRaven#28180. The only intended observable behaviour change from this commit is that tapeworms now consume half of the calories you ingest, as well as half the vitamins (they used to only affect vitamins).
Add a new nutrients struct, which consists of some calorie and vitamin info. Use this struct in food item definitions (specifically, islot_comestible) and in stomach. Turned out stomach already contained a nutrients struct, which contained the above together with water and total volume. That is renamed food_summary, and uses nutrients internally. The main advantage of this separate struct is that it simplifies the arithmetic used to compute aggregate food nutrient values based on components used to craft that food. That code was also refactored and split up to make it easier to understand and helps separate out the things which will need to be separate to work on CleverRaven#28180. The only intended observable behaviour change from this commit is that tapeworms now consume half of the calories you ingest, as well as half the vitamins (they used to only affect vitamins).
Add a new nutrients struct, which consists of some calorie and vitamin info. Use this struct in food item definitions (specifically, islot_comestible) and in stomach. Turned out stomach already contained a nutrients struct, which contained the above together with water and total volume. That is renamed food_summary, and uses nutrients internally. The main advantage of this separate struct is that it simplifies the arithmetic used to compute aggregate food nutrient values based on components used to craft that food. That code was also refactored and split up to make it easier to understand and helps separate out the things which will need to be separate to work on CleverRaven#28180. The only intended observable behaviour change from this commit is that tapeworms now consume half of the calories you ingest, as well as half the vitamins (they used to only affect vitamins).
Add a new nutrients struct, which consists of some calorie and vitamin info. Use this struct in food item definitions (specifically, islot_comestible) and in stomach. Turned out stomach already contained a nutrients struct, which contained the above together with water and total volume. That is renamed food_summary, and uses nutrients internally. The main advantage of this separate struct is that it simplifies the arithmetic used to compute aggregate food nutrient values based on components used to craft that food. That code was also refactored and split up to make it easier to understand and helps separate out the things which will need to be separate to work on CleverRaven#28180. The only intended observable behaviour change from this commit is that tapeworms now consume half of the calories you ingest, as well as half the vitamins (they used to only affect vitamins).
Add a new nutrients struct, which consists of some calorie and vitamin info. Use this struct in food item definitions (specifically, islot_comestible) and in stomach. Turned out stomach already contained a nutrients struct, which contained the above together with water and total volume. That is renamed food_summary, and uses nutrients internally. The main advantage of this separate struct is that it simplifies the arithmetic used to compute aggregate food nutrient values based on components used to craft that food. That code was also refactored and split up to make it easier to understand and helps separate out the things which will need to be separate to work on CleverRaven#28180. The only intended observable behaviour change from this commit is that tapeworms now consume half of the calories you ingest, as well as half the vitamins (they used to only affect vitamins).
Describe the bug
Look at Vitamins/Calories/Volume/Weight for Cooked Oatmeal and Deluxe Cooked Oatmeal.
Cooked Oatmeal: Iron (12% RDA)
Deluxe Cooked Oatmeal (Using Sugar in my example): Vitamin C (58% RDA)
Wot?
I haven't checked values for other recipe results but I imagine similar things will be seen throughout these valuesfor different foods (I.E Nonsensical results).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Values should likely be calculated based off the food included in an recipe.
For example, if something is Cooked Meat + Zuchinni, it should combine the values of the two to reach the value of the prepared item.
While this isn't exactly how it works in real life (Bioavailble nutrients can change based off of how food is prepared if I'm not mistaken), it will likely make sense from a development and maintenance perspective.
Instead of the value of a resulting recipe being hard coded as they are now, we can do a larger initial amount of work adding values to all food recipe components and add a simple system to combine that value into an end result.
Cataclysm-DDA/data/json/items/comestibles/wheat.json
Line 227 in 7bbaecb
Cataclysm-DDA/data/json/items/comestibles/wheat.json
Line 248 in 7bbaecb
Versions and configuration(please complete the following information):
The text was updated successfully, but these errors were encountered: