feat: burg groups - image icons

This commit is contained in:
Azgaar 2025-01-02 14:14:00 +01:00
parent c29f3b73e8
commit 2f53a635c8
27 changed files with 225 additions and 211 deletions

View file

@ -615,12 +615,12 @@ async function parseLoadedData(data, mapVersion) {
console.error(
`[Data integrity] Neutral burgs (${capitalBurgs
.map(b => b.i)
.join(", ")}) marked as capitals. Moving them to towns`
.join(", ")}) marked as capitals. Moving them to town`
);
capitalBurgs.forEach(burg => {
burg.capital = 0;
moveBurgToGroup(burg.i, "towns");
moveBurgToGroup(burg.i, "town");
});
return;
@ -629,13 +629,13 @@ async function parseLoadedData(data, mapVersion) {
if (capitalBurgs.length > 1) {
const message = `[Data integrity] State ${state.i} has multiple capitals (${capitalBurgs
.map(b => b.i)
.join(", ")}) assigned. Keeping the first as capital and moving others to towns`;
.join(", ")}) assigned. Keeping the first as capital and moving others to town`;
ERROR && console.error(message);
capitalBurgs.forEach((burg, i) => {
if (!i) return;
burg.capital = 0;
moveBurgToGroup(burg.i, "towns");
moveBurgToGroup(burg.i, "town");
});
return;
@ -645,7 +645,7 @@ async function parseLoadedData(data, mapVersion) {
ERROR &&
console.error(`[Data integrity] State ${state.i} has no capital. Assigning the first burg as capital`);
stateBurgs[0].capital = 1;
moveBurgToGroup(stateBurgs[0].i, "cities");
moveBurgToGroup(stateBurgs[0].i, "city");
}
});