C# Class 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.
ファイルを表示 Open project: OmegaExtern/gmod-csharp-binary-module

Public Methods

Method Description
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.

Method Details

AppTime() public static method

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.
return uint

BatteryPower() public static method

Returns the current battery power.
public static BatteryPower ( LuaState luaState ) : byte
luaState LuaState Pointer to lua_State struct.
return byte

FlashWindow() public static method

Flashes the window. Currently works only on Windows platform.
public static FlashWindow ( LuaState luaState ) : void
luaState LuaState Pointer to lua_State struct.
return void

GetCountry() public static method

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.
return string

HasFocus() public static method

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.
return bool

IsLinux() public static method

Returns whether the current OS is Linux.
public static IsLinux ( LuaState luaState ) : bool
luaState LuaState Pointer to lua_State struct.
return bool

IsOSX() public static method

Returns whether the current OS is OSX.
public static IsOSX ( LuaState luaState ) : bool
luaState LuaState Pointer to lua_State struct.
return bool

IsWindowed() public static method

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.
return bool

IsWindows() public static method

Returns whether the current OS is Windows.
public static IsWindows ( LuaState luaState ) : bool
luaState LuaState Pointer to lua_State struct.
return bool

SteamTime() public static method

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.
return uint

UpTime() public static method

Returns the total uptime of operating system.
public static UpTime ( LuaState luaState ) : uint
luaState LuaState Pointer to lua_State struct.
return uint