Pass debugOptions on construction of CSimulation2

The functions to set them explicitly are removed. This makes the
interface of `CSimulation2` smaller.

Also serializationtest and rejointest can't be active at the same time.
Add a warning about that and use a `std::variant`.
This commit is contained in:
phosit
2025-10-15 11:50:35 +02:00
parent 10afb7d856
commit ef016884ab
6 changed files with 64 additions and 26 deletions
+2 -2
View File
@@ -77,10 +77,10 @@ const CStr CGame::EventNameSimulationUpdate = "SimulationUpdate";
* Constructor
*
**/
CGame::CGame(bool replayLog, const bool oosLog):
CGame::CGame(bool replayLog, const SimulationDebugOptions debugOptions):
m_World(new CWorld(*this)),
m_Simulation2{new CSimulation2{&m_World->GetUnitManager(), *g_ScriptContext, &m_World->GetTerrain(),
oosLog}},
debugOptions}},
// TODO: we need to remove that global dependency. Maybe the game view
// should be created outside only if needed.
m_GameView(CRenderer::IsInitialised() ? new CGameView(g_VideoMode.GetBackendDevice(), this) : nullptr),