From 27054bde835a9af85a7baa0fb4b593fe65edef0c Mon Sep 17 00:00:00 2001 From: Katokoda <79760461+Katokoda@users.noreply.github.com> Date: Fri, 12 Jun 2026 17:50:00 +0200 Subject: [PATCH] [FIX] Filters actionable events to remove dead requestors (#4238) Resolves #4220 ## Description: Filters `ActionableEvents` to remove dead requestors. ## 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 - [ ] I have added relevant tests to the test directory **I do not know how** to create and then kill a player in `tests/client/graphics/layers/ActionableEventsAlliance.test.ts`. ## Please put your Discord username so you can be contacted if a bug or regression is found: Katokoda --- src/client/hud/layers/ActionableEvents.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/client/hud/layers/ActionableEvents.ts b/src/client/hud/layers/ActionableEvents.ts index 3782dd2aa..ae2c604a2 100644 --- a/src/client/hud/layers/ActionableEvents.ts +++ b/src/client/hud/layers/ActionableEvents.ts @@ -120,10 +120,14 @@ export class ActionableEvents extends LitElement implements Controller { (event.duration === undefined || this.game.ticks() - event.createdAt < event.duration) && (event.type !== MessageType.ALLIANCE_REQUEST || - // We remove Alliance Requests if the requestor is no longer requesting an alliance with us. - ( + // We remove Alliance Requests if the requestor is dead. + (( this.game.playerBySmallID(event.requestorID) as PlayerView - ).isRequestingAllianceWith(this.game.myPlayer() as PlayerView)), + ).isAlive() && + // We remove Alliance Requests if the requestor is no longer requesting an alliance with us. + ( + this.game.playerBySmallID(event.requestorID) as PlayerView + ).isRequestingAllianceWith(this.game.myPlayer() as PlayerView))), ); if (this.events.length !== remainingEvents.length) {