mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 18:41:23 +01:00
feat: zones - auto-update
This commit is contained in:
parent
26c608402c
commit
fdf0d163a8
2 changed files with 12 additions and 1 deletions
|
|
@ -928,6 +928,16 @@ export function resolveVersionConflicts(mapVersion) {
|
||||||
|
|
||||||
if (isOlderThan("1.100.0")) {
|
if (isOlderThan("1.100.0")) {
|
||||||
// v1.100.00 added zones to pack data
|
// v1.100.00 added zones to pack data
|
||||||
zones.stlye("display", "none");
|
pack.zones = [];
|
||||||
|
zones.selectAll("g").each(function () {
|
||||||
|
const i = pack.zones.length;
|
||||||
|
const name = this.dataset.description;
|
||||||
|
const type = this.dataset.type;
|
||||||
|
const color = this.getAttribute("fill");
|
||||||
|
const cells = this.dataset.cells.split(",").map(Number);
|
||||||
|
pack.zones.push({i, name, type, cells, color});
|
||||||
|
});
|
||||||
|
zones.style("display", null).selectAll("*").remove();
|
||||||
|
if (layerIsOn("toggleZones")) drawZones();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ const VERSION = "1.100.00";
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<strong>Latest changes:</strong>
|
<strong>Latest changes:</strong>
|
||||||
|
<li>Zones update</li>
|
||||||
<li>Notes Editor: on-demand AI text generation</li>
|
<li>Notes Editor: on-demand AI text generation</li>
|
||||||
<li>New style preset: Dark Seas</li>
|
<li>New style preset: Dark Seas</li>
|
||||||
<li>New routes generation algorithm</li>
|
<li>New routes generation algorithm</li>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue