Add clear recipe to all registered tanks

This commit is contained in:
Evert Prants 2019-03-07 14:29:44 +02:00
parent 8a8962d9e0
commit 6280bab23b
No known key found for this signature in database
GPG Key ID: 1688DA83D222D0B5

@ -152,6 +152,18 @@ local function create_tank_node(tankname, def, fluid_name)
end end
fluid_lib.register_node(tankname) fluid_lib.register_node(tankname)
if srcnode then
if srcnode:match("^:") then
srcnode = srcnode:sub(2)
end
minetest.register_craft({
type = "shapeless",
output = srcnode,
recipe = { tankname },
})
end
end end
function fluid_tanks.register_tank(tankname, def) function fluid_tanks.register_tank(tankname, def)