mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu
This commit is contained in:
parent
6228d634fb
commit
4e1f50035e
153 changed files with 3725 additions and 3625 deletions
|
@ -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"
|
||||
^ eg. string.trim("\n \t\tfoo bar\t ") == "foo bar"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue