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;
|
2024-09-04 08:30:24 +00:00
|
|
|
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-05-24 09:53:58 +01: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
|
|
|
{
|
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-08-29 10:15:58 +01:00
|
|
|
new TinnitusFixPatch().Enable(); // Probably needed
|
|
|
|
//new EmptyInfilFixPatch().Enable();
|
|
|
|
new MaxBotPatch().Enable(); // Custom code, needed
|
|
|
|
//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
|
2024-07-09 10:33:42 +01:00
|
|
|
|
2024-07-06 10:23:41 +01:00
|
|
|
// Still need
|
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();
|
2024-09-02 08:35:03 +00:00
|
|
|
new AmmoUsedCounterPatch().Enable(); // Necessary for fixing bug #773
|
2024-07-06 10:23:41 +01:00
|
|
|
new PluginErrorNotifierPatch().Enable();
|
|
|
|
new GetNewBotTemplatesPatch().Enable();
|
|
|
|
new MapReadyButtonPatch().Enable();
|
|
|
|
new RemoveUsedBotProfilePatch().Enable();
|
2024-07-12 14:48:51 +01:00
|
|
|
new ScavLateStartPatch().Enable();
|
2024-08-24 11:43:19 +01:00
|
|
|
new ScavSellAllPriceStorePatch().Enable();
|
|
|
|
new ScavSellAllRequestPatch().Enable();
|
2024-09-04 23:21:12 +01:00
|
|
|
new ScavRepAdjustmentPatch().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-09-13 18:14:13 +01:00
|
|
|
//new InsuranceScreenPatch().Enable();
|
2024-08-24 00:42:01 +01:00
|
|
|
new RemoveStashUpgradeLabelPatch().Enable();
|
2024-08-24 10:35:20 +00:00
|
|
|
new RemoveClothingItemExternalObtainLabelPatch().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
|
|
|
}
|
2024-09-04 08:30:24 +00:00
|
|
|
|
|
|
|
public void Start()
|
|
|
|
{
|
|
|
|
TraderServiceManager.GetModdedTraderData();
|
|
|
|
}
|
2023-03-03 18:52:31 +00:00
|
|
|
}
|
|
|
|
}
|