Use ephemeral sounds
This commit is contained in:
parent
b2c75acd68
commit
c5e4ec5e27
61 changed files with 123 additions and 122 deletions
|
@ -28,7 +28,8 @@ minetest.register_tool("mcl_fire:flint_and_steel", {
|
|||
local idef = itemstack:get_definition()
|
||||
minetest.sound_play(
|
||||
"fire_flint_and_steel",
|
||||
{pos = pointed_thing.above, gain = 0.5, max_hear_distance = 8}
|
||||
{pos = pointed_thing.above, gain = 0.5, max_hear_distance = 8},
|
||||
true
|
||||
)
|
||||
local used = false
|
||||
if pointed_thing.type == "node" then
|
||||
|
@ -44,7 +45,7 @@ minetest.register_tool("mcl_fire:flint_and_steel", {
|
|||
used = true
|
||||
end
|
||||
if itemstack:get_count() == 0 and idef.sound and idef.sound.breaks then
|
||||
minetest.sound_play(idef.sound.breaks, {pos=user:get_pos(), gain=0.5})
|
||||
minetest.sound_play(idef.sound.breaks, {pos=user:get_pos(), gain=0.5}, true)
|
||||
end
|
||||
if not minetest.settings:get_bool("creative_mode") and used == true then
|
||||
itemstack:add_wear(65535/65) -- 65 uses
|
||||
|
|
|
@ -67,7 +67,7 @@ minetest.register_node("mcl_fire:fire", {
|
|||
floodable = true,
|
||||
on_flood = function(pos, oldnode, newnode)
|
||||
if minetest.get_item_group(newnode.name, "water") ~= 0 then
|
||||
minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.25, max_hear_distance = 16})
|
||||
minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.25, max_hear_distance = 16}, true)
|
||||
end
|
||||
end,
|
||||
on_timer = function(pos)
|
||||
|
@ -151,7 +151,7 @@ minetest.register_node("mcl_fire:eternal_fire", {
|
|||
floodable = true,
|
||||
on_flood = function(pos, oldnode, newnode)
|
||||
if minetest.get_item_group(newnode.name, "water") ~= 0 then
|
||||
minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.25, max_hear_distance = 16})
|
||||
minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.25, max_hear_distance = 16}, true)
|
||||
end
|
||||
end,
|
||||
on_timer = function(pos)
|
||||
|
@ -310,7 +310,7 @@ minetest.register_abm({
|
|||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.remove_node(pos)
|
||||
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,
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue