mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-13 17:00:21 +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:
@@ -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 ||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user