From d57cb7865b642ff9147a9040c2883270a2bd3b9e Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Fri, 17 Jul 2020 00:58:59 +0200 Subject: [PATCH] Finally fix cooking recipes --- init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 8c09804..952a4c2 100644 --- a/init.lua +++ b/init.lua @@ -695,7 +695,7 @@ local function cache_recipes(item) end 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 @@ -1470,7 +1470,9 @@ core.register_craft = function(def) elseif def.type == "cooking" then def.cooktime = def.cooktime or 1 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