[small-fix 20 lines] Add FFA collusion warning#4107
Conversation
WalkthroughThis PR adds a heads-up warning message to inform new players that pre-game collusion is not permitted in FFA mode. The warning displays during spawn phase and includes a new English translation string defining the message content. ChangesFFA Collusion Warning Feature
Estimated Code Review Effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/client/hud/layers/HeadsUpMessage.ts`:
- Around line 185-186: In HeadsUpMessage.render (class HeadsUpMessage) guard
access to this.game before calling its methods: change the FFA warning condition
to first verify this.game exists (e.g. this.game && this.game.inSpawnPhase()) or
otherwise short-circuit when this.game is undefined; update any related checks
in render that reference this.game (including the spawn-phase/FFA expression and
any places that set isVisible via getMessage()) so initial Lit renders before
the controller injects game do not dereference this.game.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 69673d03-3983-445e-9d40-84f37d8e0ed4
📒 Files selected for processing (2)
resources/lang/en.jsonsrc/client/hud/layers/HeadsUpMessage.ts
| </div> | ||
| ` | ||
| : null} | ||
| ${this.game.inSpawnPhase() && |
There was a problem hiding this comment.
we should add a close button and only show this to a player once.
|
Also might be worth slightly softening the wording, so it sounds like a tip rather than a warning? Even just a "Remember: " at the start |
Resolves #3900
Description:
During the spawn phase in FFA games, display a collusion warning to clearly communicate to new users that pre-game agreement is not allowed.

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