mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 08:30:45 -05:00
Add a patch to track when we place items at quest locations for use in insurance. Reviewed-on: SPT/Modules#131 Co-authored-by: Kaeno <kaeno@noreply.dev.sp-tarkov.com> Co-committed-by: Kaeno <kaeno@noreply.dev.sp-tarkov.com>
99 lines
4.2 KiB
C#
99 lines
4.2 KiB
C#
using System;
|
|
using SPT.Common;
|
|
using SPT.Custom.Airdrops.Patches;
|
|
using SPT.Custom.BTR.Patches;
|
|
using SPT.Custom.Patches;
|
|
using SPT.Custom.Utils;
|
|
using SPT.Reflection.Utils;
|
|
using SPT.SinglePlayer.Utils.MainMenu;
|
|
using BepInEx;
|
|
using UnityEngine;
|
|
|
|
namespace SPT.Custom
|
|
{
|
|
[BepInPlugin("com.SPT.custom", "SPT.Custom", SPTPluginInfo.PLUGIN_VERSION)]
|
|
class SPTCustomPlugin : BaseUnityPlugin
|
|
{
|
|
public void Awake()
|
|
{
|
|
Logger.LogInfo("Loading: SPT.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();
|
|
// 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 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();
|
|
new InsurancePlaceItem().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: SPT.Custom");
|
|
}
|
|
}
|
|
}
|