mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-21 19:41:23 +01:00
Setup cultureTree after map load
This commit is contained in:
parent
be19212557
commit
55ef878480
1 changed files with 7 additions and 2 deletions
|
|
@ -278,6 +278,7 @@ function fantasyMap() {
|
|||
makeFileFromUrl(decodeURIComponent(mapLink)).then(blob => {
|
||||
uploadFile(blob);
|
||||
manorsAndRegions(); // namesBase global state
|
||||
cleanData();
|
||||
})
|
||||
} else {
|
||||
applyNamesData(); // apply default namesbase on load
|
||||
|
|
@ -7049,8 +7050,12 @@ function fantasyMap() {
|
|||
points = JSON.parse(data[1]);
|
||||
cells = JSON.parse(data[2]);
|
||||
manors = JSON.parse(data[3]);
|
||||
if (data[7]) cultures = JSON.parse(data[7]);
|
||||
if (data[7] === undefined) generateCultures();
|
||||
if (data[7]) {
|
||||
cultures = JSON.parse(data[7]);
|
||||
cultureTree = d3.quadtree(cultures.map(c => c.center));
|
||||
} else {
|
||||
generateCultures();
|
||||
}
|
||||
if (data[11]) notes = JSON.parse(data[11]);
|
||||
|
||||
// place random point
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue