diff options
author | kwolekr <kwolekr@minetest.net> | 2014-12-06 18:08:08 -0500 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2014-12-06 18:08:23 -0500 |
commit | 60feb4ad25003b4ed5f93f7fda7f4b8177a0ba51 (patch) | |
tree | 1b4a9e41b4bea77463cc1fb144ff88bfd790c404 /src/script | |
parent | f3abaec83be741094ef1b0949e3400fb16729f97 (diff) | |
download | minetest-60feb4ad25003b4ed5f93f7fda7f4b8177a0ba51.tar.gz minetest-60feb4ad25003b4ed5f93f7fda7f4b8177a0ba51.tar.bz2 minetest-60feb4ad25003b4ed5f93f7fda7f4b8177a0ba51.zip |
Add minetest.clear_registered_biomes() api
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/lua_api/l_mapgen.cpp | 8 | ||||
-rw-r--r-- | src/script/lua_api/l_mapgen.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/script/lua_api/l_mapgen.cpp b/src/script/lua_api/l_mapgen.cpp index a8f55cd25..5f9266c2b 100644 --- a/src/script/lua_api/l_mapgen.cpp +++ b/src/script/lua_api/l_mapgen.cpp @@ -360,6 +360,13 @@ int ModApiMapgen::l_register_biome(lua_State *L) return 1; } +int ModApiMapgen::l_clear_registered_biomes(lua_State *L) +{ + BiomeManager *bmgr = getServer(L)->getEmergeManager()->biomemgr; + bmgr->clear(); + return 0; +} + // register_decoration({lots of stuff}) int ModApiMapgen::l_register_decoration(lua_State *L) { @@ -678,6 +685,7 @@ void ModApiMapgen::Initialize(lua_State *L, int top) API_FCT(register_biome); API_FCT(register_decoration); API_FCT(register_ore); + API_FCT(clear_registered_biomes); API_FCT(create_schematic); API_FCT(place_schematic); diff --git a/src/script/lua_api/l_mapgen.h b/src/script/lua_api/l_mapgen.h index dac0f00a7..d76190f27 100644 --- a/src/script/lua_api/l_mapgen.h +++ b/src/script/lua_api/l_mapgen.h @@ -52,6 +52,9 @@ private: // register_ore({lots of stuff}) static int l_register_ore(lua_State *L); + // clear_registered_biomes() + static int l_clear_registered_biomes(lua_State *L); + // create_schematic(p1, p2, probability_list, filename) static int l_create_schematic(lua_State *L); |