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:
parent
fdf7b3bcdf
commit
e494b5d422
3 changed files with 46 additions and 1 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue