The stadium has a name of its own, and the name can be sold
A manager renames his stadium on the stadium page. On the advertising page three sponsors offer to buy the name for one to five years; the sponsor pays with every month change, the stadium is called after him, and until the contract ends it can be neither renamed nor sold again. The match sheet shows the name. Engine: naming_rights.hpp; read stadium (name, nameEditable, namingRights, namingOffers), commands stadium.rename and stadium.namingRights, live read stadiumName; saved in state/modern.json. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
83bd96c1ff
commit
2639f37def
26 files changed
+507
-9
No files matched your search
@@ -193,7 +193,13 @@ void save_world_career(const std::filesystem::path& path, const World& world, co
|
||||
rows.push_back(O{{"assets", m.assets}, {"place", int64_t(m.place)}, {"voted_season", int64_t(m.voted_season)}});
|
||||
return J(std::move(rows));
|
||||
}()},
|
||||
{"dismissals", state.dismissals}});
|
||||
{"dismissals", state.dismissals},
|
||||
{"stadiums", [&] {
|
||||
A rows;
|
||||
for (const auto& s : state.stadiums)
|
||||
rows.push_back(O{{"name", s.name}, {"sponsor", int64_t(s.sponsor)}, {"monthly", int64_t(s.monthly)}, {"months", int64_t(s.months)}});
|
||||
return J(std::move(rows));
|
||||
}()}});
|
||||
// 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);
|
||||
@@ -270,6 +276,14 @@ SavedWorldCareer load_world_career(const std::filesystem::path& path, const Worl
|
||||
if (const auto it = o->find("dismissals"); it != o->end() && std::holds_alternative<bool>(it->second.value))
|
||||
out.state.dismissals = std::get<bool>(it->second.value);
|
||||
}
|
||||
// stadium names and naming rights (since 17 November 2026)
|
||||
if (o->count("stadiums"))
|
||||
for (const J& row : arr(get(modern, "stadiums"))) {
|
||||
ModernState::StadiumName s;
|
||||
s.name = str(get(row, "name")), s.sponsor = uint8_t(num(get(row, "sponsor"))), s.monthly = uint32_t(num(get(row, "monthly"))), s.months = uint16_t(num(get(row, "months")));
|
||||
if (s.name.size() > 40 || s.months > 60 || (s.months && s.sponsor > 9)) fail("invalid stadium name");
|
||||
out.state.stadiums.push_back(std::move(s));
|
||||
}
|
||||
if (o->count("career_end_reason")) {
|
||||
out.state.career_end_reason = str(get(modern, "career_end_reason"));
|
||||
out.state.career_end_date = uint32_t(num(get(modern, "career_end_date")));
|
||||
|
||||
Reference in new issue
Block a user