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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue