diff --git a/Live/CWX_Mods.sln b/Live/CWX_Mods.sln index b0310ff..e81c515 100644 --- a/Live/CWX_Mods.sln +++ b/Live/CWX_Mods.sln @@ -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 diff --git a/Live/TraderScrolling/TraderScrolling.csproj b/Live/Kaeno-TraderScrolling/Kaeno-TraderScrolling.csproj similarity index 100% rename from Live/TraderScrolling/TraderScrolling.csproj rename to Live/Kaeno-TraderScrolling/Kaeno-TraderScrolling.csproj diff --git a/Live/TraderScrolling/PlayerCardPatch.cs b/Live/Kaeno-TraderScrolling/PlayerCardPatch.cs similarity index 66% rename from Live/TraderScrolling/PlayerCardPatch.cs rename to Live/Kaeno-TraderScrolling/PlayerCardPatch.cs index 24df702..abb1cd7 100644 --- a/Live/TraderScrolling/PlayerCardPatch.cs +++ b/Live/Kaeno-TraderScrolling/PlayerCardPatch.cs @@ -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(); - + var gameObject = GameObject.Find("Menu UI"); + var check = gameObject.GetComponentInChildren(); if (check != null) { return; } - go.AddComponent(); + gameObject.AddComponent(); } } } diff --git a/Live/TraderScrolling/PlayerCardScript.cs b/Live/Kaeno-TraderScrolling/PlayerCardScript.cs similarity index 96% rename from Live/TraderScrolling/PlayerCardScript.cs rename to Live/Kaeno-TraderScrolling/PlayerCardScript.cs index 4957788..398ad92 100644 --- a/Live/TraderScrolling/PlayerCardScript.cs +++ b/Live/Kaeno-TraderScrolling/PlayerCardScript.cs @@ -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 - } } } diff --git a/Live/TraderScrolling/TraderScrolling.cs b/Live/Kaeno-TraderScrolling/TraderScrolling.cs similarity index 100% rename from Live/TraderScrolling/TraderScrolling.cs rename to Live/Kaeno-TraderScrolling/TraderScrolling.cs diff --git a/Live/TraderScrolling/TraderScrollingPatch.cs b/Live/Kaeno-TraderScrolling/TraderScrollingPatch.cs similarity index 53% rename from Live/TraderScrolling/TraderScrollingPatch.cs rename to Live/Kaeno-TraderScrolling/TraderScrollingPatch.cs index d1e86b4..c5253de 100644 --- a/Live/TraderScrolling/TraderScrollingPatch.cs +++ b/Live/Kaeno-TraderScrolling/TraderScrollingPatch.cs @@ -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(); + var gameObject = GameObject.Find("Menu UI"); + var check = gameObject.GetComponentInChildren(); + if (check != null) { return; } - go.AddComponent(); + gameObject.AddComponent(); } } } diff --git a/Live/TraderScrolling/TraderScrollingScript.cs b/Live/Kaeno-TraderScrolling/TraderScrollingScript.cs similarity index 100% rename from Live/TraderScrolling/TraderScrollingScript.cs rename to Live/Kaeno-TraderScrolling/TraderScrollingScript.cs