mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 03:53:49 +00:00
Fixes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { NukeMagnitude } from "../configuration/Config";
|
||||
import { Game, Player } from "../game/Game";
|
||||
import { Game, Player, UnitType } from "../game/Game";
|
||||
import { euclDistFN, GameMap, TileRef } from "../game/GameMap";
|
||||
import { GameView } from "../game/GameView";
|
||||
|
||||
@@ -119,7 +119,7 @@ export function listNukeBreakAlliance(
|
||||
|
||||
// Also check if any allied structures would be destroyed
|
||||
game
|
||||
.nearbyUnits(targetTile, magnitude.outer, this.game.getStructureTypes())
|
||||
.nearbyUnits(targetTile, magnitude.outer, [...game.getStructureTypes()])
|
||||
.forEach(({ unit }) =>
|
||||
playersToBreakAllianceWith.add(unit.owner().smallID()),
|
||||
);
|
||||
|
||||
@@ -780,6 +780,7 @@ export interface Game extends GameMap {
|
||||
): Array<{ unit: Unit; distSquared: number }>;
|
||||
getStructureTypes(): readonly UnitType[];
|
||||
isStructureType(type: UnitType): boolean;
|
||||
getPlayerBuildableUnitTypes(): readonly UnitType[];
|
||||
|
||||
addExecution(...exec: Execution[]): void;
|
||||
displayMessage(
|
||||
|
||||
Reference in New Issue
Block a user