Fix liquid not flowing in moontest air

Also minor tweak to cause it not to delete vacuum or air directly above
it... doesn't flow upwards anyway, now does it?
This commit is contained in:
HeroOfTheWinds 2014-05-21 10:52:11 -10:00
parent 228ff22996
commit 170596c13f

View file

@ -129,19 +129,19 @@ minetest.register_on_generated(function(minp, maxp, seed)
vm:write_to_map(data)
end)
--make liquid delete vacuum nodes nearby so as to allow flowing
--make liquid delete vacuum and air nodes nearby so as to allow flowing
minetest.register_abm({
nodenames = {"group:liquid"},
neighbors = {"moontest:vacuum"},
neighbors = {"moontest:vacuum", "moontest:air"},
interval = 1.0,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
for x = -1,1 do
for y = -1,1 do
for y = -1,0 do
for z = -1,1 do
n_pos = {x=x + pos.x,y=y+pos.y,z=z+pos.z}
n_name = minetest.get_node(n_pos).name
if n_name == "moontest:vacuum" then
if n_name == "moontest:vacuum" or n_name == "moontest:air" then
minetest.remove_node(n_pos)
end
end