summaryrefslogtreecommitdiff
path: root/game/objectives/goto.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-03-16 18:29:37 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-03-16 18:29:37 +0000
commitea35e8ede4c3a522375d4539c872e8a6d6c9830a (patch)
treeb0569f5ffe9b92b407bde67f501a0a79a2cf78e5 /game/objectives/goto.h
parentAllow activities to be changed when doing them (diff)
downloadilt-ea35e8ede4c3a522375d4539c872e8a6d6c9830a.tar.bz2
ilt-ea35e8ede4c3a522375d4539c872e8a6d6c9830a.tar.xz
ilt-ea35e8ede4c3a522375d4539c872e8a6d6c9830a.zip
Implement goto so node
Encompasses determining a route and a distance to travel
Diffstat (limited to 'game/objectives/goto.h')
-rw-r--r--game/objectives/goto.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/game/objectives/goto.h b/game/objectives/goto.h
new file mode 100644
index 0000000..01e47ae
--- /dev/null
+++ b/game/objectives/goto.h
@@ -0,0 +1,22 @@
+#ifndef GOTO_H
+#define GOTO_H
+
+#include <game/activity.h>
+#include <game/network/link.h>
+#include <game/objective.h>
+
+class Orders;
+
+class GoTo : public Objective {
+public:
+ GoTo(Orders * os, const Link::End &, float, const NodePtr & dest);
+
+ [[nodiscard]] ActivityPtr createActivity() const override;
+ [[nodiscard]] Link::Next navigate(Link::Nexts::const_iterator, Link::Nexts::const_iterator) const override;
+
+private:
+ Link::Nexts links;
+ float startDist;
+};
+
+#endif