summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorFoghrye4 <foghrye4@gmail.com>2016-04-25 18:50:10 +0300
committerest31 <MTest31@outlook.com>2016-07-05 21:40:13 +0200
commit281e9f39fdffd106e79122ae23e2b5443a5daea3 (patch)
tree38456eaaed63d4d4bd9fea72438e9dd64d9d5706 /doc
parent7a532056e29d00006382caad9ccde66e54ca8aa5 (diff)
downloadminetest-281e9f39fdffd106e79122ae23e2b5443a5daea3.tar.gz
minetest-281e9f39fdffd106e79122ae23e2b5443a5daea3.tar.bz2
minetest-281e9f39fdffd106e79122ae23e2b5443a5daea3.zip
Adding minetest.clear_craft
Modifications by est31: grammar fixes in doc + error messages and a little style fix, no functional change.
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt8
1 files changed, 8 insertions, 0 deletions
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)`