mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
fix: remove old feature masks, v1.108.0
This commit is contained in:
parent
e39ca793f2
commit
764993b680
5 changed files with 49 additions and 42 deletions
|
|
@ -963,7 +963,6 @@ export function resolveVersionConflicts(mapVersion) {
|
|||
defs.select("#land").selectAll("path, use").remove();
|
||||
defs.select("#water").selectAll("path, use").remove();
|
||||
viewbox.select("#coastline").selectAll("path, use").remove();
|
||||
drawFeatures();
|
||||
|
||||
// v1.104.0 introduced bugs with state borders
|
||||
regions
|
||||
|
|
@ -983,4 +982,16 @@ export function resolveVersionConflicts(mapVersion) {
|
|||
if (layerIsOn("toggleMarkers")) drawMarkers();
|
||||
if (layerIsOn("toggleMilitary")) drawMilitary();
|
||||
}
|
||||
|
||||
if (isOlderThan("1.108.0")) {
|
||||
// v1.108.0 changed features rendering method
|
||||
pack.features.forEach(f => {
|
||||
// fix lakes with missing group
|
||||
if (f?.type === "lake" && !f.group) f.group = "freshwater";
|
||||
});
|
||||
drawFeatures();
|
||||
|
||||
// some old maps has incorrect "heights" groups
|
||||
viewbox.selectAll("#heights").remove();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue