diff --git a/mods/PLAYER/playerplus/depends.txt b/mods/PLAYER/playerplus/depends.txt index cfa064e27e..5ba88b430c 100644 --- a/mods/PLAYER/playerplus/depends.txt +++ b/mods/PLAYER/playerplus/depends.txt @@ -1,4 +1,5 @@ mcl_init mcl_util mcl_core +mcl_hunger 3d_armor? diff --git a/mods/PLAYER/playerplus/init.lua b/mods/PLAYER/playerplus/init.lua index 9a5a021b26..6bf43da2a4 100644 --- a/mods/PLAYER/playerplus/init.lua +++ b/mods/PLAYER/playerplus/init.lua @@ -115,6 +115,9 @@ minetest.register_globalstep(function(dtime) for _,object in pairs(minetest.get_objects_inside_radius(near, 1.1)) do if object:get_hp() > 0 then object:set_hp(object:get_hp() - 1) + if object:is_player() then + mcl_hunger.exhaust(object:get_player_name(), mcl_hunger.EXHAUST_DAMAGE) + end end end