diff --git a/init.lua b/init.lua index c379b40..bc772e4 100644 --- a/init.lua +++ b/init.lua @@ -70,9 +70,10 @@ workbench.defs = { -- Tools allowed to be repaired function workbench:repairable(stack) local tools = {"pick", "axe", "shovel", "sword", "hoe", "armor", "shield"} - for i=1, #tools do - return stack:find(tools[i]) + for _, t in pairs(tools) do + if stack:find(t) then return true end end + return false end function workbench:get_output(inv, input, name)