mirror of
https://repo.or.cz/minetest_hudbars.git
synced 2024-11-24 08:03:46 +01:00
Enable damage when hunger is 0
This commit is contained in:
parent
2e6127b42b
commit
030f30d47e
2
init.lua
2
init.lua
@ -161,7 +161,7 @@ minetest.after(2.5, function()
|
||||
if HUD_ENABLE_HUNGER and timer > 4 then
|
||||
if h>=16 then
|
||||
player:set_hp(player:get_hp()+1)
|
||||
elseif h==1 and minetest.setting_getbool("enable_damage") then
|
||||
elseif h<=1 and minetest.setting_getbool("enable_damage") then
|
||||
if player:get_hp()-1 >= 1 then player:set_hp(player:get_hp()-1) end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user