Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

Adjust Raw Butter recipes, Adds raw butter to recipes that use butter

Open Sirbab opened this issue 4 months ago • 1 comments

Summary

Bugfixes "Fix raw butter calories, add salt to raw butter recipes, Add raw butter as option to recipes that use butter"

Purpose of change

Fixes https://github.com/CleverRaven/Cataclysm-DDA/issues/77224, or at least, as much as I'm able to. Raw butter before was making super low calorie versions of butter, some recipes that used butter did not allow for using raw butter. Salt was added to raw butter recipes for two reasons, first as raw butter is used as a drop in replacement for butter it should match it vaguely in terms of taste. Secondly, when looking up homemade butter recipes, all four I examined had a line recommending adding salt to taste.

This is a duplicate of a prior PR made about 30 minutes, but I made a mistake of not using a branch, so this fixes it.

Describe the solution

From a few resources, like FDA definition of butter, and several recipes for homemade butter, I determined that homemade butter should be approximately 80-85% milkfat, and found that the current listing for raw butter at ~109 calories was more or less accurate. This adjusts the output charges of raw butter from the churn from 99 to 22, resulting in raw butter with 111 calories per serving, and reduces the output of the shake method of raw butter from 33 to 13, resulting in raw butter with 113 calories per serving. This PR also adds raw butter to recipes that seemingly lack it as an oversight, as they use butter. This particular facet of the PR may be considered over-reach and I'm happy to split it off if desired. The recipes changed for this facet are the condiment list, shillelagh, escargot, pbj toast, and lobster roll. The PR also adds the requirement of 1 unit of salt per crafting operation of raw butter. To appease the iteminfo_test, I have adjusted the calorie range from 52 to 56, as somehow butter changes impact ice cream. Thanks to Harakka for and GuardianDll for helping me find this error.

Describe alternatives you've considered

1: Remove Raw Butter entirely, make all current recipes craft regular butter instead. This means that crafted butter would last longer on average by a few days, but that seems reasonable. In the desire to not change more than necessary, I opted to not do this unless it's broadly desired. 2: Rename raw butter to homemade butter. I feel like the name raw implies a state that's better or more refined. 3: Add nutrient_override to raw butter, so we don't run into this mess of juggling calories. It would also allow for fixing the side issue of the buttermilk being magic calories. That said, given that seems to be part of a broader crafting issue, I opted not to do so. 4: Splitting this PR into several, as I worry this might be considered scope creep between the charge adjustments, adding the raw butter to recipes that use butter, and adding salt to the recipes.

Testing

Tested on:

OS: Windows OS Version: 10.0.19045.4894 (22H2) Game Version: cdda-experimental-2024-10-21-2303 https://github.com/CleverRaven/Cataclysm-DDA/commit/7fc041490be599e84ba4d179d2b2707a368a07c7 [64-bit] Graphics Version: Tiles Game Language: System language [] Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], Portal Storms Ignore NPCs [personal_portal_storms], Slowdown Fungal Growth [no_fungal_growth] ] I started a new game using these changes, encountered some errors, fixed them, loaded into the world, set skills to 10, spawned the "things to do with milk" book, several containers, tools etc, and turned milk jars into heavy cream. Next, I crafted one craft of raw butter using the churn method, observed the 111 calories that match calculation. Next, I crafted the shake method, encountered an issue where the calories in did not match calories out, meaning we have magic calories in this, as well as other recipes that use food and byproducts. That seems outside the scope of this issue, so for now I'm accepting the buttermilk being free calories. I adjusted the recipe again and found it to make raw butter with 113 calories, which is within the 5% difference I set for myself as a metric. If one wishes to test the byproduct issue, spawn 2 units of chunk of fat, notice they have 1923 calories each, then craft lard, and notice you have 6 units of lard at 641, and one unit of cracklins at 270. This means that you have 3846 calories in, and 3846+270 calories out. Assuming this is correct and I'm not making an error, I believe this warrants a bug report.

Additional context

Please let me know if my changes need adjustment, or split up. I'm still trying to understand what degree of scope expanse would warrant making multiple PRs. I want to make clean edits, but I don't want to annoy reviewers with 3 different PRs if that's unnecessary.

Sirbab avatar Oct 22 '24 02:10 Sirbab