diff options
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r-- | src/inventory.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp index 1929761a5..6d0a2a214 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -158,12 +158,17 @@ video::ITexture * MaterialItem::getImage(ITextureSource *tsrc) const bool MaterialItem::isCookable() const { - return item_material_is_cookable(m_content, m_gamedef); + INodeDefManager *ndef = m_gamedef->ndef(); + const ContentFeatures &f = ndef->get(m_content); + return (f.cookresult_item != ""); } InventoryItem *MaterialItem::createCookResult() const { - return item_material_create_cook_result(m_content, m_gamedef); + INodeDefManager *ndef = m_gamedef->ndef(); + const ContentFeatures &f = ndef->get(m_content); + std::istringstream is(f.cookresult_item, std::ios::binary); + return InventoryItem::deSerialize(is, m_gamedef); } /* |