mirror of
https://codeberg.org/tenplus1/farming.git
synced 2025-12-27 16:25:20 +01:00
fix api.txt hoe recipe, add check for register_hoe recipe (thx the4codeblocks)
This commit is contained in:
19
hoes.lua
19
hoes.lua
@@ -36,19 +36,14 @@ farming.register_hoe = function(name, def)
|
||||
})
|
||||
|
||||
-- Register its recipe
|
||||
if def.recipe then
|
||||
core.register_craft({ output = name:sub(2), recipe = def.recipe })
|
||||
local recipe = def.recipe or (def.material and {
|
||||
{def.material, def.material},
|
||||
{"", "group:stick"},
|
||||
{"", "group:stick"}
|
||||
})
|
||||
|
||||
elseif def.material then
|
||||
|
||||
core.register_craft({
|
||||
output = name:sub(2),
|
||||
recipe = {
|
||||
{def.material, def.material, ""},
|
||||
{"", "group:stick", ""},
|
||||
{"", "group:stick", ""}
|
||||
}
|
||||
})
|
||||
if recipe then
|
||||
core.register_craft({ output = name:sub(2), recipe = recipe })
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user