diff options
Diffstat (limited to 'src/main/headers/Item.hpp')
-rw-r--r-- | src/main/headers/Item.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/headers/Item.hpp b/src/main/headers/Item.hpp index caa1e6f..56f8733 100644 --- a/src/main/headers/Item.hpp +++ b/src/main/headers/Item.hpp @@ -11,11 +11,18 @@ class Actor; class Item { public: + enum Type { + BULLET, MELEEWEAPON, RANGEDWEAPON, STICK, HEAL, FOOD + }; + + const Type type; + Item() = delete; virtual ~Item() {} virtual bool use(Actor &user, Actor &actor) = 0; + int amount() { return _amount; } bool stackable() { return _maxAmount == 1; } protected: @@ -24,7 +31,7 @@ protected: const std::string _name; - Item(const std::string &name) : _name(name) {} + Item(Type t, const std::string &name) : _name(name), type(t) {} }; #endif |