mirror of
https://github.com/Facepunch/sbox-public.git
synced 2025-12-23 22:48:07 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
42 lines
1.0 KiB
C#
42 lines
1.0 KiB
C#
using System.Reflection;
|
|
|
|
namespace Sandbox;
|
|
|
|
/// <summary>
|
|
/// Utility info for tools usage.
|
|
/// </summary>
|
|
public static class Global
|
|
{
|
|
internal static Assembly Assembly { get; set; }
|
|
|
|
/// <summary>
|
|
/// Is the local client in game or not.
|
|
/// </summary>
|
|
public static bool InGame { get; internal set; }
|
|
|
|
/// <summary>
|
|
/// Name of the map the local client is on.
|
|
/// </summary>
|
|
public static string MapName { get; internal set; } = "";
|
|
|
|
/// <summary>
|
|
/// Identity of the gamemode the local client is currently playing.
|
|
/// </summary>
|
|
public static string GameIdent { get; internal set; } = "";
|
|
|
|
/// <summary>
|
|
/// Front facing identity for the backend
|
|
/// </summary>
|
|
public static string BackendTitle => "sbox.game";
|
|
|
|
/// <summary>
|
|
/// Url for the backend
|
|
/// </summary>
|
|
public static string BackendUrl => "https://sbox.game";
|
|
|
|
/// <summary>
|
|
/// Are we connected to the API? (If not, offline mode. Requires Steam Servers to be online to connect..)
|
|
/// </summary>
|
|
public static bool IsApiConnected => Api.IsConnected;
|
|
}
|