0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00
modules/project/Aki.Custom/AkiCustomPlugin.cs
Kaeno de325c8b0d remove CulistsPriestEvent and RavangeZryachiyEvent from running IsEnemyPatch Letting them use BSG logic instead.
Added a patch to handle Closing all extracts but 1 for when cultist ritual succeeds in halloween event.
Halloween Event doesnt seem to work well when map has newspawn system enabled. I think bots are getting stuck getting loaded. causing delayed spawns of cultists.
2024-03-17 12:47:59 +00:00

95 lines
4.0 KiB
C#

using System;
using Aki.Common;
using Aki.Custom.Airdrops.Patches;
using Aki.Custom.BTR.Patches;
using Aki.Custom.Patches;
using Aki.Custom.Utils;
using Aki.Reflection.Utils;
using Aki.SinglePlayer.Utils.MainMenu;
using BepInEx;
using UnityEngine;
namespace Aki.Custom
{
[BepInPlugin("com.spt-aki.custom", "AKI.Custom", AkiPluginInfo.PLUGIN_VERSION)]
class AkiCustomPlugin : BaseUnityPlugin
{
public void Awake()
{
Logger.LogInfo("Loading: Aki.Custom");
try
{
// Bundle patches should always load first
BundleManager.GetBundles();
new EasyAssetsPatch().Enable();
new EasyBundlePatch().Enable();
new BossSpawnChancePatch().Enable();
new BotDifficultyPatch().Enable();
new CoreDifficultyPatch().Enable();
new OfflineRaidMenuPatch().Enable();
// Fixed in live, no need for patch
//new RaidSettingsWindowPatch().Enable();
new OfflineRaidSettingsMenuPatch().Enable();
// new SessionIdPatch().Enable();
new VersionLabelPatch().Enable();
new IsEnemyPatch().Enable();
new BotCalledDataTryCallPatch().Enable();
new BotCallForHelpCallBotPatch().Enable();
new BotOwnerDisposePatch().Enable();
new LocationLootCacheBustingPatch().Enable();
//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();
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 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 ScavItemCheckmarkPatch().Enable();
new ResetTraderServicesPatch().Enable();
new CultistAmuletRemovalPatch().Enable();
new HalloweenExtractPatch().Enable();
HookObject.AddOrGetComponent<MenuNotificationManager>();
}
catch (Exception ex)
{
Logger.LogError($"A PATCH IN {GetType().Name} FAILED. SUBSEQUENT PATCHES HAVE NOT LOADED");
Logger.LogError($"{GetType().Name}: {ex}");
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();
throw;
}
Logger.LogInfo("Completed: Aki.Custom");
}
}
}