Modern press journal: finished stand blocks
When a stand block's construction weeks run out at a kickoff, the journal notes stadium.expansion_finished with the stadium's places. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
706577d002
commit
98e6982d07
4 files changed
+26
-2
No files matched your search
@@ -169,6 +169,27 @@ void journal_advance(ModernState& g, const ModernState& before) {
|
||||
for (size_t m = 0; m < g.manager_teams.size(); ++m) g.press_month_cash.push_back(cash(m));
|
||||
}
|
||||
}
|
||||
// a stand block finished: its construction weeks (manager record +0x34 + block) ran down to
|
||||
// zero; the stadium's places then (+0x4c + block, in thousands, all eight blocks)
|
||||
for (size_t m = 0; m < g.manager_teams.size() && m < before.manager_teams.size(); ++m) {
|
||||
const int team = club_of_manager(g, m);
|
||||
if (team < 0 || club_of_manager(before, m) != team) continue;
|
||||
const auto record = [&](const ModernState& s) {
|
||||
const bool coach = m == 0 && s.manager_teams[0] == no_team() && s.memory.has(::bmh::layout::CoachActive) &&
|
||||
s.memory.u8(::bmh::layout::CoachActive) != 0;
|
||||
return (coach ? 4 : m) * size_t(0xb0c);
|
||||
};
|
||||
const size_t now_at = record(g), was_at = record(before);
|
||||
if (now_at + 0x54 > g.manager_records.size() || was_at + 0x54 > before.manager_records.size()) continue;
|
||||
bool finished = false;
|
||||
for (size_t b = 0; b < 8; ++b)
|
||||
finished |= before.manager_records[was_at + 0x34 + b] > 0 && g.manager_records[now_at + 0x34 + b] == 0;
|
||||
if (!finished) continue;
|
||||
int64_t places = 0;
|
||||
for (size_t b = 0; b < 8; ++b) places += int64_t(g.manager_records[now_at + 0x4c + b]) * 1000;
|
||||
note_press(g, "stadium.expansion_finished", ui_team_id(g, team),
|
||||
O{{"team", press_team(g, team)}, {"stadium", press_team(g, team)}, {"count", places}});
|
||||
}
|
||||
// a new toto settlement of a club manager
|
||||
for (size_t m = 0; m < g.pools.size() && m < before.pools.size() && m < g.manager_teams.size(); ++m) {
|
||||
const auto& a = before.pools[m];
|
||||
|
||||
@@ -16,7 +16,9 @@
|
||||
// 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.
|
||||
// stadium.expansion_planned (a stand block, stadium.commit), career.manager_resigned;
|
||||
// - at a kickoff also: finance.profit / finance.loss (the cash change of the month just ended)
|
||||
// and stadium.expansion_finished (a stand block's construction ran out).
|
||||
// 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