2023-10-08 22:19:26 +01:00
|
|
|
|
using System.Reflection;
|
|
|
|
|
using Aki.Reflection.Patching;
|
|
|
|
|
using Aki.Reflection.Utils;
|
|
|
|
|
using EFT.UI;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace TraderScrolling
|
2023-08-14 03:07:14 +01:00
|
|
|
|
{
|
|
|
|
|
public class TraderScrollingPatch : ModulePatch
|
|
|
|
|
{
|
|
|
|
|
protected override MethodBase GetTargetMethod()
|
|
|
|
|
{
|
|
|
|
|
return typeof(TraderScreensGroup).GetMethod("method_4", PatchConstants.PrivateFlags);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[PatchPostfix]
|
|
|
|
|
public static void PatchPostFix()
|
|
|
|
|
{
|
2023-10-08 22:19:26 +01:00
|
|
|
|
var gameObject = GameObject.Find("Menu UI");
|
|
|
|
|
var check = gameObject.GetComponentInChildren<TraderScrollingScript>();
|
|
|
|
|
|
2023-10-08 16:48:28 +01:00
|
|
|
|
if (check != null)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-08 22:19:26 +01:00
|
|
|
|
gameObject.AddComponent<TraderScrollingScript>();
|
2023-08-14 03:07:14 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|