summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJDiaz <runspect@gmail.com>2021-01-11 18:03:31 +0100
committerGitHub <noreply@github.com>2021-01-11 18:03:31 +0100
commit08ee9794fbc0960a8aab1af21d34f40685809e75 (patch)
treeeb6acad972eca4793159c95519b4deb6e05c9448 /doc
parentfcb3ed840a5e66e6d37b27effe30d8d723a7da59 (diff)
downloadminetest-08ee9794fbc0960a8aab1af21d34f40685809e75.tar.gz
minetest-08ee9794fbc0960a8aab1af21d34f40685809e75.tar.bz2
minetest-08ee9794fbc0960a8aab1af21d34f40685809e75.zip
Implement on_rightclickplayer callback (#10775)
Co-authored-by: rubenwardy <rw@rubenwardy.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 47c2776e6..ba4d6312c 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -2113,7 +2113,7 @@ Examples
list[current_player;main;0,3.5;8,4;]
list[current_player;craft;3,0;3,3;]
list[current_player;craftpreview;7,1;1,1;]
-
+
Version History
---------------
@@ -4587,6 +4587,10 @@ Call these functions only at load time!
the puncher to the punched.
* `damage`: Number that represents the damage calculated by the engine
* should return `true` to prevent the default damage mechanism
+* `minetest.register_on_rightclickplayer(function(player, clicker))`
+ * Called when a player is right-clicked
+ * `player`: ObjectRef - Player that was right-clicked
+ * `clicker`: ObjectRef - Object that right-clicked, may or may not be a player
* `minetest.register_on_player_hpchange(function(player, hp_change, reason), modifier)`
* Called when the player gets damaged or healed
* `player`: ObjectRef of the player
@@ -7641,12 +7645,12 @@ Used by `minetest.register_node`.
-- intensity: 1.0 = mid range of regular TNT.
-- If defined, called when an explosion touches the node, instead of
-- removing the node.
-
+
mod_origin = "modname",
-- stores which mod actually registered a node
-- if it can not find a source, returns "??"
-- useful for getting what mod truly registered something
- -- example: if a node is registered as ":othermodname:nodename",
+ -- example: if a node is registered as ":othermodname:nodename",
-- nodename will show "othermodname", but mod_orgin will say "modname"
}