forked from VoxeLibre/VoxeLibre
Exhaust player for hitting by arrow
This commit is contained in:
parent
2197a48974
commit
c1ad39febd
|
@ -62,6 +62,9 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
|
||||||
full_punch_interval=1.0,
|
full_punch_interval=1.0,
|
||||||
damage_groups={fleshy=self._damage},
|
damage_groups={fleshy=self._damage},
|
||||||
}, nil)
|
}, nil)
|
||||||
|
if obj:is_player() then
|
||||||
|
mcl_hunger.exhaust(obj:get_player_name(), mcl_hunger.EXHAUST_DAMAGE)
|
||||||
|
end
|
||||||
|
|
||||||
-- Achievement for hitting skeleton, wither skeleton or stray (TODO) with an arrow at least 50 meters away
|
-- Achievement for hitting skeleton, wither skeleton or stray (TODO) with an arrow at least 50 meters away
|
||||||
-- TODO: This achievement should be given for the kill, not just a hit
|
-- TODO: This achievement should be given for the kill, not just a hit
|
||||||
|
@ -77,6 +80,10 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
|
||||||
full_punch_interval=1.0,
|
full_punch_interval=1.0,
|
||||||
damage_groups={fleshy=self._damage},
|
damage_groups={fleshy=self._damage},
|
||||||
}, nil)
|
}, nil)
|
||||||
|
if obj:is_player() then
|
||||||
|
mcl_hunger.exhaust(obj:get_player_name(), mcl_hunger.EXHAUST_DAMAGE)
|
||||||
|
end
|
||||||
|
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
mcl_core
|
mcl_core
|
||||||
|
mcl_hunger
|
||||||
mcl_achievements
|
mcl_achievements
|
||||||
doc?
|
doc?
|
||||||
|
|
Loading…
Reference in New Issue