Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion Robust.Server/ServerStatus/StatusHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> cvar, string val)
Expand Down Expand Up @@ -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
{
Expand Down
30 changes: 30 additions & 0 deletions Robust.Shared/CVars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,36 @@ protected CVars()
public static readonly CVarDef<string> BuildManifestUrl =
CVarDef.Create("build.manifest_url", string.Empty);

/// <summary>
/// URL of the game repository fork (e.g. "https://github.com/MyFork/space-station-14")
/// or original game repository.
/// </summary>
public static readonly CVarDef<string> SourceUrl =
CVarDef.Create("build.source_url", string.Empty);

/// <summary> Commit ID on which current game was built. </summary>
public static readonly CVarDef<string> SourceCommitId =
CVarDef.Create("build.source_commit_id", string.Empty);

/// <summary> Branch on which current game was built. </summary>
public static readonly CVarDef<string> SourceBranchName =
CVarDef.Create("build.source_branch_name", string.Empty);

/// <summary>
/// URL for engine repository (or its fork), used for this version of the game,
/// or original game repository URL.
/// </summary>
public static readonly CVarDef<string> EngineSourceBranchName =
CVarDef.Create("build.engine_source_url", string.Empty);

/// <summary> Commit ID of engine, that was used to build this version of the game. </summary>
public static readonly CVarDef<string> EngineSourceUrl =
CVarDef.Create("build.engine_source_commit_id", string.Empty);

/// <summary> Name of branch for engine, on which this version of game was built. </summary>
public static readonly CVarDef<string> EngineSourceCommitId =
CVarDef.Create("build.engine_source_branch_name", string.Empty);

/// <summary>
/// URL at which the launcher can download the manifest game files.
/// </summary>
Expand Down
Loading