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();
2024-10-03 10:20:46 +01:00
new OverrideMaxAiAliveInRaidValuePatch ( ) . Enable ( ) ;
2024-08-29 10:15:58 +01:00
//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-10-03 09:50:15 +01:00
new FixPostScavRaidXpShowingZeroPatch ( ) . Enable ( ) ;
2024-09-25 19:17:10 +01:00
new DisablePMCExtractsForScavsPatch ( ) . Enable ( ) ;
2024-09-18 15:25:05 +01:00
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 ( ) ;
2024-10-03 09:52:49 +01:00
//new BotTemplateLimitPatch().Enable(); // Not necessary, controls how many 'respawns' the wave has, different to what the original patches intent was when written
2024-07-06 10:23:41 +01:00
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-10-03 10:22:16 +01:00
new DisableWelcomeToPVEModeMessagePatch ( ) . 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-11-02 13:40:35 +00:00
new GetProfileAtEndOfRaidPatch ( ) . Enable ( ) ; //TODO BROKEN IN 15.5 - FIX OR REMOVE
new FixSavageInventoryScreenPatch ( ) . Enable ( ) ; //TODO BROKEN IN 15.5 - FIX OR REMOVE
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 ( ) ;
2024-09-16 18:18:52 +00:00
new FixLocalRaidPatch ( ) . Enable ( ) ;
2024-09-19 16:58:47 +00:00
new ScavIsPlayerEnemyPatch ( ) . Enable ( ) ;
2024-10-15 15:13:14 +00:00
new BotOwnerManualUpdatePatch ( ) . Enable ( ) ;
2024-10-17 16:32:40 +00:00
new FirearmControllerShowIncompatibleNotificationClass ( ) . Enable ( ) ;
2024-08-24 10:35:20 +00:00
}
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
}
}