Add exhaust for cactus damage
This commit is contained in:
parent
6083c4895d
commit
3c72330880
|
@ -1,4 +1,5 @@
|
||||||
mcl_init
|
mcl_init
|
||||||
mcl_util
|
mcl_util
|
||||||
mcl_core
|
mcl_core
|
||||||
|
mcl_hunger
|
||||||
3d_armor?
|
3d_armor?
|
||||||
|
|
|
@ -115,6 +115,9 @@ minetest.register_globalstep(function(dtime)
|
||||||
for _,object in pairs(minetest.get_objects_inside_radius(near, 1.1)) do
|
for _,object in pairs(minetest.get_objects_inside_radius(near, 1.1)) do
|
||||||
if object:get_hp() > 0 then
|
if object:get_hp() > 0 then
|
||||||
object:set_hp(object:get_hp() - 1)
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue