Show the world's UTF-8 names in the Modern console

club_text/player_text replace the console's utf8(g.club_name(..)) and
utf8(g.player_name(..)); in openbmh_modern_cli they give the world's
names (players with first names), in openbmh_cli the engine's names as
before. The Modern session resolves the matchday results with the
world's club names. The live match keeps a pointer to the session state
type, so the names are read from the full Modern state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-24 14:51:41 +02:00
1 parent ce79697b20
commit 3dbaea294a
11 files changed
+57 -31

No files matched your search

+3 -2
View File
@@ -4468,8 +4468,9 @@ TurnAdvanceResult ModernSession::dispatch_kickoff(const ui::DeskRequest& request
// transition. The result view must keep the identities of the played event.
std::vector<std::string> names;
names.reserve(g_.club_ids.size());
for (size_t team = 0; team < g_.club_ids.size(); ++team)
names.push_back(ui::original_to_utf8(g_.club_name(int(team))));
for (size_t team = 0; team < g_.club_ids.size(); ++team) // a Modern world's UTF-8 names first
names.push_back(team < g_.world_club_name.size() && !g_.world_club_name[team].empty()
? g_.world_club_name[team] : ui::original_to_utf8(g_.club_name(int(team))));
const bool had_results = turn_driver_.last_results.valid;
const uint32_t previous_result_date = turn_driver_.last_results.date;
const uint32_t previous_day = g_.date;