move FactoryState ownership out of BuildingSystem to Simulation

This commit is contained in:
2026-08-05 06:43:52 +02:00
parent 0edea5d961
commit 46932e4abf
10 changed files with 97 additions and 43 deletions

View File

@@ -9,6 +9,7 @@
#include <QPoint>
#include "BeltSystem.h"
#include "FactoryState.h"
#include "EntityAdmin.h"
#include "entt/entity/entity.hpp"
#include "SchematicChoiceOption.h"
@@ -209,6 +210,9 @@ private:
UnlockState m_unlockState;
EntityAdmin m_admin;
// The factory's world data. Owned here, not by BuildingSystem, so the systems
// that operate on it can be handed the same state (see FactoryState.h).
FactoryState m_factoryState;
BeltSystem m_beltSystem;
std::unique_ptr<BuildingSystem> m_buildingSystem;
std::unique_ptr<ShipSystem> m_shipSystem;