summaryrefslogtreecommitdiff
path: root/crafts.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2012-09-02 12:55:14 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2012-09-02 12:55:14 -0400
commitc47d6b02df8ec33ecaaa43a20294bdd0704540dd (patch)
treedfeeab328e9232971d95b61fa676f32078400925 /crafts.lua
parentccf696748d8ef354033224265119b60c947c55ff (diff)
downloadpipeworks-c47d6b02df8ec33ecaaa43a20294bdd0704540dd.tar
pipeworks-c47d6b02df8ec33ecaaa43a20294bdd0704540dd.tar.gz
pipeworks-c47d6b02df8ec33ecaaa43a20294bdd0704540dd.tar.bz2
pipeworks-c47d6b02df8ec33ecaaa43a20294bdd0704540dd.tar.xz
pipeworks-c47d6b02df8ec33ecaaa43a20294bdd0704540dd.zip
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 :-)
Diffstat (limited to 'crafts.lua')
-rw-r--r--crafts.lua94
1 files changed, 94 insertions, 0 deletions
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