end
minetest.sound_play({name = "default_place_node_metal", gain = 0.5},
- {pos = pointed_thing.above})
+ {pos = pointed_thing.above}, true)
if not (creative and creative.is_enabled_for
and creative.is_enabled_for(placer:get_player_name())) then
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 = {}
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",
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",
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
minetest.sound_play("default_item_smoke", {
pos = p,
max_hear_distance = 8,
- })
+ }, true)
minetest.add_particlespawner({
amount = 3,
time = 0.1,
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
if state % 2 == 0 then
minetest.sound_play(def.door.sounds[1],
- {pos = pos, gain = 0.3, max_hear_distance = 10})
+ {pos = pos, gain = 0.3, max_hear_distance = 10}, true)
else
minetest.sound_play(def.door.sounds[2],
- {pos = pos, gain = 0.3, max_hear_distance = 10})
+ {pos = pos, gain = 0.3, max_hear_distance = 10}, true)
end
minetest.swap_node(pos, {
itemstack:take_item()
end
- minetest.sound_play(def.sounds.place, {pos = pos})
+ minetest.sound_play(def.sounds.place, {pos = pos}, true)
on_place_node(pos, minetest.get_node(pos),
placer, node, itemstack, pointed_thing)
if string.sub(node.name, -5) == "_open" then
minetest.sound_play(def.sound_close,
- {pos = pos, gain = 0.3, max_hear_distance = 10})
+ {pos = pos, gain = 0.3, max_hear_distance = 10}, true)
minetest.swap_node(pos, {name = string.sub(node.name, 1,
string.len(node.name) - 5), param1 = node.param1, param2 = node.param2})
else
minetest.sound_play(def.sound_open,
- {pos = pos, gain = 0.3, max_hear_distance = 10})
+ {pos = pos, gain = 0.3, max_hear_distance = 10}, true)
minetest.swap_node(pos, {name = node.name .. "_open",
param1 = node.param1, param2 = node.param2})
end
local node_def = minetest.registered_nodes[node.name]
minetest.swap_node(pos, {name = node_def.gate, param2 = node.param2})
minetest.sound_play(node_def.sound, {pos = pos, gain = 0.3,
- max_hear_distance = 8})
+ max_hear_distance = 8}, true)
return itemstack
end,
selection_box = {
minetest.sound_play("default_dig_crumbly", {
pos = pt.under,
gain = 0.5,
- })
+ }, true)
if not (creative and creative.is_enabled_for
and creative.is_enabled_for(user:get_player_name())) then
itemstack:add_wear(65535/(uses-1))
-- tool break sound
if itemstack:get_count() == 0 and wdef.sound and wdef.sound.breaks then
- minetest.sound_play(wdef.sound.breaks, {pos = pt.above, gain = 0.5})
+ minetest.sound_play(wdef.sound.breaks, {pos = pt.above,
+ gain = 0.5}, true)
end
end
return itemstack
if not (nodedef and nodedef.groups and
nodedef.groups.igniter and nodedef.groups.igniter > 0) then
minetest.sound_play("fire_extinguish_flame",
- {pos = pos, max_hear_distance = 16, gain = 0.15})
+ {pos = pos, max_hear_distance = 16, gain = 0.15}, true)
end
-- Remove the flame
return false
local sound_pos = pointed_thing.above or user:get_pos()
minetest.sound_play(
"fire_flint_and_steel",
- {pos = sound_pos, gain = 0.5, max_hear_distance = 8}
+ {pos = sound_pos, gain = 0.5, max_hear_distance = 8},
+ true
)
local player_name = user:get_player_name()
if pointed_thing.type == "node" then
itemstack:add_wear(1000)
-- Tool break sound
if itemstack:get_count() == 0 and wdef.sound and wdef.sound.breaks then
- minetest.sound_play(wdef.sound.breaks, {pos = sound_pos, gain = 0.5})
+ minetest.sound_play(wdef.sound.breaks, {pos = sound_pos,
+ gain = 0.5}, true)
end
return itemstack
end
def.on_ignite(pos)
elseif minetest.get_item_group(name, "tnt") > 0 then
minetest.swap_node(pos, {name = name .. "_burning"})
- minetest.sound_play("tnt_ignite", {pos = pos})
+ minetest.sound_play("tnt_ignite", {pos = pos}, true)
minetest.get_node_timer(pos):start(1)
end
end
end
local sound = def.sound or "tnt_explode"
minetest.sound_play(sound, {pos = pos, gain = 2.5,
- max_hear_distance = math.min(def.radius * 20, 128)})
+ max_hear_distance = math.min(def.radius * 20, 128)}, true)
local drops, radius = tnt_explode(pos, def.radius, def.ignore_protection,
def.ignore_on_blast, owner, def.explode_center)
-- append entity drops
-- unaffected by explosions
on_blast = function() end,
on_construct = function(pos)
- minetest.sound_play("tnt_gunpowder_burning", {pos = pos, gain = 2})
+ minetest.sound_play("tnt_gunpowder_burning", {pos = pos,
+ gain = 2}, true)
minetest.get_node_timer(pos):start(1)
end,
})
-- unaffected by explosions
on_blast = function() end,
on_construct = function(pos)
- minetest.sound_play("tnt_ignite", {pos = pos})
+ minetest.sound_play("tnt_ignite", {pos = pos}, true)
minetest.get_node_timer(pos):start(4)
minetest.check_for_falling(pos)
end,