From 8efb1887a577de6ddb18a1f0cda954e186408e44 Mon Sep 17 00:00:00 2001 From: crabman77 Date: Fri, 18 Nov 2016 18:29:42 +0100 Subject: [PATCH] fix crash with xdecor enchanting armor(if we add xdecor 1 day) --- 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 754b7b52..503680a0 100755 --- a/mods/hbhunger/hunger.lua +++ b/mods/hbhunger/hunger.lua @@ -483,7 +483,7 @@ function hbhunger.handle_node_actions(pos, oldnode, player, ext) 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 + exhaus = exhaus + ((exhausting_items[itemname] and exhausting_items[itemname][itemmaterial]) or 0)/10 -- 0 is admin armor -- Value is divided by 5 to give a larger scale to our values, without having to high nor -- too low exhausting factor end