Fix procedural mine mapgen overwriting exit location #1808
Merged
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.
Summary
SUMMARY: Bugfixes "Fixed procedural mine mapgen overwriting exit location"
Purpose of change
Fix #1643
Describe the solution
Shuffle to nearest
empty_rock
omt before starting placement.This means is some rare cases "bottom" procgenned parts can be disconnected from "top" procgenned parts, but that's better than current situation and should affect starting characters only.
Also fixed off-by-one position of mine shaft ladder to manhole exit.
Describe alternatives you've considered
Porting CleverRaven/Cataclysm-DDA#56555 would be ideal, but it uses mutable overmap specials which we don't have (I'd love to see them ported at some point as well though).
Testing
Teleported around the world, so no new mines generated with their -2 offloading room overwritten.