mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-26 12:33:43 +01:00
Minor cleaning
This commit is contained in:
parent
d903aaca89
commit
f2a5c4255e
11
init.lua
11
init.lua
@ -699,23 +699,22 @@ end
|
||||
|
||||
local function cache_recipes(item)
|
||||
local recipes = get_all_recipes(item)
|
||||
local _recipes
|
||||
|
||||
if replacements[item] then
|
||||
_recipes = {}
|
||||
local _recipes = {}
|
||||
|
||||
for k, v in ipairs(recipes or {}) do
|
||||
_recipes[#recipes + 1 - k] = v
|
||||
end
|
||||
|
||||
for k, v in pairs(replacements[item]) do
|
||||
if v.type ~= "fuel" then
|
||||
_recipes[k].replacements = v
|
||||
end
|
||||
_recipes[k].replacements = v
|
||||
end
|
||||
|
||||
recipes = _recipes
|
||||
end
|
||||
|
||||
recipes_cache[item] = _recipes or recipes
|
||||
recipes_cache[item] = recipes
|
||||
end
|
||||
|
||||
local function get_recipes(item, data, player)
|
||||
|
Loading…
Reference in New Issue
Block a user