mirror of
https://github.com/minetest-mods/carpets.git
synced 2024-12-30 08:57:28 +01:00
be sure recipe_def.groups is provided
This commit is contained in:
parent
245331c039
commit
92d7c46484
3
api.lua
3
api.lua
@ -49,10 +49,11 @@ function carpets.register(recipe, def)
|
|||||||
if not node.groups then
|
if not node.groups then
|
||||||
node.groups = {}
|
node.groups = {}
|
||||||
-- copy by value because of some changes
|
-- copy by value because of some changes
|
||||||
|
if recipe_def.groups then
|
||||||
for k, v in pairs(recipe_def.groups) do
|
for k, v in pairs(recipe_def.groups) do
|
||||||
node.groups[k] = v
|
node.groups[k] = v
|
||||||
end
|
end
|
||||||
|
end
|
||||||
node.groups.leafdecay = nil
|
node.groups.leafdecay = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user