0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00
modules/project/Aki.Debugging/AkiDebuggingPlugin.cs
DrakiaXYZ 497e581c1e Create an exfil dumper patch for aki-debugging (!98)
This patch can be used to dump the data contained in the `allExtracts.json` files in the server locations database. When enabled, load into each map sequentially, and the extract data will be dumped to `ExfilDumps/{mapName}/allExtracts.json`, ready to be copy/pasted into the server `database/locations` directory

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#98
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
2024-03-20 09:45:46 +00:00

51 lines
1.4 KiB
C#

using System;
using Aki.Common;
using Aki.Common.Http;
using Aki.Common.Utils;
using Aki.Debugging.Patches;
using BepInEx;
namespace Aki.Debugging
{
[BepInPlugin("com.spt-aki.debugging", "AKI.Debugging", AkiPluginInfo.PLUGIN_VERSION)]
public class AkiDebuggingPlugin : BaseUnityPlugin
{
public static LoggingLevelResponse logLevel;
public void Awake()
{
Logger.LogInfo("Loading: Aki.Debugging");
try
{
new EndRaidDebug().Enable();
new LoggerClassLogPatch().Enable();
// new CoordinatesPatch().Enable();
// new StaticLootDumper().Enable();
// new ExfilDumper().Enable();
// BTR debug command patches, can be disabled later
//new BTRDebugCommandPatch().Enable();
//new BTRDebugDataPatch().Enable();
//new PMCBotSpawnLocationPatch().Enable();
// Chomp said to leave it enabled by default
new ReloadClientPatch().Enable();
}
catch (Exception ex)
{
Logger.LogError($"{GetType().Name}: {ex}");
throw;
}
Logger.LogInfo("Completed: Aki.Debugging");
}
public void Start()
{
var loggingJson = RequestHandler.GetJson("/singleplayer/enableBSGlogging");
logLevel = Json.Deserialize<LoggingLevelResponse>(loggingJson);
}
}
}