diff options
Diffstat (limited to 'src/item.h')
-rw-r--r-- | src/item.h | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -4,17 +4,21 @@ #include <memory> namespace entry { + struct itemImpl; + class Item : public Entry { public: + Item(); static std::shared_ptr<Item> create(const nlohmann::json& data); virtual ~Item() {} - }; + virtual int getCost(void) const; + virtual double getWeight(void) const; + virtual std::string getCostWeightText() const; + virtual std::string getText() const override; + virtual std::string getText(const creature::Creature& c) const override; - class Substantial { - public: - virtual int getCost(void) const = 0; - virtual double getWeight(void) const = 0; - std::string getText() const; - virtual ~Substantial() {} + NLOHMANN_FRIEND_DECLARES(Item); + private: + std::shared_ptr<itemImpl> data; }; } |