diff --git a/docs/Lua API.rst b/docs/Lua API.rst index 5a40fa8a8..e938a51e0 100644 --- a/docs/Lua API.rst +++ b/docs/Lua API.rst @@ -789,11 +789,12 @@ can be omitted. Returns the DF version string from ``symbols.xml``. -* ``getDFHackVersion()`` -* ``getDFHackRelease()`` -* ``getCompiledDFVersion()`` -* ``getGitDescription()`` -* ``getGitCommit()`` +* ``dfhack.getDFHackVersion()`` +* ``dfhack.getDFHackRelease()`` +* ``dfhack.getCompiledDFVersion()`` +* ``dfhack.getGitDescription()`` +* ``dfhack.getGitCommit()`` +* ``dfhack.isRelease()`` Return information about the DFHack build in use. @@ -835,10 +836,20 @@ can be omitted. Convert a string from DF's CP437 encoding to UTF-8. +* ``dfhack.df2console()`` + + Convert a string from DF's CP437 encoding to the correct encoding for the + DFHack console. + * ``dfhack.utf2df(string)`` Convert a string from UTF-8 to DF's CP437 encoding. +**Note:** When printing CP437-encoded text to the console (for example, names +returned from TranslateName()), use ``print(dfhack.df2console(text)`` to ensure +proper display on all platforms. + + Gui module ---------- @@ -860,7 +871,7 @@ Gui module Returns the topmost viewscreen out of the top ``depth`` viewscreens with the specified type (e.g. ``df.viewscreen_titlest``), or ``nil`` if none match. - If ``limit`` is not specified or is less than 1, all viewscreens are checked. + If ``depth`` is not specified or is less than 1, all viewscreens are checked. * ``dfhack.gui.getSelectedWorkshopJob([silent])``