2024-05-21 19:10:17 +01:00
|
|
|
using SPT.Reflection.Patching;
|
2023-03-03 18:52:31 +00:00
|
|
|
using EFT.UI;
|
|
|
|
using EFT.UI.Matchmaker;
|
|
|
|
using System.Reflection;
|
2024-01-13 22:08:29 +00:00
|
|
|
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>
|
2024-10-03 09:53:06 +01:00
|
|
|
/// Remove the ready button from select location screen,
|
|
|
|
/// easier to remove button than fix problems caused by clicking it
|
2023-03-03 18:52:31 +00:00
|
|
|
/// </summary>
|
2024-07-04 23:57:58 +01:00
|
|
|
public class DisableReadyLocationReadyPatch : ModulePatch
|
2023-03-03 18:52:31 +00:00
|
|
|
{
|
|
|
|
protected override MethodBase GetTargetMethod()
|
|
|
|
{
|
2024-01-13 22:08:29 +00:00
|
|
|
return AccessTools.Method(typeof(MatchMakerSelectionLocationScreen), nameof(MatchMakerSelectionLocationScreen.Awake));
|
2023-03-03 18:52:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
[PatchPostfix]
|
2024-08-02 16:57:59 +01:00
|
|
|
public static void PatchPostfix(DefaultUIButton ____readyButton)
|
2023-03-03 18:52:31 +00:00
|
|
|
{
|
|
|
|
____readyButton.Interactable = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|