feat: generate watabou preview links for villages (#1056)

Co-authored-by: Azgaar <azgaar.fmg@yandex.com>
This commit is contained in:
Azgaar 2024-03-14 13:56:12 +04:00 committed by GitHub
parent 56e6e47286
commit d6c3c46a5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 247 additions and 192 deletions

View file

@ -827,4 +827,20 @@ export function resolveVersionConflicts(version) {
});
});
}
if (version < 1.97) {
// v1.97.00 changed MFCG link to an arbitrary preview URL
options.villageMaxPopulation = 2000;
options.showBurgPreview = options.showMFCGMap;
delete options.showMFCGMap;
pack.burgs.forEach(burg => {
if (!burg.i || burg.removed) return;
if (burg.MFCG) {
burg.link = getBurgLink(burg);
delete burg.MFCG;
}
});
}
}