0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00
modules/project/SPT.SinglePlayer/Patches/MainMenu/InsuranceScreenPatch.cs

51 lines
1.4 KiB
C#
Raw Normal View History

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;
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()
{
//[CompilerGenerated]
//private void method_XX()
//{
// 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();
//}
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;
}
}
}