mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 03:30:44 -05:00
This fixes the current issue of having an airdrop in the game causing a CTD after an extract. There's still two caveats to this that I'm looking into: - On the very next raid, the sky will still have the chaff from the flares in the sky, however these will have pink textures and take a few seconds to dissipate. - On the very next raid, calling in an airplane with a red flare will cause the notification manager to spam messages about the airspace being currently in use even at the start of the raid. Reviewed-on: SPT/Modules#175 Co-authored-by: Archangel <jesse@archangel.wtf> Co-committed-by: Archangel <jesse@archangel.wtf>
62 lines
2.4 KiB
C#
62 lines
2.4 KiB
C#
using System;
|
|
using SPT.Common;
|
|
using SPT.Custom.Patches;
|
|
using SPT.Custom.Utils;
|
|
using SPT.Reflection.Utils;
|
|
using BepInEx;
|
|
using UnityEngine;
|
|
|
|
namespace SPT.Custom
|
|
{
|
|
[BepInPlugin("com.SPT.custom", "SPT.Custom", SPTPluginInfo.PLUGIN_VERSION)]
|
|
public class SPTCustomPlugin : BaseUnityPlugin
|
|
{
|
|
public void Awake()
|
|
{
|
|
Logger.LogInfo("Loading: SPT.Custom");
|
|
|
|
try
|
|
{
|
|
// Bundle patches should always load first - DO NOT REMOVE
|
|
new EasyAssetsPatch().Enable();
|
|
new EasyBundlePatch().Enable();
|
|
|
|
// Still need
|
|
new DisableNonHalloweenExitsDuringEventPatch().Enable();
|
|
new SendFleaListingTaxAmountToServerPatch().Enable();
|
|
new AddTraitorScavsPatch().Enable();
|
|
new CustomAiPatch().Enable();
|
|
new SaveSettingsToSptFolderPatch().Enable();
|
|
new SaveRegistryToSptFolderPatches().Enable();
|
|
new QTEPatch().Enable();
|
|
new RedirectClientImageRequestsPatch().Enable();
|
|
new DisableGameModeAdjustButtonPatch().Enable();
|
|
new FixPmcSpawnParamsNullErrorPatch().Enable();
|
|
new SetPreRaidSettingsScreenDefaultsPatch().Enable();
|
|
new CoreDifficultyPatch().Enable();
|
|
new BotDifficultyPatch().Enable();
|
|
new VersionLabelPatch().Enable();
|
|
new FixScavWarNullErrorWithMarkOfUnknownPatch().Enable();
|
|
new MergeScavPmcQuestsOnInventoryLoadPatch().Enable();
|
|
new CopyPmcQuestsToPlayerScavPatch().Enable();
|
|
new FixBossesHavingNoFollowersOnMediumAiAmount().Enable();
|
|
new FixAirdropCrashPatch().Enable();
|
|
//new AllowAirdropsInPvEPatch().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");
|
|
}
|
|
}
|
|
}
|