summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
Diffstat (limited to 'sim')
-rw-r--r--sim/src/BaseBattle.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/sim/src/BaseBattle.cpp b/sim/src/BaseBattle.cpp
index b85c0eb..87b2096 100644
--- a/sim/src/BaseBattle.cpp
+++ b/sim/src/BaseBattle.cpp
@@ -4,6 +4,7 @@
#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/universe.h>
@@ -25,6 +26,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);
for (const auto& turret_type : ship.turrets)
build(repo->turret_type(turret_type), entity);
manager.add(ship.team, entity); // registry supports on construction events