Bind the kickoff of the Modern desk to the engine and show its recording in the ticker

The kickoff button sends session.advance; the engine's recording of the
played matchday is shaped for the live ticker (phases, per-match tables,
the desk manager's squad). A contract running out on the way asks the
manager to extend at the player's demand or to release him. The UI script
driver accepts optional clicks, and modern_live_dump writes the engine's
recording for inspection.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-14 00:05:04 +01:00
1 parent 9e92d07b03
commit 7c0e66affe
15 files changed
+447 -30

No files matched your search

+4 -1
View File
@@ -3,6 +3,7 @@
#include "modern/ui/demo_career.hpp"
#include "modern/ui/demo_lineup.hpp"
#include "modern/ui/demo_sports.hpp"
#include "modern/ui/engine_live.hpp"
#include <algorithm>
#include <array>
#include <map>
@@ -215,6 +216,8 @@ Json make_demo_live(const Catalog &world, const Json &state, uint64_t revision)
bool valid_live_fixture(const Json &v) {
try {
// A recording of the engine has its own, engine-shaped rules.
if (v.is_object() && v.value("source", "") == "engine-recording") return valid_engine_live_fixture(v);
if (!v.is_object() || !v.value("ok", false) || v.at("schema") != "openbmh-live-fixture@1" ||
v.at("source") != "ui-demo-fixture" || !v.at("fixture_id").is_string() ||
!uint_value(v.at("source_revision"), UINT64_MAX) || !v.at("owners").is_array() ||
@@ -383,7 +386,7 @@ bool LivePlayback::cycle_owner(int direction) {
}
Json LivePlayback::frame() const { return available() ? live_fixture_frame(fixture_, sequence_) : failure("live_unavailable"); }
Json LivePlayback::status() const {
return {{"source", available() ? Json("ui-demo-fixture") : Json()}, {"available", available()},
return {{"source", available() ? fixture_.at("source") : Json()}, {"available", available()},
{"fixture_id", available() ? fixture_.at("fixture_id") : Json()},
{"source_revision", available() ? fixture_.at("source_revision") : Json()},
{"sequence", sequence_}, {"speed", speed_}, {"owner", owner_}, {"finished", finished()}};