diff --git a/README.md b/README.md index d729969..759b794 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Hunger with HUD bar [`hbhunger`] -* Version: 1.0.0 +* Version: 1.0.1 ## Using the mod diff --git a/hunger.lua b/hunger.lua index 37eaefa..05f3564 100644 --- a/hunger.lua +++ b/hunger.lua @@ -79,7 +79,13 @@ function hbhunger.item_eat(hunger_change, replace_with_item, poisen, heal, sound if h == nil or hp == nil then return end - minetest.sound_play({name = sound or "hbhunger_eat_generic", gain = 1}, {pos=user:getpos(), max_hear_distance = 16}) + minetest.sound_play( + {name = sound or "hbhunger_eat_generic", + gain = 1}, + {object=user, + max_hear_distance = 16, + pitch = 1 + math.random(-10, 10)*0.005,} + ) -- Saturation if h < 30 and hunger_change then diff --git a/init.lua b/init.lua index e91bbff..4fd300f 100644 --- a/init.lua +++ b/init.lua @@ -41,7 +41,7 @@ end dofile(minetest.get_modpath("hbhunger").."/hunger.lua") -- register satiation hudbar -hb.register_hudbar("satiation", 0xFFFFFF, S("Satiation"), { icon = "hbhunger_icon.png", bgicon = "hbhunger_bgicon.png", bar = "hbhunger_bar.png" }, 20, 30, false) +hb.register_hudbar("satiation", 0xFFFFFF, S("Satiation"), { icon = "hbhunger_icon.png", bgicon = "hbhunger_bgicon.png", bar = "hbhunger_bar.png" }, 20, 30, false, nil, { format_value = "%.1f", format_max_value = "%d" }) -- update hud elemtens if value has changed local function update_hud(player) diff --git a/locale/hbhunger.ru.tr b/locale/hbhunger.ru.tr new file mode 100644 index 0000000..afd6e66 --- /dev/null +++ b/locale/hbhunger.ru.tr @@ -0,0 +1,2 @@ +# textdomain:hbhunger +Satiation=голод