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/DisableReadyLocationReadyPatch.cs
2024-10-03 09:53:06 +01:00

27 lines
780 B
C#

using SPT.Reflection.Patching;
using EFT.UI;
using EFT.UI.Matchmaker;
using System.Reflection;
using HarmonyLib;
namespace SPT.SinglePlayer.Patches.MainMenu
{
/// <summary>
/// Remove the ready button from select location screen,
/// easier to remove button than fix problems caused by clicking it
/// </summary>
public class DisableReadyLocationReadyPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(MatchMakerSelectionLocationScreen), nameof(MatchMakerSelectionLocationScreen.Awake));
}
[PatchPostfix]
public static void PatchPostfix(DefaultUIButton ____readyButton)
{
____readyButton.Interactable = false;
}
}
}