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.
IIRC, in 1.1 the default map gen settings were not specified (other than ore patches), so our system to build
redmew
surface relied on whitelisting new properties to make sand-only, grass-only maps.In 2.0, all properties are always listed by default, so whitelisting same properties would only overwrite existing ones, but fails at excluding those unwanted (i.e. passing the preset "grass_only" with whitelisted grass tiles would not have any effect as those are already enabled, and so are other unwanted tiles like sand...).
So I've added a check and if any of the map gen presets we're applying is blacklisting others (
treat_missing_as_default = false
) it will proceed to empty that property in the default's nauvis preset, so whitelisting would now work again.I'm not 100% convinced this is best practice (especially with mods, what if they already added their settings we're not accounting for?). On the other hand, this is how 1.1 worked, and if maps have very special needs needs regarding MGS, they will simply take care themselves and/or pass those additional parameters to the merge table.
So far I've tested it with a handful of our maps, modded and not, and everything seems to work as expected (some decoratives might seem off sometimes, maybe this will need further customization to pass decorative presets along with tile presets, but not a relevant issue imo).
I've tested it with these maps:
Here's a BEFORE --> AFTER w/ normal crash site (uses grass_only). Before it's just standard Nauvis, and after the changes it's effectively grass-only