Difference between revisions of "Lua API:Platform"
(Added platform page) |
m (Add to lua category) |
||
Line 68: | Line 68: | ||
nil plat.clipboardPaste(string text) | nil plat.clipboardPaste(string text) | ||
"Pastes" text to clipboard | "Pastes" text to clipboard | ||
+ | |||
+ | [[Category:Lua]] |
Latest revision as of 05:15, 15 December 2024
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