mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 02:21:24 +01:00
refactor: fix burgId issue
This commit is contained in:
parent
ec6285a7a4
commit
bc98757b96
8 changed files with 62 additions and 41 deletions
|
|
@ -29,7 +29,7 @@ export function specifyBurgs(
|
|||
): TBurgs {
|
||||
TIME && console.time("specifyBurgs");
|
||||
|
||||
const burgs = [...capitals, ...towns].map(burgData => {
|
||||
const burgs = [...capitals, ...towns].map((burgData, index) => {
|
||||
const {cell, culture, capital} = burgData;
|
||||
const state = stateIds[cell];
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ export function specifyBurgs(
|
|||
const type = defineType(cell, port, population);
|
||||
const coa: ICoa = defineEmblem(state, culture, port, capital, type, cultures, states);
|
||||
|
||||
const burg: IBurg = {...burgData, state, port, population, x, y, type, coa};
|
||||
const burg: IBurg = {i: index + 1, ...burgData, state, port, population, x, y, type, coa};
|
||||
return burg;
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue