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;
|
|
|
|
|
|
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
|
|
|
|
{
|
2024-03-16 21:04:00 +00:00
|
|
|
|
public static LoggingLevelResponse logLevel;
|
|
|
|
|
|
2023-11-14 18:49:42 +00:00
|
|
|
|
public void Awake()
|
2023-03-03 18:52:31 +00:00
|
|
|
|
{
|
2024-05-21 17:44:27 +01:00
|
|
|
|
Logger.LogInfo("Loading: SPT.Debugging");
|
2023-03-03 18:52:31 +00:00
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
2023-10-10 10:58:33 +00:00
|
|
|
|
new EndRaidDebug().Enable();
|
2024-03-16 21:04:00 +00:00
|
|
|
|
new LoggerClassLogPatch().Enable();
|
2024-03-21 15:21:57 +00:00
|
|
|
|
// new CoordinatesPatch().Enable();
|
2024-03-20 09:45:46 +00:00
|
|
|
|
// new StaticLootDumper().Enable();
|
|
|
|
|
// new ExfilDumper().Enable();
|
2024-03-07 22:10:07 +00:00
|
|
|
|
|
2024-03-21 15:21:57 +00:00
|
|
|
|
//new PMCBotSpawnLocationPatch().Enable();
|
2024-07-05 17:46:55 +01:00
|
|
|
|
new ReloadClientPatch().Enable();
|
2024-03-19 09:43:17 +00:00
|
|
|
|
}
|
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
|
|
|
|
}
|
2024-03-16 21:04:00 +00:00
|
|
|
|
|
|
|
|
|
public void Start()
|
|
|
|
|
{
|
|
|
|
|
var loggingJson = RequestHandler.GetJson("/singleplayer/enableBSGlogging");
|
|
|
|
|
logLevel = Json.Deserialize<LoggingLevelResponse>(loggingJson);
|
|
|
|
|
}
|
2023-03-03 18:52:31 +00:00
|
|
|
|
}
|
|
|
|
|
}
|