]> git.lizzy.rs Git - Crafter.git/commitdiff
Fix regeneration not continuing with full hunger bar
authoroilboi <47129783+oilboi@users.noreply.github.com>
Sun, 31 May 2020 03:36:24 +0000 (23:36 -0400)
committeroilboi <47129783+oilboi@users.noreply.github.com>
Sun, 31 May 2020 03:36:24 +0000 (23:36 -0400)
mods/armor/init.lua
mods/hunger/init.lua

index fcdc2bae7e13da1413f8af0e33bddafaae37ce1a..e41946d7ee80335ac4efb4a15e365f88d62e8611 100644 (file)
@@ -71,7 +71,6 @@ function calculate_armor_absorbtion(player)
     if armor_absorbtion > 0 then
         armor_absorbtion = math.ceil(armor_absorbtion/4)
     end
-    print(armor_absorbtion)
     return(armor_absorbtion)
 end
 
index fe1b07cc6bc539aa5d8521ec456746b8b3393a5c..f25e4ff13a6b4e28ccac7f2a64f73652c6899ebc 100644 (file)
@@ -158,7 +158,7 @@ local function hunger_update()
                        
                        local hp = player:get_hp()
                        --make regeneration happen every second
-                       if meta:get_int("drowning") == 0 and hunger >= 20 and hp < 20 and satiation > 0 then
+                       if meta:get_int("drowning") == 0 and hunger >= 20 and hp < 20 then
                                local regeneration_interval = meta:get_int("regeneration_interval")
                                --print(regeneration_interval,"--------------------------")
                                regeneration_interval = regeneration_interval + 1