mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 09:50:43 -05:00
Add additional debug patch
This commit is contained in:
parent
2b3bf8864a
commit
f781071bf2
@ -17,6 +17,8 @@ namespace Aki.Debugging
|
|||||||
new EndRaidDebug().Enable();
|
new EndRaidDebug().Enable();
|
||||||
// new CoordinatesPatch().Enable();
|
// new CoordinatesPatch().Enable();
|
||||||
// new StaticLootDumper().Enable();
|
// new StaticLootDumper().Enable();
|
||||||
|
new DebugLogoPatch().Enable();
|
||||||
|
new DebugLogoPatch2().Enable();
|
||||||
|
|
||||||
// BTR debug command patches, can be disabled later
|
// BTR debug command patches, can be disabled later
|
||||||
//new BTRDebugCommandPatch().Enable();
|
//new BTRDebugCommandPatch().Enable();
|
||||||
|
43
project/Aki.Debugging/Patches/DebugLogoPatch.cs
Normal file
43
project/Aki.Debugging/Patches/DebugLogoPatch.cs
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
using Aki.Common.Http;
|
||||||
|
using Aki.Common.Utils;
|
||||||
|
using Aki.Custom.Models;
|
||||||
|
using Aki.Reflection.Patching;
|
||||||
|
using EFT;
|
||||||
|
using EFT.UI;
|
||||||
|
using HarmonyLib;
|
||||||
|
using System.Reflection;
|
||||||
|
using TMPro;
|
||||||
|
|
||||||
|
namespace Aki.Debugging.Patches
|
||||||
|
{
|
||||||
|
public class DebugLogoPatch : ModulePatch
|
||||||
|
{
|
||||||
|
protected override MethodBase GetTargetMethod()
|
||||||
|
{
|
||||||
|
return AccessTools.Method(typeof(TarkovApplication), nameof(TarkovApplication.method_27));
|
||||||
|
}
|
||||||
|
|
||||||
|
[PatchPrefix]
|
||||||
|
private static void PatchPrefix(Profile profile)
|
||||||
|
{
|
||||||
|
MonoBehaviourSingleton<PreloaderUI>.Instance.SetWatermarkStatus(profile, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class DebugLogoPatch2 : ModulePatch
|
||||||
|
{
|
||||||
|
protected override MethodBase GetTargetMethod()
|
||||||
|
{
|
||||||
|
return AccessTools.Method(typeof(ClientWatermark), nameof(ClientWatermark.method_0));
|
||||||
|
}
|
||||||
|
|
||||||
|
[PatchPostfix]
|
||||||
|
private static void patchPostfix(ref TextMeshProUGUI ____label, Profile ___profile_0)
|
||||||
|
{
|
||||||
|
var json = RequestHandler.GetJson("/singleplayer/settings/version");
|
||||||
|
var result = Json.Deserialize<VersionResponse>(json).Version;
|
||||||
|
|
||||||
|
____label.text = $"SPT BLEEDINGEDGE \n ${result} \n {___profile_0.Nickname} \n {GClass1296.Now.ToString("HH:mm:ss")}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user