mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Allow inputting nodename of MaterialItem in ItemSpec::checkItem
This commit is contained in:
parent
4725e5c52e
commit
564c3a9c96
1 changed files with 7 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue