Remove lakes from the game 🌊 (#4214)

## Description:

Nametags look weird here because on the left is a lake:

<img width="954" height="765" alt="Screenshot 2026-06-10 170116"
src="https://github.com/user-attachments/assets/2b679a68-fab3-458e-8e29-e12b9a4f281b"
/>

I removed isLake from the nametag position calculation

Because isLake was unused then, I removed it completely.

Full changelog:

- Remove isLake() from GameMap interface, GameMapImpl, GameImpl, and
GameView
- Remove TerrainType.Lake enum value
- terrainType() now returns Ocean for all water tiles (previously
distinguished lake vs ocean, but nothing treated them differently)
- Remove Lake case from PastelTheme and PastelThemeDark (already fell
through to Ocean)
- Exclude lakes from nametag placement grid in NameBoxCalculator

Maybe as a next step also remove lakes metadata from the map generator?

AI Model used: MiMo 2.5 Pro

## Please complete the following:

- [X] I have added screenshots for all UI updates
- [X] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [X] I have added relevant tests to the test directory

## Please put your Discord username so you can be contacted if a bug or
regression is found:

FloPinguin
This commit is contained in:
FloPinguin
2026-06-10 22:20:52 +02:00
committed by GitHub
parent f17ca9bd65
commit 3aaf0ea05d
7 changed files with 3 additions and 18 deletions
-1
View File
@@ -122,7 +122,6 @@ export function createGrid(
if (game.isOnMap(cell)) {
const tile = game.ref(cell.x, cell.y);
grid[x - scaledBoundingBox.min.x][y - scaledBoundingBox.min.y] =
game.isLake(tile) ||
game.isShore(tile) ||
(game.isOcean(tile) && game.magnitude(tile) < 10) ||
game.owner(tile) === player ||
+1 -2
View File
@@ -143,8 +143,7 @@ export class PastelTheme implements Theme {
return this.shore;
}
switch (gm.terrainType(tile)) {
case TerrainType.Ocean:
case TerrainType.Lake: {
case TerrainType.Ocean: {
const w = this.water.rgba;
if (gm.isShoreline(tile) && gm.isWater(tile)) {
return this.shorelineWater;
+1 -2
View File
@@ -24,8 +24,7 @@ export class PastelThemeDark extends PastelTheme {
return this.darkShore;
}
switch (gm.terrainType(tile)) {
case TerrainType.Ocean:
case TerrainType.Lake: {
case TerrainType.Ocean: {
const w = this.darkWater.rgba;
if (gm.isShoreline(tile) && gm.isWater(tile)) {
return this.darkShorelineWater;
-3
View File
@@ -1057,9 +1057,6 @@ export class GameView implements GameMap {
isWater(ref: TileRef): boolean {
return this._map.isWater(ref);
}
isLake(ref: TileRef): boolean {
return this._map.isLake(ref);
}
isShore(ref: TileRef): boolean {
return this._map.isShore(ref);
}
-1
View File
@@ -523,7 +523,6 @@ export enum TerrainType {
Plains,
Highland,
Mountain,
Lake,
Ocean,
}
-3
View File
@@ -1149,9 +1149,6 @@ export class GameImpl implements Game {
isWater(ref: TileRef): boolean {
return this._map.isWater(ref);
}
isLake(ref: TileRef): boolean {
return this._map.isLake(ref);
}
isShore(ref: TileRef): boolean {
return this._map.isShore(ref);
}
+1 -6
View File
@@ -37,7 +37,6 @@ export interface GameMap {
isBorder(ref: TileRef): boolean;
neighbors(ref: TileRef): TileRef[];
isWater(ref: TileRef): boolean;
isLake(ref: TileRef): boolean;
isShore(ref: TileRef): boolean;
cost(ref: TileRef): number;
terrainType(ref: TileRef): TerrainType;
@@ -311,10 +310,6 @@ export class GameMapImpl implements GameMap {
return !this.isLand(ref);
}
isLake(ref: TileRef): boolean {
return !this.isLand(ref) && !this.isOcean(ref);
}
isShore(ref: TileRef): boolean {
return this.isLand(ref) && this.isShoreline(ref);
}
@@ -332,7 +327,7 @@ export class GameMapImpl implements GameMap {
if (magnitude < 20) return TerrainType.Highland;
return TerrainType.Mountain;
}
return this.isOcean(ref) ? TerrainType.Ocean : TerrainType.Lake;
return TerrainType.Ocean;
}
neighbors(ref: TileRef): TileRef[] {