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

This commit is contained in:
Loic Blot
2015-02-22 17:01:03 +01:00
committed by Craig Robbins
parent 2b189d4507
commit 0f556d0c7f
3 changed files with 56 additions and 3 deletions

View File

@@ -119,6 +119,10 @@ class ModApiEnvMod : public ModApiBase {
// 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);