Update lava cooling for minetest_game

Lava cooling functions were merged here 7d2dfe4101
This commit is contained in:
MT-Modder 2016-02-14 00:55:20 -05:00
parent a747e05e2e
commit afc43172dd

View File

@ -753,18 +753,18 @@ if minetest.setting_getbool("gloopblocks_lavacooling") ~= false then
return false return false
end end
default.cool_lava_source = function(pos) default.cool_lava = function(pos, node)
if gloopblocks_search_nearby_nodes(pos,"default:water_source") if node.name == "default:lava_source" then
or gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then if gloopblocks_search_nearby_nodes(pos,"default:water_source")
minetest.set_node(pos, {name="gloopblocks:obsidian_cooled"}) or gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then
end minetest.set_node(pos, {name="gloopblocks:obsidian_cooled"})
end end
else -- Lava flowing
default.cool_lava_flowing = function(pos) if gloopblocks_search_nearby_nodes(pos,"default:water_source") then
if gloopblocks_search_nearby_nodes(pos,"default:water_source") then minetest.set_node(pos, {name="gloopblocks:basalt_cooled"})
minetest.set_node(pos, {name="gloopblocks:basalt_cooled"}) elseif gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then
elseif gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then minetest.set_node(pos, {name="gloopblocks:pumice_cooled"})
minetest.set_node(pos, {name="gloopblocks:pumice_cooled"}) end
end end
end end
end end