From cb8a2644502d82d062ed829879b2d7ba299be5c5 Mon Sep 17 00:00:00 2001 From: Craig Davison Date: Sat, 17 Jan 2015 19:54:21 +0000 Subject: [PATCH] Add protection support to lavacooling functions --- mods/default/functions.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mods/default/functions.lua b/mods/default/functions.lua index c5623205..f754eef8 100644 --- a/mods/default/functions.lua +++ b/mods/default/functions.lua @@ -122,7 +122,9 @@ minetest.register_abm({ interval = 1, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) - default.cool_lava_flowing(pos, node, active_object_count, active_object_count_wider) + if not minetest.is_protected(pos, "") then + default.cool_lava_flowing(pos, node, active_object_count, active_object_count_wider) + end end, }) @@ -132,7 +134,9 @@ minetest.register_abm({ interval = 1, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) - default.cool_lava_source(pos, node, active_object_count, active_object_count_wider) + if not minetest.is_protected(pos, "") then + default.cool_lava_source(pos, node, active_object_count, active_object_count_wider) + end end, })