Files
sbox-public/engine/Sandbox.Tools/Global.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

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;
}