mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-12-14 02:30:17 +01:00
Remove useless code
This commit is contained in:
parent
1ebc1eab68
commit
bba7dd81b9
26
init.lua
26
init.lua
@ -1478,32 +1478,8 @@ core.register_craft = function(def)
|
|||||||
def.width = def.cooktime
|
def.width = def.cooktime
|
||||||
def.cooktime = nil
|
def.cooktime = nil
|
||||||
def.items[1] = def.recipe
|
def.items[1] = def.recipe
|
||||||
|
|
||||||
elseif def.type == "shapeless" then
|
|
||||||
def.width = 0
|
|
||||||
for j = 1, #def.recipe do
|
|
||||||
def.items[#def.items + 1] = def.recipe[j]
|
|
||||||
end
|
|
||||||
else
|
|
||||||
def.width = #def.recipe[1]
|
|
||||||
local c = 0
|
|
||||||
|
|
||||||
for j = 1, #def.recipe do
|
|
||||||
if def.recipe[j] then
|
|
||||||
for h = 1, def.width do
|
|
||||||
c = c + 1
|
|
||||||
local it = def.recipe[j][h]
|
|
||||||
|
|
||||||
if it and it ~= "" then
|
|
||||||
def.items[c] = it
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if def.type and def.type ~= "fuel" and def.type ~= "shapeless" then
|
|
||||||
def.recipe = nil
|
def.recipe = nil
|
||||||
|
|
||||||
recipes_cache[name] = recipes_cache[name] or {}
|
recipes_cache[name] = recipes_cache[name] or {}
|
||||||
insert(recipes_cache[name], 1, def)
|
insert(recipes_cache[name], 1, def)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user