0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-12 20:50:44 -05:00

add patch to remove "looking for group cluster"

This commit is contained in:
CWX 2024-07-05 00:13:40 +01:00
parent 2383a402e5
commit 414b29218e
3 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,23 @@
using System.Reflection;
using EFT.UI.Matchmaker;
using HarmonyLib;
using SPT.Reflection.Patching;
namespace SPT.SinglePlayer.Patches.MainMenu
{
public class DisableMatchmakerPlayerPreviewButtonsPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(MatchMakerPlayerPreview), nameof(MatchMakerPlayerPreview.Show));
}
[PatchPrefix]
private static void PatchPrefix(ref GClass3114 contextInteractions)
{
// clear with a null to stop "looking for group/create group" buttons
// they handle nulls so dont worry
contextInteractions = null;
}
}
}

View File

@ -20,6 +20,7 @@
<Reference Include="UnityEngine" HintPath="..\Shared\Managed\UnityEngine.dll" Private="False" />
<Reference Include="UnityEngine.AudioModule" HintPath="..\Shared\Managed\UnityEngine.AudioModule.dll" Private="False" />
<Reference Include="UnityEngine.CoreModule" HintPath="..\Shared\Managed\UnityEngine.CoreModule.dll" Private="False" />
<Reference Include="UnityEngine.CoreModule" HintPath="..\Shared\Managed\Sirenix.Serialization.dll" Private="False" />
</ItemGroup>
<ItemGroup>

View File

@ -73,6 +73,7 @@ namespace SPT.SinglePlayer
new AmmoUsedCounterPatch().Enable();
new ArmorDamageCounterPatch().Enable();
new PVEModeWelcomeMessagePatch().Enable();
new DisableMatchmakerPlayerPreviewButtonsPatch().Enable();
}
catch (Exception ex)
{