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
+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) {