diff options
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r-- | src/inventory.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp index 1e1e27c82..a913430e6 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -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(); |