mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Convert sound_play uses in builtin to ephemeral
This commit is contained in:
parent
c10e188594
commit
7d29611c1b
2 changed files with 11 additions and 5 deletions
|
@ -475,7 +475,10 @@ function core.do_item_eat(hp_change, replace_with_item, itemstack, user, pointed
|
|||
user:set_hp(user:get_hp() + hp_change)
|
||||
|
||||
if def and def.sound and def.sound.eat then
|
||||
minetest.sound_play(def.sound.eat, { pos = user:get_pos(), max_hear_distance = 16 })
|
||||
core.sound_play(def.sound.eat, {
|
||||
pos = user:get_pos(),
|
||||
max_hear_distance = 16
|
||||
}, true)
|
||||
end
|
||||
|
||||
if replace_with_item then
|
||||
|
@ -582,7 +585,10 @@ function core.node_dig(pos, node, digger)
|
|||
if not core.settings:get_bool("creative_mode") then
|
||||
wielded:add_wear(dp.wear)
|
||||
if wielded:get_count() == 0 and wdef.sound and wdef.sound.breaks then
|
||||
core.sound_play(wdef.sound.breaks, {pos = pos, gain = 0.5})
|
||||
core.sound_play(wdef.sound.breaks, {
|
||||
pos = pos,
|
||||
gain = 0.5
|
||||
}, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue