diff options
author | raymoo <raymoo@users.noreply.github.com> | 2016-04-10 04:52:18 -0700 |
---|---|---|
committer | est31 <est31@users.noreply.github.com> | 2016-04-10 13:52:18 +0200 |
commit | c566a8f2de162fa985aca53647efdc82a82c2d29 (patch) | |
tree | f4f133239bc033e44c46bb60c5b1cdb8fb6f1b15 | |
parent | af799d4bd2d277a108154f815ff6b6b7a8394a9a (diff) | |
download | minetest-c566a8f2de162fa985aca53647efdc82a82c2d29.tar.gz minetest-c566a8f2de162fa985aca53647efdc82a82c2d29.tar.bz2 minetest-c566a8f2de162fa985aca53647efdc82a82c2d29.zip |
Document hpchange callback ordering thing (#3981)
Document hpchange callback ordering thing
Callbacks registered by register_on_player_hpchange are ordered so that non-modifiers are called after modifiers are called. Credit to @TeTpaAka who mentioned this previously-undocumented feature in #3799.
See also commit
aa13baa30a45b0f834c23bd5c0407895eb8ec0ee "Add minetest.register_on_player_hpchange"
-rw-r--r-- | doc/lua_api.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index a03a95d9e..17b311ffd 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1870,6 +1870,7 @@ Call these functions only at load time! * `modifier`: when true, the function should return the actual hp_change. Note: modifiers only get a temporary hp_change that can be modified by later modifiers. modifiers can return true as a second argument to stop the execution of further functions. + Non-modifiers receive the final hp change calculated by the modifiers. * `minetest.register_on_respawnplayer(func(ObjectRef))` * Called when player is to be respawned * Called _before_ repositioning of player occurs |