1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-15 20:03:15 +02:00

Don't place shipyard or boats at very small lakes

This commit is contained in:
Tomasz Zieliński
2023-03-18 21:48:17 +01:00
parent f2dc9cb48e
commit 1d2913bea0

View File

@@ -143,6 +143,13 @@ RouteInfo WaterProxy::waterRoute(Zone & dst)
continue; continue;
} }
//Don't place shipyard or boats on the very small lake
if (lake.area.getTiles().size() < 25)
{
logGlobal->info("Skipping very small lake at zone %d", dst.getId());
continue;
}
int zoneTowns = 0; int zoneTowns = 0;
if(auto * m = dst.getModificator<TownPlacer>()) if(auto * m = dst.getModificator<TownPlacer>())
zoneTowns = m->getTotalTowns(); zoneTowns = m->getTotalTowns();