aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-06-02 15:47:36 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-06-03 22:31:01 +0300
commitbf8cfce50e3f32b84c7fccf470601986d6f7913f (patch)
tree9cb99973db9cb1c83b184ff0d9fe0e8cee2fd9f5 /doc
parentb235e4d290e3565a2789ec5097d33b1ec9dbb5ce (diff)
downloadminetest-bf8cfce50e3f32b84c7fccf470601986d6f7913f.tar.gz
minetest-bf8cfce50e3f32b84c7fccf470601986d6f7913f.tar.bz2
minetest-bf8cfce50e3f32b84c7fccf470601986d6f7913f.zip
Add ObjRef:is_player() and modify ObjRef:get_player_name() to always return a string to aid better inter-object compatibility of code that assumes objects to be players
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 6de255c0d..ddab47262 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -913,7 +913,8 @@ LuaEntitySAO-only: (no-op for other objects)
- get_entity_name() (DEPRECATED: Will be removed in a future version)
- get_luaentity()
Player-only: (no-op for other objects)
-- get_player_name(): will return nil if is not a player
+- is_player(): true for players, false for others
+- get_player_name(): returns "" if is not a player
- get_look_dir(): get camera direction as a unit vector
- get_look_pitch(): pitch in radians
- get_look_yaw(): yaw in radians (wraps around pretty randomly as of now)