Damage System: ability to integrate damage modifier. Closes lord-server/lord#1642

This commit is contained in:
alek13
2024-09-11 04:10:09 +03:00
parent 491335f66b
commit b1e1c0c98a

View File

@@ -501,7 +501,7 @@ function minetest.register_on_rightclickplayer(callback) end
--- Non-modifiers receive the final HP change calculated by the modifiers. --- Non-modifiers receive the final HP change calculated by the modifiers.
--- ---
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4607-L4626) --- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4607-L4626)
--- @param callback fun(player:Player, hp_change:number, reason:PlayerHPChangeReason) --- @param callback fun(player:Player, hp_change:number, reason:PlayerHPChangeReason)|fun(player:Player, hp_change:number, reason:PlayerHPChangeReason):number,boolean
--- @param modifier boolean --- @param modifier boolean
function minetest.register_on_player_hpchange(callback, modifier) end function minetest.register_on_player_hpchange(callback, modifier) end
--- * Called when a player dies --- * Called when a player dies