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
|
@ -343,6 +343,13 @@ video::ITexture * ToolItem::getImageRaw() const
|
|||
}
|
||||
#endif
|
||||
|
||||
bool ToolItem::isKnown() const
|
||||
{
|
||||
IToolDefManager *tdef = m_gamedef->tdef();
|
||||
const ToolDefinition *def = tdef->getToolDefinition(m_toolname);
|
||||
return (def != NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
CraftItem
|
||||
*/
|
||||
|
@ -357,6 +364,13 @@ video::ITexture * CraftItem::getImage() const
|
|||
}
|
||||
#endif
|
||||
|
||||
bool CraftItem::isKnown() const
|
||||
{
|
||||
ICraftItemDefManager *cidef = m_gamedef->cidef();
|
||||
const CraftItemDefinition *def = cidef->getCraftItemDefinition(m_subname);
|
||||
return (def != NULL);
|
||||
}
|
||||
|
||||
u16 CraftItem::getStackMax() const
|
||||
{
|
||||
ICraftItemDefManager *cidef = m_gamedef->cidef();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue