Added a directory to station maps #31156
Merged
+152
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About the PR
This PR adds a directory to the station map UI, with buttons that center the map screen on the selected beacon. This is ported from the downstream fork Imp Station 14.
Why / Balance
Big stations are a mess to navigate. Trying to pick out a specific area on the map is difficult, if it even exists at all (some maps don't mark Cryosleep!).
This will make playing new maps far less difficult, as you can easily see what is available, and search for specific areas.
Technical details
When the UI opens, it will loop through all the enabled beacons on the map and create buttons that will recenter onto the beacon's offset when clicked. This menu does not adjust if beacons are removed/renamed/recolored, but it does not cause any errors if this happens.
Buttons in the menu are first sorted by converting the color to a 4 byte integer and sorting that, effectively "grouping" beacons with similar colors together. If beacons are the same color, they are then sorted alphabetically.
Media
map-directory.mp4
Requirements
Breaking changes
Changelog
🆑 TGRCDev