mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
v1.5.8 - update river data on map load
This commit is contained in:
parent
fbec08f982
commit
49b9895b0b
3 changed files with 21 additions and 4 deletions
|
|
@ -1099,6 +1099,23 @@ function parseLoadedData(data) {
|
|||
});
|
||||
}
|
||||
|
||||
if (version < 1.59) {
|
||||
// v 1.6 changed rivers data
|
||||
for (const river of pack.rivers) {
|
||||
const el = document.getElementById("river"+river.i);
|
||||
if (el) {
|
||||
el.removeAttribute("data-width");
|
||||
el.removeAttribute("data-increment");
|
||||
river.widthFactor = +this.getAttribute("data-width");
|
||||
river.discharge = pack.cells.fl[river.mouth] || 1;
|
||||
river.width = rn(river.length / 100, 2);
|
||||
river.sourceWidth = .1;
|
||||
} else {
|
||||
Rivers.remove(river.i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}()
|
||||
|
||||
void function checkDataIntegrity() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue