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

Fix item temperature processing in ice labs #39813

Merged
merged 4 commits into from
Apr 22, 2020

Conversation

Hirmuolio
Copy link
Contributor

@Hirmuolio Hirmuolio commented Apr 22, 2020

Summary

SUMMARY: Bugfixes "Fix temperature processing in ice labs"

Purpose of change

Fixes #39778

Describe the solution

Rottable items on floor are processed on map load by map::remove_rotten_items. This processing used wrong coordinate. The temperature code didn't like that coordinate and would just always return 0 as the temperature modifier.

Describe alternatives you've considered

Testing

Skipping time in ice lab, coming from far to ice lab after skipping time and going down stairs to ice lab after skipping time work with z-levels on and off.

Additional context

There is still a smaller bug: When z-levels are off g->m.get_temperature( pos ) gives the temperature of wrong z-level for items processed by map::remove_rotten_items if the player changes z-level on that turn (with stairs, does not happen with debug teleport).

So when you go from above ground (level 0, temperature modifier -20) to underground (level -1, temperature modifier -50) the items on the below ground floor get their temperatures processed with temperature modifier -20 instead of -50.

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Mechanics: Temperature Freezing, cooling, thawing, heating, etc. mechanics labels Apr 22, 2020
@ZhilkinSerg ZhilkinSerg merged commit e0d2716 into CleverRaven:master Apr 22, 2020
@Hirmuolio Hirmuolio deleted the icelab branch May 5, 2020 12:33
kevingranade pushed a commit that referenced this pull request Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Mechanics: Temperature Freezing, cooling, thawing, heating, etc. mechanics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Food rotting in ice labs again (0.E)
2 participants