2024-05-21 19:10:17 +01:00
|
|
|
using SPT.Reflection.Patching;
|
2023-03-03 18:52:31 +00:00
|
|
|
using EFT;
|
|
|
|
using System.Reflection;
|
2024-01-13 22:08:29 +00:00
|
|
|
using HarmonyLib;
|
2023-03-03 18:52:31 +00:00
|
|
|
|
2024-05-21 19:10:17 +01:00
|
|
|
namespace SPT.SinglePlayer.Patches.MainMenu
|
2023-03-03 18:52:31 +00:00
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Force ERaidMode to online to make interface show insurance page
|
|
|
|
/// </summary>
|
2024-03-02 15:50:50 +00:00
|
|
|
public class InsuranceScreenPatch : ModulePatch
|
2023-03-03 18:52:31 +00:00
|
|
|
{
|
|
|
|
static InsuranceScreenPatch()
|
|
|
|
{
|
|
|
|
_ = nameof(MainMenuController.InventoryController);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override MethodBase GetTargetMethod()
|
|
|
|
{
|
2023-10-10 10:58:33 +00:00
|
|
|
//[CompilerGenerated]
|
2024-01-13 22:08:29 +00:00
|
|
|
//private void method_XX()
|
2023-10-10 10:58:33 +00:00
|
|
|
//{
|
|
|
|
// if (this.raidSettings_0.SelectedLocation.Id == "laboratory")
|
|
|
|
// {
|
|
|
|
// this.raidSettings_0.WavesSettings.IsBosses = true;
|
|
|
|
// }
|
|
|
|
// if (this.raidSettings_0.RaidMode == ERaidMode.Online)
|
|
|
|
// {
|
|
|
|
// this.method_40();
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// this.method_41();
|
|
|
|
//}
|
|
|
|
|
2024-04-27 09:38:27 +00:00
|
|
|
return AccessTools.Method(typeof(MainMenuController), nameof(MainMenuController.method_73));
|
2023-03-03 18:52:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
[PatchPrefix]
|
|
|
|
private static void PrefixPatch(RaidSettings ___raidSettings_0)
|
|
|
|
{
|
|
|
|
___raidSettings_0.RaidMode = ERaidMode.Online;
|
|
|
|
}
|
|
|
|
|
|
|
|
[PatchPostfix]
|
|
|
|
private static void PostfixPatch(RaidSettings ___raidSettings_0)
|
|
|
|
{
|
|
|
|
___raidSettings_0.RaidMode = ERaidMode.Local;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|