This commit is contained in:
Azgaar 2019-09-28 15:10:53 +03:00
parent 729d91c053
commit 35b3e9dd9c
18 changed files with 621 additions and 171 deletions

View file

@ -108,7 +108,7 @@ function regenerateBurgs() {
const state = cells.state[cell];
const capital = !states[state].capital; // if state doesn't have capital, make this burg a capital
if (capital) {states[state].capital = id; states[state].cell = cell;}
if (capital) {states[state].capital = id; states[state].center = cell;}
const culture = cells.culture[cell];
const name = Names.getCulture(culture);
@ -121,6 +121,7 @@ function regenerateBurgs() {
states.filter(s => s.i && !s.removed && !s.capital).forEach(s => {
const burg = addBurg([cells.p[s.center][0], cells.p[s.center][1]]); // add new burg
s.capital = burg;
s.center = pack.burgs[burg].cell;
pack.burgs[burg].capital = true;
pack.burgs[burg].state = s.i;
moveBurgToGroup(burg, "cities");