From c47d6b02df8ec33ecaaa43a20294bdd0704540dd Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sun, 2 Sep 2012 12:55:14 -0400 Subject: Added crafting recipes for various objects, with options: If homedecor is installed, use the plastic sheeting therein. If not, we define it manually. If the Technic mod is installed, don't define any recipes at all. Also removed the extra "loaded!" messages and tweaked the default pipe alias to point to something that is actually visible :-) --- crafts.lua | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 crafts.lua (limited to 'crafts.lua') diff --git a/crafts.lua b/crafts.lua new file mode 100644 index 0000000..bcff106 --- /dev/null +++ b/crafts.lua @@ -0,0 +1,94 @@ +-- Crafting recipes for pipeworks + +-- If the technic mod is present, then don't bother registering these recipes +-- as that mod supplies its own. + +if io.open(minetest.get_modpath("pipeworks").."/../technic/init.lua", "r") == nil then + + -- If homedecor is not installed, we need to register a few of its crafts + -- manually so we can use them. + + if minetest.get_modpath("homedecor") == nil then + + minetest.register_craftitem(":homedecor:plastic_sheeting", { + description = "Plastic sheet", + inventory_image = "pipeworks_plastic_sheeting.png", + }) + + minetest.register_craft({ + type = "cooking", + output = "homedecor:plastic_sheeting", + recipe = "default:junglegrass 2", + }) + + minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:plastic_sheeting', + burntime = 30, + }) + end + + minetest.register_craft( { + output = "pipeworks:pipe_110000_empty 6", + recipe = { + { "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }, + { "", "", "" }, + { "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" } + }, + }) + + minetest.register_craft( { + output = "pipeworks:pump", + recipe = { + { "default:stone", "default:stone", "default:stone" }, + { "default:steel_ingot", "default:stick", "default:steel_ingot" }, + { "default:stone", "default:stone", "default:stone" } + }, + }) + + minetest.register_craft( { + output = "pipeworks:valve", + recipe = { + { "", "default:stick", "" }, + { "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }, + { "", "default:steel_ingot", "" } + }, + }) + + minetest.register_craft( { + output = "pipeworks:storage_tank", + recipe = { + { "", "default:steel_ingot", "default:steel_ingot" }, + { "default:steel_ingot", "default:glass", "default:steel_ingot" }, + { "default:steel_ingot", "default:steel_ingot", "" } + }, + }) + + minetest.register_craft( { + output = "pipeworks:intake", + recipe = { + { "", "default:steel_ingot", "" }, + { "default:steel_ingot", "", "default:steel_ingot" }, + { "", "default:steel_ingot", "" } + }, + }) + + minetest.register_craft( { + output = "pipeworks:outlet", + recipe = { + { "default:steel_ingot", "", "default:steel_ingot" }, + { "", "default:steel_ingot", "" }, + { "default:steel_ingot", "", "default:steel_ingot" } + }, + }) + + minetest.register_craft( { + output = "pipeworks:tube 6", + recipe = { + { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" }, + { "", "", "" }, + { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" } + }, + }) + +end -- cgit v1.2.3