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

Adds Patch to remove use BSG servers for matchmaking (needs looking at when we get more data)

This commit is contained in:
KaenoDev 2025-02-07 21:54:01 +00:00
parent d071b202f2
commit 1277e10381
3 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,27 @@
using System.Reflection;
using EFT.UI;
using HarmonyLib;
using SPT.Reflection.Patching;
namespace SPT.SinglePlayer.Patches.MainMenu
{
/// <summary>
/// Removes BSG's checkmark to use BSG servers instead of local hosted
/// Also Sets checkmark to false.if checkmark is somehow enabled it will default to false (local raid only)
/// </summary>
public class DisableUseBSGServersCheckbox : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(LocationInfoPanel), nameof(LocationInfoPanel.method_1));
}
[PatchPostfix]
public static void PatchPostfix(ref UpdatableToggle ____onlineModeToggle)
{
____onlineModeToggle.isOn = false;
____onlineModeToggle.transform.parent.gameObject.SetActive(false);
}
}
}

View File

@ -23,6 +23,7 @@
<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="Sirenix.Serialization" HintPath="..\Shared\Managed\Sirenix.Serialization.dll" Private="False" />
<Reference Include="UnityEngine.UI" HintPath="..\Shared\Managed\UnityEngine.UI.dll" Private="False" />
</ItemGroup>
<ItemGroup>

View File

@ -71,6 +71,7 @@ namespace SPT.SinglePlayer
new DisableDevMaskCheckPatch().Enable();
new RemoveStopwatchAllocationsEveryBotFramePatch().Enable();
new RemoveStopwatchAllocationsEveryCoverPointFramePatch().Enable();
new DisableUseBSGServersCheckbox().Enable();
}
catch (Exception ex)
{