From 9eee3c3f465c071bb9908749cf48be3c131a1bdf Mon Sep 17 00:00:00 2001 From: BlockMen Date: Fri, 20 Nov 2015 23:46:33 +0100 Subject: Add option to give every object a nametag or change the nametag text of players --- doc/lua_api.txt | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'doc') 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 = , -- sets color of nametag as ColorSpec } ### Entity definition (`register_entity`) -- cgit v1.2.3