mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-23 02:51:06 +01:00
Add exhaust for cactus damage
This commit is contained in:
parent
6083c4895d
commit
3c72330880
2 changed files with 4 additions and 0 deletions
|
@ -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 a new issue