mirror of
https://github.com/minetest/minetest_game.git
synced 2025-06-28 04:40:22 +02:00
Convert minetest.sound_play uses to ephemeral
This commit is contained in:
@ -46,7 +46,8 @@ function default.chest.chest_lid_close(pn)
|
||||
local node = minetest.get_node(pos)
|
||||
minetest.after(0.2, minetest.swap_node, pos, { name = "default:" .. swap,
|
||||
param2 = node.param2 })
|
||||
minetest.sound_play(sound, {gain = 0.3, pos = pos, max_hear_distance = 10})
|
||||
minetest.sound_play(sound, {gain = 0.3, pos = pos,
|
||||
max_hear_distance = 10}, true)
|
||||
end
|
||||
|
||||
default.chest.open_chests = {}
|
||||
@ -128,7 +129,7 @@ function default.chest.register_chest(name, d)
|
||||
end
|
||||
|
||||
minetest.sound_play(def.sound_open, {gain = 0.3,
|
||||
pos = pos, max_hear_distance = 10})
|
||||
pos = pos, max_hear_distance = 10}, true)
|
||||
if not default.chest.chest_lid_obstructed(pos) then
|
||||
minetest.swap_node(pos,
|
||||
{ name = "default:" .. name .. "_open",
|
||||
@ -199,7 +200,7 @@ function default.chest.register_chest(name, d)
|
||||
end
|
||||
def.on_rightclick = function(pos, node, clicker)
|
||||
minetest.sound_play(def.sound_open, {gain = 0.3, pos = pos,
|
||||
max_hear_distance = 10})
|
||||
max_hear_distance = 10}, true)
|
||||
if not default.chest.chest_lid_obstructed(pos) then
|
||||
minetest.swap_node(pos, {
|
||||
name = "default:" .. name .. "_open",
|
||||
|
@ -141,7 +141,7 @@ default.cool_lava = function(pos, node)
|
||||
minetest.set_node(pos, {name = "default:stone"})
|
||||
end
|
||||
minetest.sound_play("default_cool_lava",
|
||||
{pos = pos, max_hear_distance = 16, gain = 0.25})
|
||||
{pos = pos, max_hear_distance = 16, gain = 0.25}, true)
|
||||
end
|
||||
|
||||
if minetest.settings:get_bool("enable_lavacooling") ~= false then
|
||||
|
@ -20,7 +20,7 @@ local item = {
|
||||
minetest.sound_play("default_item_smoke", {
|
||||
pos = p,
|
||||
max_hear_distance = 8,
|
||||
})
|
||||
}, true)
|
||||
minetest.add_particlespawner({
|
||||
amount = 3,
|
||||
time = 0.1,
|
||||
|
@ -11,7 +11,8 @@ local function on_flood(pos, oldnode, newnode)
|
||||
nodedef.groups.igniter and nodedef.groups.igniter > 0) then
|
||||
minetest.sound_play(
|
||||
"default_cool_lava",
|
||||
{pos = pos, max_hear_distance = 16, gain = 0.1}
|
||||
{pos = pos, max_hear_distance = 16, gain = 0.1},
|
||||
true
|
||||
)
|
||||
end
|
||||
-- Remove the torch node
|
||||
|
Reference in New Issue
Block a user