Files
spacesuit/repair.lua
coil 7c5570af5e Replace air bottle by empty bottle when repairing spacesuit
This gives the empty heavy iron bottle back when crafting an air
bottle and a spacesuit part to repair the spacesuit part.
2019-06-30 21:31:50 -04:00

27 lines
471 B
Lua

local has_vacuum = minetest.get_modpath("vacuum")
if has_vacuum then
function repair_recipe(partname)
minetest.register_craft({
type = "shapeless",
output = partname,
recipe = {
"vacuum:air_bottle",
partname
},
replacements = {
{"vacuum:air_bottle", "vessels:steel_bottle"}
}
})
end
repair_recipe("spacesuit:helmet")
repair_recipe("spacesuit:chestplate")
repair_recipe("spacesuit:pants")
repair_recipe("spacesuit:boots")
end