summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2012-08-24 13:39:29 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2012-08-24 13:39:29 -0400
commit4a834d17b28cd0d39fd116c67d3107a586f017f8 (patch)
tree608eb768312fc5f9e166b64e840152ed5a920046 /init.lua
parent83f853d2ae772f55b31307d0573b64820e274262 (diff)
downloadpipeworks-4a834d17b28cd0d39fd116c67d3107a586f017f8.tar
pipeworks-4a834d17b28cd0d39fd116c67d3107a586f017f8.tar.gz
pipeworks-4a834d17b28cd0d39fd116c67d3107a586f017f8.tar.bz2
pipeworks-4a834d17b28cd0d39fd116c67d3107a586f017f8.tar.xz
pipeworks-4a834d17b28cd0d39fd116c67d3107a586f017f8.zip
Added pneumatic tubes with their own autoplace code (does not connect to
steel pipes). Fixed a recursion bug that sometimes caused a stack overflow.
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua17
1 files changed, 10 insertions, 7 deletions
diff --git a/init.lua b/init.lua
index fe5d353..a36fc16 100644
--- a/init.lua
+++ b/init.lua
@@ -1,13 +1,15 @@
-- Pipeworks mod by Vanessa Ezekowitz - 2012-08-05
--
--- Entirely my own code. This mod merely supplies enough nodes to build
--- a bunch of pipes in all directions and with all types of junctions
+-- Entirely my own code. This mod supplies various shapes of pipes
+-- and devices that they can connect to such as pumps, valves, etc.
+-- All pipes autoconnect as you lay them out, and devices will auto-
+-- connect to them.
--
-- License: WTFPL
--
--- comment-out the following dofile line to disnable the old pipe nodes.
-dofile(minetest.get_modpath("pipeworks").."/oldpipes.lua")
+-- Un-comment the following dofile line to re-enable the old pipe nodes.
+-- dofile(minetest.get_modpath("pipeworks").."/oldpipes.lua")
-- tables
@@ -116,7 +118,7 @@ dbg = function(s)
end
end
-function fix_newpipe_names(table, replacement)
+function pipes_fix_image_names(table, replacement)
outtable={}
for i in ipairs(table) do
outtable[i]=string.gsub(table[i], "_XXXXX", replacement)
@@ -249,7 +251,7 @@ for zp = 0, 1 do
minetest.register_node("pipeworks:pipe_"..pname.."_empty", {
description = pipedesc,
drawtype = "nodebox",
- tiles = fix_newpipe_names(outimgs, "_empty"),
+ tiles = pipes_fix_image_names(outimgs, "_empty"),
paramtype = "light",
selection_box = {
type = "fixed",
@@ -280,7 +282,7 @@ for zp = 0, 1 do
minetest.register_node("pipeworks:pipe_"..pname.."_loaded", {
description = "Pipe segment (loaded, "..pname..")... You hacker, you.",
drawtype = "nodebox",
- tiles = fix_newpipe_names(outimgs, "_loaded"),
+ tiles = pipes_fix_image_names(outimgs, "_loaded"),
paramtype = "light",
selection_box = {
type = "fixed",
@@ -314,6 +316,7 @@ end
end
end
+dofile(minetest.get_modpath("pipeworks").."/tubes.lua")
dofile(minetest.get_modpath("pipeworks").."/devices.lua")
dofile(minetest.get_modpath("pipeworks").."/autoplace.lua")