must right click near coast for boat option

This commit is contained in:
evanpelle
2024-10-02 17:39:16 -07:00
parent 088e3a41ff
commit 1357787d82
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -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
+11
View File
@@ -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) {