Difference between revisions of "Lua API:Platform"
(Added platform page) |
(No difference)
|
Revision as of 19:54, 4 January 2023
Contents
Methods
platform.platform
string plat.platform()
Returns the platform that the game's executable is compiled for.
Possible return values:
- WIN64
- WIN32
- LIN64
- LIN32
- MACOSARM
- MACOSX
- UNKNOWN
platform.ident
string plat.ident()
Returns the target triplet for the game's executable containing the CPU family, the OS name and C environment separated by dashes
Possible return values:
platform.build
string plat.build()
THIS FUNCTION IS DEPRECATED
Possible return values:
- SSE3
- SSE2
- SSE
- NO
platform.releaseType
string plat.releaseType()
Returns the game's executable release type.
Possible return values:
- R (Release)
- B (Beta)
- S (Snapshot)
platform.exeName
string plat.exeName()
Returns the path to the game's executable.
platform.restart
nil plat.restart()
Restarts the game
platform.openLink
nil plat.openLink(string URI)
Opens the provided link in the default system browser.
platform.clipboardCopy
string plat.clipboardCopy()
"Copies" or returns text from clipboard
platform.clipboardPaste
nil plat.clipboardPaste(string text)
"Pastes" text to clipboard