diff options
author | BlockMen <nmuelll@web.de> | 2015-11-20 23:46:33 +0100 |
---|---|---|
committer | BlockMen <nmuelll@web.de> | 2015-12-15 23:32:19 +0100 |
commit | 9eee3c3f465c071bb9908749cf48be3c131a1bdf (patch) | |
tree | 916b11e605c29b789db01d0c775dc0bc7c4c8983 /doc | |
parent | 19f73e4efc14622b4d020c9d373176cd7801e37f (diff) | |
download | minetest-9eee3c3f465c071bb9908749cf48be3c131a1bdf.tar.gz minetest-9eee3c3f465c071bb9908749cf48be3c131a1bdf.tar.bz2 minetest-9eee3c3f465c071bb9908749cf48be3c131a1bdf.zip |
Add option to give every object a nametag
or change the nametag text of players
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 56dc84d24..45a47c9ab 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2544,6 +2544,19 @@ This is basically a reference to a C++ `ServerActiveObject` * `set_properties(object property table)` * `get_properties()`: returns object property table * `is_player()`: returns true for players, false otherwise +* `get_nametag_attributes()` + * returns a table with the attributes of the nametag of an object + * { + color = {a=0..255, r=0..255, g=0..255, b=0..255}, + text = "", + } +* `set_nametag_attributes(attributes)` + * sets the attributes of the nametag of an object + * `attributes`: + { + color = ColorSpec, + text = "My Nametag", + } ##### LuaEntitySAO-only (no-op for other objects) * `setvelocity({x=num, y=num, z=num})` @@ -2644,17 +2657,6 @@ This is basically a reference to a C++ `ServerActiveObject` * in first person view * in third person view (max. values `{x=-10/10,y=-10,15,z=-5/5}`) * `get_eye_offset()`: returns offset_first and offset_third -* `get_nametag_attributes()` - * returns a table with the attributes of the nametag of the player - * { - color = {a=0..255, r=0..255, g=0..255, b=0..255}, - } -* `set_nametag_attributes(attributes)` - * sets the attributes of the nametag of the player - * `attributes`: - { - color = ColorSpec, - } ### `InvRef` An `InvRef` is a reference to an inventory. @@ -3232,6 +3234,8 @@ Definition tables automatic_face_movement_dir = 0.0, -- ^ automatically set yaw to movement direction; offset in degrees; false to disable backface_culling = true, -- false to disable backface_culling for model + nametag = "", -- by default empty, for players their name is shown if empty + nametag_color = <color>, -- sets color of nametag as ColorSpec } ### Entity definition (`register_entity`) |