From bfd0c94fefef23ac05d05a196a4d58a12b9d3937 Mon Sep 17 00:00:00 2001 From: Arion-Kun Date: Sun, 18 Oct 2020 14:18:13 +0200 Subject: [PATCH] 1.1 Update --- TogglePostProcessing/Custom/RubyButtonAPI.cs | 11 -------- .../Properties/AssemblyInfo.cs | 4 +-- TogglePostProcessing/TogglePostProcessing.cs | 28 ++++++++++++------- 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/TogglePostProcessing/Custom/RubyButtonAPI.cs b/TogglePostProcessing/Custom/RubyButtonAPI.cs index d1cf209..487b8ed 100644 --- a/TogglePostProcessing/Custom/RubyButtonAPI.cs +++ b/TogglePostProcessing/Custom/RubyButtonAPI.cs @@ -440,8 +440,6 @@ public class QuickMenuStuff // Internal cache of the QuickMenu private static QuickMenu quickmenuInstance; - // Internal cache of the VRCUiManager - private static VRCUiManager vrcuimInstance; @@ -490,15 +488,6 @@ public static QuickMenu GetQuickMenuInstance() } return quickmenuInstance; } - // Fetch the VRCUiManager instance - public static VRCUiManager GetVRCUiMInstance() - { - if (vrcuimInstance == null) - { - vrcuimInstance = VRCUiManager.field_Protected_Static_VRCUiManager_0; - } - return vrcuimInstance; - } // Cache the FieldInfo for getting the current page. Hope to god this works! private static FieldInfo currentPageGetter; diff --git a/TogglePostProcessing/Properties/AssemblyInfo.cs b/TogglePostProcessing/Properties/AssemblyInfo.cs index a5f8fdf..70ca717 100644 --- a/TogglePostProcessing/Properties/AssemblyInfo.cs +++ b/TogglePostProcessing/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ [assembly: Guid("d3359f93-f373-4e70-9788-2e6b95f667ed")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion(BuildInfo.Version)] +[assembly: AssemblyFileVersion(BuildInfo.Version)] [assembly: MelonInfo(typeof(TogglePostProcessing.TogglePostProcessing), BuildInfo.Name, BuildInfo.Version, BuildInfo.Author, BuildInfo.DownloadLink)] [assembly: MelonGame("VRChat", "VRChat")] \ No newline at end of file diff --git a/TogglePostProcessing/TogglePostProcessing.cs b/TogglePostProcessing/TogglePostProcessing.cs index 649d167..81652b2 100644 --- a/TogglePostProcessing/TogglePostProcessing.cs +++ b/TogglePostProcessing/TogglePostProcessing.cs @@ -18,7 +18,7 @@ public static class BuildInfo public const string Name = "TogglePostProcessing"; - public const string Version = "1.0.4 Build 2"; + public const string Version = "1.1.0"; } public class TogglePostProcessing : MelonMod @@ -37,7 +37,7 @@ public override void OnApplicationStart() MelonPrefs.RegisterBool("TogglePostProcessing", "DisablePostProcessing", false, "Disable Post Processing"); //QM Stuff MelonPrefs.RegisterBool("TogglePostProcessing", "QMToggle", true, "QuickMenu Toggle Button"); -#if OnePointOne +#if TwoPointZero MelonPrefs.RegisterFloat("TigglePostProcessing", "NightMode1", 0, "Night Mode - 1"); MelonPrefs.RegisterFloat("TigglePostProcessing", "NightMode2", 0, "Night Mode - 2"); MelonPrefs.RegisterFloat("TogglePostProcessing", "NightModeCustomLevel", 0, "Night Mode - Custom: Darkness Level"); @@ -63,7 +63,7 @@ public override void OnLevelWasLoaded(int level) GrabWorldVolumes(); GetPrefs(); ToggleMethod(ToggleHandler); - #if OnePointOne + #if TwoPointZero NightMode.ApplyNightMode(); Bloom.ApplyBloom(); #endif @@ -86,7 +86,7 @@ public override void OnModSettingsApplied() TogglePostProcessingQM.setActive(QMToggle); TogglePostProcessingQM.setToggleState(!ToggleHandler); #endif -#if OnePointOne +#if TwoPointZero NightMode.ApplyNightMode(); Bloom.ApplyBloom(); #endif @@ -119,7 +119,7 @@ public override void VRChat_OnUiManagerInit() GetPrefs(); } ToggleMethod(ToggleHandler); - }), "Toggle Post Processing", null, null, null); + }), "Toggle Post Processing"); Arion.SetSizeButtonfor(TogglePostProcessingQM.btnOff, 2.5f, 1.51f); Arion.SetSizeButtonfor(TogglePostProcessingQM.btnOn, 2.5f, 1.51f); Arion.SetSizeButtonfor(TogglePostProcessingQM.getGameObject(), 1.9f, 1.38f); @@ -140,7 +140,7 @@ public void GetPrefs() { ToggleHandler = MelonPrefs.GetBool("TogglePostProcessing", "DisablePostProcessing"); QMToggle = MelonPrefs.GetBool("TogglePostProcessing", "QMToggle"); - #if OnePointOne + #if TwoPointZero NightMode.NightMode1Bool = MelonPrefs.GetBool("TogglePostProcessing", "NightMode1"); NightMode.NightMode2Bool = MelonPrefs.GetBool("TogglePostProcessing", "NightMode2"); NightMode.NightMode3Bool = MelonPrefs.GetBool("TogglePostProcessing", "NightModeCustom"); @@ -154,7 +154,9 @@ public void GetPrefs() #endif } catch (Exception e) - { MelonLogger.LogError("GetPrefs Error: " + e); } + { + MelonLogger.LogError($"GetPrefs Error: {e}"); + } } private static void GrabWorldVolumes() //Credits to Psychloor for Method @@ -168,7 +170,9 @@ public void GetPrefs() } } catch (Exception e) - { MelonLogger.LogError("GrabWorldVolumes Error: " + e); } + { + MelonLogger.LogError($"GrabWorldVolumes Error: {e}"); + } } private static void Reset() //Credits to Psychloor for Method @@ -184,7 +188,9 @@ public void GetPrefs() } } catch (Exception e) - { MelonLogger.LogError("Reset Error: " + e); } + { + MelonLogger.LogError($"Reset Error: {e}"); + } } private static void ToggleMethod(bool disable) { @@ -209,7 +215,9 @@ private static void ToggleMethod(bool disable) } } catch (Exception e) - { MelonLogger.LogError("ToggleMethod Error: " + e); } + { + MelonLogger.LogError($"ToggleMethod Error: {e}"); + } } private static void DisablePostProcessingBool(bool value) {