diff --git a/TODO.txt b/TODO.txt index 5319da25a..b05075bd2 100644 --- a/TODO.txt +++ b/TODO.txt @@ -154,7 +154,7 @@ * add request attack other players DONE 10/2/2024 * Improve alliance icon DONE 10/2/2024 * BUG: center button should be disabled select island DONE 10/2/2024 -* BUG: boat icon appears when click inland +* BUG: boat icon appears when click inland DONE 10/2/2024 * BUG: double tap zooms on mobile * Make fake humans spawn by their country * add emoji button diff --git a/src/client/graphics/layers/RadialMenu.ts b/src/client/graphics/layers/RadialMenu.ts index ab75fd27c..55469ca7a 100644 --- a/src/client/graphics/layers/RadialMenu.ts +++ b/src/client/graphics/layers/RadialMenu.ts @@ -305,6 +305,17 @@ export class RadialMenu implements Layer { return } + let nearOcean = false + for (const t of bfs(tile, and(t => t.owner() == tile.owner() && t.isLand(), dist(tile, 25)))) { + if (t.isOceanShore()) { + nearOcean = true + break + } + } + if (!nearOcean) { + return + } + if (myPlayerBordersOcean && otherPlayerBordersOcean) { const [src, dst] = sourceDstOceanShore(this.game, myPlayer, other, this.clickedCell) if (src != null && dst != null) {