summaryrefslogtreecommitdiff
path: root/sim/src/BaseSimulation.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2023-05-04 00:07:51 +0200
committerAki <please@ignore.pl>2024-04-05 19:41:19 +0200
commit52b0bdaba5b38790d144bf1e800ea34be937ded0 (patch)
treec2215cb7848e421b9c96fcc5cf4beb83b3a75c97 /sim/src/BaseSimulation.cpp
parent61d16477b01bcfbe8c3a481a232658ac60309f57 (diff)
downloadkurator-52b0bdaba5b38790d144bf1e800ea34be937ded0.zip
kurator-52b0bdaba5b38790d144bf1e800ea34be937ded0.tar.gz
kurator-52b0bdaba5b38790d144bf1e800ea34be937ded0.tar.bz2
Refactored Actions to be owned by registry
Registry is now also responsible for switching between the actions and each action is expected to have one system. Technically an std::variant could be used here, but let's wait a bit and see how this part evolves.
Diffstat (limited to 'sim/src/BaseSimulation.cpp')
-rw-r--r--sim/src/BaseSimulation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/sim/src/BaseSimulation.cpp b/sim/src/BaseSimulation.cpp
index 2731c67..ffd43f9 100644
--- a/sim/src/BaseSimulation.cpp
+++ b/sim/src/BaseSimulation.cpp
@@ -16,6 +16,7 @@ namespace sim
BaseSimulation::BaseSimulation(State& ctx)
{
+ setup_ai_components(ctx);
manager.extend(ctx);
}
@@ -24,7 +25,7 @@ void
BaseSimulation::operator()(State& ctx)
{
pick_random_targets(ctx, manager);
- take_actions(ctx);
+ keep_at_range(ctx);
FloatingMovement::update(ctx);
update_turrets(ctx);
shoot_at_targets(ctx);