diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-05-10 17:28:11 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-05-10 17:28:11 -0400 |
commit | 9231f9fa016cf2d2ad354e5e1a87acbf39873303 (patch) | |
tree | dd3b4abd8feea5977cdac4ef9212ac4910c76d58 /flowing_logic.lua | |
parent | 54a78297bbe9d0d44926bc003b391b2174e3dd6f (diff) |
made valves and airtight entry panels work.
Removed "flowing" spigot from creative inventory.
Diffstat (limited to 'flowing_logic.lua')
-rw-r--r-- | flowing_logic.lua | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/flowing_logic.lua b/flowing_logic.lua index 2b03ef3..e633983 100644 --- a/flowing_logic.lua +++ b/flowing_logic.lua @@ -47,13 +47,14 @@ local check4inflows = function(pos,node) end if newnode then dbg(newnode..' to replace '..node.name) - minetest.env:add_node(pos,{name=newnode}) + minetest.env:add_node(pos,{name=newnode, param2 = node.param2}) minetest.env:get_meta(pos):set_string('source',minetest.pos_to_string(source)) end end local checksources = function(pos,node) local sourcepos = minetest.string_to_pos(minetest.env:get_meta(pos):get_string('source')) + if not sourcepos then return end local source = minetest.env:get_node(sourcepos).name local newnode = false if not ((source == 'pipeworks:pump_on' and check4liquids(sourcepos)) or string.find(source,'_loaded') or source == 'ignore' ) then @@ -62,7 +63,7 @@ local checksources = function(pos,node) if newnode then dbg(newnode..' to replace '..node.name) end if newnode then - minetest.env:add_node(pos,{name=newnode}) + minetest.env:add_node(pos,{name=newnode, param2 = node.param2}) minetest.env:get_meta(pos):set_string('source','') end end @@ -99,6 +100,16 @@ local spigot_check = function(pos,node) end end +table.insert(pipes_empty_nodenames,"pipeworks:valve_on_empty") +table.insert(pipes_empty_nodenames,"pipeworks:valve_off_empty") +table.insert(pipes_empty_nodenames,"pipeworks:valve_on_loaded") +table.insert(pipes_empty_nodenames,"pipeworks:entry_panel_empty") + +table.insert(pipes_full_nodenames,"pipeworks:valve_on_empty") +table.insert(pipes_full_nodenames,"pipeworks:valve_off_empty") +table.insert(pipes_full_nodenames,"pipeworks:valve_on_loaded") +table.insert(pipes_full_nodenames,"pipeworks:entry_panel_loaded") + minetest.register_abm({ nodenames = pipes_empty_nodenames, interval = 1, |