From 39698be0773829de4ccf182f4fce2daa5eecdda3 Mon Sep 17 00:00:00 2001 From: Canis Artorus Date: Sun, 5 Mar 2023 20:59:46 -0700 Subject: [PATCH] version update; fix add wild folk --- index.html | 8 ++++---- modules/religions-generator.js | 6 +++--- modules/ui/editors.js | 2 +- versioning.js | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index a7892868..9f672e48 100644 --- a/index.html +++ b/index.html @@ -7864,10 +7864,10 @@ - + - + @@ -7882,11 +7882,11 @@ - + - + diff --git a/modules/religions-generator.js b/modules/religions-generator.js index 910a4655..bd3eb9a4 100644 --- a/modules/religions-generator.js +++ b/modules/religions-generator.js @@ -526,12 +526,12 @@ window.Religions = (function () { function parseLockedReligions() { // copy and sort the locked religions list - const lockedReligionQueue = [...lockedReligions].sort((a, b) => a.i - b.i).map(religion => { + const lockedReligionQueue = lockedReligions.map(religion => { // and filter their origins to locked religions let newOrigin = religion.origins.filter(n => lockedReligions.some(({i: index}) => index === n)); if (newOrigin === []) newOrigin = [0]; return {...religion, origins: newOrigin}; - }); + }).sort((a, b) => a.i - b.i); const highestLockedIndex = Math.max(...(lockedReligions.map(r => r.i))); const codes = lockedReligions.length > 0 ? lockedReligions.map(r => r.code) : []; @@ -719,7 +719,7 @@ window.Religions = (function () { const religionId = cells.religion[center]; const cultureId = cells.culture[center]; - const missingFolk = !religions.some(({type, culture, removed}) => type === "Folk" && culture === cultureId && !removed); + const missingFolk = cultureId !== 0 && !religions.some(({type, culture, removed}) => type === "Folk" && culture === cultureId && !removed); const color = missingFolk ? cultures[cultureId].color : getMixedColor(religions[religionId].color, 0.3, 0); diff --git a/modules/ui/editors.js b/modules/ui/editors.js index 1f110900..c0a09efc 100644 --- a/modules/ui/editors.js +++ b/modules/ui/editors.js @@ -1188,6 +1188,6 @@ async function editCultures() { async function editReligions() { if (customization) return; - const Editor = await import("../dynamic/editors/religions-editor.js?v=1.89.09"); + const Editor = await import("../dynamic/editors/religions-editor.js?v=1.89.10"); Editor.open(); } diff --git a/versioning.js b/versioning.js index 1598751a..15336b1f 100644 --- a/versioning.js +++ b/versioning.js @@ -1,7 +1,7 @@ "use strict"; // version and caching control -const version = "1.89.09"; // generator version, update each time +const version = "1.89.10"; // generator version, update each time { document.title += " v" + version;