mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-14 03:33:50 +01:00
Default/functions: Reduce lavacooling ABM/sound overload
This commit is contained in:
parent
8d1eef025d
commit
547a7b3304
@ -90,19 +90,21 @@ end
|
|||||||
|
|
||||||
default.cool_lava_source = function(pos)
|
default.cool_lava_source = function(pos)
|
||||||
minetest.set_node(pos, {name = "default:obsidian"})
|
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
|
end
|
||||||
|
|
||||||
default.cool_lava_flowing = function(pos)
|
default.cool_lava_flowing = function(pos)
|
||||||
minetest.set_node(pos, {name = "default:stone"})
|
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
|
end
|
||||||
|
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = {"default:lava_flowing"},
|
nodenames = {"default:lava_flowing"},
|
||||||
neighbors = {"group:water"},
|
neighbors = {"group:water"},
|
||||||
interval = 1,
|
interval = 1,
|
||||||
chance = 1,
|
chance = 2,
|
||||||
action = function(...)
|
action = function(...)
|
||||||
default.cool_lava_flowing(...)
|
default.cool_lava_flowing(...)
|
||||||
end,
|
end,
|
||||||
@ -112,7 +114,7 @@ minetest.register_abm({
|
|||||||
nodenames = {"default:lava_source"},
|
nodenames = {"default:lava_source"},
|
||||||
neighbors = {"group:water"},
|
neighbors = {"group:water"},
|
||||||
interval = 1,
|
interval = 1,
|
||||||
chance = 1,
|
chance = 2,
|
||||||
action = function(...)
|
action = function(...)
|
||||||
default.cool_lava_source(...)
|
default.cool_lava_source(...)
|
||||||
end,
|
end,
|
||||||
|
Loading…
Reference in New Issue
Block a user