CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.07k stars 4.1k forks source link

Contents of packaging decompose at different rates #71467

Open BjoHart opened 6 months ago

BjoHart commented 6 months ago

Describe the bug

Contents of packaging decompose at different rates. In this picture, for example, it is flour. But it also happens with other things.

Attach save file

Feb_2024-trimmed.tar.gz

Steps to reproduce

Make a new game with the experimental. Find a house and check for flour.

Expected behavior

Flour in a bag, for example, should decompose evenly.

Screenshots

screen

Versions and configuration

Additional context

No response

ANickelN commented 6 months ago

/confirmed Contained foods should have their spoil timers rolled once and then applied to the whole container rather than separately. Not a good solution performance-wise, but the issue still needs to actually be addressed.

MrHrulgin commented 6 months ago

But foods in a package do decompose at different rates. The flour at the top of the bag can go rancid before that at the bottom, since it's exposed to more moisture. A block of cheese can be moldy at the end exposed to air, and fine deeper in the package, where the plastic protected it more.

BjoHart commented 6 months ago

But not like this:

Top : 0% fresh Middle : 50% fresh Bottom : 1000% fresh

More like:

Top : 90% fresh Middle : 95% fresh Bottom : 100% fresh

MrHrulgin commented 6 months ago

Using flour as an example, your top example is exactly what happens. The bad stuff clumps up from moisture exposure and makes a shell on the top which is pretty much inedible. The stuff underneath it is fine-ish to salvage as long as you don't mix the bad with the good during the extraction.

Food doesn't start going bad on the day of the apocalypse. People were giving up on making fresh bread everyday and letting flour sit in their cupboards going bad for a while beforehand. It would be less realistic if there wasn't anything that was rotten.

andrei8l commented 6 months ago

This is a duplicate of #67603 unless that's a fresh batch of flour that you've crafted.

/confirmed Contained foods should have their spoil timers rolled once and then applied to the whole container rather than separately

No, they really shouldn't. That would be a performance disaster, unless you're willing to implement item back links so you'd have a functional cache of whether the container is all food or not. Even then, I have doubts... See also #63233 where I fixed a bug/design issue that did basically what you're suggesting.