refactor: generate states cleanup

This commit is contained in:
max 2022-08-06 00:02:35 +03:00
parent c2fc0679ad
commit ff974a4fd0
16 changed files with 98 additions and 64 deletions

View file

@ -103,7 +103,7 @@ export function specifyBurgs(capitals: TCapitals, towns: TTowns, roadScores: Uin
if (stateId === 0) {
const baseCoa = COA.generate(null, 0, null, coaType);
const shield = COA.getShield(cultureId, stateId);
const shield = COA.getShield(cultureId, stateId, cultures, states);
return {...baseCoa, shield};
}
@ -111,7 +111,7 @@ export function specifyBurgs(capitals: TCapitals, towns: TTowns, roadScores: Uin
const kinship = defineKinshipToStateEmblem();
const baseCoa = COA.generate(stateCOA, kinship, null, coaType);
const shield = COA.getShield(cultureId, stateId);
const shield = COA.getShield(cultureId, stateId, cultures, states);
return {...baseCoa, shield};
function defineKinshipToStateEmblem() {