-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathBigBrainPlugin.cs
46 lines (38 loc) · 1.48 KB
/
BigBrainPlugin.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using BepInEx;
using DrakiaXYZ.BigBrain.Patches;
using DrakiaXYZ.BigBrain.VersionChecker;
using System;
namespace DrakiaXYZ.BigBrain
{
[BepInPlugin("xyz.drakia.bigbrain", "DrakiaXYZ-BigBrain", "1.2.0")]
[BepInDependency("com.SPT.core", "3.10.0")]
internal class BigBrainPlugin : BaseUnityPlugin
{
// This needs to be initialized because other mods could interact with BrainManager before this plugin has loaded
internal static BepInEx.Logging.ManualLogSource BigBrainLogger { get; private set; } = new BepInEx.Logging.ManualLogSource("DrakiaXYZ-BigBrain");
private void Awake()
{
Logger.LogInfo("Loading: DrakiaXYZ-BigBrain");
BigBrainLogger = Logger;
if (!TarkovVersion.CheckEftVersion(Logger, Info, Config))
{
throw new Exception($"Invalid EFT Version");
}
try
{
new BotBaseBrainActivatePatch().Enable();
new BotBrainCreateLogicNodePatch().Enable();
new BotBaseBrainUpdatePatch().Enable();
new BotAgentUpdatePatch().Enable();
new BotBaseBrainActivateLayerPatch().Enable();
new BotStandartBotBrainActivatePatch().Enable();
}
catch (Exception ex)
{
Logger.LogError($"{GetType().Name}: {ex}");
throw;
}
Logger.LogInfo("Completed: DrakiaXYZ-BigBrain");
}
}
}