From 0e91fc6a8e14eebb5a89b260f66e5e74b42074bb Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 10 Jan 2023 00:57:41 +0100 Subject: Extracted ship loadout into own class --- sim/src/BaseBattle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sim/src') diff --git a/sim/src/BaseBattle.cpp b/sim/src/BaseBattle.cpp index 037a818..5173892 100644 --- a/sim/src/BaseBattle.cpp +++ b/sim/src/BaseBattle.cpp @@ -30,10 +30,10 @@ BaseBattle::BaseBattle(const campaign::Scenario& scenario) : { Builder build {_registry, spawner}; for (const auto& ship : scenario.ships) { - const auto entity = build(ship.type, ship.team); + const auto entity = build(ship.loadout.type, ship.team); _registry.emplace(entity, ship.identifier); auto& state = _registry.get(entity); - for (const auto& turret_type : ship.turrets) { + for (const auto& turret_type : ship.loadout.turrets) { build(turret_type, entity); state.keep_at_range = std::min(state.keep_at_range, turret_type.optimal_range); } -- cgit v1.1