1
0
Fork 0

Add exhaust for cactus damage

This commit is contained in:
Wuzzy 2017-05-21 06:07:23 +02:00
parent 6083c4895d
commit 3c72330880
2 changed files with 4 additions and 0 deletions

View File

@ -1,4 +1,5 @@
mcl_init
mcl_util
mcl_core
mcl_hunger
3d_armor?

View File

@ -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