be sure recipe_def.groups is provided

This commit is contained in:
Alexander Weber 2016-12-16 13:47:35 +01:00
parent 245331c039
commit 92d7c46484

@ -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