1
0
Fork 0

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

merge-requests/1/head
Maksym H 2023-04-29 14:53:50 +03:00 committed by mckaygerhard
parent 6156f4b0a8
commit f58cf228ae
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
core.sound_play(def.sound.eat, {
pos = pos,
max_hear_distance = 16})
max_hear_distance = 16
}, true)
else
core.sound_play("player_eat", {
pos = pos,
max_hear_distance = 10,
gain = 0.3})
max_hear_distance = 16,
gain = 0.3
}, true)
end
local dir = user:get_look_dir()

View File

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