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

88 lines
3.8 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.Healing;
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;
using SPT.SinglePlayer.Patches.TraderServices;
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
{
new OfflineSaveProfilePatch().Enable();
//new OfflineSpawnPointPatch().Enable(); // Spawns are properly randomised and patch is likely no longer needed
2023-03-03 18:52:31 +00:00
new ExperienceGainPatch().Enable();
new ScavExperienceGainPatch().Enable();
2023-03-03 18:52:31 +00:00
new MainMenuControllerPatch().Enable();
new PlayerPatch().Enable();
new DisableReadyLocationReadyPatch().Enable();
// No longer required with PVE offline mode
// new InsuranceScreenPatch().Enable();
2023-03-03 18:52:31 +00:00
new BotTemplateLimitPatch().Enable();
new GetNewBotTemplatesPatch().Enable();
new RemoveUsedBotProfilePatch().Enable();
new DogtagPatch().Enable();
new LoadOfflineRaidScreenPatch().Enable();
new ScavPrefabLoadPatch().Enable();
new ScavProfileLoadPatch().Enable();
new ScavExfilPatch().Enable();
new ExfilPointManagerPatch().Enable();
new TinnitusFixPatch().Enable();
new MaxBotPatch().Enable();
new SpawnPmcPatch().Enable();
2024-07-04 22:21:45 +01:00
new PostRaidHealingPricePatch().Enable();
2023-03-03 18:52:31 +00:00
new EndByTimerPatch().Enable();
new InRaidQuestAvailablePatch().Enable();
2024-07-04 22:21:45 +01:00
// new PostRaidHealScreenPatch().Enable(); // TODO: Temp disabled, this might not be needed
2023-03-03 18:52:31 +00:00
new VoIPTogglerPatch().Enable();
new MidRaidQuestChangePatch().Enable();
new HealthControllerPatch().Enable();
new LighthouseBridgePatch().Enable();
new LighthouseTransmitterPatch().Enable();
new EmptyInfilFixPatch().Enable();
2023-06-30 19:29:56 +01:00
new SmokeGrenadeFuseSoundFixPatch().Enable();
new PlayerToggleSoundFixPatch().Enable();
new PluginErrorNotifierPatch().Enable();
new SpawnProcessNegativeValuePatch().Enable();
new InsuredItemManagerStartPatch().Enable();
new MapReadyButtonPatch().Enable();
new LabsKeycardRemovalPatch().Enable();
new ScavLateStartPatch().Enable();
new MidRaidAchievementChangePatch().Enable();
new GetTraderServicesPatch().Enable();
new PurchaseTraderServicePatch().Enable();
new ScavSellAllPriceStorePatch().Enable();
new ScavSellAllRequestPatch().Enable();
new HideoutQuestIgnorePatch().Enable();
new LightKeeperServicesPatch().Enable();
new ScavEncyclopediaPatch().Enable();
new ScavRepAdjustmentPatch().Enable();
new AmmoUsedCounterPatch().Enable();
new ArmorDamageCounterPatch().Enable();
new PVEModeWelcomeMessagePatch().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
}
}
}