Fix for capitals in neutral lands

This commit is contained in:
Evolvedexperiment 2019-11-19 12:32:12 +00:00
parent ce40a8e2ec
commit 65f368f229

View file

@ -114,7 +114,7 @@ function regenerateBurgs() {
if (burgsTree.find(x, y, s) !== undefined) continue; // to close to existing burg
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;}
const culture = cells.culture[cell];
@ -497,4 +497,4 @@ function viewCellDetails() {
resizable: false, width: "22em", title: "Cell Details",
position: {my: "right top", at: "right-10 top+10", of: "svg", collision: "fit"}
});
}
}