8 Commits

Author SHA1 Message Date
3732bd9920 Merge remote-tracking branch 'upstream/master' 2022-08-26 14:59:13 +02:00
0777594e78 Add Wuzzy to mailmap 2022-08-01 13:58:37 +02:00
2d4d44a612 Merge remote-tracking branch 'upstream/master' 2021-08-31 19:46:56 +02:00
470b0f693d Version 1.1.2 2021-08-28 20:17:25 +02:00
2b385540eb Add support for fake players 2021-08-28 10:58:07 +02:00
ad2dbf5647 Merge remote-tracking branch 'upstream/master' 2021-06-20 17:09:34 +02:00
ea958fbf6b Version 1.1.1 2021-06-08 14:08:32 +02:00
738c660489 Hearty stew is no longer poisonous 2021-06-08 14:07:52 +02:00
4 changed files with 22 additions and 10 deletions

2
.mailmap Normal file
View File

@ -0,0 +1,2 @@
Wuzzy <Wuzzy@disroot.org> <Wuzzy2@mail.ru>
Wuzzy <Wuzzy@disroot.org> <almikes@aol.com>

View File

@ -1,6 +1,6 @@
# Hunger with HUD bar [`hbhunger`]
* Version: 1.1.0
* Version: 1.1.2
## Using the mod

View File

@ -79,14 +79,24 @@ function hbhunger.item_eat(hunger_change, replace_with_item, poisen, heal, sound
if h == nil or hp == nil then
return
end
if user:is_player() then
local object, object_pos
-- Check if user is a "fake player" (unofficial imitation of a the player data structure)
if type(user) == "userdata" then
object = user
else
object_pos = user:get_pos()
end
minetest.sound_play(
{name = sound or "hbhunger_eat_generic",
gain = 1},
{object=user,
{object=object,
pos=object_pos,
max_hear_distance = 16,
pitch = 1 + math.random(-10, 10)*0.005,},
true
)
end
-- Saturation
if h < hbhunger.SAT_MAX and hunger_change then

View File

@ -217,7 +217,7 @@ if minetest.get_modpath("ethereal") then
hbhunger.register_food("ethereal:wild_onion_plant", 2)
hbhunger.register_food("ethereal:mushroom_soup", 4, "ethereal:bowl")
hbhunger.register_food("ethereal:mushroom_soup_cooked", 6, "ethereal:bowl")
hbhunger.register_food("ethereal:hearty_stew", 6, "ethereal:bowl", 3)
hbhunger.register_food("ethereal:hearty_stew", 6, "ethereal:bowl")
hbhunger.register_food("ethereal:hearty_stew_cooked", 10, "ethereal:bowl")
if minetest.get_modpath("bucket") then
hbhunger.register_food("ethereal:bucket_cactus", 2, "bucket:bucket_empty")