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-09 20:15:06 +0000
committerStijn Buys <ingar@osirion.org>2013-11-09 20:15:06 +0000
commit2218c7094ad6dc40b200274ebffdc9fb4c1a8e0c (patch)
tree97a89e9ae8b5302ffeb80cad85b9e95daf51f019 /src/game/base/npctype.cc
parente69ce33b0436d0fa9b81e032442026a43cbbbb05 (diff)
Removed shipmodel npcname support,
made Patrols load NPC types instead of ship models, replaces patrol [ship] subsection with a [npc] subsection.
Diffstat (limited to 'src/game/base/npctype.cc')
-rw-r--r--src/game/base/npctype.cc71
1 files changed, 71 insertions, 0 deletions
diff --git a/src/game/base/npctype.cc b/src/game/base/npctype.cc
new file mode 100644
index 0000000..f44cc1f
--- /dev/null
+++ b/src/game/base/npctype.cc
@@ -0,0 +1,71 @@
+/*
+ base/npctype.h
+ This file is part of the Osirion project and is distributed under
+ the terms and conditions of the GNU General Public License version 2
+*/
+
+#include "base/npctype.h"
+
+namespace game
+{
+
+NPCType::NPCType() :
+ npctype_name()
+{
+ npctype_amount = 1;
+ npctype_merchant = false;
+
+ npctype_faction = 0;
+ npctype_shipmodel = 0;
+
+ npctype_cannon = 0;
+ npctype_turret = 0;
+}
+
+
+NPCType::~NPCType()
+{
+ // clear pointers
+ npctype_faction = 0;
+ npctype_shipmodel = 0;
+
+ npctype_cannon = 0;
+ npctype_turret = 0;
+}
+
+void NPCType::set_name(const std::string &name)
+{
+ npctype_name.assign(name);
+}
+
+void NPCType::set_amount(const long amount)
+{
+ npctype_amount = amount;
+}
+
+void NPCType::set_merchant(const bool is_merchant)
+{
+ npctype_merchant = is_merchant;
+}
+
+void NPCType::set_faction(const Faction *faction)
+{
+ npctype_faction = faction;
+}
+
+void NPCType::set_shipmodel(const ShipModel *shipmodel)
+{
+ npctype_shipmodel = shipmodel;
+}
+
+void NPCType::set_cannon(const Weapon *cannon)
+{
+ npctype_cannon = cannon;
+}
+
+void NPCType::set_turret(const Weapon *turret)
+{
+ npctype_turret = turret;
+}
+
+} // namespace game