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:
parent
9f8767bd0d
commit
454cea79f8
@ -16,6 +16,7 @@ namespace Aki.Debugging
|
|||||||
{
|
{
|
||||||
|
|
||||||
public static string sptVersion;
|
public static string sptVersion;
|
||||||
|
public static string commitHash;
|
||||||
|
|
||||||
// Disable this in release builds.
|
// Disable this in release builds.
|
||||||
private bool _isBleeding = true;
|
private bool _isBleeding = true;
|
||||||
@ -69,6 +70,8 @@ namespace Aki.Debugging
|
|||||||
{
|
{
|
||||||
var json = RequestHandler.GetJson("/singleplayer/settings/version");
|
var json = RequestHandler.GetJson("/singleplayer/settings/version");
|
||||||
sptVersion = Json.Deserialize<VersionResponse>(json).Version;
|
sptVersion = Json.Deserialize<VersionResponse>(json).Version;
|
||||||
|
var splitVersion = sptVersion.Split(' ');
|
||||||
|
commitHash = splitVersion[4] ?? "";
|
||||||
|
|
||||||
_hasVersionChangedSinceLastRun = SetVersionPref();
|
_hasVersionChangedSinceLastRun = SetVersionPref();
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ namespace Aki.Debugging.Patches
|
|||||||
[PatchPostfix]
|
[PatchPostfix]
|
||||||
private static void PatchPostfix(ref TextMeshProUGUI ____label, Profile ___profile_0)
|
private static void PatchPostfix(ref TextMeshProUGUI ____label, Profile ___profile_0)
|
||||||
{
|
{
|
||||||
____label.text = $"{AkiDebuggingPlugin.sptVersion}";
|
____label.text = $"{AkiDebuggingPlugin.commitHash}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user