aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPilzAdam <PilzAdam@gmx.de>2013-01-04 00:05:56 +0100
committerPilzAdam <PilzAdam@gmx.de>2013-01-04 17:15:16 +0100
commit5bc14e2fe45f12cdb69d302807d05985ee5552ee (patch)
tree13a95b1597ea24752fb267bf17abb4ff556dc142 /doc
parentd2b1210376f6cc52fe031ac41d3bf54720ebd356 (diff)
downloadminetest-5bc14e2fe45f12cdb69d302807d05985ee5552ee.tar.gz
minetest-5bc14e2fe45f12cdb69d302807d05985ee5552ee.tar.bz2
minetest-5bc14e2fe45f12cdb69d302807d05985ee5552ee.zip
Add on_rightclick(pos, node, clicker) callback for nodes
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 124344cad..f891b56f0 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -942,6 +942,8 @@ minetest.item_place_object(itemstack, placer, pointed_thing)
^ Place item as-is
minetest.item_place(itemstack, placer, pointed_thing)
^ Use one of the above based on what the item is.
+^ Calls on_rightclick of pointed_thing.under if defined instead
+^ Note: is not called when wielded item overrides on_place
minetest.item_drop(itemstack, dropper, pos)
^ Drop the item
minetest.item_eat(hp_change, replace_with_item)
@@ -1482,6 +1484,8 @@ Node definition (register_node)
on_punch = func(pos, node, puncher),
^ default: minetest.node_punch
^ By default: does nothing
+ on_rightclick = func(pos, node, clicker),
+ ^ default: nil
on_dig = func(pos, node, digger),
^ default: minetest.node_dig
^ By default: checks privileges, wears out tool and removes node