From d9a178221a21f1f135b7d8e0804762a23298abe5 Mon Sep 17 00:00:00 2001 From: Scott Anderson <662325+scottanderson@users.noreply.github.com> Date: Sun, 24 Aug 2025 21:36:25 -0400 Subject: [PATCH] format --- eslint.config.js | 5 ++++- src/client/graphics/layers/EventsDisplay.ts | 4 ++-- tests/AllianceRequestExecution.test.ts | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 7df719abe..12faeab62 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -99,7 +99,10 @@ export default [ "function-call-argument-newline": ["error", "consistent"], "max-depth": ["error", { max: 5 }], "max-len": ["error", { code: 120 }], - "max-lines": ["error", { max: 677, skipBlankLines: true, skipComments: true }], + "max-lines": [ + "error", + { max: 677, skipBlankLines: true, skipComments: true }, + ], "max-lines-per-function": ["error", { max: 561 }], "no-loss-of-precision": "error", "no-multi-spaces": "error", diff --git a/src/client/graphics/layers/EventsDisplay.ts b/src/client/graphics/layers/EventsDisplay.ts index 498dc77e6..f1bd977be 100644 --- a/src/client/graphics/layers/EventsDisplay.ts +++ b/src/client/graphics/layers/EventsDisplay.ts @@ -470,13 +470,13 @@ export class EventsDisplay extends LitElement implements Layer { }, ], createdAt: this.game.ticks(), - priority: 0, duration: this.game.config().allianceRequestDuration() - 20, // 2 second buffer + focusID: update.requestorID, + priority: 0, shouldDelete: (game) => { // Recipient sent a separate request, so they became allied without the recipient responding. return requestor.isAlliedWith(recipient); }, - focusID: update.requestorID, }); } diff --git a/tests/AllianceRequestExecution.test.ts b/tests/AllianceRequestExecution.test.ts index b6df1e657..21bae3903 100644 --- a/tests/AllianceRequestExecution.test.ts +++ b/tests/AllianceRequestExecution.test.ts @@ -1,7 +1,7 @@ -import { Game, Player, PlayerType } from "../src/core/game/Game"; -import { playerInfo, setup } from "./util/Setup"; import { AllianceRequestExecution } from "../src/core/execution/alliance/AllianceRequestExecution"; import { AllianceRequestReplyExecution } from "../src/core/execution/alliance/AllianceRequestReplyExecution"; +import { Game, Player, PlayerType } from "../src/core/game/Game"; +import { playerInfo, setup } from "./util/Setup"; let game: Game; let player1: Player; @@ -13,8 +13,8 @@ describe("AllianceRequestExecution", () => { "plains", { infiniteGold: true, - instantBuild: true, infiniteTroops: true, + instantBuild: true, }, [ playerInfo("player1", PlayerType.Human),