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

Faction camp food stores always uses default calories of comestible, not actual calories #50805

Closed
RenechCDDA opened this issue Aug 15, 2021 · 0 comments · Fixed by #65168
Closed
Labels
<Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code` Items: Food / Vitamins Comestibles and drinks NPC / Factions NPCs, AI, Speech, Factions, Ownership Player Faction Base / Camp All about the player faction base/camp/site

Comments

@RenechCDDA
Copy link
Member

RenechCDDA commented Aug 15, 2021

Describe the bug

See steps to reproduce

Steps To Reproduce

Debugged campfire hot dog is 130 calories
Campfire hot dog made out of debugged bratwurst is 297 calories (inherits calories from sole component)
Put bratwurst-turned-hot-dog(297 calories) into camp food stores, you get only 130 calories
You are missing 167 calories

Expected behavior

You are not missing 167 calories

Screenshots

These two campfire hot dogs give the same amount of calories(130 each) to the camp food stores, despite having different calorie amounts when consumed.
Untitled

Versions and configuration

70df41c
(0.F-1)

Additional context

I believe this is the issue:

const int kcal = it.get_comestible()->default_nutrition.kcal() * it.count() * rot_multip( it,

Instead of get_comestible()->default_nutrition.kcal() we need something like Character::compute_effective_nutrients. Except it probably shouldn't take from the avatar classes at all, because you're feeding generic NPCs. Assuming they are 'normal' is a decent approximation.

@actual-nh actual-nh added <Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code` Items: Food / Vitamins Comestibles and drinks NPC / Factions NPCs, AI, Speech, Factions, Ownership Player Faction Base / Camp All about the player faction base/camp/site labels Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code` Items: Food / Vitamins Comestibles and drinks NPC / Factions NPCs, AI, Speech, Factions, Ownership Player Faction Base / Camp All about the player faction base/camp/site
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants