0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00

Show commit hash in friendly debug message

This commit is contained in:
Dev 2024-03-07 13:44:20 +00:00
parent 9f8767bd0d
commit 454cea79f8
2 changed files with 4 additions and 1 deletions

View File

@ -16,6 +16,7 @@ namespace Aki.Debugging
{
public static string sptVersion;
public static string commitHash;
// Disable this in release builds.
private bool _isBleeding = true;
@ -69,6 +70,8 @@ namespace Aki.Debugging
{
var json = RequestHandler.GetJson("/singleplayer/settings/version");
sptVersion = Json.Deserialize<VersionResponse>(json).Version;
var splitVersion = sptVersion.Split(' ');
commitHash = splitVersion[4] ?? "";
_hasVersionChangedSinceLastRun = SetVersionPref();
}

View File

@ -34,7 +34,7 @@ namespace Aki.Debugging.Patches
[PatchPostfix]
private static void PatchPostfix(ref TextMeshProUGUI ____label, Profile ___profile_0)
{
____label.text = $"{AkiDebuggingPlugin.sptVersion}";
____label.text = $"{AkiDebuggingPlugin.commitHash}";
}
}