mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 09:50:43 -05:00
Co-authored-by: Dev <dev@dev.sp-tarkov.com> Co-authored-by: CWX <CWX@noreply.dev.sp-tarkov.com> Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com> Co-authored-by: RaiRaiTheRaichu <rairaitheraichu@noreply.dev.sp-tarkov.com> Co-authored-by: CWX <cwx@noreply.dev.sp-tarkov.com> Co-authored-by: Kaeno <e> Reviewed-on: SPT-AKI/Modules#33
26 lines
872 B
C#
26 lines
872 B
C#
using System.Reflection;
|
|
using Aki.Reflection.Patching;
|
|
using Aki.Reflection.Utils;
|
|
using EFT.UI;
|
|
using EFT.UI.Matchmaker;
|
|
|
|
namespace Aki.SinglePlayer.Patches.MainMenu
|
|
{
|
|
/// <summary>
|
|
/// Removes the 'ready' button from the map preview screen - accessible by choosing map to deply to > clicking 'map' bottom left of screen
|
|
/// Clicking the ready button makes a call to client/match/available, something we dont want
|
|
/// </summary>
|
|
public class MapReadyButtonPatch : ModulePatch
|
|
{
|
|
protected override MethodBase GetTargetMethod()
|
|
{
|
|
return typeof(MatchmakerMapPointsScreen).GetMethod("Show", PatchConstants.PrivateFlags);
|
|
}
|
|
|
|
[PatchPostfix]
|
|
private static void PatchPostFix(ref DefaultUIButton ____readyButton)
|
|
{
|
|
____readyButton?.GameObject?.SetActive(false);
|
|
}
|
|
}
|
|
} |