Modern press journal: promotion, advertising, credit, stadium
The season change notes a human club's promotion or relegation; the confirmed commands note an advertising contract, a loan taken or paid off and a planned stand expansion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
651d262546
commit
055b48697e
5 files changed
+60
-3
No files matched your search
@@ -7,6 +7,7 @@
|
||||
#include <variant>
|
||||
|
||||
#include "formats/executable_layout.hpp"
|
||||
#include "game/schedule.hpp"
|
||||
#include "game/state.hpp"
|
||||
#include "modern/content/ui_contract.hpp"
|
||||
#include "modern/game/almanac.hpp"
|
||||
@@ -148,6 +149,23 @@ void journal_advance(ModernState& g, const ModernState& before) {
|
||||
else if (b.paid > 0) note_press(g, "toto.loss", id, O{{"team", press_team(g, team)}, {"amount", ui_money(b.paid)}});
|
||||
}
|
||||
// a new season
|
||||
// promotion and relegation: a human club's league at the new season (a lower index is the
|
||||
// higher league)
|
||||
const auto league_entity = [&](int league) {
|
||||
const std::string id = size_t(league) < g.world_league_id.size() && !g.world_league_id[size_t(league)].empty()
|
||||
? g.world_league_id[size_t(league)] : "league:" + std::to_string(league);
|
||||
const std::string name = size_t(league) < g.world_league_name.size() && !g.world_league_name[size_t(league)].empty()
|
||||
? g.world_league_name[size_t(league)] : "Liga " + std::to_string(league + 1);
|
||||
return J(O{{"id", id}, {"name", name}, {"kind", "league"}, {"season", season_text(g)}});
|
||||
};
|
||||
if (g.season != before.season)
|
||||
for (const std::string& club : clubs) {
|
||||
const int was_team = team_of_identity(before, club), team = team_of_identity(g, club);
|
||||
const int from = team_league(was_team), to = team_league(team);
|
||||
if (from == to || from >= kLeagueCount || to >= kLeagueCount) continue;
|
||||
note_press(g, to < from ? "league.promoted" : "league.relegated", ui_team_id(g, team),
|
||||
O{{"team", press_team(g, team)}, {"competition", league_entity(to)}, {"from", league_entity(from)}, {"season", season_text(g)}});
|
||||
}
|
||||
if (g.season != before.season)
|
||||
for (const std::string& club : human_clubs(g)) {
|
||||
const int team = team_of_identity(g, club);
|
||||
|
||||
@@ -12,8 +12,11 @@
|
||||
// - a kickoff (session.advance, also live): the squads of the human clubs before and after
|
||||
// give transfer.signed (with fromClub, or transfer.free from the pool), transfer.sold
|
||||
// (toClub) and contract.ended (to the pool); a new toto settlement gives toto.win /
|
||||
// toto.loss; a season change career.season_finished and career.season_started;
|
||||
// - confirmed commands: contract.extended (contract.offer), career.manager_resigned.
|
||||
// toto.loss; a season change career.season_finished and career.season_started, and a human
|
||||
// club in another league league.promoted / league.relegated;
|
||||
// - confirmed commands: contract.extended (contract.offer), advertising.signed
|
||||
// (advertising.accept), finance.loan_approved / finance.loan_repaid (bank.commit credit),
|
||||
// stadium.expansion_planned (a stand block, stadium.commit), career.manager_resigned.
|
||||
// Fees are not known from the squads: the transfer events carry no fee (the renderer's
|
||||
// fee-undisclosed variants).
|
||||
|
||||
|
||||
Reference in new issue
Block a user