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
|
|
|
{
|
2024-05-24 09:53:58 +01: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
|
|
|
{
|
2023-11-14 18:49:42 +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
|
|
|
|
{
|
2024-07-06 09:32:55 +01:00
|
|
|
// TODO: check if these patches are needed
|
2024-07-06 10:23:41 +01:00
|
|
|
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();
|
2024-07-06 10:23:41 +01:00
|
|
|
new HideoutQuestIgnorePatch().Enable();
|
2023-07-17 13:11:22 +01:00
|
|
|
new SpawnProcessNegativeValuePatch().Enable();
|
2024-07-06 10:23:41 +01:00
|
|
|
new SpawnPmcPatch().Enable();
|
2024-07-12 14:48:51 +01:00
|
|
|
// new ScavRepAdjustmentPatch().Enable();
|
|
|
|
// new ScavSellAllPriceStorePatch().Enable();
|
|
|
|
// new ScavSellAllRequestPatch().Enable();
|
2024-08-01 17:22:47 +01:00
|
|
|
|
2024-08-20 20:25:53 +01:00
|
|
|
// new ArmorDamageCounterPatch().Enable();
|
|
|
|
// new AmmoUsedCounterPatch().Enable();
|
|
|
|
|
2024-07-09 10:33:42 +01:00
|
|
|
|
2024-07-06 10:23:41 +01:00
|
|
|
// Still need
|
2024-08-02 16:57:59 +01:00
|
|
|
// new SmokeGrenadeFuseSoundFixPatch().Enable(); TODO: refactor as it causes exceptions to be thrown when grenade is tossed by player
|
2024-07-12 15:59:37 +01:00
|
|
|
new ScavExperienceGainPatch().Enable();
|
|
|
|
new DisablePMCExtractsForScavsPatch().Enable();
|
|
|
|
new ScavExfilPatch().Enable();
|
2024-07-12 14:48:51 +01:00
|
|
|
new ScavProfileLoadPatch().Enable();
|
|
|
|
new ScavPrefabLoadPatch().Enable();
|
2024-07-06 10:23:41 +01:00
|
|
|
new DisableReadyLocationReadyPatch().Enable();
|
|
|
|
new BotTemplateLimitPatch().Enable();
|
|
|
|
new LoadOfflineRaidScreenPatch().Enable();
|
|
|
|
new PluginErrorNotifierPatch().Enable();
|
|
|
|
new GetNewBotTemplatesPatch().Enable();
|
|
|
|
new LabsKeycardRemovalPatch().Enable();
|
|
|
|
new MapReadyButtonPatch().Enable();
|
|
|
|
new RemoveUsedBotProfilePatch().Enable();
|
2024-07-12 14:48:51 +01:00
|
|
|
new ScavLateStartPatch().Enable();
|
2024-07-06 10:23:41 +01:00
|
|
|
|
|
|
|
// 3.10.0
|
2024-07-04 23:59:44 +01:00
|
|
|
new PVEModeWelcomeMessagePatch().Enable();
|
2024-07-05 00:13:40 +01:00
|
|
|
new DisableMatchmakerPlayerPreviewButtonsPatch().Enable();
|
2024-07-05 15:40:14 +01:00
|
|
|
new EnableRefForPVEPatch().Enable();
|
|
|
|
new EnableRefIntermScreenPatch().Enable();
|
2024-08-01 20:29:07 +01:00
|
|
|
new EnablePlayerScavPatch().Enable();
|
2024-07-08 15:11:13 +01:00
|
|
|
new ScavFoundInRaidPatch().Enable();
|
2024-07-09 10:33:42 +01:00
|
|
|
new GetProfileAtEndOfRaidPatch().Enable();
|
|
|
|
new FixSavageInventoryScreenPatch().Enable();
|
2024-07-11 09:12:44 +01:00
|
|
|
new InsuranceScreenPatch().Enable();
|
2024-07-12 11:17:56 +01:00
|
|
|
new FixQuestAchieveControllersPatch().Enable();
|
2023-03-03 18:52:31 +00:00
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
2023-10-10 10:58:33 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|