Faction camp food stores always uses default calories of comestible, not actual calories #50805
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
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](https://user-images.githubusercontent.com/84619419/129469468-f429eab1-4618-4f60-a0fc-efe99c802684.png)
Versions and configuration
70df41c
(0.F-1)
Additional context
I believe this is the issue:
Cataclysm-DDA/src/faction_camp.cpp
Line 3823 in ee0b7b6
Instead of
get_comestible()->default_nutrition.kcal()
we need something likeCharacter::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.The text was updated successfully, but these errors were encountered: