Fix up and re-add kill assists (#782)

* Add kill assists

* Fix bug

* Move to seperate mod

* Fix bugs and improve code some more

Co-authored-by: LoneWolfHT <lonewolf04361@gmail.com>
This commit is contained in:
Anthony-De 2021-02-08 19:03:03 -05:00 committed by GitHub
parent c9c2f6c7e0
commit f8cb85be9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 138 additions and 39 deletions

View file

@ -117,6 +117,7 @@ minetest.register_globalstep(function(dtime)
if pstat then
local hp = player:get_hp()
if hp < pstat.regen_max then
kill_assist.add_heal_assist(name, regen_step)
player:set_hp(math.min(hp + regen_step, pstat.regen_max))
else
stop_healing(player)