summaryrefslogtreecommitdiff
path: root/src/inventory.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-12-03 13:46:19 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-12-03 13:46:19 +0200
commite494b5d422609b9ed9f79cc39b401f40b6a3ec9a (patch)
tree27608c569d940616f7a704a473e028d5555365b2 /src/inventory.h
parentfdf7b3bcdfd62aab2563d92b728e98b3518bbc52 (diff)
downloadminetest-e494b5d422609b9ed9f79cc39b401f40b6a3ec9a.tar.gz
minetest-e494b5d422609b9ed9f79cc39b401f40b6a3ec9a.tar.bz2
minetest-e494b5d422609b9ed9f79cc39b401f40b6a3ec9a.zip
Show infotext for unknown items placed on ground
Diffstat (limited to 'src/inventory.h')
-rw-r--r--src/inventory.h7
1 files changed, 7 insertions, 0 deletions
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
{