summaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_mapgen.cpp17
-rw-r--r--src/script/lua_api/l_mapgen.h6
2 files changed, 23 insertions, 0 deletions
diff --git a/src/script/lua_api/l_mapgen.cpp b/src/script/lua_api/l_mapgen.cpp
index 3fe6fb991..177e0d85b 100644
--- a/src/script/lua_api/l_mapgen.cpp
+++ b/src/script/lua_api/l_mapgen.cpp
@@ -464,6 +464,20 @@ int ModApiMapgen::l_clear_registered_biomes(lua_State *L)
return 0;
}
+int ModApiMapgen::l_clear_registered_decorations(lua_State *L)
+{
+ DecorationManager *dmgr = getServer(L)->getEmergeManager()->decomgr;
+ dmgr->clear();
+ return 0;
+}
+
+int ModApiMapgen::l_clear_registered_ores(lua_State *L)
+{
+ OreManager *omgr = getServer(L)->getEmergeManager()->oremgr;
+ omgr->clear();
+ return 0;
+}
+
// register_decoration({lots of stuff})
int ModApiMapgen::l_register_decoration(lua_State *L)
{
@@ -789,7 +803,10 @@ 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(clear_registered_decorations);
+ API_FCT(clear_registered_ores);
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 76f60a2d7..87ae9fd81 100644
--- a/src/script/lua_api/l_mapgen.h
+++ b/src/script/lua_api/l_mapgen.h
@@ -55,6 +55,12 @@ private:
// clear_registered_biomes()
static int l_clear_registered_biomes(lua_State *L);
+ // clear_registered_decorations()
+ static int l_clear_registered_decorations(lua_State *L);
+
+ // clear_registered_ores
+ static int l_clear_registered_ores(lua_State *L);
+
// create_schematic(p1, p2, probability_list, filename)
static int l_create_schematic(lua_State *L);