Fix: can't boat into AFK ally from radial menu (#3165)

## Description:

Fixes issue where you can't boat into an AFK/disconnected ally from the
radial menu:
https://www.youtube.com/clip/UgkxRXy2Y9BrmCiQRSFJnhVFanR5NRsG9pzu

## 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
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:

tryout33
This commit is contained in:
VariableVince
2026-02-09 22:00:51 +01:00
committed by evanpelle
parent b55f7dadbb
commit cceb7bd0fc
@@ -618,6 +618,7 @@ export const rootMenuElement: MenuElement = {
color: COLORS.info,
subMenu: (params: MenuElementParams) => {
const isAllied = params.selected?.isAlliedWith(params.myPlayer);
const isDisconnected = isDisconnectedTarget(params);
const tileOwner = params.game.owner(params.tile);
const isOwnTerritory =
@@ -629,9 +630,9 @@ export const rootMenuElement: MenuElement = {
...(isOwnTerritory
? [deleteUnitElement, allyRequestElement, buildMenuElement]
: [
isAllied ? allyBreakElement : boatMenuElement,
isAllied && !isDisconnected ? allyBreakElement : boatMenuElement,
allyRequestElement,
isFriendlyTarget(params) && !isDisconnectedTarget(params)
isFriendlyTarget(params) && !isDisconnected
? donateGoldRadialElement
: attackMenuElement,
]),