0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00
modules/project/Aki.SinglePlayer/Patches/MainMenu/SelectLocationScreenPatch.cs

32 lines
950 B
C#
Raw Normal View History

2023-03-03 18:52:31 +00:00
using Aki.Reflection.Patching;
using Aki.Reflection.Utils;
using EFT.UI;
using EFT.UI.Matchmaker;
using System.Reflection;
namespace Aki.SinglePlayer.Patches.MainMenu
{
/// <summary>
/// Remove the ready button from select location screen
/// </summary>
public class SelectLocationScreenPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
var desiredType = typeof(MatchMakerSelectionLocationScreen);
var desiredMethod = desiredType.GetMethod("Awake", PatchConstants.PrivateFlags);
Logger.LogDebug($"{this.GetType().Name} Type: {desiredType?.Name}");
Logger.LogDebug($"{this.GetType().Name} Method: {desiredMethod?.Name}");
return desiredMethod;
}
[PatchPostfix]
private static void PatchPostfix(DefaultUIButton ____readyButton)
{
____readyButton.Interactable = false;
}
}
}