aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-09-02 19:38:44 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-09-02 19:38:44 +0300
commitd53a6cd8518edd025acdfc7878ede857867e507b (patch)
tree089ff99cd0e15b6da8ac73deb79b642b49615ebf /doc
parentb6c12d2aa3f7f3f0faca86a0b20904e309c15179 (diff)
downloadminetest-d53a6cd8518edd025acdfc7878ede857867e507b.tar.gz
minetest-d53a6cd8518edd025acdfc7878ede857867e507b.tar.bz2
minetest-d53a6cd8518edd025acdfc7878ede857867e507b.zip
Add overridable function for handling dropped items from nodes
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index d3e254a2d..b71b6d62c 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -891,6 +891,12 @@ minetest.get_craft_recipe(output) -> input
^ input.items = for example { stack 1, stack 2, stack 3, stack 4,
stack 5, stack 6, stack 7, stack 8, stack 9 }
^ input.items = nil if no recipe found
+minetest.handle_node_drops(pos, drops, digger)
+^ drops: list of itemstrings
+^ Handles drops from nodes after digging: Default action is to put them into
+ digger's inventory
+^ Can be overridden to get different functionality (eg. dropping items on
+ ground)
Rollbacks:
minetest.rollback_get_last_node_actor(p, range, seconds) -> actor, p, seconds