Added extra recipe options

Now you can craft a full tank from other full tanks instead of needing
them empty. (But you can't use tanks partially full)
This commit is contained in:
david 2021-03-04 17:36:02 -05:00
parent cc7e52d8a7
commit 4b802eea93

@ -199,6 +199,7 @@ local function register_air_tank_2(name, desc, color, uses)
end, end,
}) })
-- Allow empty tanks
minetest.register_craft({ minetest.register_craft({
recipe = { recipe = {
-- Use 2 singles to make a double -- Use 2 singles to make a double
@ -206,6 +207,14 @@ local function register_air_tank_2(name, desc, color, uses)
}, },
output = "airtanks:empty_"..name.."_tank_2", output = "airtanks:empty_"..name.."_tank_2",
}) })
-- Allow full tanks too
minetest.register_craft({
recipe = {
-- Use 2 singles to make a double
{"airtanks:"..name.."_tank", "airtanks:"..name.."_tank"},
},
output = "airtanks:"..name.."_tank_2",
})
end end
@ -247,6 +256,7 @@ local function register_air_tank_3(name, desc, color, uses)
end, end,
}) })
-- Allow empty tanks
minetest.register_craft({ minetest.register_craft({
recipe = { recipe = {
-- Use 3 singles to make a triple -- Use 3 singles to make a triple
@ -261,6 +271,21 @@ local function register_air_tank_3(name, desc, color, uses)
}, },
output = "airtanks:empty_"..name.."_tank_3", output = "airtanks:empty_"..name.."_tank_3",
}) })
-- Allow full tanks too
minetest.register_craft({
recipe = {
-- Use 3 singles to make a triple
{"airtanks:"..name.."_tank", "airtanks:"..name.."_tank", "airtanks:"..name.."_tank"},
},
output = "airtanks:"..name.."_tank_3",
})
minetest.register_craft({
recipe = {
-- Use 1 single and 1 dobule to make a triple
{"airtanks:"..name.."_tank", "airtanks:"..name.."_tank_2", ""},
},
output = "airtanks:"..name.."_tank_3",
})
end end