From 281e9f39fdffd106e79122ae23e2b5443a5daea3 Mon Sep 17 00:00:00 2001 From: Foghrye4 Date: Mon, 25 Apr 2016 18:50:10 +0300 Subject: Adding minetest.clear_craft Modifications by est31: grammar fixes in doc + error messages and a little style fix, no functional change. --- doc/lua_api.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 297566068..a59a9c0f2 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1847,6 +1847,14 @@ Call these functions only at load time! * `minetest.register_craftitem(name, item definition)` * `minetest.register_alias(name, convert_to)` * `minetest.register_craft(recipe)` + * Check recipe table syntax for different types below. +* `minetest.clear_craft(recipe)` + * Will erase existing craft based either on output item or on input recipe. + * Specify either output or input only. If you specify both, input will be ignored. For input use the same recipe table + syntax as for `minetest.register_craft(recipe)`. For output specify only the item, without a quantity. + * If no erase candidate could be found, Lua exception will be thrown. + * Warning! The type field ("shaped","cooking" or any other) will be ignored if the recipe + contains output. Erasing is then done independently from the crafting method. * `minetest.register_ore(ore definition)` * `minetest.register_decoration(decoration definition)` * `minetest.override_item(name, redefinition)` -- cgit v1.2.3