Finally fix cooking recipes

This commit is contained in:
Jean-Patrick Guerrero 2020-07-17 00:58:59 +02:00
parent 0b37b2bb2f
commit d57cb7865b

@ -695,7 +695,7 @@ local function cache_recipes(item)
end end
if cook_cache[item] then if cook_cache[item] then
recipes_cache[item] = table_merge(recipes_cache[item] or {}, {cook_cache[item]}) recipes_cache[item] = table_merge(recipes_cache[item] or {}, cook_cache[item])
end end
end end
@ -1470,7 +1470,9 @@ core.register_craft = function(def)
elseif def.type == "cooking" then elseif def.type == "cooking" then
def.cooktime = def.cooktime or 1 def.cooktime = def.cooktime or 1
def.items = {def.recipe} def.items = {def.recipe}
cook_cache[def.recipe] = def def.recipe = nil
cook_cache[name] = cook_cache[name] or {}
insert(cook_cache[name], def)
end end
end end
end end