Modern: the traffic access has four stages

The Modern interface shows four stages for the traffic access, the original
has three. A Modern world (WorldLayout::traffic_stages = 4) keeps the
condition byte in steps of 64 (64, 128, 192, 255) and offers a build up to
stage 3; every stage weighs as one original stage. New careers convert the
original start table, older Modern saves are converted on load
(traffic_scale). Classic data keeps three stages; the Classic equivalence is
unchanged. Also: the live ticker takes the matches from the desk day on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-27 09:53:31 +01:00
1 parent fda4b72967
commit 0046ab90d0
18 files changed
+154 -16

No files matched your search

+3 -1
View File
@@ -138,7 +138,8 @@ void save_world_career(const std::filesystem::path& path, const World& world, co
{"exclusive_sponsors", sponsors_json(state.exclusive_sponsors)},
{"career_id", state.career_id},
{"manager_ids", strings(state.manager_ids)},
{"manager_serial", int64_t(state.manager_serial)}});
{"manager_serial", int64_t(state.manager_serial)},
{"traffic_scale", int64_t(state.traffic_scale)}});
// The almanac: finished seasons unchanged, the running one encoded now.
for (const auto& [name, bytes] : state.almanac.finished) docs[name] = bytes;
if (state.almanac.current.season >= 0) docs["history/current.bin"] = encode_almanac_season(state.almanac.current);
@@ -193,6 +194,7 @@ SavedWorldCareer load_world_career(const std::filesystem::path& path, const Worl
out.state.career_id = str(get(modern, "career_id"));
out.state.manager_ids = strings(get(modern, "manager_ids"));
out.state.manager_serial = uint32_t(num(get(modern, "manager_serial")));
if (o->count("traffic_scale")) out.state.traffic_scale = uint8_t(num(get(modern, "traffic_scale")));
}
for (const auto& [name, bytes] : docs) {
if (!name.starts_with("history/season-")) continue;