Update hbhunger mod
|
@ -1,6 +1,6 @@
|
|||
# Hunger with HUD bar [`hbhunger`]
|
||||
|
||||
* Version: 0.5.2
|
||||
* Version: 0.5.3
|
||||
|
||||
## Using the mod
|
||||
|
0
mods/hbhunger/description.txt → mods/PLAYER/hbhunger/description.txt
Executable file → Normal file
|
@ -99,8 +99,16 @@ function hbhunger.item_eat(hunger_change, replace_with_item, poisen, heal, sound
|
|||
poisenp(1, poisen, 0, user)
|
||||
end
|
||||
|
||||
--sound:eat
|
||||
itemstack:add_item(replace_with_item)
|
||||
if itemstack:get_count() == 0 then
|
||||
itemstack:add_item(replace_with_item)
|
||||
else
|
||||
local inv = user:get_inventory()
|
||||
if inv:room_for_item("main", replace_with_item) then
|
||||
inv:add_item("main", replace_with_item)
|
||||
else
|
||||
minetest.add_item(user:getpos(), replace_with_item)
|
||||
end
|
||||
end
|
||||
end
|
||||
return itemstack
|
||||
end
|
|
@ -5,7 +5,7 @@ else
|
|||
S = function ( s ) return s end
|
||||
end
|
||||
|
||||
if minetest.setting_getbool("enable_damage") then
|
||||
if minetest.settings:get_bool("enable_damage") then
|
||||
|
||||
hbhunger = {}
|
||||
hbhunger.food = {}
|
0
mods/hbhunger/locale/template.txt → mods/PLAYER/hbhunger/locale/template.txt
Executable file → Normal file
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
0
mods/hbhunger/sounds/hbhunger_eat_generic.ogg → mods/PLAYER/hbhunger/sounds/hbhunger_eat_generic.ogg
Executable file → Normal file
0
mods/hbhunger/textures/hbhunger_bar.png → mods/PLAYER/hbhunger/textures/hbhunger_bar.png
Executable file → Normal file
Before Width: | Height: | Size: 80 B After Width: | Height: | Size: 80 B |
0
mods/hbhunger/textures/hbhunger_bar_health_poison.png → mods/PLAYER/hbhunger/textures/hbhunger_bar_health_poison.png
Executable file → Normal file
Before Width: | Height: | Size: 151 B After Width: | Height: | Size: 151 B |
0
mods/hbhunger/textures/hbhunger_bgicon.png → mods/PLAYER/hbhunger/textures/hbhunger_bgicon.png
Executable file → Normal file
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 417 B |
0
mods/hbhunger/textures/hbhunger_icon.png → mods/PLAYER/hbhunger/textures/hbhunger_icon.png
Executable file → Normal file
Before Width: | Height: | Size: 522 B After Width: | Height: | Size: 522 B |
0
mods/hbhunger/textures/hbhunger_icon_health_poison.png → mods/PLAYER/hbhunger/textures/hbhunger_icon_health_poison.png
Executable file → Normal file
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 526 B |