From d13358b71ec15085f2638fd9c3fc634df62dfc94 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 9 May 2021 13:56:46 -0400 Subject: Reduced dependency on json-related hacks --- src/armor.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/armor.h') diff --git a/src/armor.h b/src/armor.h index 0d148b7..c059093 100644 --- a/src/armor.h +++ b/src/armor.h @@ -5,8 +5,6 @@ namespace entry { class Armor; - std::string genText(const Armor& a, const creature::Creature& c); - class Armor : public Item , public Substantial { public: Armor(const nlohmann::json& data, const nlohmann::json& base) : Item(base), acBonus(data["ac"]), armorType(data["armor_type"]), strRequirement(data["strength"]), stealthDis(data["disadvantage"]), cost(data["cost"]), weight(data["weight"]) {} @@ -19,18 +17,7 @@ namespace entry { double getWeight(void) const {return weight;} virtual std::string getText() const override; - virtual std::string getText(const creature::Creature& c) const override {return genText(*this, c);} - - /*virtual nlohmann::json toJson(void) const { - auto data = Item::toJson(); - data["ac"] = acBonus; - data["type"] = armorType; - data["strength"] = strRequirement; - data["disadvantage"] = stealthDis; - data["cost"] = cost; - data["weight"] = weight; - return data; - }*/ + virtual std::string getText(const creature::Creature& c) const override; private: const int acBonus; -- cgit v1.2.3