summaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorRealBadAngel <mk@realbadangel.pl>2013-03-04 01:55:16 +0100
committerkwolekr <kwolekr@minetest.net>2013-03-05 23:32:33 -0500
commit5af8acfa6e41e258dd7e2135e8e75f03096c1d5c (patch)
treeab819388ec6be2e9ae683aeed223257b966e36f7 /doc/lua_api.txt
parentba78194636a9a498f6979cc21cd39399f23d658a (diff)
downloadminetest-5af8acfa6e41e258dd7e2135e8e75f03096c1d5c.tar.gz
minetest-5af8acfa6e41e258dd7e2135e8e75f03096c1d5c.tar.bz2
minetest-5af8acfa6e41e258dd7e2135e8e75f03096c1d5c.zip
Added method to get all registered recipes for item(node)
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 8246377e2..809d3d9d0 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -922,12 +922,17 @@ minetest.get_craft_result(input) -> output, decremented_input
^ output.time = number, if unsuccessful: 0
^ decremented_input = like input
minetest.get_craft_recipe(output) -> input
+^ returns last registered recipe for output item (node)
^ output is a node or item type such as 'default:torch'
^ input.method = 'normal' or 'cooking' or 'fuel'
^ input.width = for example 3
^ 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.get_all_craft_recipes(output) -> table or nil
+^ returns table with all registered recipes for output item (node)
+^ returns nil if no recipe was found
+^ table entries have same format as minetest.get_craft_recipe
minetest.handle_node_drops(pos, drops, digger)
^ drops: list of itemstrings
^ Handles drops from nodes after digging: Default action is to put them into