Skip to content

Warn on invalid victory faction#2730

Merged
daid merged 2 commits intodaid:masterfrom
oznogon:warn-on-invalid-victory-faction
Feb 19, 2026
Merged

Warn on invalid victory faction#2730
daid merged 2 commits intodaid:masterfrom
oznogon:warn-on-invalid-victory-faction

Conversation

@oznogon
Copy link
Contributor

@oznogon oznogon commented Feb 19, 2026

If neither side wins in Clash in Shangri-La, it attempts to declare victory for Independents, an invalid faction name (should be Independent). Fix this invalid faction name.

This changes the victory screen behavior for this outcome. Before, the game pauses with no victory message. After, the game pauses with a victory message for the Independent faction.

This behavior exposes another issue: functions used to find factions do not log when the passed faction name is invalid. Add warning logging when an invalid faction name is passed to Faction::find(), and error logging when an invalid faction name is passed to victory()

Example:

victory("Nobody")

results in no functional change in behavior, but adds logging to raise the issue:

[WARNING ]: Attempted to find faction named Nobody, but no faction name matched.
[ERROR   ]: Attempted to set victory faction to Nobody, but no faction name matched.

@oznogon oznogon force-pushed the warn-on-invalid-victory-faction branch from a3015cd to e95e2f0 Compare February 19, 2026 07:07
@daid daid merged commit a31cf9f into daid:master Feb 19, 2026
5 checks passed
@oznogon oznogon deleted the warn-on-invalid-victory-faction branch February 20, 2026 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants