From 42b3e0b2bba08ed9961926d3e0c39d5b6041db4c Mon Sep 17 00:00:00 2001 From: Canis Artorus Date: Sat, 4 Mar 2023 03:16:33 -0700 Subject: [PATCH] Manual Add prefers to create missing Folk --- modules/religions-generator.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/religions-generator.js b/modules/religions-generator.js index 57c6790c..ae60a19b 100644 --- a/modules/religions-generator.js +++ b/modules/religions-generator.js @@ -708,12 +708,13 @@ window.Religions = (function () { } const add = function (center) { - const {cells, religions} = pack; + const {cells, cultures, religions} = pack; const religionId = cells.religion[center]; const cultureId = cells.culture[center]; - const color = getMixedColor(religions[religionId].color, 0.3, 0); - const missingFolk = !religions.some(({type, culture}) => type === "Folk" && culture === cultureId); + const missingFolk = !religions.some(({type, culture, removed}) => type === "Folk" && culture === cultureId && !removed); + const color = missingFolk ? cultures[cultureId].color + : getMixedColor(religions[religionId].color, 0.3, 0); const type = missingFolk ? "Folk" :