Allow aliasing extendable lake shore terrain #32724
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: Infrastructure "Allow aliasing extendable lake shore terrain"
Purpose of change
The lakes I added in #30442 have procedurally generated shores, which will also utilize the mapgen of a subset of overmap terrains if they are adjacent to the shore in order to "extend" that mapgen right up to the water (e.g. if the shore is next to a forest, then the forest will be extended up to the water).
If someone wants to put a cabin on a forested island in a lake, a reasonable mapgen entry might be the single cabin overmap terrain surrounded by lake shore. However, because that cabin isn't listed in the "extendable lake shore terrain", the lake shores will just default back to normal regional ground cover. If the user were to list the cabin terrain in the "extendable lake shore terrain", it still wouldn't have the desired effect since the game would just try to put a cabin on every adjacent lake shore.
What we really want is the ability to tell mapgen that the cabin should be treated like a forest for the purposes of extending the overmap terrains to lake shores...so I did that.
Describe the solution
Added a new section in the lake regional settings where overmap terrain matching rules and aliases can be defined.
Updated the lake shore mapgen to utilize these aliases when determining which overmap terrain to extend to the water.
Additional context
Suppose we make a new overmap terrain, have it specify
"predecessor_mapgen": "forest_thick"
and then place it in the lake surrounded on all sides by lake shore. Here's a look at the result before and after this change.before this change
after this change