From 75ed62a3b3c1cbd8d840fd80444570df901d9951 Mon Sep 17 00:00:00 2001 From: variablevince <24507472+VariableVince@users.noreply.github.com> Date: Sun, 26 Oct 2025 10:27:13 +0100 Subject: [PATCH] Break --- src/core/game/PlayerImpl.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/core/game/PlayerImpl.ts b/src/core/game/PlayerImpl.ts index 522d2db39..181b7c361 100644 --- a/src/core/game/PlayerImpl.ts +++ b/src/core/game/PlayerImpl.ts @@ -903,6 +903,7 @@ export class PlayerImpl implements Player { transportShipFilter?: TransportShipFilter, ): BuildableUnit[] { const notInSpawnPhase = !this.mg.inSpawnPhase(); + let foundShip = false; const result: BuildableUnit[] = []; const validTiles = @@ -912,14 +913,19 @@ export class PlayerImpl implements Player { for (const u of Object.values(UnitType)) { if ( - (u === UnitType.TransportShip && - transportShipFilter === TransportShipFilter.Exclude) || - (u !== UnitType.TransportShip && - transportShipFilter === TransportShipFilter.Only) + u === UnitType.TransportShip && + transportShipFilter === TransportShipFilter.Exclude ) { continue; } + if (transportShipFilter === TransportShipFilter.Only) { + if (foundShip) break; + + if (u !== UnitType.TransportShip) continue; + else foundShip = true; + } + let canBuild: TileRef | false = false; let canUpgrade: number | false = false;