-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rot away items inside reality bubble #39822
Conversation
a bit late to the party, but an alternative would be to leave nonperishable parts (e.g. bones) behind instead of nothing. I'm not sure how it would affect performance and how useful it would be, but it could be interesting to have streets filled with skeletons months into the cataclysm |
That's out of scope here. This is only extending an existing behavior to happen in the reality bubble, that's a new feature. |
Summary
SUMMARY: Features "Rot away items away in reality bubble"
Purpose of change
Items rot away (are removed) when they have 2x shelf life of rot.
This check is done only when the item is loaded into reality bubble. So if you stay in same place items do not rot away.
It would be better for the rotting away to be done on items that are inside reality bubble.
Describe the solution
Check for item removal due to rot during normal rot calculations and remove the item (return true) if it has rotten away.
process_temperature_rot
needs to know if the item is inside sealed container (those do not rot away). So a new booleanseals
is passed around into the functions.Items that are carried by someone are never removed. It could be a bit confusing for items to disappear from your inventory. Also would cause issues if the item was supposed to spawn some monster when it rots away (eggs).
Also adds a test for item inside reality bubble rotting away.
Describe alternatives you've considered
The check for item rotting on map load could be removed. But the item processing on map load is useful so it should stay in some form at least.
Testing
Spawn food, drop it on ground and wait. The food will despawn once it has 2x of its shelf life worth of rot.
Do same with eggs. A bird will spawn on the spot where the egg was.
Additional context
It can take several tens of seconds for the chicken to spawn after the egg despawns. Some quirk of monster spawning.
Item despawning inside reality bubble will generate bunch of errors
I do not believe this error has anything to do with this feature. This error appears always when a processed item is despawned (for example zombie revives). See issues #39402 and #39451.