fix: Remove FFA collusion warnings on replay and ranked (#4414) (#4434)

> **Before opening a PR:** discuss new features on
[Discord](https://discord.gg/K9zernJB5z) first, and file bugs or small
improvements as
[issues](https://github.com/openfrontio/OpenFrontIO/issues/new/choose).
You must be assigned to an `approved` issue — unsolicited PRs will be
auto-closed.

**Add approved & assigned issue number here:**

Resolves #4414 

## Description:

The 2 lines added check whether it's a replay or a ranked game. If so,
don't show the FFA collusion warning

## Please complete the following:

- [X] I have added screenshots for all UI updates (couldn't sign in via
the dev server)
- [X] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [X] I have added relevant tests to the test directory

## Please put your Discord username so you can be contacted if a bug or
regression is found:

lents (not in the development server yet, sent request to join)
This commit is contained in:
Antonio Lentini
2026-06-28 15:34:39 +02:00
committed by GitHub
parent c622e8581c
commit d42b095304
+3 -1
View File
@@ -1,6 +1,6 @@
import { LitElement, html } from "lit";
import { customElement, state } from "lit/decorators.js";
import { GameMode, GameType } from "../../../core/game/Game";
import { GameMode, GameType, RankedType } from "../../../core/game/Game";
import { GameUpdateType } from "../../../core/game/GameUpdates";
import { Controller } from "../../Controller";
import { translateText } from "../../Utils";
@@ -195,6 +195,8 @@ export class HeadsUpMessage extends LitElement implements Controller {
`
: null}
${this.game?.inSpawnPhase() &&
!this.game.config().isReplay() &&
this.game.config().gameConfig().rankedType !== RankedType.OneVOne &&
this.game.config().gameConfig().gameMode === GameMode.FFA &&
this.game.config().gameConfig().gameType === GameType.Public &&
!this.hasClosedCollusionWarning