1
0
mirror of https://github.com/rubenwardy/food.git synced 2024-11-13 22:00:35 +01:00

override function fix if no groups

This commit is contained in:
rubenwardy 2014-04-18 08:49:12 +01:00
parent dbcd373e30
commit e4b9ff0373

View File

@ -45,9 +45,11 @@ function food.support(group,mod,item)
-- Need to copy this table, not modify it in place, otherwise it can change
-- the groups for ALL craftitems that use the default groups.
g = {}
if data.groups then
for k, v in pairs(data.groups) do
g[k] = v
end
end
g["food_"..group] = 1
minetest.override_item(item, {groups = g})