1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Merge pull request #1720 from vcmi/fix_small_lakes_clean

Don't place shipyard or boats at very small lakes
This commit is contained in:
Andrii Danylchenko
2023-03-19 19:52:22 +02:00
committed by GitHub

View File

@@ -142,6 +142,13 @@ RouteInfo WaterProxy::waterRoute(Zone & dst)
dst.areaPossible().subtract(lake.neighbourZones[dst.getId()]); dst.areaPossible().subtract(lake.neighbourZones[dst.getId()]);
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>())