mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-17 01:00:06 +00:00
Enable eslint rule @stylistic/ts/indent (#1779)
## Description: Enable eslint rule `@stylistic/ts/indent`. Fixes #1778 ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced
This commit is contained in:
@@ -57,13 +57,13 @@ export async function createGameRunner(
|
||||
const nations = gameStart.config.disableNPCs
|
||||
? []
|
||||
: gameMap.manifest.nations.map(
|
||||
(n) =>
|
||||
new Nation(
|
||||
new Cell(n.coordinates[0], n.coordinates[1]),
|
||||
n.strength,
|
||||
new PlayerInfo(n.name, PlayerType.FakeHuman, null, random.nextID()),
|
||||
),
|
||||
);
|
||||
(n) =>
|
||||
new Nation(
|
||||
new Cell(n.coordinates[0], n.coordinates[1]),
|
||||
n.strength,
|
||||
new PlayerInfo(n.name, PlayerType.FakeHuman, null, random.nextID()),
|
||||
),
|
||||
);
|
||||
|
||||
const game: Game = createGame(
|
||||
humans,
|
||||
|
||||
@@ -455,8 +455,8 @@ export class FakeHumanExecution implements Execution {
|
||||
const tiles =
|
||||
type === UnitType.Port
|
||||
? Array.from(this.player.borderTiles()).filter((t) =>
|
||||
this.mg.isOceanShore(t),
|
||||
)
|
||||
this.mg.isOceanShore(t),
|
||||
)
|
||||
: Array.from(this.player.tiles());
|
||||
if (tiles.length === 0) return null;
|
||||
return this.random.randElement(tiles);
|
||||
|
||||
@@ -43,9 +43,9 @@ export class RailroadExecution implements Execution {
|
||||
railType:
|
||||
tiles.length > 0
|
||||
? this.computeExtremityDirection(
|
||||
tiles[tiles.length - 1],
|
||||
tiles[tiles.length - 2],
|
||||
)
|
||||
tiles[tiles.length - 1],
|
||||
tiles[tiles.length - 2],
|
||||
)
|
||||
: RailType.VERTICAL,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,19 +11,19 @@ export enum PathFindResultType {
|
||||
}
|
||||
export type AStarResult<NodeType> =
|
||||
| {
|
||||
type: PathFindResultType.NextTile;
|
||||
node: NodeType;
|
||||
}
|
||||
type: PathFindResultType.NextTile;
|
||||
node: NodeType;
|
||||
}
|
||||
| {
|
||||
type: PathFindResultType.Pending;
|
||||
}
|
||||
type: PathFindResultType.Pending;
|
||||
}
|
||||
| {
|
||||
type: PathFindResultType.Completed;
|
||||
node: NodeType;
|
||||
}
|
||||
type: PathFindResultType.Completed;
|
||||
node: NodeType;
|
||||
}
|
||||
| {
|
||||
type: PathFindResultType.PathNotFound;
|
||||
};
|
||||
type: PathFindResultType.PathNotFound;
|
||||
};
|
||||
|
||||
export type Point = {
|
||||
x: number;
|
||||
|
||||
Reference in New Issue
Block a user