summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_env.h
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-02-22 17:01:03 +0100
committerCraig Robbins <kde.psych@gmail.com>2015-02-27 21:34:33 +1000
commit0f556d0c7f8c98c7209416577aae4fcc0c1c2b32 (patch)
tree51db9a8f2f853905a8e0b5e89aeb108baf30d700 /src/script/lua_api/l_env.h
parent2b189d4507028068694e2d5d2d94ded646d3c604 (diff)
downloadminetest-0f556d0c7f8c98c7209416577aae4fcc0c1c2b32.tar.gz
minetest-0f556d0c7f8c98c7209416577aae4fcc0c1c2b32.tar.bz2
minetest-0f556d0c7f8c98c7209416577aae4fcc0c1c2b32.zip
Add find_surface_nodes_in_area LUA call which permit to only get the nodes which touch air. This permit to massively improve performance for mods like plantlife
Diffstat (limited to 'src/script/lua_api/l_env.h')
-rw-r--r--src/script/lua_api/l_env.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/lua_api/l_env.h b/src/script/lua_api/l_env.h
index bfaea1c4d..807afe459 100644
--- a/src/script/lua_api/l_env.h
+++ b/src/script/lua_api/l_env.h
@@ -119,6 +119,10 @@ private:
// nodenames: eg. {"ignore", "group:tree"} or "default:dirt"
static int l_find_nodes_in_area(lua_State *L);
+ // find_surface_nodes_in_area(minp, maxp, nodenames) -> list of positions
+ // nodenames: eg. {"ignore", "group:tree"} or "default:dirt"
+ static int l_find_surface_nodes_in_area(lua_State *L);
+
// delete_area(p1, p2) -> true/false
static int l_delete_area(lua_State *L);