diff options
author | kwolekr <kwolekr@minetest.net> | 2014-12-12 14:07:49 -0500 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2014-12-12 14:08:04 -0500 |
commit | cf8213ea827f38ae5d4b8ef16c396545e3e59657 (patch) | |
tree | e739591704b1776002baa1bde7a4ff86de5f06ad /src/script/lua_api/l_mapgen.cpp | |
parent | cec141adc1fd0845e27df9b0c88d979dd765e76f (diff) | |
download | minetest-cf8213ea827f38ae5d4b8ef16c396545e3e59657.tar.gz minetest-cf8213ea827f38ae5d4b8ef16c396545e3e59657.tar.bz2 minetest-cf8213ea827f38ae5d4b8ef16c396545e3e59657.zip |
Add minetest.clear_registered_decorations() and clear_registered_ores()
Diffstat (limited to 'src/script/lua_api/l_mapgen.cpp')
-rw-r--r-- | src/script/lua_api/l_mapgen.cpp | 17 |
1 files changed, 17 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); |