mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-25 02:00:37 +01:00
Prevent hbhunger from searching exhaustion value of random items
This commit is contained in:
parent
b88a6ad2a2
commit
0052dfa543
@ -469,7 +469,7 @@ function hbhunger.handle_node_actions(pos, oldnode, player, ext)
|
|||||||
local armorinv = arminv:get_list("armor")
|
local armorinv = arminv:get_list("armor")
|
||||||
-- table.foreach(armorinv, print)
|
-- table.foreach(armorinv, print)
|
||||||
for index, stack in ipairs(armorinv) do
|
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 itemname = stack:get_name():split(":")[2]:split("_")[1]
|
||||||
local itemmaterial = stack:get_name():split(":")[2]:split("_")[2]
|
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][itemmaterial] or 0)/10 -- 0 is admin armor
|
||||||
|
Loading…
Reference in New Issue
Block a user