From 0052dfa5432b264579773dab3a1f97db11da3895 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Wed, 29 Jul 2015 14:11:33 +0200 Subject: [PATCH] Prevent hbhunger from searching exhaustion value of random items --- mods/hbhunger/hunger.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/hbhunger/hunger.lua b/mods/hbhunger/hunger.lua index ec09689d..efea642b 100755 --- a/mods/hbhunger/hunger.lua +++ b/mods/hbhunger/hunger.lua @@ -469,7 +469,7 @@ function hbhunger.handle_node_actions(pos, oldnode, player, ext) local armorinv = arminv:get_list("armor") -- table.foreach(armorinv, print) for index, stack in ipairs(armorinv) do - if stack:get_count() > 0 then + if stack:get_count() > 0 and (stack:get_name():split(":")[1] == "3d_armor" or stack:get_name():split(":")[1] == "shields") then local itemname = stack:get_name():split(":")[2]:split("_")[1] local itemmaterial = stack:get_name():split(":")[2]:split("_")[2] exhaus = exhaus + (exhausting_items[itemname][itemmaterial] or 0)/10 -- 0 is admin armor