]> git.lizzy.rs Git - minetest.git/blobdiff - doc/menu_lua_api.txt
Add minetest.global_exists()
[minetest.git] / doc / menu_lua_api.txt
index 13ef45de0373fe03ba510c8bd256fc44adaddfa7..e5ba46d4c0998e63eb259c59a757256682d8b262 100644 (file)
@@ -1,4 +1,4 @@
-Minetest Lua Mainmenu API Reference 0.4.10
+Minetest Lua Mainmenu API Reference 0.4.12
 ========================================
 
 Introduction
@@ -88,6 +88,11 @@ core.sound_play(spec, looped) -> handle
 ^ spec = SimpleSoundSpec (see lua-api.txt)
 ^ looped = bool
 core.sound_stop(handle)
+core.get_video_drivers()
+^ get list of video drivers supported by engine (not all modes are guaranteed to work)
+^ returns list of available video drivers' settings name and 'friendly' display name
+^ e.g. { {name="opengl", friendly_name="OpenGL"}, {name="software", friendly_name="Software Renderer"} }
+^ first element of returned list is guaranteed to be the NULL driver
 
 Formspec:
 core.update_formspec(formspec)
@@ -140,6 +145,8 @@ core.get_game(index)
        addon_mods_paths = {[1] = <path>,},
 }
 core.get_games() -> table of all games in upper format (possible in async calls)
+core.get_mapgen_names() -> table of all map generator algorithms registered in
+                           the core (possible in async calls)
 
 Favorites:
 core.get_favorites(location) -> list of favorites (possible in async calls)
@@ -190,9 +197,11 @@ core.delete_world(index)
 Helpers:
 core.gettext(string) -> string
 ^ look up the translation of a string in the gettext message catalog
-fgettext(string, ...) -> string
+fgettext_ne(string, ...)
 ^ call core.gettext(string), replace "$1"..."$9" with the given
-^ extra arguments, call core.formspec_escape and return the result
+^ extra arguments and return the result
+fgettext(string, ...) -> string
+^ same as fgettext_ne(), but calls core.formspec_escape before returning result
 core.parse_json(string[, nullvalue]) -> something (possible in async calls)
 ^ see core.parse_json (lua_api.txt)
 dump(obj, dumped={})
@@ -204,6 +213,12 @@ string:trim()
 core.is_yes(arg) (possible in async calls)
 ^ returns whether arg can be interpreted as yes
 
+Version compat:
+core.get_min_supp_proto()
+^ returns the minimum supported network protocol version
+core.get_max_supp_proto()
+^ returns the maximum supported network protocol version
+
 Async:
 core.handle_async(async_job,parameters,finished)
 ^ execute a function asynchronously