0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00
modules/project/Aki.Custom/Patches/OfflineRaidSettingsMenuPatch.cs
Dev 37e356c430 Only add Z and follower to list if they dont exist already
Call `CheckAndAddEnemy` instead of `AddEnemy` - use additional checks
2023-07-30 13:47:51 +01:00

31 lines
955 B
C#

using System.Reflection;
using Aki.Reflection.Patching;
using EFT.UI;
using EFT.UI.Matchmaker;
namespace Aki.Custom.Patches
{
public class OfflineRaidSettingsMenuPatch : ModulePatch
{
/// <summary>
/// RaidSettingsWindow.Show()
/// </summary>
protected override MethodBase GetTargetMethod()
{
var desiredType = typeof(RaidSettingsWindow);
var desiredMethod = desiredType.GetMethod(nameof(RaidSettingsWindow.Show));
Logger.LogDebug($"{GetType().Name} Type: {desiredType.Name}");
Logger.LogDebug($"{GetType().Name} Method: {desiredMethod?.Name}");
return desiredMethod;
}
[PatchPostfix]
private static void PatchPostfix(UiElementBlocker ____coopModeBlocker)
{
// Always disable the Coop Mode checkbox
____coopModeBlocker.SetBlock(true, "SPT will never support Co-op");
}
}
}