[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
This commit is contained in:
Katokoda
2026-06-12 17:50:00 +02:00
committed by GitHub
parent 2e6f70c098
commit 27054bde83
+7 -3
View File
@@ -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) {