diff --git a/Loader.cs b/Loader.cs index 7fc9461..b0b73f2 100644 --- a/Loader.cs +++ b/Loader.cs @@ -62,7 +62,7 @@ private static async void CheckForUpdate() try { var client = new GitHubClient(new ProductHeaderValue("UmbraUpdateCheck")); - var releases = await client.Repository.Release.GetAll("Acher0ns", "Umbra-Mod-Menu").ConfigureAwait(false); + var releases = await client.Repository.Release.GetAll("Aquatic-Labs", "Umbra-Mod-Menu").ConfigureAwait(false); var latest = releases[0]; latestVersion = latest.TagName; diff --git a/Menus/Render.cs b/Menus/Render.cs index fe42b1a..0347193 100644 --- a/Menus/Render.cs +++ b/Menus/Render.cs @@ -18,7 +18,7 @@ public class Render : Menu public static List secretButtons = new List(); public static List scrappers = new List(); public static List hurtBoxes; - public static bool onRenderIntEnable = true, renderMobs, renderInteractables, renderMods = true; + public static bool scenePopulateToggle = true, renderMobs, renderInteractables, renderMods = true; public Button toggleActiveMods; public Button toggleInteractESP; @@ -69,8 +69,20 @@ public override void Reset() base.Reset(); } + public static void RefreshInteractables(SceneDirector obj) + { + RefreshInteractables(); + } + public static void RefreshInteractables() + { + barrelInteractions = MonoBehaviour.FindObjectsOfType().ToList(); + purchaseInteractions = MonoBehaviour.FindObjectsOfType().ToList(); + secretButtons = MonoBehaviour.FindObjectsOfType().ToList(); + scrappers = MonoBehaviour.FindObjectsOfType().ToList(); + } private void ToggleRenderInteractables() { + if (renderInteractables) { DisableInteractables(); @@ -78,6 +90,21 @@ private void ToggleRenderInteractables() else { EnableInteractables(); + Render.RefreshInteractables(); + } + renderInteractables = !renderInteractables; + } + public static void ToggleRenderInteractablesKey() + { + + if (renderInteractables) + { + DisableInteractables(); + } + else + { + EnableInteractables(); + Render.RefreshInteractables(); } renderInteractables = !renderInteractables; } @@ -94,31 +121,21 @@ private void ToggleRenderMobs() public static void EnableInteractables() { - if (onRenderIntEnable) + if (scenePopulateToggle) { - DumpInteractables(null); - SceneDirector.onPostPopulateSceneServer += DumpInteractables; - onRenderIntEnable = false; + SceneDirector.onPostPopulateSceneServer += RefreshInteractables; + scenePopulateToggle = false; } } public static void DisableInteractables() { - if (!onRenderIntEnable) + if (!scenePopulateToggle) { - SceneDirector.onPostPopulateSceneServer -= DumpInteractables; - onRenderIntEnable = true; + SceneDirector.onPostPopulateSceneServer -= RefreshInteractables; + scenePopulateToggle = true; } } - - public static void DumpInteractables(SceneDirector obj) - { - barrelInteractions = MonoBehaviour.FindObjectsOfType().ToList(); - purchaseInteractions = MonoBehaviour.FindObjectsOfType().ToList(); - secretButtons = MonoBehaviour.FindObjectsOfType().ToList(); - scrappers = MonoBehaviour.FindObjectsOfType().ToList(); - } - public static void DrawTeleporter() { camera = Camera.main; diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index f1b714c..01c13bc 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.5")] -[assembly: AssemblyFileVersion("2.0.5")] +[assembly: AssemblyVersion("2.0.6")] +[assembly: AssemblyFileVersion("2.0.6")] diff --git a/UmbraMenu.cs b/UmbraMenu.cs index ec6cca1..57823be 100644 --- a/UmbraMenu.cs +++ b/UmbraMenu.cs @@ -12,7 +12,7 @@ public class UmbraMenu : MonoBehaviour { public const string NAME = "U M B R A", - VERSION = "2.0.5"; + VERSION = "2.0.6"; @@ -161,7 +161,7 @@ private void OnGUI() #region Watermark if (Loader.updateAvailable) { - GUI.Label(new Rect(Screen.width - 250, 1f, 100, 50f), $"Umbra Menu (v{VERSION}) - Lastest (v{Loader.latestVersion})", Styles.WatermarkStyle); + GUI.Label(new Rect(Screen.width - 250, 1f, 100, 50f), $"Umbra Menu (v{VERSION}) - Latest (v{Loader.latestVersion})", Styles.WatermarkStyle); } else if (Loader.upToDate) { @@ -293,7 +293,7 @@ public void OnSceneLoaded(Scene s1, Scene s2) { if (Menus.Render.renderInteractables) { - Menus.Render.DumpInteractables(null); + Menus.Render.RefreshInteractables(); } } } @@ -1136,7 +1136,7 @@ private void Keybinds() if (Input.GetKeyDown(keybindDict["RENDER INTERACTABLES"].KeyCode)) { - Menus.Render.renderInteractables = !Menus.Render.renderInteractables; + Menus.Render.ToggleRenderInteractablesKey(); Utility.FindButtonById(6, 2).SetEnabled(Menus.Render.renderInteractables); } diff --git a/UmbraMenu.csproj b/UmbraMenu.csproj index 52b93ae..9204676 100644 --- a/UmbraMenu.csproj +++ b/UmbraMenu.csproj @@ -117,13 +117,13 @@ .\0Harmony.dll - D:\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\Assembly-CSharp.dll + ..\..\..\Programs\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\Assembly-CSharp.dll - D:\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\com.unity.multiplayer-hlapi.Runtime.dll + ..\..\..\Programs\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\com.unity.multiplayer-hlapi.Runtime.dll - D:\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\HGCSharpUtils.dll + ..\..\..\Programs\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\HGCSharpUtils.dll False @@ -134,31 +134,34 @@ .\Octokit.dll - D:\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\Rewired_Core.dll + ..\..\..\Programs\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\Rewired_Core.dll - D:\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\RoR2.dll + ..\..\..\Programs\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\RoR2.dll D:\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\System.dll - D:\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\UnityEngine.dll + ..\..\..\Programs\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\UnityEngine.dll - D:\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\UnityEngine.CoreModule.dll + ..\..\..\Programs\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\UnityEngine.CoreModule.dll - D:\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\UnityEngine.IMGUIModule.dll + ..\..\..\Programs\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\UnityEngine.IMGUIModule.dll - D:\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\UnityEngine.InputLegacyModule.dll + ..\..\..\Programs\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\UnityEngine.InputLegacyModule.dll - D:\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\UnityEngine.TextCoreModule.dll + ..\..\..\Programs\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\UnityEngine.TextCoreModule.dll - D:\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\UnityEngine.TextRenderingModule.dll + ..\..\..\Programs\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\UnityEngine.TextRenderingModule.dll + + + ..\..\..\Programs\Steam\steamapps\common\Risk of Rain 2\Risk of Rain 2_Data\Managed\UnityEngine.UI.dll