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

@@ -31,8 +31,11 @@ struct DeconstructionEntry
// data/behaviour split the ecs/system/ classes already follow, where world data
// arrives as a tick argument instead of being owned by the system.
//
// Owned by BuildingSystem for now. The intent is to hand ownership to Simulation
// and pass this into the tick methods, so the systems become stateless over it.
// Owned by Simulation (and by ArenaSimulation in the balancing tool), not by the
// systems that operate on it. BuildingSystem holds a reference. The remaining step
// is to pass this into the tick methods instead, so the systems become stateless
// over it — that one is gated on the query surface, which today reaches the data
// through BuildingSystem's ~180 const call sites.
struct FactoryState
{
std::vector<Building> buildings;