alternate recipe if neither technic nor moreores is installed

(default gold + steel + copper == 3 brass)
This commit is contained in:
Vanessa Ezekowitz 2015-07-17 17:55:55 -04:00
parent 451d2e26ad
commit a949238a0d

View File

@ -149,22 +149,32 @@ if not minetest.get_modpath("mesecons") then
end end
-- alternate crafting if technic is/isn't installed -- alternate crafting if technic is/isn't installed
if not minetest.get_modpath("technic") then if not minetest.get_modpath("technic") then
minetest.register_craftitem(":technic:brass_ingot", { minetest.register_craftitem(":technic:brass_ingot", {
description = S("Brass Ingot"), description = S("Brass Ingot"),
inventory_image = "homedecor_brass_ingot.png", inventory_image = "homedecor_brass_ingot.png",
}) })
minetest.register_craft( { if minetest.get_modpath("moreores") then
type = "shapeless", minetest.register_craft( {
output = "technic:brass_ingot 2", type = "shapeless",
recipe = { output = "technic:brass_ingot 2",
"moreores:silver_ingot", recipe = {
"default:copper_ingot", "moreores:silver_ingot",
}, "default:copper_ingot",
}) },
})
else
minetest.register_craft( {
type = "shapeless",
output = "technic:brass_ingot 3",
recipe = {
"default:steel_ingot",
"default:copper_ingot",
"default:gold_ingot",
},
})
end
end end
minetest.register_alias("homedecor:brass_ingot", "technic:brass_ingot") minetest.register_alias("homedecor:brass_ingot", "technic:brass_ingot")