31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
end
else
local is = ItemStack(identity)
identity,count = is:get_name(), is:get_count()
end
end
local stack = ItemStack(item)
if sorcery.lib.str.beginswith(identity, 'group:') then
local groups = sorcery.lib.str.explode(string.sub(identity,7), ',')
for _,g in pairs(groups) do
local rn,rv = sorcery.lib.tbl.split(g,'=')
local gv = minetest.get_item_group(stack:get_name(), rn)
if rv then
if gv ~= tonumber(rv) then return false, stack end
else
|
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
end
else
local is = ItemStack(identity)
identity,count = is:get_name(), is:get_count()
end
end
if sorcery.lib.str.beginswith(identity, 'group:') then
local stack = ItemStack(item)
local groups = sorcery.lib.str.explode(string.sub(identity,7), ',')
for _,g in pairs(groups) do
local rn,rv = sorcery.lib.tbl.split(g,'=')
local gv = minetest.get_item_group(stack:get_name(), rn)
if rv then
if gv ~= tonumber(rv) then return false, stack end
else
|