2025-01-01 01:19:14 -08:00
using BepInEx ;
2024-05-21 19:10:17 +01:00
using SPT.Common ;
using SPT.SinglePlayer.Patches.MainMenu ;
2025-01-01 01:19:14 -08:00
using SPT.SinglePlayer.Patches.Performance ;
2024-05-21 19:10:17 +01:00
using SPT.SinglePlayer.Patches.Progression ;
using SPT.SinglePlayer.Patches.RaidFix ;
using SPT.SinglePlayer.Patches.ScavMode ;
2024-09-04 08:30:24 +00:00
using SPT.SinglePlayer.Utils.MainMenu ;
2025-01-01 01:19:14 -08:00
using System ;
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
{
2025-01-01 01:19:14 -08:00
[BepInPlugin("com.SPT.singleplayer", "SPT.Singleplayer", SPTPluginInfo.PLUGIN_VERSION)]
public class SPTSingleplayerPlugin : BaseUnityPlugin
{
public void Awake ( )
{
Logger . LogInfo ( "Loading: SPT.SinglePlayer" ) ;
2023-03-03 18:52:31 +00:00
2025-01-01 01:19:14 -08:00
try
{
// TODO: check if these patches are needed
new TinnitusFixPatch ( ) . Enable ( ) ; // Probably needed
new EmptyInfilFixPatch ( ) . Enable ( ) ;
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
2024-07-09 10:33:42 +01:00
2025-01-01 01:19:14 -08:00
// 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 ( ) ;
2024-12-12 22:45:33 -08:00
2025-01-01 01:19:14 -08:00
// 3.10.0
new DisableWelcomeToPVEModeMessagePatch ( ) . Enable ( ) ;
new DisableMatchmakerPlayerPreviewButtonsPatch ( ) . Enable ( ) ;
new EnableRefForPVEPatch ( ) . Enable ( ) ;
new EnableRefIntermScreenPatch ( ) . Enable ( ) ;
new EnablePlayerScavPatch ( ) . Enable ( ) ;
new ScavFoundInRaidPatch ( ) . Enable ( ) ;
new GetProfileAtEndOfRaidPatch ( ) . Enable ( ) ;
new SendPlayerScavProfileToServerAfterRaidPatch ( ) . Enable ( ) ;
//new InsuranceScreenPatch().Enable();
new RemoveStashUpgradeLabelPatch ( ) . Enable ( ) ;
2024-08-24 10:35:20 +00:00
new RemoveClothingItemExternalObtainLabelPatch ( ) . Enable ( ) ;
2024-11-17 15:44:18 +00:00
new ForceRaidModeToLocalPatch ( ) . Enable ( ) ;
2024-09-19 16:58:47 +00:00
new ScavIsPlayerEnemyPatch ( ) . Enable ( ) ;
2024-10-17 16:32:40 +00:00
new FirearmControllerShowIncompatibleNotificationClass ( ) . Enable ( ) ;
2025-01-01 01:19:14 -08:00
new FixKeyAlreadyExistsErrorOnAchievementPatch ( ) . Enable ( ) ;
// 4.0.0
new ScavPrestigeFixPatch ( ) . Enable ( ) ;
new DisableDevMaskCheckPatch ( ) . Enable ( ) ;
new BotOwner_ManualUpdate_Transpiler ( ) . Enable ( ) ;
new CoverPointMaster_method_0_Transpiler ( ) . Enable ( ) ;
}
catch ( Exception ex )
{
Logger . LogError ( $"A PATCH IN {GetType().Name} FAILED. SUBSEQUENT PATCHES HAVE NOT LOADED" ) ;
Logger . LogError ( $"{GetType().Name}: {ex}" ) ;
throw ;
}
2023-03-03 18:52:31 +00:00
2025-01-01 01:19:14 -08:00
Logger . LogInfo ( "Completed: SPT.SinglePlayer" ) ;
}
2024-09-04 08:30:24 +00:00
2025-01-01 01:19:14 -08:00
public void Start ( )
{
TraderServiceManager . GetModdedTraderData ( ) ;
}
}
2023-03-03 18:52:31 +00:00
}