Play Modern worlds in the text console (openbmh_modern_cli)

The console and its desk/window actions are compiled a second time
against ModernSession (src/app/session.hpp, OPENBMH_MODERN_SESSION), so
a Modern world can be played before the new interface is connected:
new career, club picker, desk, live matchday, results, save and load.

- The CLI opens a Modern world like the season sim and keys its save
  folder by the SHA-256 of the world id.
- Rollbacks keep the whole session state (app::SessionState) instead
  of slicing it to GameState, which would drop Modern data.
- Club picker: clubs a world adds get unused master ids so the
  original picker's order stays unique; only German clubs can be
  confirmed in Modern.

Classic openbmh_cli is unchanged (same sources without the switch).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-24 14:16:41 +02:00
1 parent a11311994d
commit ce79697b20
13 files changed
+163 -11

No files matched your search

+4
View File
@@ -53,6 +53,8 @@
#include "ui/opportunities.hpp"
#include "ui/other_games_state.hpp"
namespace bmh::app { class TransferActions; }
namespace bmh::modern::app {
ui::OutgoingTransferEditorState loan_return_offer_editor_projection(
@@ -116,6 +118,8 @@ struct AutomationRequest {
class ModernSession {
friend class TransferActions;
// the console's transfer actions, compiled against this session (openbmh_modern_cli, app/session.hpp)
friend class ::bmh::app::TransferActions;
public:
struct LineupCheckpoint {
ModernState state;