1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-28 04:40:22 +02:00

Add option to disable lavacooling (#1726)

This commit is contained in:
Ezhh
2017-05-07 17:25:53 +01:00
committed by SmallJoker
parent 6737952fbf
commit 08706313f4
3 changed files with 19 additions and 12 deletions

View File

@ -131,18 +131,19 @@ default.cool_lava = function(pos, node)
{pos = pos, max_hear_distance = 16, gain = 0.25})
end
minetest.register_abm({
label = "Lava cooling",
nodenames = {"default:lava_source", "default:lava_flowing"},
neighbors = {"group:cools_lava", "group:water"},
interval = 1,
chance = 2,
catch_up = false,
action = function(...)
default.cool_lava(...)
end,
})
if minetest.setting_getbool("enable_lavacooling") ~= false then
minetest.register_abm({
label = "Lava cooling",
nodenames = {"default:lava_source", "default:lava_flowing"},
neighbors = {"group:cools_lava", "group:water"},
interval = 1,
chance = 2,
catch_up = false,
action = function(...)
default.cool_lava(...)
end,
})
end
--
-- optimized helper to put all items in an inventory into a drops list