mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 00:21:55 +00:00
Merge branch 'main' of https://github.com/openfrontio/OpenFrontIO into meta3
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
|
||||
|
||||
@@ -148,7 +148,7 @@ export class DefaultConfig implements Config {
|
||||
return 0.5;
|
||||
}
|
||||
traitorDuration(): number {
|
||||
return 30 * 10; // 30 seconds
|
||||
return 15 * 10; // 15 seconds
|
||||
}
|
||||
spawnImmunityDuration(): Tick {
|
||||
return 5 * 10;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -148,6 +148,10 @@ export function bestShoreDeploymentSource(
|
||||
player: Player,
|
||||
target: TileRef,
|
||||
): TileRef | null {
|
||||
target = targetTransportTile(gm, target);
|
||||
if (target == null) {
|
||||
return null;
|
||||
}
|
||||
let closestManhattanDistance = Infinity;
|
||||
let minX = Infinity,
|
||||
minY = Infinity,
|
||||
|
||||
Reference in New Issue
Block a user