mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-23 12:31:24 +01:00
FIX: incorrect province copy and minor fix of rebels
This commit is contained in:
parent
006ab7f329
commit
2b1dd01a1e
2 changed files with 2 additions and 1 deletions
1
main.js
1
main.js
|
|
@ -1695,6 +1695,7 @@ function addZones(number = 1) {
|
||||||
if (!state) return;
|
if (!state) return;
|
||||||
|
|
||||||
const neib = ra(state.neighbors.filter(n => n && !states[n].removed));
|
const neib = ra(state.neighbors.filter(n => n && !states[n].removed));
|
||||||
|
if (!neib) return;
|
||||||
const cell = cells.i.find(i => cells.state[i] === state.i && !state.removed && cells.c[i].some(c => cells.state[c] === neib));
|
const cell = cells.i.find(i => cells.state[i] === state.i && !state.removed && cells.c[i].some(c => cells.state[c] === neib));
|
||||||
const cellsArray = [],
|
const cellsArray = [],
|
||||||
queue = [],
|
queue = [],
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ window.Submap = (function () {
|
||||||
const validProvinces = new Set(pack.cells.province);
|
const validProvinces = new Set(pack.cells.province);
|
||||||
pack.provinces = parentMap.pack.provinces;
|
pack.provinces = parentMap.pack.provinces;
|
||||||
// mark uneccesary provinces
|
// mark uneccesary provinces
|
||||||
pack.states.forEach((s, i) => {
|
pack.provinces.forEach((s, i) => {
|
||||||
if (s.removed) return;
|
if (s.removed) return;
|
||||||
if (!validProvinces.has(i)) s.removed = true;
|
if (!validProvinces.has(i)) s.removed = true;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue