Allow inputting nodename of MaterialItem in ItemSpec::checkItem

This commit is contained in:
Perttu Ahola 2011-11-16 19:10:49 +02:00
parent 4725e5c52e
commit 564c3a9c96

@ -1016,8 +1016,13 @@ bool ItemSpec::checkItem(const InventoryItem *item) const
if(itemname != "MaterialItem")
return false;
MaterialItem *mitem = (MaterialItem*)item;
if(num != 65535){
if(mitem->getMaterial() != num)
return false;
} else {
if(mitem->getNodeName() != name)
return false;
}
}
else if(type == ITEM_CRAFT)
{