mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Allow inputting nodename of MaterialItem in ItemSpec::checkItem
This commit is contained in:
@@ -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(num != 65535){
|
||||||
if(mitem->getMaterial() != num)
|
if(mitem->getMaterial() != num)
|
||||||
return false;
|
return false;
|
||||||
|
} else {
|
||||||
|
if(mitem->getNodeName() != name)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(type == ITEM_CRAFT)
|
else if(type == ITEM_CRAFT)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user