mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 15:20:15 +00:00
bugfix: have radial menu check canBuild when checking if boating allowed
This commit is contained in:
@@ -380,7 +380,8 @@ export class RadialMenu implements Layer {
|
||||
});
|
||||
}
|
||||
if (
|
||||
actions.buildableUnits.some((bu) => bu.type == UnitType.TransportShip)
|
||||
actions.buildableUnits.find((bu) => bu.type == UnitType.TransportShip)
|
||||
?.canBuild
|
||||
) {
|
||||
this.activateMenuElement(Slot.Boat, "#3f6ab1", boatIcon, () => {
|
||||
// BestTransportShipSpawn is an expensive operation, so
|
||||
|
||||
@@ -43,7 +43,7 @@ import { andFN, manhattanDistFN, TileRef } from "./GameMap";
|
||||
import { AttackUpdate, GameUpdateType, PlayerUpdate } from "./GameUpdates";
|
||||
import { TerraNulliusImpl } from "./TerraNulliusImpl";
|
||||
import {
|
||||
bestShoreDeploymentSource as bestTranpsortShipSpawn,
|
||||
bestShoreDeploymentSource,
|
||||
canBuildTransportShip,
|
||||
} from "./TransportShipUtils";
|
||||
import { UnitImpl } from "./UnitImpl";
|
||||
@@ -1017,7 +1017,7 @@ export class PlayerImpl implements Player {
|
||||
}
|
||||
|
||||
bestTransportShipSpawn(targetTile: TileRef): TileRef | false {
|
||||
return bestTranpsortShipSpawn(this.mg, this, targetTile);
|
||||
return bestShoreDeploymentSource(this.mg, this, targetTile);
|
||||
}
|
||||
|
||||
// It's a probability list, so if an element appears twice it's because it's
|
||||
|
||||
Reference in New Issue
Block a user