I'm sure you know more about how the engine works. But I was wondering if you have considered this approach: Store the time item was spawned/ dropped and the current global temperature. How long the food should last in current temp should be predefined in a table ex: 4°C 3 days, 0°C 6 days. And the game by default checks for spoiled status one by one ( to mitigate load) every 12 hours. Or maybe even better only updates the spoiled status by checking the dropped time and reference from table to determine if it has been longer than the fresh duration. If it has change status and it could be set to update only when the player interacts with the item or maybe if is within a certain tile limit. Kind of like how terraria's tree growth works. And since the player can have limited items at hand anyway the performance cost of tracking maybe those items in real time would be managable or if that's too much the above method could be used with inventory too? Then again I'm no expert on the engine. I'd like to know your thoughts.