mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 13:40:46 +00:00
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:
@@ -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,
|
||||
]),
|
||||
|
||||
Reference in New Issue
Block a user