diff --git a/index.html b/index.html index 8d0fd14a..8a342fa2 100644 --- a/index.html +++ b/index.html @@ -8005,7 +8005,7 @@ - + diff --git a/modules/ui/tools.js b/modules/ui/tools.js index e1d554da..5d9d0d40 100644 --- a/modules/ui/tools.js +++ b/modules/ui/tools.js @@ -361,10 +361,10 @@ function regenerateBurgs() { const score = new Int16Array(cells.s.map(s => s * Math.random())); // cell score for capitals placement const sorted = cells.i.filter(i => score[i] > 0 && cells.culture[i]).sort((a, b) => score[b] - score[a]); // filtered and sorted array of indexes + const existingStatesCount = states.filter(s => s.i && !s.removed).length; const burgsCount = - manorsInput.value === "1000" - ? rn(sorted.length / 5 / (grid.points.length / 10000) ** 0.8) + states.length - : +manorsInput.value + states.length; + (manorsInput.value === "1000" ? rn(sorted.length / 5 / (grid.points.length / 10000) ** 0.8) : +manorsInput.value) + + existingStatesCount; const spacing = (graphWidth + graphHeight) / 150 / (burgsCount ** 0.7 / 66); // base min distance between towns for (let i = 0; i < sorted.length && burgs.length < burgsCount; i++) { diff --git a/versioning.js b/versioning.js index 8d658c4f..27b2928c 100644 --- a/versioning.js +++ b/versioning.js @@ -1,7 +1,7 @@ "use strict"; // version and caching control -const version = "1.95.00"; // generator version, update each time +const version = "1.95.01"; // generator version, update each time { document.title += " v" + version;