Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix food auditor for new food system #10059

Merged
merged 2 commits into from
Jul 21, 2024
Merged

Fix food auditor for new food system #10059

merged 2 commits into from
Jul 21, 2024

Conversation

uecasm
Copy link
Contributor

@uecasm uecasm commented Jul 20, 2024

Changes proposed in this pull request:

  • Fixes duplicated items appearing in general item lists (due to a quirk of creative tab enumeration).
  • Fixes cook force-feeding citizens (when their inventory is full) using outdated food value calculation.
  • Updates the food audit output according to the new food system.
    • The rule to calculate maxlevel changed in the food update. It now uses a common implementation.
    • Adds a tier column which contains the MineColonies food tier level (or empty for non-mcol food).
    • Adds actual0-actual5 columns which contain the actual food value a colonist with the given residence level will gain. (This does not include the research bonus.)
    • Sample output with no extra mods

Known or suspected (pre-existing) issues not fixed in this pull request:

  • When the cook force-feeds a citizen, container items are lost.
  • The "amount of food to serve" by the cook is based on the raw food nutrition value, not actual value.
  • The restaurant still requests food based on rawNutrition >= (restaurantLevel - 1), which is very unrelated to actual food value.
  • The restaurant UI hides items that fail canEat(restaurantLevel), which notably is a rawNutrition >= (restaurantLevel + 1) check.
  • There's a mismatch between canEat allowing any food for level 1-2 while the Food request does not.

(Some of these things might be fixed by #10054)

[x] Yes I tested this before submitting it.
[ ] I also did a multiplayer test.

Review please

@Raycoms Raycoms merged commit 2300eae into version/main Jul 21, 2024
2 checks passed
@Raycoms Raycoms deleted the fix/food-audit branch July 21, 2024 13:17
Raycoms pushed a commit that referenced this pull request Jul 27, 2024
Fixes duplicated items appearing in general item lists (due to a quirk of creative tab enumeration).
Fixes cook force-feeding citizens (when their inventory is full) using outdated food value calculation.
Updates the food audit output according to the new food system.
The rule to calculate maxlevel changed in the food update. It now uses a common implementation.
Adds a tier column which contains the MineColonies food tier level (or empty for non-mcol food).
Adds actual0-actual5 columns which contain the actual food value a colonist with the given residence level will gain. (This does not include the research bonus.)
Sample output with no extra mods
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants