From a4a6cc8eb1197648bce9bec1f0a1aa6aa4b787b7 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Tue, 13 Jan 2015 12:26:13 -0500 Subject: builtin: Unify register wrapper functions and wrap clear_registered_* functions too --- doc/lua_api.txt | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'doc/lua_api.txt') 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! -- cgit v1.2.3