diff options
author | mafaldo <mafaldo@heavyhammer.home> | 2018-02-12 23:43:14 +0100 |
---|---|---|
committer | mafaldo <mafaldo@heavyhammer.home> | 2018-02-12 23:43:14 +0100 |
commit | 3472e0de54bbfa63517de8db7d665b732389ae85 (patch) | |
tree | a3754a70c36dad94ea80877323c2b9798b5b5036 /src/main/headers/Item.hpp | |
parent | Add Actor attributes (diff) | |
download | Subconscious-old-3472e0de54bbfa63517de8db7d665b732389ae85.tar.gz Subconscious-old-3472e0de54bbfa63517de8db7d665b732389ae85.zip |
Add RangedWeapon, MeleeWeapon
Diffstat (limited to '')
-rw-r--r-- | src/main/headers/Item.hpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/headers/Item.hpp b/src/main/headers/Item.hpp index 3664a0e..caa1e6f 100644 --- a/src/main/headers/Item.hpp +++ b/src/main/headers/Item.hpp @@ -14,16 +14,17 @@ public: Item() = delete; virtual ~Item() {} - virtual bool use(Actor &actor) = 0; - virtual bool use(Item &item) = 0; + virtual bool use(Actor &user, Actor &actor) = 0; bool stackable() { return _maxAmount == 1; } protected: - const unsigned _maxAmount; - const unsigned _amount; // stackable + unsigned _maxAmount; + unsigned _amount; // stackable - std::string _name; + const std::string _name; + + Item(const std::string &name) : _name(name) {} }; #endif |