summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-02-03 01:05:12 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-06-18 12:42:19 -0400
commit7f94ed4c1ac06b5bbe05e87323eb90a099df321b (patch)
treeebcd4d124328273fcc09abc35f14186f31fb7d33 /init.lua
parente8c249f8d24aac7adf3401155567006db554cd40 (diff)
make valves and flow sensors work with new flow logic
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua16
1 files changed, 15 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 7c7befa..82bf8f7 100644
--- a/init.lua
+++ b/init.lua
@@ -84,6 +84,18 @@ function pipeworks.replace_name(tbl,tr,name)
return ntbl
end
+function pipeworks.table_copy(t)
+ local nt = { };
+ for k, v in pairs(t) do
+ if type(v) == "table" then
+ nt[k] = pipeworks.table_copy(v)
+ else
+ nt[k] = v
+ end
+ end
+ return nt
+end
+
-------------------------------------------
-- Load the various other parts of the mod
@@ -93,7 +105,10 @@ dofile(pipeworks.modpath.."/autoplace_pipes.lua")
dofile(pipeworks.modpath.."/autoplace_tubes.lua")
dofile(pipeworks.modpath.."/luaentity.lua")
dofile(pipeworks.modpath.."/item_transport.lua")
+
+if pipeworks.enable_pipes then dofile(pipeworks.modpath.."/pipes.lua") end
dofile(pipeworks.modpath.."/flowing_logic.lua")
+
dofile(pipeworks.modpath.."/crafts.lua")
dofile(pipeworks.modpath.."/tube_registration.lua")
dofile(pipeworks.modpath.."/routing_tubes.lua")
@@ -105,7 +120,6 @@ dofile(pipeworks.modpath.."/filter-injector.lua")
dofile(pipeworks.modpath.."/trashcan.lua")
dofile(pipeworks.modpath.."/wielder.lua")
-if pipeworks.enable_pipes then dofile(pipeworks.modpath.."/pipes.lua") end
if pipeworks.enable_teleport_tube then dofile(pipeworks.modpath.."/teleport_tube.lua") end
if pipeworks.enable_pipe_devices then dofile(pipeworks.modpath.."/devices.lua") end
if pipeworks.enable_redefines then dofile(pipeworks.modpath.."/compat.lua") end