1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 06:11:47 +02:00

Updated hud/hunger while saving our modifications

- Splitted hud into two mods : hud and hunger
This commit is contained in:
LeMagnesium
2015-04-06 20:38:52 +02:00
parent 74adffa8cc
commit 7142fdf3cd
30 changed files with 2370 additions and 944 deletions

View File

@ -367,13 +367,6 @@ minetest.register_node("nether:apple", {
return itemstack
end
local p_hunger = tonumber(hud.hunger[user:get_player_name()])
if not p_hunger then return end
p_hunger = p_hunger+9
if p_hunger > 30 then p_hunger = 30 end
hud.hunger[user:get_player_name()] = p_hunger
hud.set_hunger(user)
local amount = math.random(4, 6)
inv:add_item("main", {name="nether:blood_extracted", count=math.floor(amount/3)})
user:set_hp(user:get_hp()-amount)