1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2024-12-26 02:40:23 +01:00

Made pipes able to carry water!

It was just a minor logic error resulting from moving the water flowing code
into it's own file when I originally imported it.  Many thanks to Mauvebic for
writing it!
This commit is contained in:
Vanessa Ezekowitz 2013-01-04 01:34:25 -05:00
parent 88bc800ccb
commit 0a1f90c391
2 changed files with 9 additions and 9 deletions

View File

@ -86,22 +86,22 @@ local spigot_check = function(pos,node)
end end
minetest.register_abm({ minetest.register_abm({
nodenames = empty_nodenames, nodenames = pipes_empty_nodenames,
interval = 15, interval = 1,
chance = 1, chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider) check4inflows(pos,node) end action = function(pos, node, active_object_count, active_object_count_wider) check4inflows(pos,node) end
}) })
minetest.register_abm({ minetest.register_abm({
nodenames = full_nodenames, nodenames = pipes_full_nodenames,
interval = 10, interval = 1,
chance = 1, chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider) checksources(pos,node) end action = function(pos, node, active_object_count, active_object_count_wider) checksources(pos,node) end
}) })
minetest.register_abm({ minetest.register_abm({
nodenames = {'pipeworks:outlet','pipeworks:spigot'}, nodenames = {'pipeworks:outlet','pipeworks:spigot'},
interval = 10, interval = 1,
chance = 1, chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider) action = function(pos, node, active_object_count, active_object_count_wider)
if node.name == 'pipeworks:outlet' then update_outlet(pos) if node.name == 'pipeworks:outlet' then update_outlet(pos)

View File

@ -135,8 +135,8 @@ end
-- now define the nodes! -- now define the nodes!
local empty_nodenames = {} pipes_empty_nodenames = {}
local full_nodenames = {} pipes_full_nodenames = {}
for xm = 0, 1 do for xm = 0, 1 do
for xp = 0, 1 do for xp = 0, 1 do
@ -310,8 +310,8 @@ for zp = 0, 1 do
pipe_scanforobjects(pos) pipe_scanforobjects(pos)
end end
}) })
table.insert(empty_nodenames,"pipeworks:pipe_"..pname.."_empty") -- for the abms table.insert(pipes_empty_nodenames,"pipeworks:pipe_"..pname.."_empty") -- for the abms
table.insert(full_nodenames,"pipeworks:pipe_"..pname.."_loaded") -- for bacon table.insert(pipes_full_nodenames,"pipeworks:pipe_"..pname.."_loaded") -- for bacon
end end
end end
end end