diff --git a/src/core/execution/Util.ts b/src/core/execution/Util.ts index a4a414e89..ed33836f5 100644 --- a/src/core/execution/Util.ts +++ b/src/core/execution/Util.ts @@ -119,7 +119,7 @@ export function listNukeBreakAlliance( // Also check if any allied structures would be destroyed game - .nearbyUnits(targetTile, magnitude.outer, [...StructureTypes]) + .nearbyUnits(targetTile, magnitude.outer, StructureTypes) .forEach(({ unit }) => playersToBreakAllianceWith.add(unit.owner().smallID()), ); diff --git a/src/core/game/Game.ts b/src/core/game/Game.ts index 5f17f2b01..26395acf5 100644 --- a/src/core/game/Game.ts +++ b/src/core/game/Game.ts @@ -793,7 +793,7 @@ export interface Game extends GameMap { nearbyUnits( tile: TileRef, searchRange: number, - types: UnitType | UnitType[], + types: UnitType | readonly UnitType[], predicate?: UnitPredicate, includeUnderConstruction?: boolean, ): Array<{ unit: Unit; distSquared: number }>; diff --git a/src/core/game/GameImpl.ts b/src/core/game/GameImpl.ts index 0f807e3d3..0339fdb33 100644 --- a/src/core/game/GameImpl.ts +++ b/src/core/game/GameImpl.ts @@ -895,7 +895,7 @@ export class GameImpl implements Game { nearbyUnits( tile: TileRef, searchRange: number, - types: UnitType | UnitType[], + types: UnitType | readonly UnitType[], predicate?: UnitPredicate, includeUnderConstruction?: boolean, ): Array<{ unit: Unit; distSquared: number }> { diff --git a/src/core/game/GameView.ts b/src/core/game/GameView.ts index 974874ad1..f02e0e10b 100644 --- a/src/core/game/GameView.ts +++ b/src/core/game/GameView.ts @@ -711,7 +711,7 @@ export class GameView implements GameMap { nearbyUnits( tile: TileRef, searchRange: number, - types: UnitType | UnitType[], + types: UnitType | readonly UnitType[], predicate?: UnitPredicate, ): Array<{ unit: UnitView; distSquared: number }> { return this.unitGrid.nearbyUnits(