summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-07-14 22:36:53 +0200
committerGitHub <noreply@github.com>2020-07-14 22:36:53 +0200
commit4b4513a67d9fc426d0f33798d0810a3a0594baaf (patch)
treea9afe34600523ce7b80b8484923b40c95019bdc8 /doc
parent88ffd641243ead70d82623d54822421c72893240 (diff)
downloadminetest-4b4513a67d9fc426d0f33798d0810a3a0594baaf.tar.gz
minetest-4b4513a67d9fc426d0f33798d0810a3a0594baaf.tar.bz2
minetest-4b4513a67d9fc426d0f33798d0810a3a0594baaf.zip
Implement grouped mode for find_nodes_in_area (#9888)
plus general improvements to find_node_* functions
Diffstat (limited to 'doc')
-rw-r--r--doc/client_lua_api.txt13
-rw-r--r--doc/lua_api.txt13
2 files changed, 16 insertions, 10 deletions
diff --git a/doc/client_lua_api.txt b/doc/client_lua_api.txt
index 04815aaa4..3b0046b4f 100644
--- a/doc/client_lua_api.txt
+++ b/doc/client_lua_api.txt
@@ -768,12 +768,15 @@ Call these functions only at load time!
* `nodenames`: e.g. `{"ignore", "group:tree"}` or `"default:dirt"`
* `search_center` is an optional boolean (default: `false`)
If true `pos` is also checked for the nodes
-* `minetest.find_nodes_in_area(pos1, pos2, nodenames)`: returns a list of
- positions.
+* `minetest.find_nodes_in_area(pos1, pos2, nodenames, [grouped])`
+ * `pos1` and `pos2` are the min and max positions of the area to search.
* `nodenames`: e.g. `{"ignore", "group:tree"}` or `"default:dirt"`
- * First return value: Table with all node positions
- * Second return value: Table with the count of each node with the node name
- as index.
+ * If `grouped` is true the return value is a table indexed by node name
+ which contains lists of positions.
+ * If `grouped` is false or absent the return values are as follows:
+ first value: Table with all node positions
+ second value: Table with the count of each node with the node name
+ as index
* Area volume is limited to 4,096,000 nodes
* `minetest.find_nodes_in_area_under_air(pos1, pos2, nodenames)`: returns a
list of positions.
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index d3a367b27..e0c895c97 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -4762,12 +4762,15 @@ Environment access
* `nodenames`: e.g. `{"ignore", "group:tree"}` or `"default:dirt"`
* `search_center` is an optional boolean (default: `false`)
If true `pos` is also checked for the nodes
-* `minetest.find_nodes_in_area(pos1, pos2, nodenames)`: returns a list of
- positions.
+* `minetest.find_nodes_in_area(pos1, pos2, nodenames, [grouped])`
+ * `pos1` and `pos2` are the min and max positions of the area to search.
* `nodenames`: e.g. `{"ignore", "group:tree"}` or `"default:dirt"`
- * First return value: Table with all node positions
- * Second return value: Table with the count of each node with the node name
- as index.
+ * If `grouped` is true the return value is a table indexed by node name
+ which contains lists of positions.
+ * If `grouped` is false or absent the return values are as follows:
+ first value: Table with all node positions
+ second value: Table with the count of each node with the node name
+ as index
* Area volume is limited to 4,096,000 nodes
* `minetest.find_nodes_in_area_under_air(pos1, pos2, nodenames)`: returns a
list of positions.