From 7f94ed4c1ac06b5bbe05e87323eb90a099df321b Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Tue, 3 Feb 2015 01:05:12 -0500 Subject: make valves and flow sensors work with new flow logic --- init.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'init.lua') 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 -- cgit v1.2.3