diff --git a/doc/menu_lua_api.md b/doc/menu_lua_api.md index 56b51f3b9..2fc2ee6da 100644 --- a/doc/menu_lua_api.md +++ b/doc/menu_lua_api.md @@ -109,6 +109,8 @@ of manually putting one, as different OSs use different delimiters. E.g. * `handle:stop()` or `core.sound_stop(handle)` * `core.get_mapgen_names([include_hidden=false])` -> table of map generator algorithms registered in the core (possible in async calls) +* `core.get_mapgen_descriptions([include_hidden=false])` -> table of map generator descriptions, + in the same order as returned by `core.get_mapgen_names` registered in the core (possible in async calls) * `core.get_cache_path()` -> path of cache * `core.get_temp_path([param])` (possible in async calls) * `param`=true: returns path to a newly created temporary file diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp index 3f76ff55d..e91d5eeed 100644 --- a/src/script/lua_api/l_mainmenu.cpp +++ b/src/script/lua_api/l_mainmenu.cpp @@ -1117,6 +1117,7 @@ void ModApiMainMenu::InitializeAsync(lua_State *L, int top) API_FCT(get_worlds); API_FCT(get_games); API_FCT(get_mapgen_names); + API_FCT(get_mapgen_descriptions); API_FCT(get_user_path); API_FCT(get_modpath); API_FCT(get_modpaths);