From 763dbb4190211d346b1074b731ca129d733fb6d0 Mon Sep 17 00:00:00 2001 From: FloPinguin <25036848+FloPinguin@users.noreply.github.com> Date: Wed, 10 Jun 2026 20:35:47 +0200 Subject: [PATCH] Remove isLake method and TerrainType.Lake enum value --- src/client/hud/NameBoxCalculator.ts | 1 - src/client/theme/PastelTheme.ts | 3 +-- src/client/theme/PastelThemeDark.ts | 3 +-- src/client/view/GameView.ts | 3 --- src/core/game/Game.ts | 1 - src/core/game/GameImpl.ts | 3 --- src/core/game/GameMap.ts | 7 +------ 7 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/client/hud/NameBoxCalculator.ts b/src/client/hud/NameBoxCalculator.ts index 811f499f1c..14158594c9 100644 --- a/src/client/hud/NameBoxCalculator.ts +++ b/src/client/hud/NameBoxCalculator.ts @@ -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 || diff --git a/src/client/theme/PastelTheme.ts b/src/client/theme/PastelTheme.ts index b11e5d01e9..df975b75b5 100644 --- a/src/client/theme/PastelTheme.ts +++ b/src/client/theme/PastelTheme.ts @@ -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; diff --git a/src/client/theme/PastelThemeDark.ts b/src/client/theme/PastelThemeDark.ts index 7ffde57351..d4c5bed3cd 100644 --- a/src/client/theme/PastelThemeDark.ts +++ b/src/client/theme/PastelThemeDark.ts @@ -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; diff --git a/src/client/view/GameView.ts b/src/client/view/GameView.ts index 2103db2f61..8a83cf9ca9 100644 --- a/src/client/view/GameView.ts +++ b/src/client/view/GameView.ts @@ -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); } diff --git a/src/core/game/Game.ts b/src/core/game/Game.ts index 82349f1693..6a8170f30e 100644 --- a/src/core/game/Game.ts +++ b/src/core/game/Game.ts @@ -523,7 +523,6 @@ export enum TerrainType { Plains, Highland, Mountain, - Lake, Ocean, } diff --git a/src/core/game/GameImpl.ts b/src/core/game/GameImpl.ts index 6670d8584b..65a250b28b 100644 --- a/src/core/game/GameImpl.ts +++ b/src/core/game/GameImpl.ts @@ -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); } diff --git a/src/core/game/GameMap.ts b/src/core/game/GameMap.ts index be403dcf18..b872c3eafc 100644 --- a/src/core/game/GameMap.ts +++ b/src/core/game/GameMap.ts @@ -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[] {