0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00
modules/project/Aki.Core/AkiCorePlugin.cs

43 lines
1.2 KiB
C#
Raw Normal View History

2023-03-03 18:52:31 +00:00
using System;
using Aki.Common;
2023-03-03 18:52:31 +00:00
using Aki.Core.Patches;
using BepInEx;
namespace Aki.Core
{
[BepInPlugin("com.spt-aki.core", "AKI.Core", AkiPluginInfo.PLUGIN_VERSION)]
2023-03-03 18:52:31 +00:00
class AkiCorePlugin : BaseUnityPlugin
{
// Temp static logger field, remove along with plugin whitelisting before release
internal static BepInEx.Logging.ManualLogSource _logger;
public void Awake()
2023-03-03 18:52:31 +00:00
{
_logger = Logger;
2023-03-03 18:52:31 +00:00
Logger.LogInfo("Loading: Aki.Core");
try
{
new ConsistencySinglePatch().Enable();
new ConsistencyMultiPatch().Enable();
new GameValidationPatch().Enable();
2023-03-03 18:52:31 +00:00
new BattlEyePatch().Enable();
new SslCertificatePatch().Enable();
new UnityWebRequestPatch().Enable();
new WebSocketPatch().Enable();
new TransportPrefixPatch().Enable();
}
catch (Exception ex)
{
Logger.LogError($"A PATCH IN {GetType().Name} FAILED. SUBSEQUENT PATCHES HAVE NOT LOADED");
2023-03-03 18:52:31 +00:00
Logger.LogError($"{GetType().Name}: {ex}");
2023-03-03 18:52:31 +00:00
throw;
}
Logger.LogInfo("Completed: Aki.Core");
}
}
}