mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 04:21:50 +00:00
update doc/*/scripting/builtins/libentities.md
This commit is contained in:
parent
d450bd3564
commit
145a7b6273
2 changed files with 17 additions and 0 deletions
|
|
@ -36,6 +36,15 @@ entities.def_index(name: str) -> int
|
|||
-- Returns number of available entity definitions
|
||||
entities.defs_count() -> int
|
||||
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> The following functions for retrieving multiple entities return tables with integer keys (uid).
|
||||
> For iteration, use `pairs`, and for calculating the table size, use `table.count_pairs`.
|
||||
> Using `ipairs` will yield incorrect results, since the returned table is not an array.
|
||||
|
||||
```lua
|
||||
|
||||
-- Returns a table of all loaded entities
|
||||
entities.get_all() -> table
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue