aboutsummaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2015-01-13 12:26:13 -0500
committerkwolekr <kwolekr@minetest.net>2015-01-13 12:36:05 -0500
commita4a6cc8eb1197648bce9bec1f0a1aa6aa4b787b7 (patch)
tree23f99eb94ac5b9747983a78bb2d1572c5808872d /doc/lua_api.txt
parent0fd1ee03808ee8121e7b65e5c7c9ba19599d185e (diff)
downloadminetest-a4a6cc8eb1197648bce9bec1f0a1aa6aa4b787b7.tar.gz
minetest-a4a6cc8eb1197648bce9bec1f0a1aa6aa4b787b7.tar.bz2
minetest-a4a6cc8eb1197648bce9bec1f0a1aa6aa4b787b7.zip
builtin: Unify register wrapper functions and wrap clear_registered_* functions too
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt17
1 files changed, 15 insertions, 2 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index e2d93a059..6d6625348 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -417,10 +417,20 @@ the global `minetest.registered_*` tables.
* added to `minetest.registered_items[name]`
* `minetest.register_ore(ore definition)`
- * added to `minetest.registered_ores`
+ * returns an integer uniquely identifying the registered ore
+ * added to `minetest.registered_ores` with the key of `ore.name`
+ * if `ore.name` is nil, the key is the returned ID
* `minetest.register_decoration(decoration definition)`
- * added to `minetest.registered_decorations`
+ * returns an integer uniquely identifying the registered decoration
+ * added to `minetest.registered_decorations` with the key of `decoration.name`
+ * if `decoration.name` is nil, the key is the returned ID
+
+* `minetest.clear_registered_ores()`
+ * clears all ores currently registered
+
+* `minetest.clear_registered_decorations()`
+ * clears all decorations currently registered
Note that in some cases you will stumble upon things that are not contained
in these tables (e.g. when a mod has been removed). Always check for
@@ -1679,6 +1689,9 @@ Call these functions only at load time!
* Note: Item must already be defined, (opt)depend on the mod defining it.
* Example: `minetest.override_item("default:mese", {light_source=LIGHT_MAX})`
+* `minetest.clear_registered_ores()`
+* `minetest.clear_registered_decorations()`
+
### Global callback registration functions
Call these functions only at load time!