1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Show infotext for unknown items placed on ground

This commit is contained in:
Perttu Ahola 2011-12-03 13:46:19 +02:00
parent fdf7b3bcdf
commit e494b5d422
3 changed files with 46 additions and 1 deletions

View file

@ -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
{