move FactoryState ownership out of BuildingSystem to Simulation
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "BeltSystem.h"
|
||||
#include "Building.h"
|
||||
#include "BuildingSystem.h"
|
||||
#include "FactoryState.h"
|
||||
#include "BuildingType.h"
|
||||
#include "ConfigLoader.h"
|
||||
#include "DeliverScrapBehavior.h"
|
||||
@@ -54,6 +55,7 @@
|
||||
struct Fixture
|
||||
{
|
||||
GameConfig cfg;
|
||||
FactoryState state;
|
||||
BeltSystem belts;
|
||||
BuildingId nextBuildingId;
|
||||
int stock;
|
||||
@@ -76,7 +78,7 @@ struct Fixture
|
||||
, nextBuildingId(1)
|
||||
, stock(0)
|
||||
, rng(42)
|
||||
, buildings(cfg, belts,
|
||||
, buildings(cfg, state, belts,
|
||||
[this]() { return nextBuildingId++; },
|
||||
[this](int n) { stock += n; },
|
||||
[](const std::string&, QVector2D, const std::optional<ShipLayoutConfig>&) {},
|
||||
|
||||
Reference in New Issue
Block a user