diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 579fe796e..da9ebb9f1 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -208,11 +208,17 @@ when registering it. The `:` prefix can also be used for maintaining backwards compatibility. ### Aliases -Aliases can be added by using `minetest.register_alias(name, convert_to)`. +Aliases can be added by using `minetest.register_alias(name, convert_to)` or +`minetest.register_alias_force(name, convert_to). This will make Minetest to convert things called name to things called `convert_to`. +The only difference between `minetest.register_alias` and +`minetest.register_alias_force` is that if an item called `name` exists, +`minetest.register_alias` will do nothing while +`minetest.register_alias_force` will unregister it. + This can be used for maintaining backwards compatibility. This can be also used for setting quick access names for things, e.g. if @@ -464,6 +470,11 @@ the global `minetest.registered_*` tables. * `minetest.register_craftitem(name, item definition)` * added to `minetest.registered_items[name]` +* `minetest.unregister_item(name)` + * Unregisters the item name from engine, and deletes the entry with key + * `name` from `minetest.registered_items` and from the associated item + * table according to its nature: minetest.registered_nodes[] etc + * `minetest.register_biome(biome definition)` * returns an integer uniquely identifying the registered biome * added to `minetest.registered_biome` with the key of `biome.name` @@ -1883,7 +1894,9 @@ Call these functions only at load time! * `minetest.register_node(name, node definition)` * `minetest.register_tool(name, item definition)` * `minetest.register_craftitem(name, item definition)` +* `minetest.unregister_item(name)` * `minetest.register_alias(name, convert_to)` +* `minetest.register_alias_force(name, convert_to)` * `minetest.register_craft(recipe)` * Check recipe table syntax for different types below. * `minetest.clear_craft(recipe)` |