0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 02:10:45 -05:00
modules/project/SPT.Debugging/SPTDebuggingPlugin.cs

53 lines
1.5 KiB
C#
Raw Permalink Normal View History

2023-03-03 18:52:31 +00:00
using System;
2024-05-21 19:10:17 +01:00
using SPT.Common;
using SPT.Common.Http;
using SPT.Common.Utils;
using SPT.Debugging.Patches;
2023-03-03 18:52:31 +00:00
using BepInEx;
using SPT.Custom.Models;
using UnityEngine;
2023-03-03 18:52:31 +00:00
2024-05-21 19:10:17 +01:00
namespace SPT.Debugging
2023-03-03 18:52:31 +00:00
{
2024-05-21 19:10:17 +01:00
[BepInPlugin("com.SPT.debugging", "SPT.Debugging", SPTPluginInfo.PLUGIN_VERSION)]
public class SPTDebuggingPlugin : BaseUnityPlugin
2023-03-03 18:52:31 +00:00
{
internal static GameObject HookObject;
public static LoggingLevelResponse logLevel;
public void Awake()
2023-03-03 18:52:31 +00:00
{
2024-05-21 17:44:27 +01:00
Logger.LogInfo("Loading: SPT.Debugging");
HookObject = new GameObject();
DontDestroyOnLoad(HookObject);
2023-03-03 18:52:31 +00:00
try
{
new EndRaidDebug().Enable();
new LoggerClassLogPatch().Enable();
// new CoordinatesPatch().Enable();
// new StaticLootDumper().Enable();
// new ExfilDumper().Enable();
// new PMCBotSpawnLocationPatch().Enable();
2024-07-05 17:46:55 +01:00
new ReloadClientPatch().Enable();
// new DumpyLibPatch().Enable();
}
2023-03-03 18:52:31 +00:00
catch (Exception ex)
{
Logger.LogError($"{GetType().Name}: {ex}");
throw;
}
2024-05-21 19:10:17 +01:00
Logger.LogInfo("Completed: SPT.Debugging");
2023-03-03 18:52:31 +00:00
}
public void Start()
{
var loggingJson = RequestHandler.GetJson("/singleplayer/enableBSGlogging");
logLevel = Json.Deserialize<LoggingLevelResponse>(loggingJson);
}
2023-03-03 18:52:31 +00:00
}
}