Use ephemeral sounds

This commit is contained in:
Wuzzy 2020-04-07 00:55:45 +02:00
parent b2c75acd68
commit c5e4ec5e27
61 changed files with 123 additions and 122 deletions

View file

@ -105,7 +105,7 @@ local fish = function(itemstack, player)
local idef = itemstack:get_definition()
itemstack:add_wear(65535/65) -- 65 uses
if itemstack:get_count() == 0 and idef.sound and idef.sound.breaks then
minetest.sound_play(idef.sound.breaks, {pos=player:get_pos(), gain=0.5})
minetest.sound_play(idef.sound.breaks, {pos=player:get_pos(), gain=0.5}, true)
end
end
end
@ -119,7 +119,7 @@ local fish = function(itemstack, player)
local idef = itemstack:get_definition()
itemstack:add_wear((65535/65)*2) -- if so and not creative then wear double like in MC.
if itemstack:get_count() == 0 and idef.sound and idef.sound.breaks then
minetest.sound_play(idef.sound.breaks, {pos=player:get_pos(), gain=0.5})
minetest.sound_play(idef.sound.breaks, {pos=player:get_pos(), gain=0.5}, true)
end
end
end