From bfdb67783b31936ab94c93e9746aa977e0d60eb4 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Wed, 15 Jul 2020 00:28:23 +0200 Subject: [PATCH] Fix missing recipes again --- init.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index 76d7aad..1c4a6d3 100644 --- a/init.lua +++ b/init.lua @@ -701,11 +701,7 @@ local function cache_recipes(item) item = reg_aliases[item] or item local def = reg_items[item] if not def then return end - local recipes = get_all_recipes(item) - - if recipes then - recipes_cache[item] = table_merge(recipes_cache[item], recipes) - end + recipes_cache[item] = get_all_recipes(item) end local function get_recipes(item, data, player) @@ -1563,9 +1559,15 @@ local function get_init_items() for name, def in pairs(reg_items) do if name ~= "" and show_item(def) then - cache_recipes(name) cache_drops(name, def.drop) - cache_fuel(name) + + if not fuel_cache[name] then + cache_fuel(name) + end + + if not recipes_cache[name] then + cache_recipes(name) + end _preselect[name] = true end