diff options
author | ShadowNinja <shadowninja@minetest.net> | 2015-10-30 20:38:22 -0400 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2016-03-07 16:33:20 -0500 |
commit | 3ce6642a26d43fd368c24cdfc5460557258fb44f (patch) | |
tree | 3f84e8a4491abc6c9bc4a615dea018fdd8cf0697 /doc | |
parent | 821551a2669123ac9a476894d65b5efe10026040 (diff) | |
download | minetest-3ce6642a26d43fd368c24cdfc5460557258fb44f.tar.gz minetest-3ce6642a26d43fd368c24cdfc5460557258fb44f.tar.bz2 minetest-3ce6642a26d43fd368c24cdfc5460557258fb44f.zip |
Add AreaStore custom ID API
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 50fa25273..65af51578 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2727,7 +2727,7 @@ If you chose the parameter-less constructor, a fast implementation will be autom * `get_area(id, include_borders, include_data)`: returns the area with the id `id`. (optional) Boolean values `include_borders` and `include_data` control what's copied. * `get_areas_for_pos(pos, include_borders, include_data)`: returns all areas that contain the position `pos`. (optional) Boolean values `include_borders` and `include_data` control what's copied. * `get_areas_in_area(edge1, edge2, accept_overlap, include_borders, include_data)`: returns all areas that contain all nodes inside the area specified by `edge1` and `edge2` (inclusive). If `accept_overlap` is true, also areas are returned that have nodes in common with the specified area. (optional) Boolean values `include_borders` and `include_data` control what's copied. -* `insert_area(edge1, edge2, data)`: inserts an area into the store. Returns the new area's ID, or nil if the insertion failed. The (inclusive) positions `edge1` and `edge2` describe the area, `data` is a string stored with the area. +* `insert_area(edge1, edge2, data, [id])`: inserts an area into the store. Returns the new area's ID, or nil if the insertion failed. The (inclusive) positions `edge1` and `edge2` describe the area. `data` is a string stored with the area. If passed, `id` will be used as the internal area ID, it must be a unique number between 0 and 2^32-2. If you use the `id` parameter you must always use it, or insertions are likely to fail due to conflicts. * `reserve(count)`: reserves resources for at most `count` many contained areas. Only needed for efficiency, and only some implementations profit. * `remove_area(id)`: removes the area with the given id from the store, returns success. * `set_cache_params(params)`: sets params for the included prefiltering cache. Calling invalidates the cache, so that its elements have to be newly generated. |