13 lines
311 B
Lua
13 lines
311 B
Lua
|
function blockgame.item_matches (name, options)
|
||
|
return blockgame.any(options, function (option)
|
||
|
if name == option then return true end
|
||
|
|
||
|
if blockgame.starts_with(option, "group:") then
|
||
|
local group = string.sub(option, 7)
|
||
|
return minetest.get_item_group(name, group) > 0
|
||
|
end
|
||
|
|
||
|
return false
|
||
|
end)
|
||
|
end
|