Modern UI contract: national line-up and tactics

The national coach's desk reads the national team's line-up and tactics
(the original's desk has them) instead of no_club, and lineup.commit
prepares the national board without the clubs' designated set-piece
extension, whose records the national team has not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-29 09:11:04 +01:00
1 parent 1e88304019
commit c361dccd34
3 files changed
+30 -4

No files matched your search

+7 -3
View File
@@ -6126,10 +6126,11 @@ bool ModernSession::dispatch_lineup(const ui::LineupRequest& request, uint64_t&
prepare_lineup_entry(staged, request.runtime_club); // PrepareLineupEntry.
modern::open_lineup_screen(staged, active); // OpenBMH deviates from the original: supports designated set-piece record initialization and validation.
// supported rule profile NormalizePitchSetPieceSource entry initialization.
if (!initialize_pitch_set_piece_source(staged, active, request.runtime_club))
// (the designated set-piece takers are a club extension: the national team has none)
if (request.runtime_club != no_team() && !initialize_pitch_set_piece_source(staged, active, request.runtime_club))
throw std::runtime_error("set-piece set-piece record did not validate");
const uint32_t display=uint32_t(::bmh::layout::CareerSession_AnyOf_ExecutableField+active*2);
if(staged.memory.has(display)&&(staged.memory.u16(display)&0x80)&&
if(request.runtime_club!=no_team()&&staged.memory.has(display)&&(staged.memory.u16(display)&0x80)&&
!normalize_pitch_set_piece_source(staged,active,request.runtime_club))
throw std::runtime_error("set-piece reentry redraw did not validate");
} catch (const std::exception& e) {
@@ -9061,7 +9062,10 @@ cli::Json ModernSession::ui_read(const cli::Json& request, uint64_t revision) co
{"tables", std::move(tables)}});
}
const int team = g_.manager_teams[size_t(manager)];
if (team < 0 || team >= league_clubs())
// the national coach has his team's line-up and tactics as well (the original's desk); the
// club views (bank, contracts, stadium, ...) are not his
const bool national_view = team == no_team() && (kind == "lineup" || kind == "tactics");
if (!national_view && (team < 0 || team >= league_clubs()))
return modern::ui_error(request_id, "no_club", "Am Schreibtisch des Bundestrainers gibt es das nicht.", revision, false);
if (kind == "lineup") {
// the squad rows in order: the first eleven start (+0x8000), the bench (+0x4000) follows;