Support 'alternative joins' in mutable overmap specials #52103
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
Infrastructure "Support 'alternative joins' in mutable overmap specials"
Purpose of change
Continuing to finish off the feature set of mutable overmap specials.
This is intended to be a solution to the 'fragmentary hallways` issue that could strike mutable microlabs, as seen in the screenshots of #52056.
Describe the solution
Add an
alternatives
feature in the overmap definitions for a mutable special which allows it to match a different type of join than the default for that edge.Based on the mutable microlab use case, the desirable semantics seem to be that these alternatives can be used when the overmap is first placed, but not thereafter when joining with later placements.
Describe alternatives you've considered
When initially designing this I didn't expect the asymmetry in use, whereby the alternatives can only be used on first placement, but that does seem to be neater in practice. Given that revision, maybe
alternatives
is not the right name for this feature, but I haven't come up with a better one.Testing
Adjusted the mutable microlab and its
TEST_DATA
variant to use the new feature and thereby made them neater.Additional context
Here's a screenshot of a couple of placements that would have led to 'fragmentary hallways' in the old definition, but now the hallways are clean.
The key is to arrange the phases such that all the hallway is placed first, with asymmetric joins ensuring it's not placed in a disconnected way, then place all the generic microlab tiles, using the new alternatives feature to ensure that they can be placed either next to the hallway or each other, without demanding new hallway.
@John-Candlebury thanks for being an early adopter. Hope you don't mind me messing with your special yet again. The microlab continues to inspire new features. But I think this might be the last one to resolve all the issues I was aware of.