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

98 lines
4.1 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.Custom.Airdrops.Patches;
using Aki.Custom.BTR.Patches;
2023-03-03 18:52:31 +00:00
using Aki.Custom.Patches;
using Aki.Custom.Utils;
using Aki.Reflection.Utils;
using Aki.SinglePlayer.Utils.MainMenu;
2023-03-03 18:52:31 +00:00
using BepInEx;
2024-03-14 17:18:06 +00:00
using UnityEngine;
2023-03-03 18:52:31 +00:00
namespace Aki.Custom
{
[BepInPlugin("com.spt-aki.custom", "AKI.Custom", AkiPluginInfo.PLUGIN_VERSION)]
2023-03-03 18:52:31 +00:00
class AkiCustomPlugin : BaseUnityPlugin
{
public void Awake()
2023-03-03 18:52:31 +00:00
{
Logger.LogInfo("Loading: Aki.Custom");
try
{
// Bundle patches should always load first
new EasyAssetsPatch().Enable();
new EasyBundlePatch().Enable();
new BossSpawnChancePatch().Enable();
new BotDifficultyPatch().Enable();
new CoreDifficultyPatch().Enable();
new OfflineRaidMenuPatch().Enable();
2023-07-07 15:01:45 +01:00
// Fixed in live, no need for patch
//new RaidSettingsWindowPatch().Enable();
new OfflineRaidSettingsMenuPatch().Enable();
// new SessionIdPatch().Enable();
2023-03-03 18:52:31 +00:00
new VersionLabelPatch().Enable();
new IsEnemyPatch().Enable();
new BotCalledDataTryCallPatch().Enable();
new BotCallForHelpCallBotPatch().Enable();
new BotOwnerDisposePatch().Enable();
new LocationLootCacheBustingPatch().Enable();
2023-03-03 18:52:31 +00:00
//new AddSelfAsEnemyPatch().Enable();
new CheckAndAddEnemyPatch().Enable();
new BotSelfEnemyPatch().Enable(); // needed
new AddEnemyToAllGroupsInBotZonePatch().Enable();
new AirdropPatch().Enable();
new AirdropFlarePatch().Enable();
new AddSptBotSettingsPatch().Enable();
new CustomAiPatch().Enable();
new AddTraitorScavsPatch().Enable();
2023-03-03 18:52:31 +00:00
new ExitWhileLootingPatch().Enable();
new QTEPatch().Enable();
new PmcFirstAidPatch().Enable();
new SettingsLocationPatch().Enable();
new SetLocationIdOnRaidStartPatch().Enable();
//new RankPanelPatch().Enable();
new RagfairFeePatch().Enable();
new ScavQuestPatch().Enable();
new FixBrokenSpawnOnSandboxPatch().Enable();
new BTRControllerInitPatch().Enable();
new BTRPathLoadPatch().Enable();
new BTRActivateTraderDialogPatch().Enable();
new BTRInteractionPatch().Enable();
new BTRExtractPassengersPatch().Enable();
new BTRBotAttachPatch().Enable();
new BTRReceiveDamageInfoPatch().Enable();
new BTRTurretCanShootPatch().Enable();
new BTRTurretDefaultAimingPositionPatch().Enable();
new BTRIsDoorsClosedPath().Enable();
new BTRPatch().Enable();
new BTRTransferItemsPatch().Enable();
new BTREndRaidItemDeliveryPatch().Enable();
new BTRDestroyAtRaidEndPatch().Enable();
new BTRVehicleMovementSpeedPatch().Enable();
new BTRPathConfigMapPrefixPatch().Enable();
new ScavItemCheckmarkPatch().Enable();
new ResetTraderServicesPatch().Enable();
new CultistAmuletRemovalPatch().Enable();
new HalloweenExtractPatch().Enable();
new ClampRagdollPatch().Enable();
new DisablePvEPatch().Enable();
HookObject.AddOrGetComponent<MenuNotificationManager>();
}
2023-03-03 18:52:31 +00:00
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}");
2024-03-14 17:18:06 +00:00
MessageBoxHelper.Show($"A patch in {GetType().Name} FAILED. {ex.Message}. SUBSEQUENT PATCHES HAVE NOT LOADED, CHECK LOG FOR MORE DETAILS", "ERROR", MessageBoxHelper.MessageBoxType.OK);
Application.Quit();
2023-03-03 18:52:31 +00:00
throw;
}
Logger.LogInfo("Completed: Aki.Custom");
}
}
}