Opponent badge follows the day; Table and Stärken at the national desk
- Desktop: the opponent's badge sheet was loaded once when the screen
was built and kept while the state advanced, so the index of the new
opponent picked a badge from the old sheet (a foreign club's logo, the
wrong club for RB Leipzig). It is reloaded with every new state.
- National desk: the desk keeps the home club's key per manager (for
the hand-back), while Table, Stärken, Other games and the other pages
carry the identity of the runtime club (the national team). The
controller and flow compared the two and refused ("invalid Table
dispatch manager identity", "stale desktop identity"). DeskState now
gives session_identity_key() and the comparisons use it.
Refs #74.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7cfc8267b6
commit
b8a37353cc
5 files changed
+33
-14
No files matched your search
@@ -739,8 +739,17 @@ void DesktopScreen::acknowledge(DeskState updated) {
|
||||
Image next_badge = badge_;
|
||||
if ((updated.badge >> 3) != (state_.badge >> 3))
|
||||
next_badge = load_vga(asset_path(data_ / "W", std::to_string(updated.badge >> 3) + ".VGA"));
|
||||
// The opponent changes from day to day: its badge sheet (one W file holds eight badges) is
|
||||
// reloaded with the state, not kept from the day the screen was built.
|
||||
std::optional<Image> next_opponent_badge;
|
||||
if (updated.next_opponent && *updated.next_opponent >= 0 && updated.next_opponent_badge &&
|
||||
!updated.next_opponent_badge_fallback) {
|
||||
const int selector = *updated.next_opponent_badge & 0x1ff;
|
||||
next_opponent_badge = load_vga(asset_path(data_ / "W", std::to_string(selector >> 3) + ".VGA"));
|
||||
}
|
||||
shortcut_bar_visible_ = updated.shortcut_bar_always || shortcut_bar_edge_toggle_;
|
||||
state_ = std::move(updated); badge_ = std::move(next_badge);
|
||||
next_opponent_badge_ = std::move(next_opponent_badge);
|
||||
pending_.reset(); last_rejection_.clear();
|
||||
}
|
||||
void DesktopScreen::acknowledge_mailbox_parent(DeskState updated) {
|
||||
|
||||
Reference in new issue
Block a user