diff options
author | Paul Ouellette <oue.paul18@gmail.com> | 2019-04-11 15:45:39 -0400 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2019-04-11 20:45:39 +0100 |
commit | 22ad820aa459e055fde817d94f31a9461aac2726 (patch) | |
tree | 8df2ea572c26ecf3f4e0c37208c5556281a47221 /doc | |
parent | 1e5f2e0f133af42764dcd9386ccd59f4bf948328 (diff) | |
download | minetest-22ad820aa459e055fde817d94f31a9461aac2726.tar.gz minetest-22ad820aa459e055fde817d94f31a9461aac2726.tar.bz2 minetest-22ad820aa459e055fde817d94f31a9461aac2726.zip |
Add node field to PlayerHPChangeReason table (#8368)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 538e2dee7..41e8e0c96 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -3738,15 +3738,16 @@ Call these functions only at load time! giving a type - use this for custom damage types. * `punch`: Was punched. `reason.object` will hold the puncher, or nil if none. * `fall` - * `node_damage`: damage_per_second from a neighbouring node. + * `node_damage`: `damage_per_second` from a neighbouring node. + `reason.node` will hold the node name or nil. * `drown` * `respawn` * Any of the above types may have additional fields from mods. * `reason.from` will be `mod` or `engine`. * `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. + 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_dieplayer(function(ObjectRef, reason))` * Called when a player dies * `reason`: a PlayerHPChangeReason table, see register_on_player_hpchange |