Skip to content

Commit 3a8ac9b

Browse files
ClobberXDparamat
authored andcommittedJul 8, 2019
Document ObjectRef:remove under Lua entity (#8659)
This was previously documented under the general ObjectRef section with a note that this won't work on players. So I think this would fit better with Lua entity-only methods. This PR also changes the title of the Lua entity-only section from `LuaEntitySAO-only` to `Lua entity only`.
1 parent 9b067ef commit 3a8ac9b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed
 

Diff for: ‎doc/lua_api.txt

+3-4
Original file line numberDiff line numberDiff line change
@@ -5263,8 +5263,6 @@ This is basically a reference to a C++ `ServerActiveObject`
52635263

52645264
### Methods
52655265

5266-
* `remove()`: remove object (after returning from Lua)
5267-
* Note: Doesn't work on players, use `minetest.kick_player` instead
52685266
* `get_pos()`: returns `{x=num, y=num, z=num}`
52695267
* `set_pos(pos)`: `pos`=`{x=num, y=num, z=num}`
52705268
* `move_to(pos, continuous=false)`: interpolated move
@@ -5323,8 +5321,9 @@ This is basically a reference to a C++ `ServerActiveObject`
53235321
text = "My Nametag",
53245322
}
53255323

5326-
#### LuaEntitySAO-only (no-op for other objects)
5324+
#### Lua entity only (no-op for other objects)
53275325

5326+
* `remove()`: remove object (after returning from Lua)
53285327
* `set_velocity(vel)`
53295328
* `vel` is a vector, e.g. `{x=0.0, y=2.3, z=1.0}`
53305329
* `add_velocity(vel)`
@@ -5355,7 +5354,7 @@ This is basically a reference to a C++ `ServerActiveObject`
53555354
* `get_entity_name()` (**Deprecated**: Will be removed in a future version)
53565355
* `get_luaentity()`
53575356

5358-
#### Player-only (no-op for other objects)
5357+
#### Player only (no-op for other objects)
53595358

53605359
* `get_player_name()`: returns `""` if is not a player
53615360
* `get_player_velocity()`: returns `nil` if is not a player, otherwise a

0 commit comments

Comments
 (0)
Please sign in to comment.