1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Initialize facedir and wallmounted tables only once.

This makes the functions a bit faster since they don't
have to recreate the tables every invocation, and makes
the code more readable.

Also, document `wallmounted_to_dir`.

The function was implemented but not documented in `lua_api.txt`.
This commit is contained in:
Diego Martinez 2016-02-09 21:46:22 -03:00 committed by paramat
parent 0f03547b03
commit 13dd7959db
2 changed files with 31 additions and 28 deletions

View file

@ -2153,6 +2153,8 @@ and `minetest.auth_reload` call the authetification handler.
* Convert a facedir back into a vector aimed directly out the "back" of a node
* `minetest.dir_to_wallmounted(dir)`
* Convert a vector to a wallmounted value, used for `paramtype2="wallmounted"`
* `minetest.wallmounted_to_dir(wallmounted)`
* Convert a wallmounted value back into a vector aimed directly out the "back" of a node
* `minetest.get_node_drops(nodename, toolname)`
* Returns list of item names.
* **Note**: This will be removed or modified in a future version.