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

77 lines
3.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.Quests;
using SPT.SinglePlayer.Patches.RaidFix;
using SPT.SinglePlayer.Patches.ScavMode;
2023-03-03 18:52:31 +00:00
using BepInEx;
2024-05-21 19:10:17 +01:00
namespace SPT.SinglePlayer
2023-03-03 18:52:31 +00:00
{
[BepInPlugin("com.SPT.singleplayer", "spt.Singleplayer", SPTPluginInfo.PLUGIN_VERSION)]
2024-05-21 19:10:17 +01:00
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();
new EmptyInfilFixPatch().Enable();
2023-03-03 18:52:31 +00:00
new MaxBotPatch().Enable();
2024-07-04 22:21:45 +01:00
new PostRaidHealingPricePatch().Enable();
new HideoutQuestIgnorePatch().Enable();
new SpawnProcessNegativeValuePatch().Enable();
new SpawnPmcPatch().Enable();
// new ScavRepAdjustmentPatch().Enable();
// new ScavSellAllPriceStorePatch().Enable();
// new ScavSellAllRequestPatch().Enable();
2024-08-20 20:25:53 +01:00
// new ArmorDamageCounterPatch().Enable();
// new AmmoUsedCounterPatch().Enable();
// Still need
// new SmokeGrenadeFuseSoundFixPatch().Enable(); TODO: refactor as it causes exceptions to be thrown when grenade is tossed by player
new ScavExperienceGainPatch().Enable();
new DisablePMCExtractsForScavsPatch().Enable();
new ScavExfilPatch().Enable();
new ScavProfileLoadPatch().Enable();
new ScavPrefabLoadPatch().Enable();
new DisableReadyLocationReadyPatch().Enable();
new BotTemplateLimitPatch().Enable();
new LoadOfflineRaidScreenPatch().Enable();
new PluginErrorNotifierPatch().Enable();
new GetNewBotTemplatesPatch().Enable();
new MapReadyButtonPatch().Enable();
new RemoveUsedBotProfilePatch().Enable();
new ScavLateStartPatch().Enable();
// 3.10.0
new PVEModeWelcomeMessagePatch().Enable();
new DisableMatchmakerPlayerPreviewButtonsPatch().Enable();
new EnableRefForPVEPatch().Enable();
new EnableRefIntermScreenPatch().Enable();
new EnablePlayerScavPatch().Enable();
new ScavFoundInRaidPatch().Enable();
new GetProfileAtEndOfRaidPatch().Enable();
new FixSavageInventoryScreenPatch().Enable();
new InsuranceScreenPatch().Enable();
new FixQuestAchieveControllersPatch().Enable();
new RemoveStashUpgradeLabelPatch().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
}
}
}