C# Класс GarrysModLuaShared.system

The system library provides functions that allow you to gather information about the system running the game, such as operating system, uptime and battery level.
Показать файл Открыть проект

Открытые методы

Метод Описание
AppTime ( LuaState luaState ) : uint

Returns the total uptime of the current application. This will return a similar value to Global.SysTime.

BatteryPower ( LuaState luaState ) : byte

Returns the current battery power.

FlashWindow ( LuaState luaState ) : void

Flashes the window. Currently works only on Windows platform.

GetCountry ( LuaState luaState ) : string

Returns the country code of this computer, determined by the localisation settings of the OS.

HasFocus ( LuaState luaState ) : bool

Returns whether or not the game window has focus. This does nothing on dedicated servers. Returns true 100% of the time on OS X and returns nil on Linux platform.

IsLinux ( LuaState luaState ) : bool

Returns whether the current OS is Linux.

IsOSX ( LuaState luaState ) : bool

Returns whether the current OS is OSX.

IsWindowed ( LuaState luaState ) : bool

Returns true if the game is currently running windowed; otherwise false if it is fullscreen.

IsWindows ( LuaState luaState ) : bool

Returns whether the current OS is Windows.

SteamTime ( LuaState luaState ) : uint

Returns the synchronized steam time. This is the number of seconds since the Unix epoch.

UpTime ( LuaState luaState ) : uint

Returns the total uptime of operating system.

Описание методов

AppTime() публичный статический Метод

Returns the total uptime of the current application. This will return a similar value to Global.SysTime.
public static AppTime ( LuaState luaState ) : uint
luaState LuaState Pointer to lua_State struct.
Результат uint

BatteryPower() публичный статический Метод

Returns the current battery power.
public static BatteryPower ( LuaState luaState ) : byte
luaState LuaState Pointer to lua_State struct.
Результат byte

FlashWindow() публичный статический Метод

Flashes the window. Currently works only on Windows platform.
public static FlashWindow ( LuaState luaState ) : void
luaState LuaState Pointer to lua_State struct.
Результат void

GetCountry() публичный статический Метод

Returns the country code of this computer, determined by the localisation settings of the OS.
public static GetCountry ( LuaState luaState ) : string
luaState LuaState Pointer to lua_State struct.
Результат string

HasFocus() публичный статический Метод

Returns whether or not the game window has focus. This does nothing on dedicated servers. Returns true 100% of the time on OS X and returns nil on Linux platform.
public static HasFocus ( LuaState luaState ) : bool
luaState LuaState Pointer to lua_State struct.
Результат bool

IsLinux() публичный статический Метод

Returns whether the current OS is Linux.
public static IsLinux ( LuaState luaState ) : bool
luaState LuaState Pointer to lua_State struct.
Результат bool

IsOSX() публичный статический Метод

Returns whether the current OS is OSX.
public static IsOSX ( LuaState luaState ) : bool
luaState LuaState Pointer to lua_State struct.
Результат bool

IsWindowed() публичный статический Метод

Returns true if the game is currently running windowed; otherwise false if it is fullscreen.
public static IsWindowed ( LuaState luaState ) : bool
luaState LuaState Pointer to lua_State struct.
Результат bool

IsWindows() публичный статический Метод

Returns whether the current OS is Windows.
public static IsWindows ( LuaState luaState ) : bool
luaState LuaState Pointer to lua_State struct.
Результат bool

SteamTime() публичный статический Метод

Returns the synchronized steam time. This is the number of seconds since the Unix epoch.
public static SteamTime ( LuaState luaState ) : uint
luaState LuaState Pointer to lua_State struct.
Результат uint

UpTime() публичный статический Метод

Returns the total uptime of operating system.
public static UpTime ( LuaState luaState ) : uint
luaState LuaState Pointer to lua_State struct.
Результат uint