From 1563fc7b96f40909bce04ba08b36774bc41d9ae5 Mon Sep 17 00:00:00 2001 From: Brandon Date: Tue, 28 Jul 2020 17:13:54 -0400 Subject: [PATCH] comment sections of mcl_hunger that "poison" player. This is handled in mcl_potions. --- mods/PLAYER/mcl_hunger/hunger.lua | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/mods/PLAYER/mcl_hunger/hunger.lua b/mods/PLAYER/mcl_hunger/hunger.lua index cff54b169..a13e2ae4a 100644 --- a/mods/PLAYER/mcl_hunger/hunger.lua +++ b/mods/PLAYER/mcl_hunger/hunger.lua @@ -98,15 +98,15 @@ local function poisonp(tick, time, time_left, damage, exhaustion, name) if time_left < time then minetest.after(tick, poisonp, tick, time, time_left, damage, exhaustion, name) else - if damage > 0 then - mcl_hunger.poison_damage[name] = mcl_hunger.poison_damage[name] - 1 - end + -- if damage > 0 then + -- mcl_hunger.poison_damage[name] = mcl_hunger.poison_damage[name] - 1 + -- end if exhaustion > 0 then mcl_hunger.poison_hunger [name] = mcl_hunger.poison_hunger[name] - 1 end - if mcl_hunger.poison_damage[name] <= 0 then - mcl_hunger.reset_bars_poison_damage(player) - end + -- if mcl_hunger.poison_damage[name] <= 0 then + -- mcl_hunger.reset_bars_poison_damage(player) + -- end if mcl_hunger.poison_hunger[name] <= 0 then mcl_hunger.reset_bars_poison_hunger(player) end @@ -225,10 +225,10 @@ function mcl_hunger.item_eat(hunger_change, replace_with_item, poisontime, poiso end if do_poison then -- Set poison bars - if poison and poison > 0 then - hb.change_hudbar(user, "health", nil, nil, "hbhunger_icon_health_poison.png", nil, "hbhunger_bar_health_poison.png") - mcl_hunger.poison_damage[name] = mcl_hunger.poison_damage[name] + 1 - end + -- if poison and poison > 0 then + -- hb.change_hudbar(user, "health", nil, nil, "hbhunger_icon_health_poison.png", nil, "hbhunger_bar_health_poison.png") + -- mcl_hunger.poison_damage[name] = mcl_hunger.poison_damage[name] + 1 + -- end if exhaust and exhaust > 0 then hb.change_hudbar(user, "hunger", nil, nil, "mcl_hunger_icon_foodpoison.png", nil, "mcl_hunger_bar_foodpoison.png") if mcl_hunger.debug then @@ -260,4 +260,3 @@ if mcl_hunger.active then mcl_hunger.exhaust(name, mcl_hunger.EXHAUST_DIG) end) end -