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>2012-10-20 16:35:26 +0000
committerStijn Buys <ingar@osirion.org>2012-10-20 16:35:26 +0000
commit75274ebd6ba90784f5aa837b7e5ea97fc6bfb720 (patch)
treea5d51a87bf3f20833df18bc40a3254b946716afb /src/game/base/weapon.cc
parentf01629dc14b1ee05b44d2e38b3dffbc1441fd85f (diff)
Item id based inventory, support for weapon dealers.
Diffstat (limited to 'src/game/base/weapon.cc')
-rw-r--r--src/game/base/weapon.cc28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/game/base/weapon.cc b/src/game/base/weapon.cc
index 7f816e2..8be9f9a 100644
--- a/src/game/base/weapon.cc
+++ b/src/game/base/weapon.cc
@@ -11,6 +11,7 @@
#include "filesystem/inifile.h"
#include "auxiliary/functions.h"
#include "core/func.h"
+#include "base/cargopod.h"
#include "base/game.h"
#include "base/weapon.h"
@@ -187,6 +188,21 @@ void Weapon::done()
core::Func::remove("list_weapons");
}
+
+Weapon *Weapon::find(const std::string & label)
+{
+ if (!label.size()) {
+ return 0;
+ }
+
+ return (Weapon *) core::Info::find(weapon_infotype, label);
+}
+
+void Weapon::list()
+{
+ core::Info::list(weapon_infotype);
+}
+
/* ---- class Weapon ------------------------------------------- */
Weapon::Weapon() : core::Info(weapon_infotype)
@@ -200,18 +216,14 @@ Weapon::~Weapon()
{
}
-Weapon *Weapon::find(const std::string & label)
+void Weapon::set_stackable(bool stackable)
{
- if (!label.size()) {
- return 0;
- }
-
- return (Weapon *) core::Info::find(weapon_infotype, label);
+ weapon_stackable = stackable;
}
-void Weapon::list()
+void Weapon::set_level(const int level)
{
- core::Info::list(weapon_infotype);
+ weapon_level = level;
}
} // namespace game