#include #include #include #include #include #include "BaseSimulation.h" #include "Builder.h" #include "RandomSpawner.h" namespace kurator { namespace sim { State load_scenario(const campaign::Scenario& scenario) { State ctx {}; RandomSpawner spawner {scenario.last_team(), scenario.radius, 0.1}; Builder build {ctx.registry, spawner}; for (const auto& ship : scenario.ships) { const auto entity = build(ship.loadout.type, ship.team); ctx.registry.emplace(entity, ship.identifier); for (const auto& turret_type : ship.loadout.turrets) build(turret_type, entity); } return ctx; } System base_simulation_systems(State& ctx) { return BaseSimulation{ctx}; } } // namespace sim } // namespace kurator