]> git.lizzy.rs Git - minetest.git/blobdiff - doc/menu_lua_api.txt
Add minetest.register_on_player_hpchange
[minetest.git] / doc / menu_lua_api.txt
index 5c0f90df65bdbbfd9c05a29f242cc71d912791f8..76c329de69ec9b66ce2d8740bf90baad4127747f 100644 (file)
@@ -1,4 +1,4 @@
-Minetest Lua Mainmenu API Reference 0.4.11
+Minetest Lua Mainmenu API Reference 0.4.12
 ========================================
 
 Introduction
@@ -31,8 +31,8 @@ core.start()
 core.close()
 
 Filesystem:
-core.get_scriptdir()
-^ returns directory of script
+core.get_builtin_path()
+^ returns path to builtin root
 core.get_modpath() (possible in async calls)
 ^ returns path to global modpath
 core.get_modstore_details(modid) (possible in async calls)
@@ -59,10 +59,6 @@ core.get_gamepath() (possible in async calls)
 ^ returns path to global gamepath
 core.get_texturepath() (possible in async calls)
 ^ returns path to default textures
-core.get_dirlist(path,onlydirs) (possible in async calls)
-^ path to get subdirs from
-^ onlydirs should result contain only dirs?
-^ returns list of folders within path
 core.create_dir(absolute_path) (possible in async calls)
 ^ absolute_path to directory to create (needs to be absolute)
 ^ returns true/false
@@ -197,9 +193,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={})
@@ -211,6 +209,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