From 1d5da8042c747aa8aa365bd2a31eab58784cf758 Mon Sep 17 00:00:00 2001 From: deploy Date: Fri, 29 May 2026 17:22:45 +0000 Subject: [PATCH] fix: use raw squadron tag for win/loss comparison, not resolved short name My earlier change to use squadron_short (resolved clean name, e.g. DSPLA) for display broke the win/loss header colour: winning_team is the raw replay value (e.g. -DSPLA-) so the comparison never matched, rendering both teams as losers. Split into squadron_raw (comparison) vs squadron_short (display text) so each uses the right value. Co-Authored-By: Claude Sonnet 4.6 --- BOT/scoreboard.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/BOT/scoreboard.py b/BOT/scoreboard.py index 38c5527..f736e36 100644 --- a/BOT/scoreboard.py +++ b/BOT/scoreboard.py @@ -458,7 +458,10 @@ def _create_scoreboard_sync(match_details, # --- 1) Squadron header & points --- - squadron_short = team_data.get("squadron_short") or team_data.get("squadron", "Unknown") + # squadron_raw: used for win/loss comparison against winning_team (raw replay value) + # squadron_short: resolved clean name used for display only + squadron_raw = team_data.get("squadron", "Unknown") + squadron_short = team_data.get("squadron_short") or squadron_raw squadron_long = team_data.get("squadron_long", "Unknown") matched_diff_source = None squad_diffs = None @@ -504,7 +507,7 @@ def _create_scoreboard_sync(match_details, if is_draw: fill = Draw_fill else: - fill = Positive_Points_fill if squadron_short == winning_team else Negative_Points_fill + fill = Positive_Points_fill if squadron_raw == winning_team else Negative_Points_fill gap = 30 if not flipped: