]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - doc/menu_lua_api.txt
Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu
[dragonfireclient.git] / doc / menu_lua_api.txt
index 164d7876a71766ca126f2f0c550c907c66c60bd9..3812f11fddb2ef7786931e87b0ef11d915cd0fa9 100644 (file)
@@ -127,11 +127,19 @@ engine.get_favorites(location) -> list of favorites
 }
 engine.delete_favorite(id, location) -> success
 
+Logging:
+engine.debug(line)
+^ Always printed to stderr and logfile (print() is redirected here)
+engine.log(line)
+engine.log(loglevel, line)
+^ loglevel one of "error", "action", "info", "verbose"
+
 Settings:
 engine.setting_set(name, value)
 engine.setting_get(name) -> string or nil
 engine.setting_setbool(name, value)
 engine.setting_getbool(name) -> bool or nil
+engine.setting_save() -> nil, save all settings to config file
 
 Worlds:
 engine.get_worlds() -> list of worlds
@@ -164,4 +172,4 @@ dump(obj, dumped={})
 string:split(separator)
 ^ eg. string:split("a,b", ",") == {"a","b"}
 string:trim()
-^ eg. string.trim("\n \t\tfoo bar\t ") == "foo bar"
\ No newline at end of file
+^ eg. string.trim("\n \t\tfoo bar\t ") == "foo bar"