From 8126e1941666f5dccd61e9ecc60db162049bb8ff Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 3 Nov 2013 23:35:59 +0000 Subject: Added initial support for NPC patrol routes, added support for lawfull/unlawfull factions. --- src/game/base/npc.h | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'src/game/base/npc.h') diff --git a/src/game/base/npc.h b/src/game/base/npc.h index 4a89529..5a7e176 100644 --- a/src/game/base/npc.h +++ b/src/game/base/npc.h @@ -12,6 +12,8 @@ namespace game { +class Patrol; + class NPC : public Ship { public: @@ -20,11 +22,12 @@ public: * The NPC profile is set at creating time and can not be altered. * * Freelancer fallback value - * Trader Trade convoy member, prefers trade routes - * Military Police or military, prefers patrol routes + * Convoy Trade convoy member, prefers trade routes + * Patrol Police or military, prefers patrol routes + * Guard Guard an area * Wingman wingman, prefers protecting its leader * */ - enum Profile { ProfileFreelancer = 0, ProfileTrader = 1, ProfileMilitary = 2, ProfilePirate = 3, ProfileWingman = 4 }; + enum Profile { ProfileFreelancer = 0, ProfileConvoy = 1, ProfilePatrol = 2, ProfileGuard = 3, ProfileWingman = 4 }; /** * @brief Defines the general moode of the NPC @@ -62,6 +65,14 @@ public: return npc_leader; } + /** + * @brief returns this NPC's patrol. + * */ + inline Patrol *patrol() + { + return npc_patrol; + } + /* ---- mutators ------------------------------------------- */ /** @@ -74,6 +85,11 @@ public: * */ void set_leader(Ship *leader); + /** + * @brief set the NPC's patrol + * */ + void set_patrol(Patrol *patrol); + /** * @brief game frame * */ @@ -92,6 +108,8 @@ private: Ship *npc_leader; + Patrol *npc_patrol; + unsigned long npc_destroyed_timestamp; }; // class NPC -- cgit v1.2.3