- src/modern/game: the season modules as bmh::modern, working on ModernState (a GameState). Data types stay shared with Classic; Modern code calls its season functions qualified (modern::...), so a missing Modern function is a compile error instead of a silent call into Classic. - src/modern/app/modern_session: the session on the Modern core. It still uses the Classic UI projections until the Modern projections exist. - SeasonHooks: the shared match core reaches player statistics and the table prediction of the season core that owns the game (Classic: unchanged). - WorldLayout: team ranges, squad slots and pools of the running world. Shared code and the Modern fork read them; Classic keeps the original numbers. - Transfer list views moved to game/transfer_offer_view.hpp (shared). - tools/modern/check_fork_calls.sh, modern_season_sim and world_layout_tests. Verified: Classic tests and replay regression unchanged; season_sim and modern_season_sim produce identical output with Classic data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
25 lines
1.3 KiB
C++
25 lines
1.3 KiB
C++
// SPDX-License-Identifier: GPL-3.0-only
|
|
#pragma once
|
|
#include "game/environment.hpp"
|
|
#include <array>
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include "game/random.hpp"
|
|
#include "modern/game/modern_state.hpp"
|
|
|
|
namespace bmh::modern {
|
|
constexpr int kEnvironmentItems = 6;
|
|
// OpenBMH deviates from the original: uses six monthly environment budgets across data editions while retaining the shared staff prices and academy player-generation strength bands.
|
|
inline constexpr std::array<int32_t, kEnvironmentItems> kEnvironmentStep = {2000, 4000, 5000, 5000, 5000, 5000};
|
|
EnvironmentState environment_state(const ModernState& g, int manager);
|
|
// Preserve already saved lump-sum academy contracts until the user edits them.
|
|
int32_t environment_monthly_cost(const ModernState& g, int manager, int item);
|
|
bool environment_academy_active(const ModernState& g, int manager);
|
|
// Set a monthly budget to level 0..6, without an immediate debit or random draw.
|
|
EnvironmentResult set_environment(ModernState& g, int manager, int item, int level, std::string* message = nullptr);
|
|
// Youth results advance with first-division matchdays. Promotion/relegation and
|
|
// the handover to the next age group happen before annual accounts.
|
|
void advance_youth_teams(ModernState& g, int manager, WatcomRandom& rand);
|
|
void finish_youth_season(ModernState& g, int manager);
|
|
} // namespace bmh::modern
|