mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
Fix for capitals in neutral lands (#370)
* Fix for exit customization * Fix for capitals in neutral lands
This commit is contained in:
parent
ff31bd5eaa
commit
bf8d18937a
1 changed files with 2 additions and 2 deletions
|
|
@ -114,7 +114,7 @@ function regenerateBurgs() {
|
||||||
if (burgsTree.find(x, y, s) !== undefined) continue; // to close to existing burg
|
if (burgsTree.find(x, y, s) !== undefined) continue; // to close to existing burg
|
||||||
|
|
||||||
const state = cells.state[cell];
|
const state = cells.state[cell];
|
||||||
const capital = !states[state].capital; // if state doesn't have capital, make this burg a capital
|
const capital = state > 0 ? !states[state].capital : 0; // if state doesn't have capital, make this burg a capital, no capital for neutral lands
|
||||||
if (capital) {states[state].capital = id; states[state].center = cell;}
|
if (capital) {states[state].capital = id; states[state].center = cell;}
|
||||||
|
|
||||||
const culture = cells.culture[cell];
|
const culture = cells.culture[cell];
|
||||||
|
|
@ -497,4 +497,4 @@ function viewCellDetails() {
|
||||||
resizable: false, width: "22em", title: "Cell Details",
|
resizable: false, width: "22em", title: "Cell Details",
|
||||||
position: {my: "right top", at: "right-10 top+10", of: "svg", collision: "fit"}
|
position: {my: "right top", at: "right-10 top+10", of: "svg", collision: "fit"}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue