From 63d6fe23707867536cd579d4abdb476b4ffcaf15 Mon Sep 17 00:00:00 2001 From: BlockMen Date: Wed, 15 Jul 2015 01:30:29 +0200 Subject: Fix healing (death, drowning), pipeworks issue and HUD issues --- init.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index ed855ec..efbe5e5 100644 --- a/init.lua +++ b/init.lua @@ -1,7 +1,7 @@ hunger = {} hunger.food = {} -HUNGER_TICK = 800 -- time in seconds after that 1 hunger point is taken +HUNGER_TICK = 800 -- time in seconds after that 1 hunger point is taken HUNGER_HEALTH_TICK = 4 -- time in seconds after player gets healed/damaged HUNGER_MOVE_TICK = 0.5 -- time in seconds after the movement is checked @@ -10,12 +10,12 @@ HUNGER_EXHAUST_PLACE = 1 -- exhaustion increased this value after placed HUNGER_EXHAUST_MOVE = 1.5 -- exhaustion increased this value if player movement detected HUNGER_EXHAUST_LVL = 160 -- at what exhaustion player saturation gets lowered -HUNGER_HEAL = 1 -- number of HP player gets healed after HUNGER_HEALTH_TICK +HUNGER_HEAL = 1 -- number of HP player gets healed after HUNGER_HEALTH_TICK HUNGER_HEAL_LVL = 15 -- lower level of saturation needed to get healed -HUNGER_STARVE = 1 -- number of HP player gets damaged by hunger after HUNGER_HEALTH_TICK +HUNGER_STARVE = 1 -- number of HP player gets damaged by hunger after HUNGER_HEALTH_TICK HUNGER_STARVE_LVL = 3 -- level of staturation that causes starving -HUNGER_MAX = 30 -- maximum level of saturation +HUNGER_MAX = 30 -- maximum level of saturation local modpath = minetest.get_modpath("hunger") @@ -39,7 +39,7 @@ if minetest.setting_getbool("enable_damage") then lvl = 20 end minetest.after(0.8, function() - hud.change_item(player, "hunger", {offset = "item", item_name = "air"}) + hud.swap_statbar(player, "hunger", "air") hud.change_item(player, "hunger", {number = lvl, max = 20}) end) end) -- cgit v1.2.3