mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
v1.5.53 - fix for active provinces linked to removed state
This commit is contained in:
parent
d3fe1899b3
commit
c2edda6a4a
2 changed files with 12 additions and 1 deletions
|
|
@ -209,7 +209,11 @@
|
|||
}
|
||||
|
||||
const generate = function(parent, kinship, dominion, type) {
|
||||
if (parent === "custom") parent = null;
|
||||
if (!parent || parent === "custom") {
|
||||
parent = null;
|
||||
kinship = 0;
|
||||
dominion = 0;
|
||||
}
|
||||
let usedPattern = null, usedTinctures = [];
|
||||
|
||||
const t1 = P(kinship) ? parent.t1 : getTincture("field");
|
||||
|
|
|
|||
|
|
@ -1144,6 +1144,13 @@ function parseLoadedData(data) {
|
|||
cells.i.filter(i => cells.burg[i] === b.i).forEach(i => cells.burg[i] = 0);
|
||||
cells.burg[b.cell] = b.i;
|
||||
});
|
||||
|
||||
pack.provinces.forEach(p => {
|
||||
if (!p.i || p.removed) return;
|
||||
if (pack.states[p.state] && !pack.states[p.state].removed) return;
|
||||
ERROR && console.error("Data Integrity Check. Province", p.i, "is linked to removed state", p.state);
|
||||
p.removed = true; // remove incorrect province
|
||||
});
|
||||
}()
|
||||
|
||||
changeMapSize();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue