0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00
modules/project/SPT.Custom/Patches/OfflineRaidSettingsMenuPatch.cs
2024-05-21 19:10:17 +01:00

23 lines
653 B
C#

using System.Reflection;
using SPT.Reflection.Patching;
using EFT.UI;
using EFT.UI.Matchmaker;
using HarmonyLib;
namespace SPT.Custom.Patches
{
public class OfflineRaidSettingsMenuPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(RaidSettingsWindow), nameof(RaidSettingsWindow.Show));
}
[PatchPostfix]
private static void PatchPostfix(UiElementBlocker ____coopModeBlocker)
{
// Always disable the Coop Mode checkbox
____coopModeBlocker.SetBlock(true, "SPT will never support Co-op");
}
}
}