aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-rw-r--r--src/script/lua_api/l_mapgen.cpp8
-rw-r--r--src/script/lua_api/l_mapgen.h3
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);