1
0

Switch to `ephemeral' sounds of eating and picking up items

This commit is contained in:
Maksym H 2023-04-29 14:53:50 +03:00
parent e3bb04d341
commit 0de69ddffb
2 changed files with 6 additions and 4 deletions

View File

@ -585,12 +585,14 @@ function core.do_item_eat(hp_change, replace_with_item, itemstack, user, pointed
if def and def.sound and def.sound.eat then if def and def.sound and def.sound.eat then
core.sound_play(def.sound.eat, { core.sound_play(def.sound.eat, {
pos = pos, pos = pos,
max_hear_distance = 16}) max_hear_distance = 16
}, true)
else else
core.sound_play("player_eat", { core.sound_play("player_eat", {
pos = pos, pos = pos,
max_hear_distance = 10, max_hear_distance = 16,
gain = 0.3}) gain = 0.3
}, true)
end end
local dir = user:get_look_dir() local dir = user:get_look_dir()

View File

@ -421,7 +421,7 @@ if collection then
max_hear_distance = 10, max_hear_distance = 10,
gain = 0.2, gain = 0.2,
pitch = random(60, 100) / 100 pitch = random(60, 100) / 100
}) }, true)
entity.itemstring = "" entity.itemstring = ""
obj:remove() obj:remove()
item = inv:add_item("main", item) item = inv:add_item("main", item)