forked from Mirrorlandia_minetest/minetest
Allow inputting nodename of MaterialItem in ItemSpec::checkItem
This commit is contained in:
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user