1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Add method set_node_visual and get_node_visual to player Lua object and needed logic around it to allow game to set variant_offset

This commit is contained in:
SFENCE 2023-12-30 00:04:39 +01:00
parent e638072e15
commit 5482e51af0
23 changed files with 286 additions and 10 deletions

View file

@ -9136,6 +9136,13 @@ child will follow movement and rotation of that bone.
* `get_lighting()`: returns the current state of lighting for the player.
* Result is a table with the same fields as `light_definition` in `set_lighting`.
* `set_node_visual(node_name, node_visual)`: sets `node_visual` of `node_name` for the player
* `node_name` is a name of registered node.
* `node_visual` is a table with the following optional fields:
* `variant_offset` this value is added to variant from node param2 value (default: `0`).
* `get_node_visual(node_name)`: returns the current `node_visual` of `node_name` for the player.
* Result is a table with the same fields as `node_visual` in `set_node_visual`.
* `respawn()`: Respawns the player using the same mechanism as the death screen,
including calling `on_respawnplayer` callbacks.
* `get_flags()`: returns a table of player flags (the following boolean fields):