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

Add debug menu item for spawning nested mapgen #37788

Merged
merged 1 commit into from
Feb 7, 2020

Conversation

ralreegorganon
Copy link
Contributor

Summary

SUMMARY: Infrastructure "Add debug menu item for spawning nested mapgen"

Purpose of change

Makes it easier to develop and test nested mapgen by allowing them to be spawned from the debug menu.

Describe the solution

Add a new entry to the debug menu that lists all of the nested mapgens and allow selecting one, plus a target location to spawn it. Then load a map for that area and run the nested mapgen on it. Note that this code will get cleaner once we refactor all of mapgen to support multi-z-level and multi-omt mapgen, but for now nested mapgen can only target a single omt (and thus a single z-level), so to ensure this works we basically load a larger slice of map with a single z-level to run the nested mapgen on because the user selected location won't necessarily align to the omt grid and the nesting requires a single z-level.

Testing

Loaded the game and spawned a variety of nested mapgens (with things like NPCs and vehicles in addition to standard terrain and furniture) on various z-levels.

Additional context

5k4s5M9gEc

@ralreegorganon ralreegorganon added Map / Mapgen Overmap, Mapgen, Map extras, Map display [C++] Changes (can be) made in C++. Previously named `Code` labels Feb 7, 2020
@ashGlaw
Copy link
Contributor

ashGlaw commented Feb 7, 2020

Very interesting. What’s the expected use case?

@anothersimulacrum
Copy link
Member

People testing nested maps.

@ZhilkinSerg ZhilkinSerg merged commit a4cf065 into CleverRaven:master Feb 7, 2020
@ralreegorganon ralreegorganon deleted the nested-mapgen-debug branch April 7, 2020 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Map / Mapgen Overmap, Mapgen, Map extras, Map display
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants