mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 10:31:24 +01:00
refactor: specify burgs
This commit is contained in:
parent
aa6cefb683
commit
7f57c9af65
14 changed files with 151 additions and 45 deletions
|
|
@ -250,7 +250,11 @@ export function open({type, id, el}) {
|
|||
parent = province ? pack.provinces[province] : pack.states[el.state];
|
||||
}
|
||||
|
||||
const shield = el.coa.shield || COA.getShield(el.culture || parent?.culture || 0, el.state);
|
||||
const cultureId = el.culture || parent?.culture || 0;
|
||||
const cultureShield = cultures[cultureId].shield;
|
||||
const stateShield = states[el.state]?.coa?.shield;
|
||||
|
||||
const shield = el.coa.shield || COA.getPackShield(cultureShield, stateShield);
|
||||
el.coa = COA.generate(parent ? parent.coa : null, 0.3, 0.1, null);
|
||||
el.coa.shield = shield;
|
||||
emblemShapeSelector.disabled = false;
|
||||
|
|
|
|||
|
|
@ -1168,7 +1168,7 @@ function adjustProvinces(affectedProvinces) {
|
|||
const kinship = nameByBurg ? 0.8 : 0.4;
|
||||
const type = BurgsAndStates.getType(center, burg?.port);
|
||||
const coa = COA.generate(burg?.coa || states[stateId].coa, kinship, burg ? null : 0.9, type);
|
||||
coa.shield = COA.getShield(culture, stateId);
|
||||
coa.shield = COA.getPackShield(culture, stateId);
|
||||
|
||||
provinces.push({
|
||||
i: newProvinceId,
|
||||
|
|
@ -1270,7 +1270,7 @@ function addState() {
|
|||
// generate emblem
|
||||
const cultureType = pack.cultures[culture].type;
|
||||
const coa = COA.generate(burgs[burg].coa, 0.4, null, cultureType);
|
||||
coa.shield = COA.getShield(culture, null);
|
||||
coa.shield = COA.getPackShield(culture, null);
|
||||
|
||||
// update diplomacy and reverse relations
|
||||
const diplomacy = states.map(s => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue