mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 12:01:23 +01:00
Manual Add prefers to create missing Folk
This commit is contained in:
parent
a1901df0a5
commit
42b3e0b2bb
1 changed files with 4 additions and 3 deletions
|
|
@ -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" :
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue