Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-11-03 23:35:59 +0000
committerStijn Buys <ingar@osirion.org>2013-11-03 23:35:59 +0000
commit8126e1941666f5dccd61e9ecc60db162049bb8ff (patch)
tree9468363f1670352ec8d5f2155cfcfa77b602d772 /src/game/base/npc.h
parentfb18eff66171e855e378575b534683e4fb9c20f5 (diff)
Added initial support for NPC patrol routes,
added support for lawfull/unlawfull factions.
Diffstat (limited to 'src/game/base/npc.h')
-rw-r--r--src/game/base/npc.h24
1 files changed, 21 insertions, 3 deletions
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 ------------------------------------------- */
/**
@@ -75,6 +86,11 @@ public:
void set_leader(Ship *leader);
/**
+ * @brief set the NPC's patrol
+ * */
+ void set_patrol(Patrol *patrol);
+
+ /**
* @brief game frame
* */
virtual void frame(const unsigned long elapsed);
@@ -92,6 +108,8 @@ private:
Ship *npc_leader;
+ Patrol *npc_patrol;
+
unsigned long npc_destroyed_timestamp;
}; // class NPC