Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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