mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-25 01:19:33 +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_util
|
||||
mcl_core
|
||||
mcl_hunger
|
||||
3d_armor?
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue