From a949238a0ddbc19bb33d41f77d45438529471cd5 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Fri, 17 Jul 2015 17:55:55 -0400 Subject: [PATCH] alternate recipe if neither technic nor moreores is installed (default gold + steel + copper == 3 brass) --- homedecor/crafts.lua | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/homedecor/crafts.lua b/homedecor/crafts.lua index ca1783e..1d56528 100644 --- a/homedecor/crafts.lua +++ b/homedecor/crafts.lua @@ -149,22 +149,32 @@ if not minetest.get_modpath("mesecons") then end -- alternate crafting if technic is/isn't installed - if not minetest.get_modpath("technic") then - minetest.register_craftitem(":technic:brass_ingot", { - description = S("Brass Ingot"), - inventory_image = "homedecor_brass_ingot.png", + description = S("Brass Ingot"), + inventory_image = "homedecor_brass_ingot.png", }) - minetest.register_craft( { - type = "shapeless", - output = "technic:brass_ingot 2", - recipe = { - "moreores:silver_ingot", - "default:copper_ingot", - }, - }) + if minetest.get_modpath("moreores") then + minetest.register_craft( { + type = "shapeless", + output = "technic:brass_ingot 2", + recipe = { + "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 minetest.register_alias("homedecor:brass_ingot", "technic:brass_ingot")