From afc43172dd9804419a63d284a1f92b5baea6cb73 Mon Sep 17 00:00:00 2001 From: MT-Modder Date: Sun, 14 Feb 2016 00:55:20 -0500 Subject: [PATCH] Update lava cooling for minetest_game Lava cooling functions were merged here https://github.com/minetest/minetest_game/commit/7d2dfe41016c7c4b50d1afdab308efca00c20681 --- init.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index e806118..0d14764 100644 --- a/init.lua +++ b/init.lua @@ -753,18 +753,18 @@ if minetest.setting_getbool("gloopblocks_lavacooling") ~= false then return false end - default.cool_lava_source = function(pos) - if gloopblocks_search_nearby_nodes(pos,"default:water_source") - or gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then - minetest.set_node(pos, {name="gloopblocks:obsidian_cooled"}) - end - end - - default.cool_lava_flowing = function(pos) - if gloopblocks_search_nearby_nodes(pos,"default:water_source") then - minetest.set_node(pos, {name="gloopblocks:basalt_cooled"}) - elseif gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then - minetest.set_node(pos, {name="gloopblocks:pumice_cooled"}) + default.cool_lava = function(pos, node) + if node.name == "default:lava_source" then + if gloopblocks_search_nearby_nodes(pos,"default:water_source") + or gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then + minetest.set_node(pos, {name="gloopblocks:obsidian_cooled"}) + end + else -- Lava flowing + if gloopblocks_search_nearby_nodes(pos,"default:water_source") then + minetest.set_node(pos, {name="gloopblocks:basalt_cooled"}) + elseif gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then + minetest.set_node(pos, {name="gloopblocks:pumice_cooled"}) + end end end end