rename and slight changes

This commit is contained in:
CWX 2023-10-08 22:19:26 +01:00
parent bd852a938f
commit b62bb14bab
7 changed files with 21 additions and 23 deletions

View File

@ -19,10 +19,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "test-layout", "test-layout\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CWX_GrassCutter", "CWX_GrassCutter\CWX_GrassCutter.csproj", "{CC095831-11F9-4429-9A5C-BF60EF451E96}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TraderScrolling", "TraderScrolling\TraderScrolling.csproj", "{C9FC19BC-2155-4900-B14D-2F16D13ED2DA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CWX_LockPicking", "CWX_LockPicking\CWX_LockPicking.csproj", "{A9363B69-7848-48FB-8562-4B694778F679}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kaeno-TraderScrolling", "Kaeno-TraderScrolling\Kaeno-TraderScrolling.csproj", "{01BF7708-EC1F-4E2A-A788-084AE1C9E467}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -61,14 +61,14 @@ Global
{CC095831-11F9-4429-9A5C-BF60EF451E96}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC095831-11F9-4429-9A5C-BF60EF451E96}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC095831-11F9-4429-9A5C-BF60EF451E96}.Release|Any CPU.Build.0 = Release|Any CPU
{C9FC19BC-2155-4900-B14D-2F16D13ED2DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C9FC19BC-2155-4900-B14D-2F16D13ED2DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C9FC19BC-2155-4900-B14D-2F16D13ED2DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C9FC19BC-2155-4900-B14D-2F16D13ED2DA}.Release|Any CPU.Build.0 = Release|Any CPU
{A9363B69-7848-48FB-8562-4B694778F679}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A9363B69-7848-48FB-8562-4B694778F679}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9363B69-7848-48FB-8562-4B694778F679}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9363B69-7848-48FB-8562-4B694778F679}.Release|Any CPU.Build.0 = Release|Any CPU
{01BF7708-EC1F-4E2A-A788-084AE1C9E467}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{01BF7708-EC1F-4E2A-A788-084AE1C9E467}.Debug|Any CPU.Build.0 = Debug|Any CPU
{01BF7708-EC1F-4E2A-A788-084AE1C9E467}.Release|Any CPU.ActiveCfg = Release|Any CPU
{01BF7708-EC1F-4E2A-A788-084AE1C9E467}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -1,11 +1,8 @@
using Aki.Reflection.Patching;
using Aki.Reflection.Utils;
using EFT.UI;
using JetBrains.Annotations;
using System.Linq;
using System.Reflection;
using UnityEngine;
using UnityEngine.UI;
namespace TraderScrolling
{
@ -13,23 +10,21 @@ namespace TraderScrolling
{
protected override MethodBase GetTargetMethod()
{
Logger.LogError("Patching Show");
return typeof(DisplayMoneyPanelTMPText).GetMethod("Show", PatchConstants.PublicFlags);
}
[PatchPostfix]
public static void PatchPostFix()
{
var go = GameObject.Find("Menu UI");
var check = go.GetComponentInChildren<PlayerCardScript>();
var gameObject = GameObject.Find("Menu UI");
var check = gameObject.GetComponentInChildren<PlayerCardScript>();
if (check != null)
{
return;
}
go.AddComponent<PlayerCardScript>();
gameObject.AddComponent<PlayerCardScript>();
}
}
}

View File

@ -1,9 +1,6 @@
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
using BepInEx.Logging;
using EFT.UI;
using EFT.UI.Ragfair;
namespace TraderScrolling
{
@ -39,10 +36,9 @@ namespace TraderScrolling
tileRect.sizeDelta = new Vector2(500f, 0);
// Change Colour alpha to max for background
var background = tile.FirstOrDefault(x => x.name == "Background");
background.color = new Color(0, 0, 0, 1);
// Change Colour alpha to max for background
}
}
}

View File

@ -1,4 +1,10 @@
namespace TraderScrolling
using System.Reflection;
using Aki.Reflection.Patching;
using Aki.Reflection.Utils;
using EFT.UI;
using UnityEngine;
namespace TraderScrolling
{
public class TraderScrollingPatch : ModulePatch
{
@ -10,14 +16,15 @@
[PatchPostfix]
public static void PatchPostFix()
{
var go = GameObject.Find("Menu UI");
var check = go.GetComponentInChildren<TraderScrollingScript>();
var gameObject = GameObject.Find("Menu UI");
var check = gameObject.GetComponentInChildren<TraderScrollingScript>();
if (check != null)
{
return;
}
go.AddComponent<TraderScrollingScript>();
gameObject.AddComponent<TraderScrollingScript>();
}
}
}