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),