Manual Add prefers to create missing Folk

This commit is contained in:
Canis Artorus 2023-03-04 03:16:33 -07:00
parent a1901df0a5
commit 42b3e0b2bb

View file

@ -708,12 +708,13 @@ window.Religions = (function () {
} }
const add = function (center) { const add = function (center) {
const {cells, religions} = pack; const {cells, cultures, religions} = pack;
const religionId = cells.religion[center]; const religionId = cells.religion[center];
const cultureId = cells.culture[center]; const cultureId = cells.culture[center];
const color = getMixedColor(religions[religionId].color, 0.3, 0); const missingFolk = !religions.some(({type, culture, removed}) => type === "Folk" && culture === cultureId && !removed);
const missingFolk = !religions.some(({type, culture}) => type === "Folk" && culture === cultureId); const color = missingFolk ? cultures[cultureId].color
: getMixedColor(religions[religionId].color, 0.3, 0);
const type = const type =
missingFolk ? "Folk" : missingFolk ? "Folk" :