Remove unused areaLand and areaWater areas

areaLand and areaWater were created with a MapBoundsPlacer, which
evaluates the tileclass constraint on every tile of the map. However,
createArea only has an effect if either a painter is specified or the
returned Area is used. Here no painter was passed and the returned
values were never read, so these calls did nothing except waste time.
This commit is contained in:
Fabio Pedretti authored and Phosit committed 2026-10-15 16:55:16 +02:00
1 parent f5bcb3fcaa
commit 79c0a48ce3
1 file changed
-12
@@ -294,18 +294,6 @@ function placeDocks(template, playerID, count, tileClassWater, tileClassDock, he
undefined,
stayClasses(tileClassWater, 20));
g_Map.log("Marking land area");
const areaLand = createArea(
new MapBoundsPlacer(),
undefined,
avoidClasses(tileClassWater, 0));
g_Map.log("Marking water area");
const areaWater = createArea(
new MapBoundsPlacer(),
undefined,
stayClasses(tileClassWater, 0));
if (!areaSearchEnd || !areaSearchEnd.getPoints().length)
return;