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 mysterious creation of submap (0,0,-9). #36582

Merged
merged 3 commits into from
Dec 31, 2019

Conversation

BevapDin
Copy link
Contributor

SUMMARY: None

I was wondering why my save had a map folder ("save/World/maps/0.0.0") for the map at (0,0,0), through I was never even near that coordinate. Even more perplexing, it has a folder for the coordinate (0,0,-9), but no folder for the maps around those. How were those maps created? And why? It's probably aliens, but I wanted to know which aliens.

Turns out this comes from automatically calculating "recipes". Here is the back trace:

The really funny thing is the comment at the top of tinymap::fake_load:

// set up a map just long enough scribble on it
// this tinymap should never, ever get saved

It than proceeds to call generate_uniform, which explicitly calls MAPBUFFER.add_submap (which is basically saving the submap).

It even checks that the submap created by that function was properly registered within the MAPBUFFER by looking it up again.

If the key does not exist in the map, it is added its value is automatically initialized anyway.
Much simpler and does not need magic values.

fixup iterationg
The class takes care of storing the temporary submaps (and deleting them) and it will also not save them into the global mapbuffer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants