From 5cb155267d32f0af011d8a04e0d3fef043a4313c Mon Sep 17 00:00:00 2001 From: evanpelle Date: Wed, 10 Jun 2026 16:00:29 -0700 Subject: [PATCH] Only notify on warship and transport ship destruction displayMessageOnDeleted fired a "Your {unit} was destroyed" message for nearly every unit type (denylisting only MIRV warheads and train cars), which spammed the event feed with low-stakes losses like ports, cities, and trade ships. Flip it to an allowlist: only surface destruction of warships and transport ships, the two losses with real tactical weight (lost naval control, lost army at sea). Everything else is either visible on the map or not worth a notification. --- src/core/game/UnitImpl.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/core/game/UnitImpl.ts b/src/core/game/UnitImpl.ts index 254ffca9f..46b38c7a3 100644 --- a/src/core/game/UnitImpl.ts +++ b/src/core/game/UnitImpl.ts @@ -308,11 +308,12 @@ export class UnitImpl implements Unit { } private displayMessageOnDeleted(): void { - if (this._type === UnitType.MIRVWarhead) { - return; - } - - if (this._type === UnitType.Train && this._trainType !== TrainType.Engine) { + // Only warships and transport ships are worth notifying about; everything + // else is either visible on the map or too low-stakes to surface. + if ( + this._type !== UnitType.Warship && + this._type !== UnitType.TransportShip + ) { return; }