diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-03-08 20:03:40 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-03-08 20:03:40 +0000 |
commit | a32a8447028798ef05af33230fbcfa3195ab430c (patch) | |
tree | b311ea9623ac1816f48bdc1cd1f9a8f1d78091a4 /game/vehicles/train.h | |
parent | Shut up cppcheck, an STL implementation of that would be stupid (diff) | |
download | ilt-a32a8447028798ef05af33230fbcfa3195ab430c.tar.bz2 ilt-a32a8447028798ef05af33230fbcfa3195ab430c.tar.xz ilt-a32a8447028798ef05af33230fbcfa3195ab430c.zip |
Initial commit of the orders/activities system
Has the main window provide some control over our test train
Diffstat (limited to 'game/vehicles/train.h')
-rw-r--r-- | game/vehicles/train.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/game/vehicles/train.h b/game/vehicles/train.h index 34a9d28..a7d4b1b 100644 --- a/game/vehicles/train.h +++ b/game/vehicles/train.h @@ -1,6 +1,9 @@ #ifndef TRAIN_H #define TRAIN_H +#include "game/activities/go.h" // IWYU pragma: keep +#include "game/activities/idle.h" // IWYU pragma: keep +#include "game/activity.h" #include "game/network/link.h" #include "game/worldobject.h" #include "railVehicle.h" @@ -12,7 +15,7 @@ class Shader; -class Train : public Vehicle, public Collection<RailVehicle, false> { +class Train : public Vehicle, public Collection<RailVehicle, false>, public Can<Go>, public Can<Idle> { public: explicit Train(const LinkPtr & link, float linkDist = 0) : Vehicle {link, linkDist} { } @@ -25,6 +28,8 @@ public: void render(const Shader & shader) const override; void tick(TickDuration elapsed) override; + void doActivity(const Go *, TickDuration) override; + void doActivity(const Idle *, TickDuration) override; void move(TickDuration dur); [[nodiscard]] Location getBogiePosition(float linkDist, float dist) const; |