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

Removed duplicate patch. enabled a disabled patch from testing

This commit is contained in:
Kaeno 2024-07-06 00:15:58 +01:00
parent 0c52ddbd61
commit 0c850bc8d2
4 changed files with 5 additions and 45 deletions

View File

@ -50,16 +50,11 @@ namespace SPT.Custom.Patches
}
[PatchPostfix]
private static void PatchPostfix(MatchmakerOfflineRaidScreen __instance, UiElementBlocker ____onlineBlocker)
private static void PatchPostfix(MatchmakerOfflineRaidScreen __instance, DefaultUIButton ____changeSettingsButton, UiElementBlocker ____onlineBlocker)
{
// Hide "no progression save" panel
var warningPanel = __instance.transform.Find("Content/WarningPanelHorLayout").gameObject;
warningPanel.SetActive(false);
var spacer = __instance.transform.Find("Content/Space (1)").gameObject;
spacer.SetActive(false);
// Disable "Enable practice mode for this raid" toggle
____onlineBlocker.SetBlock(true, "Raids in SPT are always Offline raids. Don't worry - your progress will be saved!");
____onlineBlocker.gameObject.SetActive(false);
____changeSettingsButton.Interactable = true;
__instance.transform.Find("Content/WarningPanelHorLayout").gameObject.SetActive(false);
}
}
}

View File

@ -27,7 +27,7 @@ namespace SPT.Custom
new BossSpawnChancePatch().Enable();
new BotDifficultyPatch().Enable();
new CoreDifficultyPatch().Enable();
// new OfflineRaidMenuPatch().Enable();
new OfflineRaidMenuPatch().Enable();
// Fixed in live, no need for patch
// new RaidSettingsWindowPatch().Enable();

View File

@ -1,34 +0,0 @@
using EFT.UI;
using EFT.UI.Matchmaker;
using HarmonyLib;
using SPT.Reflection.Patching;
using System.Linq;
using System.Reflection;
namespace SPT.SinglePlayer.Patches.MainMenu
{
public class RaidSettingsScreenPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.FirstMethod(typeof(MatchmakerOfflineRaidScreen), IsTargetMethod);
}
private bool IsTargetMethod(MethodInfo method)
{
ParameterInfo[] parameters = method.GetParameters();
return parameters.Length == 2
&& parameters[0].Name == "profileInfo"
&& parameters[1].Name == "raidSettings";
}
[PatchPostfix]
private static void PatchPostfix(MatchmakerOfflineRaidScreen __instance, DefaultUIButton ____changeSettingsButton, UiElementBlocker ____onlineBlocker)
{
____onlineBlocker.gameObject.SetActive(false);
____changeSettingsButton.Interactable = true;
__instance.transform.Find("Content/WarningPanelHorLayout").gameObject.SetActive(false);
}
}
}

View File

@ -77,7 +77,6 @@ namespace SPT.SinglePlayer
new EnableRefForPVEPatch().Enable();
new EnableRefIntermScreenPatch().Enable();
new EnablePlayerScavPatch().Enable();
new RaidSettingsScreenPatch().Enable();
}
catch (Exception ex)
{