summaryrefslogtreecommitdiff
path: root/hunger.lua
diff options
context:
space:
mode:
Diffstat (limited to 'hunger.lua')
-rw-r--r--hunger.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/hunger.lua b/hunger.lua
index 439db51..62c32eb 100644
--- a/hunger.lua
+++ b/hunger.lua
@@ -70,13 +70,13 @@ local function poisenp(tick, time, time_left, player)
end
-function hbhunger.item_eat(hunger_change, replace_with_item, poisen, heal)
+function hbhunger.item_eat(hunger_change, replace_with_item, poisen, heal, sound)
return function(itemstack, user, pointed_thing)
if itemstack:take_item() ~= nil and user ~= nil then
local name = user:get_player_name()
local h = tonumber(hbhunger.hunger[name])
local hp = user:get_hp()
- minetest.sound_play({name = "hbhunger_eat_generic", gain = 1}, {pos=user:getpos(), max_hear_distance = 16})
+ minetest.sound_play({name = sound or "hbhunger_eat_generic", gain = 1}, {pos=user:getpos(), max_hear_distance = 16})
-- Saturation
if h < 30 and hunger_change then