From bf8d18937a99ea860da9bef40775b8b405551f21 Mon Sep 17 00:00:00 2001 From: evolvedexperiment <55178666+evolvedexperiment@users.noreply.github.com> Date: Tue, 19 Nov 2019 21:56:44 +0200 Subject: [PATCH] Fix for capitals in neutral lands (#370) * Fix for exit customization * Fix for capitals in neutral lands --- modules/ui/tools.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui/tools.js b/modules/ui/tools.js index 6ca0b93a..f3a3071d 100644 --- a/modules/ui/tools.js +++ b/modules/ui/tools.js @@ -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"} }); -} \ No newline at end of file +}