mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
fix #1152
This commit is contained in:
parent
c795ac6c30
commit
26b659a59e
5 changed files with 18 additions and 15 deletions
|
|
@ -8,7 +8,10 @@ window.Cultures = (function () {
|
|||
cells = pack.cells;
|
||||
|
||||
const cultureIds = new Uint16Array(cells.i.length); // cell cultures
|
||||
let count = Math.min(+culturesInput.value, +culturesSet.selectedOptions[0].dataset.max);
|
||||
|
||||
const culturesInputNumber = +byId("culturesInput").value;
|
||||
const culturesInSetNumber = +byId("culturesSet").selectedOptions[0].dataset.max;
|
||||
let count = Math.min(culturesInputNumber, culturesInSetNumber);
|
||||
|
||||
const populated = cells.i.filter(i => cells.s[i]); // populated cells
|
||||
if (populated.length < count * 25) {
|
||||
|
|
|
|||
|
|
@ -558,10 +558,10 @@ function applyStoredOptions() {
|
|||
if (key.slice(0, 5) === "style") applyOption(stylePreset, key, key.slice(5));
|
||||
}
|
||||
|
||||
if (stored("winds")) options.winds = localStorage.getItem("winds").split(",").map(Number);
|
||||
if (stored("temperatureEquator")) options.temperatureEquator = +localStorage.getItem("temperatureEquator");
|
||||
if (stored("temperatureNorthPole")) options.temperatureNorthPole = +localStorage.getItem("temperatureNorthPole");
|
||||
if (stored("temperatureSouthPole")) options.temperatureSouthPole = +localStorage.getItem("temperatureSouthPole");
|
||||
if (stored("winds")) options.winds = stored("winds").split(",").map(Number);
|
||||
if (stored("temperatureEquator")) options.temperatureEquator = +stored("temperatureEquator");
|
||||
if (stored("temperatureNorthPole")) options.temperatureNorthPole = +stored("temperatureNorthPole");
|
||||
if (stored("temperatureSouthPole")) options.temperatureSouthPole = +stored("temperatureSouthPole");
|
||||
if (stored("military")) options.military = JSON.parse(stored("military"));
|
||||
|
||||
if (stored("tooltipSize")) changeTooltipSize(stored("tooltipSize"));
|
||||
|
|
|
|||
|
|
@ -513,8 +513,8 @@ function regenerateEmblems() {
|
|||
|
||||
function regenerateReligions() {
|
||||
Religions.generate();
|
||||
if (layerIsOn("toggleReligions")) drawReligions();
|
||||
else toggleReligions();
|
||||
|
||||
layerIsOn("toggleReligions") ? drawReligions() : toggleReligions();
|
||||
refreshAllEditors();
|
||||
}
|
||||
|
||||
|
|
@ -523,8 +523,8 @@ function regenerateCultures() {
|
|||
Cultures.expand();
|
||||
BurgsAndStates.updateCultures();
|
||||
Religions.updateCultures();
|
||||
if (!layerIsOn("toggleCultures")) toggleCultures();
|
||||
else drawCultures();
|
||||
|
||||
layerIsOn("toggleCultures") ? drawCultures() : toggleCultures();
|
||||
refreshAllEditors();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue