From e494b5d422609b9ed9f79cc39b401f40b6a3ec9a Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 3 Dec 2011 13:46:19 +0200 Subject: Show infotext for unknown items placed on ground --- src/inventory.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/inventory.h') diff --git a/src/inventory.h b/src/inventory.h index 93a29764c..3f3c5435b 100644 --- a/src/inventory.h +++ b/src/inventory.h @@ -64,6 +64,9 @@ public: virtual std::string getText() { return ""; } // Returns the string used for inventory virtual std::string getItemString(); + + // Shall return false if item is not known and cannot be used + virtual bool isKnown() const { return true; } /* Quantity methods @@ -269,6 +272,8 @@ public: return os.str(); } + virtual bool isKnown() const; + virtual bool addableTo(const InventoryItem *other) const { if(std::string(other->getName()) != "CraftItem") @@ -366,6 +371,8 @@ public: { return ""; } + + virtual bool isKnown() const; virtual bool isSubsetOf(const InventoryItem *other) const { -- cgit v1.2.3