Default/functions: Reduce lavacooling ABM/sound overload

This commit is contained in:
paramat 2015-08-02 05:16:01 +01:00
parent 8d1eef025d
commit 547a7b3304
1 changed files with 6 additions and 4 deletions

View File

@ -90,19 +90,21 @@ end
default.cool_lava_source = function(pos)
minetest.set_node(pos, {name = "default:obsidian"})
minetest.sound_play("default_cool_lava", {pos = pos, gain = 0.25})
minetest.sound_play("default_cool_lava",
{pos = pos, max_hear_distance = 16, gain = 0.25})
end
default.cool_lava_flowing = function(pos)
minetest.set_node(pos, {name = "default:stone"})
minetest.sound_play("default_cool_lava", {pos = pos, gain = 0.25})
minetest.sound_play("default_cool_lava",
{pos = pos, max_hear_distance = 16, gain = 0.25})
end
minetest.register_abm({
nodenames = {"default:lava_flowing"},
neighbors = {"group:water"},
interval = 1,
chance = 1,
chance = 2,
action = function(...)
default.cool_lava_flowing(...)
end,
@ -112,7 +114,7 @@ minetest.register_abm({
nodenames = {"default:lava_source"},
neighbors = {"group:water"},
interval = 1,
chance = 1,
chance = 2,
action = function(...)
default.cool_lava_source(...)
end,