summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-16 01:34:09 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:46 +0200
commit37a5f8a30bc2e267909d699faef4910a3a261555 (patch)
treef210efc6d415f2ffb16ed2747c4d7d77196244e8 /src/inventory.cpp
parentf107967fdcfd66add9638b2932723e55c4f4ae2d (diff)
downloadminetest-37a5f8a30bc2e267909d699faef4910a3a261555.tar.gz
minetest-37a5f8a30bc2e267909d699faef4910a3a261555.tar.bz2
minetest-37a5f8a30bc2e267909d699faef4910a3a261555.zip
Move cook result properly to ContentFeatures
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp9
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);
}
/*