2023-03-08 19:07:46 +02:00
|
|
|
|
using System.Reflection;
|
2024-05-21 19:10:17 +01:00
|
|
|
|
using SPT.Reflection.Patching;
|
2023-03-08 19:07:46 +02:00
|
|
|
|
using EFT.UI;
|
|
|
|
|
using EFT.UI.Matchmaker;
|
2024-01-13 22:08:29 +00:00
|
|
|
|
using HarmonyLib;
|
2023-03-08 19:07:46 +02:00
|
|
|
|
|
2024-05-21 19:10:17 +01:00
|
|
|
|
namespace SPT.Custom.Patches
|
2023-03-08 19:07:46 +02:00
|
|
|
|
{
|
|
|
|
|
public class OfflineRaidSettingsMenuPatch : ModulePatch
|
|
|
|
|
{
|
|
|
|
|
protected override MethodBase GetTargetMethod()
|
|
|
|
|
{
|
2024-01-13 22:08:29 +00:00
|
|
|
|
return AccessTools.Method(typeof(RaidSettingsWindow), nameof(RaidSettingsWindow.Show));
|
2023-03-08 19:07:46 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[PatchPostfix]
|
2023-03-08 21:56:02 +03:00
|
|
|
|
private static void PatchPostfix(UiElementBlocker ____coopModeBlocker)
|
2023-03-08 19:07:46 +02:00
|
|
|
|
{
|
|
|
|
|
// Always disable the Coop Mode checkbox
|
2023-03-08 21:56:02 +03:00
|
|
|
|
____coopModeBlocker.SetBlock(true, "SPT will never support Co-op");
|
2023-03-08 19:07:46 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|