summaryrefslogtreecommitdiff
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
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 :-)
-rw-r--r--crafts.lua94
-rw-r--r--devices.lua1
-rw-r--r--init.lua5
-rw-r--r--textures/pipeworks_plastic_sheeting.pngbin0 -> 198 bytes
-rw-r--r--tubes.lua1
5 files changed, 96 insertions, 5 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
diff --git a/devices.lua b/devices.lua
index 80f69c7..5f1ce0d 100644
--- a/devices.lua
+++ b/devices.lua
@@ -469,4 +469,3 @@ for a in ipairs(axes) do
end)
end
-print("Pipeworks loaded!")
diff --git a/init.lua b/init.lua
index a36fc16..0c6a501 100644
--- a/init.lua
+++ b/init.lua
@@ -11,9 +11,7 @@
-- Un-comment the following dofile line to re-enable the old pipe nodes.
-- dofile(minetest.get_modpath("pipeworks").."/oldpipes.lua")
--- tables
-
-minetest.register_alias("pipeworks:pipe", "pipeworks:pipe_000000_empty")
+minetest.register_alias("pipeworks:pipe", "pipeworks:pipe_110000_empty")
pipe_leftstub = {
{ -32/64, -2/64, -6/64, 1/64, 2/64, 6/64 }, -- pipe segment against -X face
@@ -319,5 +317,6 @@ end
dofile(minetest.get_modpath("pipeworks").."/tubes.lua")
dofile(minetest.get_modpath("pipeworks").."/devices.lua")
dofile(minetest.get_modpath("pipeworks").."/autoplace.lua")
+dofile(minetest.get_modpath("pipeworks").."/crafts.lua")
print("Pipeworks loaded!")
diff --git a/textures/pipeworks_plastic_sheeting.png b/textures/pipeworks_plastic_sheeting.png
new file mode 100644
index 0000000..810ea2a
--- /dev/null
+++ b/textures/pipeworks_plastic_sheeting.png
Binary files differ
diff --git a/tubes.lua b/tubes.lua
index 3487661..e7844a3 100644
--- a/tubes.lua
+++ b/tubes.lua
@@ -198,4 +198,3 @@ end
end
end
-print("pipeworks loaded!")