Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up[READY] [CR] Freezer & freeze mechanics overhaul #24228
Conversation
nexusmrsep
added some commits
Jul 7, 2018
This comment has been minimized.
This comment has been minimized.
|
Looks great, the freeze mechanic seems quite interesting! |
This comment has been minimized.
This comment has been minimized.
Guys and gals playing "nuclear winter" scenarios will either love me or utterly hate me for that, but that's how it is, I guess, when you present such a change. |
Night-Pryanik
reviewed
Jul 8, 2018
| } else { | ||
| target.item_tags.insert( "HOT" ); | ||
| target.active = true; | ||
| target.item_counter = 600; // sets the hot food flag for 60 minutes |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
nexusmrsep
Jul 9, 2018
Author
Contributor
How about making it weight related? Same with defrost moves consumption. More mass, more energy "stored", longer the time needed to heat/cool. For ex. heating a small sausage takes less time then defrosting a galon of wood's soup. Also this sausage will be cold sooner then this amount soup. I know that IRL its also volume dependant and environment temperature plays big role too, but using only weight would be
sufficient aproximation IMHO. Can't say at this moment if its possible to do so, but will look at it asap.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
nexusmrsep
Jul 9, 2018
Author
Contributor
Done some research and found some interesting data that I have to share: THIS paper on Newton Law of Cooling says that boiling water (100C) in room temperature drops to 37C (human body temp) in about 43 minutes, but excluding evaporation (adding oil film to the water) it drops to 42C in 60 minutes. Law scales with delta temperature and other variables, but I'm sane enough to don't even think of using the real math for this. However as for cooling from hot to normal, I now think that this 60 minutes was not that off, considering just the Newton's Law.
This comment has been minimized.
This comment has been minimized.
nexusmrsep
Jul 9, 2018
Author
Contributor
Still, as THIS great explanation says heat capacity plays huge role, so smaller objects lose temperature faster then larger ones. I have an idea of implementation now, and will try to present some results soon, as my free time allows me.
| target.item_counter = 600; // sets the hot food flag for 60 minutes | ||
| if( target.item_tags.count( "FROZEN" ) ) { | ||
| target.item_tags.erase( "FROZEN" ); | ||
| target.item_tags.insert( "HOT" ); |
This comment has been minimized.
This comment has been minimized.
Night-Pryanik
Jul 8, 2018
Member
I feel the process of consecutive defrosting and heating should be longer than simple heating.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Night-Pryanik
Jul 8, 2018
Member
Yes. Regular heating consumes 300 moves, while defrosting+heating should consume more.
| * Governs HOT/COLD/FROZEN status of items in a fridge/freezer or in cold temperature | ||
| * and sets item's fridge/freezer status variables. | ||
| * @param it Item processed. | ||
| * @param freezer If true its a freezer if false its a fridge, for temperature calculation. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Can you provide examples of such products? |
This comment has been minimized.
This comment has been minimized.
According to THIS source food that doesn't suffer freezing well are:
THIS source says:
The Do Not Freeze List by THIS Lot of other sources on that too. I hope @Amariithynar might help to narrow this list or expand it if needed. For now I only added the mechanic, and not flagged any food. Same with EATEN_FROZEN. Food like granola, hardtack and other dry food in my opinion could be eaten while frozen, as inherent lack of moisture prevents them from going solid hard. |
This comment has been minimized.
This comment has been minimized.
|
Some of the cooked items separate, so it's down to our choice if that counts as "rotten" or just "no morale gain" as it can be eaten, just the ingredients resperate (or as the example with fried foods, go soggy/rubbery). [edit] Ah... this might have an easy (?) fix, of allowing frozen foods in some recipes. So "frozen onion" is ok for soups, but "(unfrozen) onion" is needed for onion rings... with frozen turning rotten instantly if unfrozen/thawed? Others (such as fruit) turn into a mush, which is still edible but not pleasant. More like "fruit pulp" that we already have. So I wonder if adding a direction for a vector of change in some items? Can we specify what they "freeze" into (as suppose to "rot" into for rotting mechanics)? Could allow a simple drink + freezer = ice lolly + food processor = ice cream or slush puppy. XD |
This comment has been minimized.
This comment has been minimized.
|
If the separation of ingredients is reversible, and safe - ok. If mixing it again won't work, or its separation is a potential danger to the consumer - lets allow to consider it rotten. If defrosting lettuce converts it to a mushy pulp that literally melts in your hands, than thank you but no, I'm not eating it ever.... You Sir, however, are free to do what your stomach tells you. :) I see the potential for triming/expanding the list, and that we can certainly discuss. |
nexusmrsep
added some commits
Jul 8, 2018
This comment has been minimized.
This comment has been minimized.
|
Oh. I've worked with people on liquid diets. If it is not "rotten" it is edible in any material phase (we had thickener to turn juice/coffee into soup/paste). But as said, it becomes mush, so morale/enjoyability is much much lower. I'd just find it interesting if frozen veg went from veg -> mush -> rotten if defrosted in game (but that might be taking simulation far to far, as you say). [edit] Remember, this game lets you eat many things (bleach?!?!), but some it does not (uncooked flour). :P |
This comment has been minimized.
This comment has been minimized.
I agree, throw lettuce in a blender, and its perfectly edible, but after a freeze & defrost I'm not so sure. I think it's not mechanical damage but destruction on cellular level. But on this topic I'm not an expert, so feel free to add any thoughts or sources found. |
This comment has been minimized.
This comment has been minimized.
|
Higher effect on cooking than freezing for vitamin/nutrition: Seems it is just texture. But actually cooking/eating such things is very difficult. They certainly would be like starch/pulp/flour is treated in game "does not look edible" or massive morale hit. I may make a note to look at those files if json-ified later, to see if I could list fruit/veg that would become mushy after defrosting. I'm all for keeping the list as is. It's more a future thing, to instead of not letting a player freeze them... letting a player discover a frozen cucumber is great for adding as flavoured ice cubes to a gin and tonic, but not in a defrosted cucumber [now mushy] sandwich! XD |
nexusmrsep
referenced this pull request
Jul 8, 2018
Merged
[Rdy] Quick fix for garlic cloves decay time #24225
This comment has been minimized.
This comment has been minimized.
|
Found a "bug" where drinks (contrary to solid food) are not processed so they never have the chance to pass the [edit]: Perishables are preactivated, that [edit 2] I would add |
This comment has been minimized.
This comment has been minimized.
Amariithynar
commented
Jul 8, 2018
|
Regarding most of the foods, especially vegetables, that are listed as breaking down when frozen- they do so because they are high in water content, and the water crystals formed from freezing ruptures cell walls and destroys the firm texture we prefer; the taste isn't greatly changed, it's more about the mouthfeel. Egge whites for example have a gummy texture to them, but are perfectly edible. If they aren't cooked on their own but instead mixed with other ingredients, the effect is minimized as well. Rice freezes perfectly fine after being cooked, but the grains have now swelled with water so they suffer the same issue; a gummy mouthfeel, which isn't present if UNCOOKED eggs are frozen, as the cooking process causes a chemical reaction that alters the structure of the proteins and makes them rigid; if you've ever had undercooked scrambled eggs where there was some mushy, almost liquid bits to it, and felt how it didn't taste BAD but it didn't FEEL good in your mouth, that's basically the same thing. Some sources: https://indianapublicmedia.org/amomentofscience/lettuce-frozen/ https://www.foodsafety.gov/keep/charts/eggstorage.html ("do not freeze" is refferring to end quality of product, not "cannot be eaten") https://www.thekitchn.com/freezer-friendly-the-do-not-freeze-list-167949 Normally I'd say for things like mayo that it's fine if you're incorporating it into another dish, but the only recipes I have that use it are sandwiches, and... yeah, no. Separated mayo on sandwiches is DISGUSTING. https://www.youtube.com/watch?v=IRHgEJib3DI however, you CAN reincorporate it quite easily, too, by using another container and adding a little bit of water to it, then slowly adding the broken mayonnaise and stirring vigourously the entire time; https://www.youtube.com/watch?v=aCWjXzkkljY What I'd recommend to do for those vegetable ingredients listed is to instead be changed upon either gaining or losing the FROZEN tag (if possible) to change into "mushy <vegetable/fruit>", edible still but with a really nasty Enjoyability rating, which can be used in making soups, or drinks just fine, can still be dehydrated into "dehydrated vegetable chips" and something that should be added is that they should be able to be ground down (quern, mortar & pestle, food processor) into "dehydrated vegetable powder" to make Veggie Drinks/Shakes (this really needs a recipe/to be in the game, with a secondary recipe using the food processor to make them directly from the fresh produce instead; I want a kale smoothie, dammit! ;P). Here's an example where one person does it with lettuce; doesn't matter how mushy the leaves are from being frozen if you dehydrate them and powderize them. https://momwithaprep.com/dehydrate-lettuce/ and it doesn't matter the texture of tomatoes when you're just boiling them down to make a sauce anyways. Basically, "does the original crispness of the ingredient matter for the end product?" and if the answer is yes, then frozen veggies of that kind shouldn't be usable for that recipe. Reading off the list I have in-game: Anything that's pickled/fermenting should be excluded, as should vacuum-packed veggy/fruit pieces, the Japanese-inspired dishes (like hosomaki), onion rings, and all sandwiches. Everything else should be fine, Most dry prepared foods that I'm aware of actually are perfectly fine to eat frozen; I actually prefer to freeze granola and granola bars because it gives it a more satisfying crunch and chew, but then I fully acknowledge that it's also much harder to eat when not in bar form, as well, because you're having to basically shatter the frozen chunks (most dried foods have some water content still, even if just like 1%). I'd have frozen dried finished goods like granola still be edible without a general reduction in enjoyability, but maybe introduce a minor morale penalty for eating it frozen still; "jaw sore from eating a frozen meal" perhaps, as a counterpoint to "recently enjoyed a hot meal"? Note that you can actually eat fresh-cut raw meats that have been frozen with minimal risk, since freezing it so quickly after butchering it prevents the growth of bacteria. That's actually how sushi is done commercially; with the fish being bought extremely fresh, freezing it at very low temperatures to ensure that any parasites are destroyed (though careful preparation and proper selection of fish can also render that moot, IRL, as some fish take to being parasitized more than others) for a week, and then kept just above freezing before being prepared. https://www.esquire.com/food-drink/food/how-to/a24118/raw-meat-safety/, http://www.foodauthority.nsw.gov.au/foodsafetyandyou/special-care-foods/raw-meat-safe-eating, https://www.seriouseats.com/2017/05/how-to-prepare-raw-fish-at-home-sushi-sashimi-food-safety.html and http://www.bccdc.ca/resource-gallery/Documents/Educational%20Materials/EH/FPS/Fish/SushiSafety.pdf for some sources. Worth noting is that eating meat freshly carved from the carcass has risks of parasites, but none for food poisoning, unless there was a botched butchery job involved, nicking the intestines, etc. |
This comment has been minimized.
This comment has been minimized.
Worthstream
commented
Jul 11, 2018
|
Just to point out, there are dishes where the vegetables have to be frozen then defrosted. For example, the italian cassoeûla, derives most of its flavor from the nutrients that get out of the cells broken during the freezing process. It would be a different dish if prepared by only boiling the cabbage, as most of the flavor would be trapped inside the strong vegetable cells membrane. |
This comment has been minimized.
This comment has been minimized.
|
@Night-Pryanik I still can't find an easy answer for the problem with non-perishables not getting @Amariithynar As for |
nexusmrsep
added some commits
Jul 14, 2018
This comment has been minimized.
This comment has been minimized.
|
Ok, sum-up of new committed changes:
FYI - committed code as of now has some debugging code woven into it as well as some commented '//' experimental snippets that I need to test possibilities of finding a way around food processing exclusions. This will be cleaned-up when I find a way (or someone gives me a good idea) and they will become obsolete. |
nexusmrsep
closed this
Jul 14, 2018
nexusmrsep
reopened this
Jul 14, 2018
nexusmrsep
added some commits
Jul 14, 2018
This comment has been minimized.
This comment has been minimized.
|
Following the discussion with the devs (Kevin mostly) on Discord, I unlocked processing for all food, perishable or not, to allow it to cool/freeze/thaw. Also if not COLD/FROZEN (and HOT) the processing speed is reduced so hopefully the hit on performance will be negligible. If not, there is room for future tweaks. Testing proves that it works now, and non-perishables freeze too. Unfortunately Travis seem to have problems with building it on every compiler - seg fault? why? - even though Appveyor seem to digest it fine. [edit: compiled version doesn't crash for me either] |
nexusmrsep
added some commits
Aug 13, 2018
This comment has been minimized.
This comment has been minimized.
|
Final PR dropped, PR is ready. It seems that some tests fail in Travis but I don't have the expertise in this area to check whats wrong. |
nexusmrsep
changed the title
[WiP] [CR] Freezer & freeze mechanics overhaul
[READY] [CR] Freezer & freeze mechanics overhaul
Aug 15, 2018
kevingranade
merged commit 76b57b2
into
CleverRaven:master
Aug 16, 2018
nexusmrsep
deleted the
nexusmrsep:freezer
branch
Aug 16, 2018
This comment has been minimized.
This comment has been minimized.
paulenka-aleh
commented
Aug 17, 2018
•
|
Everything in my RV fridge that was turned off frozen solid overnight, even though it was in garage. I tried to boil stomach to eat something. Now it's both hot and frozen at the same time. Anyway I cannot get my breakfast eaten... |
nexusmrsep commentedJul 7, 2018
•
edited
What does it do?
This PR introduces:
Minifreezer to freeze your food solid:
New freeze mechanics:
instant rot of frozen item with this flag[edit:] MUSHY flag and drop of joy from eating, some food don't like to be frozen at all (freezing irreversibly damages some food items rendering them inedible)game_constants.hTODO:
Rationale:
Follow the initial discussion and ideas presented at: #24145