0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 06:30:43 -05:00
modules/project/SPT.SinglePlayer/SPTSingleplayerPlugin.cs

89 lines
4.1 KiB
C#
Raw Normal View History

2023-03-03 18:52:31 +00:00
using System;
2024-05-21 19:10:17 +01:00
using SPT.Common;
using SPT.SinglePlayer.Patches.MainMenu;
using SPT.SinglePlayer.Patches.Progression;
using SPT.SinglePlayer.Patches.RaidFix;
using SPT.SinglePlayer.Patches.ScavMode;
2023-03-03 18:52:31 +00:00
using BepInEx;
using SPT.SinglePlayer.Utils.MainMenu;
2023-03-03 18:52:31 +00:00
2024-05-21 19:10:17 +01:00
namespace SPT.SinglePlayer
2023-03-03 18:52:31 +00:00
{
2024-11-04 08:54:51 +00:00
[BepInPlugin("com.SPT.singleplayer", "SPT.Singleplayer", SPTPluginInfo.PLUGIN_VERSION)]
2024-08-26 12:20:28 +01:00
public class SPTSingleplayerPlugin : BaseUnityPlugin
2023-03-03 18:52:31 +00:00
{
public void Awake()
2023-03-03 18:52:31 +00:00
{
2024-05-21 17:44:27 +01:00
Logger.LogInfo("Loading: SPT.SinglePlayer");
2023-03-03 18:52:31 +00:00
try
{
// TODO: check if these patches are needed
new TinnitusFixPatch().Enable(); // Probably needed
new EmptyInfilFixPatch().Enable();
2024-10-03 10:20:46 +01:00
new OverrideMaxAiAliveInRaidValuePatch().Enable();
//new PostRaidHealingPricePatch().Enable(); // Client handles this now
//new HideoutQuestIgnorePatch().Enable(); // Was only needed because FixQuestAchieveControllersPatch was causing issues
//new SpawnProcessNegativeValuePatch().Enable(); // Client handles this edge case, revisit if bot count keeps going up
//new SpawnPmcPatch().Enable(); // 2.5+ years old, PMC spawn system very different, likely not needed
//new FixQuestAchieveControllersPatch().Enable(); // Likely not needed, if cheevos don't appear, revisit patch
// Still need
new FixPostScavRaidXpShowingZeroPatch().Enable();
new DisablePMCExtractsForScavsPatch().Enable();
new ScavExfilPatch().Enable();
new ScavProfileLoadPatch().Enable();
new ScavPrefabLoadPatch().Enable();
new DisableReadyLocationReadyPatch().Enable();
//new BotTemplateLimitPatch().Enable(); // Not necessary, controls how many 'respawns' the wave has, different to what the original patches intent was when written
new LoadOfflineRaidScreenPatch().Enable();
new AmmoUsedCounterPatch().Enable(); // Necessary for fixing bug #773
new PluginErrorNotifierPatch().Enable();
new GetNewBotTemplatesPatch().Enable();
new MapReadyButtonPatch().Enable();
new RemoveUsedBotProfilePatch().Enable();
new ScavLateStartPatch().Enable();
new ScavSellAllPriceStorePatch().Enable();
new ScavSellAllRequestPatch().Enable();
new ScavRepAdjustmentPatch().Enable();
new QuestAddedAutoSelectPatch().Enable();
// 3.10.0
new DisableWelcomeToPVEModeMessagePatch().Enable();
new DisableMatchmakerPlayerPreviewButtonsPatch().Enable();
new EnableRefForPVEPatch().Enable();
new EnableRefIntermScreenPatch().Enable();
new EnablePlayerScavPatch().Enable();
new ScavFoundInRaidPatch().Enable();
2024-11-17 15:44:18 +00:00
new GetProfileAtEndOfRaidPatch().Enable();
2024-11-17 21:48:45 +00:00
new SendPlayerScavProfileToServerAfterRaidPatch().Enable();
2024-09-13 18:14:13 +01:00
//new InsuranceScreenPatch().Enable();
new RemoveStashUpgradeLabelPatch().Enable();
new RemoveClothingItemExternalObtainLabelPatch().Enable();
2024-11-17 15:44:18 +00:00
new ForceRaidModeToLocalPatch().Enable();
new ScavIsPlayerEnemyPatch().Enable();
new BotOwnerManualUpdatePatch().Enable();
new FirearmControllerShowIncompatibleNotificationClass().Enable();
new FixKeyAlreadyExistsErrorOnAchievementPatch().Enable();
// 3.10.x specific, should be removed for 4.0.x
new QuestLoadStatusChangePatch().Enable();
}
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}");
throw;
}
2024-05-21 19:10:17 +01:00
Logger.LogInfo("Completed: SPT.SinglePlayer");
2023-03-03 18:52:31 +00:00
}
public void Start()
{
TraderServiceManager.GetModdedTraderData();
}
2023-03-03 18:52:31 +00:00
}
}