From ce416f877c92679d1275a55ecdd58dc7434ffca7 Mon Sep 17 00:00:00 2001 From: evanpelle Date: Mon, 9 Mar 2026 12:41:27 -0700 Subject: [PATCH] bugfix: don't show yellow alert frame when a bot is attacking --- src/client/graphics/layers/AlertFrame.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/client/graphics/layers/AlertFrame.ts b/src/client/graphics/layers/AlertFrame.ts index 407cd81ff..2b0238f1f 100644 --- a/src/client/graphics/layers/AlertFrame.ts +++ b/src/client/graphics/layers/AlertFrame.ts @@ -1,10 +1,11 @@ import { LitElement, css, html } from "lit"; import { customElement, state } from "lit/decorators.js"; +import { PlayerType } from "../../../core/game/Game"; import { BrokeAllianceUpdate, GameUpdateType, } from "../../../core/game/GameUpdates"; -import { GameView } from "../../../core/game/GameView"; +import { GameView, PlayerView } from "../../../core/game/GameView"; import { UserSettings } from "../../../core/game/UserSettings"; import { Layer } from "./Layer"; @@ -198,6 +199,12 @@ export class AlertFrame extends LitElement implements Layer { for (const attack of incomingAttacks) { // Only alert for non-retreating attacks if (!attack.retreating && !this.seenAttackIds.has(attack.id)) { + const attacker = this.game.playerBySmallID(attack.attackerID); + if ((attacker as PlayerView).type() === PlayerType.Bot) { + this.seenAttackIds.add(attack.id); + continue; + } + // Check if this is a retaliation (we attacked them recently) const ourAttackTick = this.outgoingAttackTicks.get(attack.attackerID); const isRetaliation =