Skip to content
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

Minifridges - Do not cool hot items. Unclear if they are on. #6145

Closed
Soyweiser opened this issue Feb 17, 2014 · 3 comments

Comments

Projects
None yet
4 participants
@Soyweiser
Copy link
Contributor

commented Feb 17, 2014

Minifridges have two bugs.
1: It is unclear if the minifridge is on. Ideally it would get a pop up menu just like the kitchen unit.
2: it is possible to put hot items in the fridge. And they stay hot (even with the fridge turned on). See: http://smf.cataclysmdda.com/index.php?topic=5386.0
The link above also reports that food still rots in a fridge that is turned one. But not 100% on sure on that one (I could not reproduce it, so could ahve been a power failure).

@KA101

This comment has been minimized.

Copy link
Contributor

commented Feb 17, 2014

It's a fridge, not a freezer. ;-) Stuff can still rot, it just takes longer.

@BevapDin

This comment has been minimized.

Copy link
Contributor

commented Feb 17, 2014

Items in fridges don't rot at all.

item::rotten (does the rotting):

if ( last_rot_check+10 < int(g->turn) ) {
    const int since = ( last_rot_check == 0 ? (int)bday : last_rot_check );
    const int until = ( fridge > 0 ? fridge : int(g->turn) );
    if ( since < until ) {
        rot += get_rot_since( since, until );
    }
    last_rot_check = int(g->turn);
    if (fridge > 0) {
        rot += (until - fridge) * 0.2;
        fridge = 0;
    }
}

item::fridge is set to 0 at the end and last_rot_check to T (the current turn), but later (in the very same turn T!) the game calls map::process_active_items which sets item::fridge back to the current turn (T). After 10 turns the rotten function is called again, since is set to last_rot_check (=T), and until is set to fridge (=T), which makes both if conditions false and therefor does never increase item::rot.

Can be tested: change the small storage battery of the Ice Cream Cart to the normal storage battery. Set spoils of meat to 1 (one hour), spawn the Ice Cream Cart, meat, active the fridge and put the (still fresh!) meat into the fridge. Now wait.

@i2amroy i2amroy added Bug labels Feb 17, 2014

Rivet-the-Zombie added a commit that referenced this issue Feb 18, 2014

origamiwolf added a commit to origamiwolf/DinoCataclysm that referenced this issue Feb 19, 2014

@KA101

This comment has been minimized.

Copy link
Contributor

commented Feb 23, 2014

Pretty confident BevapDin's fixed this one. Reopen if it persists?

@KA101 KA101 closed this Feb 23, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.