From d6cf5450a897b00e5ed0d053f14108c94dfb3701 Mon Sep 17 00:00:00 2001 From: red-001 Date: Thu, 4 May 2017 21:52:58 +0100 Subject: Add option to also check the center to `find_node_near` (#5255) * Add option to also check the center to `find_node_near` --- doc/lua_api.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc/lua_api.txt') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 599e02fcb..1550a78be 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2280,9 +2280,11 @@ and `minetest.auth_reload` call the authetification handler. * `minetest.get_gametime()`: returns the time, in seconds, since the world was created * `minetest.get_day_count()`: returns number days elapsed since world was created, * accounting for time changes. -* `minetest.find_node_near(pos, radius, nodenames)`: returns pos or `nil` +* `minetest.find_node_near(pos, radius, nodenames, [search_center])`: returns pos or `nil` * `radius`: using a maximum metric * `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(minp, maxp, nodenames)`: returns a list of positions * returns as second value a table with the count of the individual nodes found * `nodenames`: e.g. `{"ignore", "group:tree"}` or `"default:dirt"` -- cgit v1.2.3