From 38580fbee71d9833ae05eae604ce2301cd23218f Mon Sep 17 00:00:00 2001 From: darkrose Date: Thu, 12 Jul 2012 04:46:10 +1000 Subject: Add minetest.get_craft_recipe() --- doc/lua_api.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 823b4b825..16f10815c 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -829,6 +829,13 @@ minetest.get_craft_result(input) -> output, decremented_input ^ output.item = ItemStack, if unsuccessful: empty ItemStack ^ output.time = number, if unsuccessful: 0 ^ decremented_input = like input +minetest.get_craft_recipe(output) -> input +^ 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 Defaults for the on_* item definition functions: (These return the leftover itemstack) -- cgit v1.2.3