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

Add patch to disable StashExpansion label and tooltip

This commit is contained in:
CWX 2024-08-24 00:42:01 +01:00
parent 112e378878
commit fc6124dfc8
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,25 @@
using System.Reflection;
using EFT.UI;
using HarmonyLib;
using SPT.Reflection.Patching;
using UnityEngine;
namespace SPT.SinglePlayer.Patches.MainMenu;
/// <summary>
/// Remove Tooltip and image from stash screen explaining to visit external site for more stash - EFT thing
/// </summary>
public class RemoveStashUpgradeLabelPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
// InventoryScreen has 2 Show methods
return AccessTools.FirstMethod(typeof(InventoryScreen), info => info.Name == "Show");
}
[PatchPostfix]
public static void Postfix(SimpleStashPanel __instance)
{
Object.Destroy(__instance.transform.Find("Items Panel/Stash Panel/Simple Panel/Header/ExternalObtain").gameObject);
}
}

View File

@ -61,6 +61,7 @@ namespace SPT.SinglePlayer
new FixSavageInventoryScreenPatch().Enable();
new InsuranceScreenPatch().Enable();
new FixQuestAchieveControllersPatch().Enable();
new RemoveStashUpgradeLabelPatch().Enable();
}
catch (Exception ex)
{