routes: fold sky/flying exclusion into guard; ui: remove redundant false arg in createMfcgLink call

This commit is contained in:
barrulus 2025-09-05 21:20:22 +01:00
parent c9b1a141f1
commit 7292c73d10
2 changed files with 2 additions and 3 deletions

View file

@ -74,9 +74,8 @@ window.Routes = (function () {
};
for (const burg of burgs) {
if (burg.i && !burg.removed) {
if (burg.i && !burg.removed && !burg.flying && !burg.skyPort) {
// Exclude flying / sky port burgs from land road/trail graphs
if (burg.flying || burg.skyPort) continue;
const {feature, capital, port} = burg;
addBurg(burgsByFeature, feature, burg);

View file

@ -366,7 +366,7 @@ function getBurgLink(burg) {
const population = burg.population * populationRate * urbanization;
if (population >= options.villageMaxPopulation || burg.citadel || burg.walls || burg.temple || burg.shanty)
return createMfcgLink(burg, false);
return createMfcgLink(burg);
return createVillageGeneratorLink(burg);
}