Allow inputting nodename of MaterialItem in ItemSpec::checkItem
parent
4725e5c52e
commit
564c3a9c96
|
@ -1016,8 +1016,13 @@ bool ItemSpec::checkItem(const InventoryItem *item) const
|
||||||
if(itemname != "MaterialItem")
|
if(itemname != "MaterialItem")
|
||||||
return false;
|
return false;
|
||||||
MaterialItem *mitem = (MaterialItem*)item;
|
MaterialItem *mitem = (MaterialItem*)item;
|
||||||
if(mitem->getMaterial() != num)
|
if(num != 65535){
|
||||||
return false;
|
if(mitem->getMaterial() != num)
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
if(mitem->getNodeName() != name)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(type == ITEM_CRAFT)
|
else if(type == ITEM_CRAFT)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue