Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Commit

Permalink
Remove useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
kilbith committed Jul 15, 2020
1 parent 1ebc1ea commit bba7dd8
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1478,32 +1478,8 @@ core.register_craft = function(def)
def.width = def.cooktime
def.cooktime = nil
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

recipes_cache[name] = recipes_cache[name] or {}
insert(recipes_cache[name], 1, def)
end
Expand Down

0 comments on commit bba7dd8

Please sign in to comment.