Read the referee pool from the world (M5, data format F9)
Referees are staff rows with role referee. Imported ones keep their original property byte; added ones (attributes strictness and the new perception, 0-3 each) follow the 49 originals in table order, up to 255. The matchday draw uses the pool size; a second match per day remains the fallback when the pool runs out. The season sim gains MODERN_EXTRA_REFEREES=N for testing before data revision 1.4 exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
28b59d9890
commit
57d75ab2f5
8 files changed
+100
-12
No files matched your search
@@ -597,7 +597,10 @@ ModernSession::ModernSession(const std::filesystem::path& data, uint32_t watcom_
|
||||
g_ = modern::startup_state(exe_, db_, read_file(data / "M3.MEN"), read_file(data / "M3.DAT"));
|
||||
// A Modern world: give the Classic start the dimensions and data of the world (M3).
|
||||
if (std::getenv("MODERN_DEBUG")) std::fprintf(stderr, "session: classic start built\n");
|
||||
if (const World* world = current_world()) world_report_ = expand_to_world(g_, *world);
|
||||
if (const World* world = current_world()) {
|
||||
world_report_ = expand_to_world(g_, *world);
|
||||
install_world_referees(db_.raw_referee_properties, *world);
|
||||
}
|
||||
if (std::getenv("MODERN_DEBUG")) std::fprintf(stderr, "session: world expanded\n");
|
||||
if (const auto resource = content::find(data)) {
|
||||
g_.display_start_year = resource->content->start_year;
|
||||
@@ -648,6 +651,9 @@ ModernSession::ModernSession(const std::filesystem::path &data, uint32_t watcom_
|
||||
// A Modern career: the save names its world; the dimensions come from the world.
|
||||
auto saved = load_world_career(save_path, *world);
|
||||
install_world_dimensions(*world);
|
||||
install_world_referees(db_.raw_referee_properties, *world);
|
||||
if (saved.state.master_database_metadata.size() != db_.raw_referee_properties.size() * 2)
|
||||
throw FormatError("the save and its world disagree on the referees");
|
||||
g_ = std::move(saved.state);
|
||||
rand_ = saved.random;
|
||||
game_ = saved.game;
|
||||
|
||||
Reference in new issue
Block a user