mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-10 10:24:37 +00:00
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:
@@ -523,7 +523,6 @@ export enum TerrainType {
|
||||
Plains,
|
||||
Highland,
|
||||
Mountain,
|
||||
Lake,
|
||||
Ocean,
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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[] {
|
||||
|
||||
Reference in New Issue
Block a user