diff --git a/Robust.Server/ServerStatus/StatusHost.cs b/Robust.Server/ServerStatus/StatusHost.cs index 01efd0f9a3f..402905555c3 100644 --- a/Robust.Server/ServerStatus/StatusHost.cs +++ b/Robust.Server/ServerStatus/StatusHost.cs @@ -194,6 +194,12 @@ private void RegisterCVars() SetCVarIfUnmodified(CVars.BuildManifestHash, info.ManifestHash ?? ""); SetCVarIfUnmodified(CVars.BuildManifestDownloadUrl, info.ManifestDownloadUrl ?? ""); SetCVarIfUnmodified(CVars.BuildManifestUrl, info.ManifestUrl ?? ""); + SetCVarIfUnmodified(CVars.SourceUrl, info.SourceUrl ?? ""); + SetCVarIfUnmodified(CVars.SourceCommitId, info.SourceCommitId ?? ""); + SetCVarIfUnmodified(CVars.SourceBranchName, info.SourceBranchName ?? ""); + SetCVarIfUnmodified(CVars.EngineSourceBranchName, info.EngineSourceBranchName ?? ""); + SetCVarIfUnmodified(CVars.EngineSourceUrl, info.EngineSourceUrl ?? ""); + SetCVarIfUnmodified(CVars.EngineSourceCommitId, info.EngineSourceCommitId ?? ""); } void SetCVarIfUnmodified(CVarDef cvar, string val) @@ -231,7 +237,20 @@ private sealed record BuildInfo( [property: JsonPropertyName("manifest_url")] string? ManifestUrl, [property: JsonPropertyName("manifest_download_url")] - string? ManifestDownloadUrl); + string? ManifestDownloadUrl, + [property: JsonPropertyName("built_on_source_url")] + string? SourceUrl, + [property: JsonPropertyName("built_on_commit_id")] + string? SourceCommitId, + [property: JsonPropertyName("built_on_branch_name")] + string? SourceBranchName, + [property: JsonPropertyName("built_on_engine_url")] + string? EngineSourceUrl, + [property: JsonPropertyName("built_on_engine_commit_id")] + string? EngineSourceCommitId, + [property: JsonPropertyName("built_on_engine_branch_name")] + string? EngineSourceBranchName + ); private sealed class ContextImpl : IStatusHandlerContext { diff --git a/Robust.Shared/CVars.cs b/Robust.Shared/CVars.cs index 6b61f349cfe..2895cd7f2d3 100644 --- a/Robust.Shared/CVars.cs +++ b/Robust.Shared/CVars.cs @@ -800,6 +800,36 @@ protected CVars() public static readonly CVarDef BuildManifestUrl = CVarDef.Create("build.manifest_url", string.Empty); + /// + /// URL of the game repository fork (e.g. "https://github.com/MyFork/space-station-14") + /// or original game repository. + /// + public static readonly CVarDef SourceUrl = + CVarDef.Create("build.source_url", string.Empty); + + /// Commit ID on which current game was built. + public static readonly CVarDef SourceCommitId = + CVarDef.Create("build.source_commit_id", string.Empty); + + /// Branch on which current game was built. + public static readonly CVarDef SourceBranchName = + CVarDef.Create("build.source_branch_name", string.Empty); + + /// + /// URL for engine repository (or its fork), used for this version of the game, + /// or original game repository URL. + /// + public static readonly CVarDef EngineSourceBranchName = + CVarDef.Create("build.engine_source_url", string.Empty); + + /// Commit ID of engine, that was used to build this version of the game. + public static readonly CVarDef EngineSourceUrl = + CVarDef.Create("build.engine_source_commit_id", string.Empty); + + /// Name of branch for engine, on which this version of game was built. + public static readonly CVarDef EngineSourceCommitId = + CVarDef.Create("build.engine_source_branch_name", string.Empty); + /// /// URL at which the launcher can download the manifest game files. ///