diff --git a/mods/hbhunger/hunger.lua b/mods/hbhunger/hunger.lua index 5016f08d..bcda8b79 100755 --- a/mods/hbhunger/hunger.lua +++ b/mods/hbhunger/hunger.lua @@ -386,6 +386,55 @@ if minetest.get_modpath("food") ~= nil then end -- player-action based hunger changes + +local exhausting_items = { + ["helmet"] = { + ["wood"] = 0, + ["cactus"] = 1, + ["steel"] = 2, + ["bronze"] = 4, + ["gold"] = 7, + ["diamond"] = 10, + ["mithril"] = 15 + }, + ["chestplate"] = { + ["wood"] = 2, + ["cactus"] = 4, + ["steel"] = 6, + ["bronze"] = 7, + ["gold"] = 11, + ["diamond"] = 15, + ["mithril"] = 18 + }, + ["leggings"] = { + ["wood"] = 1, + ["cactus"] = 2, + ["steel"] = 5, + ["bronze"] = 8, + ["gold"] = 10, + ["diamond"] = 13, + ["mithril"] = 16 + }, + ["boots"] = { + ["wood"] = 1, + ["cactus"] = 1, + ["steel"] = 3, + ["bronze"] = 4, + ["gold"] = 7, + ["diamond"] = 10, + ["mithril"] = 13 + }, + ["shield"] = { + ["wood"] = 4, + ["cactus"] = 6, + ["steel"] = 8, + ["bronze"] = 10, + ["gold"] = 13, + ["diamond"] = 16, + ["mithril"] = 20 + } +} + function hbhunger.handle_node_actions(pos, oldnode, player, ext) if not player or not player:is_player() then return @@ -403,6 +452,23 @@ function hbhunger.handle_node_actions(pos, oldnode, player, ext) new = HUNGER_EXHAUST_MOVE end exhaus = exhaus + new + + -- Armor's exhaus + if minetest.get_modpath("3d_armor") then + local name, inv, arminv, pos = armor:get_valid_player(player, "[exhaus]") + local armorinv = arminv:get_list("armor") +-- table.foreach(armorinv, print) + for index, stack in ipairs(armorinv) do + if stack:get_count() > 0 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 + -- Value is divided by 5 to give a larger scale to our values, without having to high nor + -- too low exhausting factor + end + end + end + if exhaus > HUNGER_EXHAUST_LVL then exhaus = 0 local h = tonumber(hbhunger.hunger[name]) diff --git a/mods/throwing/textures/throwing_bow_horn.png b/mods/throwing/textures/throwing_bow_horn.png old mode 100644 new mode 100755 diff --git a/worlds/minetestforfun/news.txt b/worlds/minetestforfun/news.txt index 4c109cbb..e6d5e79e 100755 --- a/worlds/minetestforfun/news.txt +++ b/worlds/minetestforfun/news.txt @@ -5,7 +5,7 @@ News de FR - MinetestForFun (Survival - PVP - Hardcore) /!\ En effet, nous profitons de cette stabilitée pour préparer une grosse MAJ qui boulversera à jamais le gameplay de Minetest /!\ ---Next merge--- (Remerciements : ???) -MaJ de "3d_armor" (drop des armurs fixé) +MaJ de "3d_armor" (drop des armurs fixé, niveau de baisse de la faim dépendant des armures ajouté) MaJ de "homedecor" (nouveaux panneaux colorés) MaJ de "plantlife" MaJ de "mesecons"