Update hbhunger mod

master
vlapsley 2017-08-18 15:49:05 +10:00
parent 8728e47f8e
commit 4f5feb0ef8
17 changed files with 12 additions and 4 deletions

View File

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

View File

View File

View File

View 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

View File

@ -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 = {}

View File

View File

View File

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

Before

Width:  |  Height:  |  Size: 80 B

After

Width:  |  Height:  |  Size: 80 B

View File

Before

Width:  |  Height:  |  Size: 151 B

After

Width:  |  Height:  |  Size: 151 B

View File

Before

Width:  |  Height:  |  Size: 417 B

After

Width:  |  Height:  |  Size: 417 B

View File

Before

Width:  |  Height:  |  Size: 522 B

After

Width:  |  Height:  |  Size: 522 B

View File

Before

Width:  |  Height:  |  Size: 526 B

After

Width:  |  Height:  |  Size: 526 B