diff options
author | Aki <please@ignore.pl> | 2023-01-02 00:47:48 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2023-01-02 00:47:48 +0100 |
commit | 27216f78d7a08ffd14ad7040f76c8078ecdfd993 (patch) | |
tree | 70b60cba5b79be2220259ba2342f0d1390bffe22 /sim | |
parent | 1e0cb31ec62a5895c475a52c4e0066672047416f (diff) | |
download | kurator-27216f78d7a08ffd14ad7040f76c8078ecdfd993.zip kurator-27216f78d7a08ffd14ad7040f76c8078ecdfd993.tar.gz kurator-27216f78d7a08ffd14ad7040f76c8078ecdfd993.tar.bz2 |
Moved UniqueIdentifier to universe module
Diffstat (limited to 'sim')
-rw-r--r-- | sim/src/BaseBattle.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sim/src/BaseBattle.cpp b/sim/src/BaseBattle.cpp index 14a9ccd..17df990 100644 --- a/sim/src/BaseBattle.cpp +++ b/sim/src/BaseBattle.cpp @@ -6,7 +6,6 @@ #include <entt/signal/dispatcher.hpp> #include <kurator/campaign/Scenario.h> -#include <kurator/campaign/UniqueIdentifier.h> #include <kurator/sim/components.h> #include <kurator/sim/events.h> #include <kurator/sim/FloatingMovement.h> @@ -14,6 +13,7 @@ #include <kurator/sim/TurretControl.h> #include <kurator/stats/events.h> #include <kurator/universe.h> +#include <kurator/universe/UniqueIdentifier.h> #include "Builder.h" @@ -33,7 +33,7 @@ BaseBattle::BaseBattle(const campaign::Scenario& scenario) : Builder build {_registry, spawner}; for (const auto& ship : scenario.ships) { const auto entity = build(repo->ship_type(ship.type), ship.team); - _registry.emplace<campaign::UniqueIdentifier>(entity, ship.identifier); + _registry.emplace<universe::UniqueIdentifier>(entity, ship.identifier); auto& state = _registry.get<AIState>(entity); for (const auto& turret_type : ship.turrets) { auto def = repo->turret_type(turret_type); @@ -105,8 +105,8 @@ BaseBattle::kill_off_dead() for (auto&& [entity, points] : view.each()) { if (points.health > 0.0) continue; - if (_registry.all_of<campaign::UniqueIdentifier, Team>(entity)) { - const auto& [identifier, team] = _registry.get<campaign::UniqueIdentifier, Team>(entity); + if (_registry.all_of<universe::UniqueIdentifier, Team>(entity)) { + const auto& [identifier, team] = _registry.get<universe::UniqueIdentifier, Team>(entity); _dispatcher.trigger(stats::ShipLeft{time, identifier, team.id, true}); } _registry.destroy(entity); |