0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 08:30:45 -05:00
modules/project/SPT.Debugging/SPTDebuggingPlugin.cs
CJ-SPT 32f451db61
Make GameObject hooks local to their respective plugin (#10)
* Make GameObject hooks local to their respective plugin

* Add DontDestoryOnLoad() just incase
2024-12-04 09:59:53 +00:00

53 lines
1.5 KiB
C#

using System;
using SPT.Common;
using SPT.Common.Http;
using SPT.Common.Utils;
using SPT.Debugging.Patches;
using BepInEx;
using SPT.Custom.Models;
using UnityEngine;
namespace SPT.Debugging
{
[BepInPlugin("com.SPT.debugging", "SPT.Debugging", SPTPluginInfo.PLUGIN_VERSION)]
public class SPTDebuggingPlugin : BaseUnityPlugin
{
internal static GameObject HookObject;
public static LoggingLevelResponse logLevel;
public void Awake()
{
Logger.LogInfo("Loading: SPT.Debugging");
HookObject = new GameObject();
DontDestroyOnLoad(HookObject);
try
{
new EndRaidDebug().Enable();
new LoggerClassLogPatch().Enable();
// new CoordinatesPatch().Enable();
// new StaticLootDumper().Enable();
// new ExfilDumper().Enable();
// new PMCBotSpawnLocationPatch().Enable();
new ReloadClientPatch().Enable();
// new DumpyLibPatch().Enable();
}
catch (Exception ex)
{
Logger.LogError($"{GetType().Name}: {ex}");
throw;
}
Logger.LogInfo("Completed: SPT.Debugging");
}
public void Start()
{
var loggingJson = RequestHandler.GetJson("/singleplayer/enableBSGlogging");
logLevel = Json.Deserialize<LoggingLevelResponse>(loggingJson);
}
}
}