diff --git a/AmongUs.props b/AmongUs.props index a72a589..f16a231 100644 --- a/AmongUs.props +++ b/AmongUs.props @@ -1,7 +1,7 @@ - + diff --git a/Reactor.Benchmarks/packages.lock.json b/Reactor.Benchmarks/packages.lock.json index cd4ff5e..507b3d2 100644 --- a/Reactor.Benchmarks/packages.lock.json +++ b/Reactor.Benchmarks/packages.lock.json @@ -4,9 +4,9 @@ "net6.0": { "AmongUs.GameLibs.Steam": { "type": "Direct", - "requested": "[2024.6.18, )", - "resolved": "2024.6.18", - "contentHash": "xb+HP1xXn4/ES8AgXpk9xeoW568LFYw5NTjY6bHwd6vQjHDf2kT1xHMmQ1me5Vfee/Gp69YIMZDXUAUToG7Elg==" + "requested": "[2024.8.13, )", + "resolved": "2024.8.13", + "contentHash": "xYZBHQJcwSF5wABtJIZlmpNwZ7jXWafe6vid6/YEWSxpk1fcYLxz42bHSTYcGjpu4wVz1p1ZG/QC4Eu0SbGhrg==" }, "BenchmarkDotNet": { "type": "Direct", diff --git a/Reactor.Debugger/packages.lock.json b/Reactor.Debugger/packages.lock.json index fc4ad1e..6bc3797 100644 --- a/Reactor.Debugger/packages.lock.json +++ b/Reactor.Debugger/packages.lock.json @@ -4,9 +4,9 @@ "net6.0": { "AmongUs.GameLibs.Steam": { "type": "Direct", - "requested": "[2024.6.18, )", - "resolved": "2024.6.18", - "contentHash": "xb+HP1xXn4/ES8AgXpk9xeoW568LFYw5NTjY6bHwd6vQjHDf2kT1xHMmQ1me5Vfee/Gp69YIMZDXUAUToG7Elg==" + "requested": "[2024.8.13, )", + "resolved": "2024.8.13", + "contentHash": "xYZBHQJcwSF5wABtJIZlmpNwZ7jXWafe6vid6/YEWSxpk1fcYLxz42bHSTYcGjpu4wVz1p1ZG/QC4Eu0SbGhrg==" }, "BepInEx.AutoPlugin": { "type": "Direct", diff --git a/Reactor.Example/packages.lock.json b/Reactor.Example/packages.lock.json index fc4ad1e..6bc3797 100644 --- a/Reactor.Example/packages.lock.json +++ b/Reactor.Example/packages.lock.json @@ -4,9 +4,9 @@ "net6.0": { "AmongUs.GameLibs.Steam": { "type": "Direct", - "requested": "[2024.6.18, )", - "resolved": "2024.6.18", - "contentHash": "xb+HP1xXn4/ES8AgXpk9xeoW568LFYw5NTjY6bHwd6vQjHDf2kT1xHMmQ1me5Vfee/Gp69YIMZDXUAUToG7Elg==" + "requested": "[2024.8.13, )", + "resolved": "2024.8.13", + "contentHash": "xYZBHQJcwSF5wABtJIZlmpNwZ7jXWafe6vid6/YEWSxpk1fcYLxz42bHSTYcGjpu4wVz1p1ZG/QC4Eu0SbGhrg==" }, "BepInEx.AutoPlugin": { "type": "Direct", diff --git a/Reactor/Patches/Fixes/CursorPosPatch.cs b/Reactor/Patches/Fixes/CursorPosPatch.cs index 912ebc2..623bac1 100644 --- a/Reactor/Patches/Fixes/CursorPosPatch.cs +++ b/Reactor/Patches/Fixes/CursorPosPatch.cs @@ -1,4 +1,6 @@ +using System.Collections.Generic; using System.Linq; +using System.Reflection; using HarmonyLib; using TMPro; using UnityEngine; @@ -8,9 +10,14 @@ namespace Reactor.Patches.Fixes; /// /// "Fixes" an issue where empty TextBoxes have wrong cursor positions. /// -[HarmonyPatch(typeof(TextMeshProExtensions), nameof(TextMeshProExtensions.CursorPos))] +[HarmonyPatch] internal static class CursorPosPatch { + public static IEnumerable TargetMethods() + { + return AccessTools.GetDeclaredMethods(typeof(TextMeshProExtensions)).Where(m => m.Name == nameof(TextMeshProExtensions.CursorPos)); + } + public static bool Prefix(TextMeshPro self, ref Vector2 __result) { if (self.textInfo == null || self.textInfo.lineCount == 0 || self.textInfo.lineInfo[0].characterCount <= 0) diff --git a/Reactor/Patches/Miscellaneous/FreeNamePatch.cs b/Reactor/Patches/Miscellaneous/FreeNamePatch.cs index 32070a9..6d97449 100644 --- a/Reactor/Patches/Miscellaneous/FreeNamePatch.cs +++ b/Reactor/Patches/Miscellaneous/FreeNamePatch.cs @@ -35,15 +35,12 @@ public static void Initialize() var textBox = nameText.GetComponent(); textBox.outputText.alignment = TextAlignmentOptions.CenterGeoAligned; textBox.outputText.transform.position = nameText.transform.position; - textBox.outputText.fontSize = 4f; textBox.OnChange.AddListener((Action) (() => { DataManager.Player.Customization.Name = textBox.text; })); textBox.OnEnter = textBox.OnFocusLost = textBox.OnChange; - - textBox.Pipe.GetComponent().fontSize = 4f; })); } diff --git a/Reactor/packages.lock.json b/Reactor/packages.lock.json index d06c335..adeb77a 100644 --- a/Reactor/packages.lock.json +++ b/Reactor/packages.lock.json @@ -4,9 +4,9 @@ "net6.0": { "AmongUs.GameLibs.Steam": { "type": "Direct", - "requested": "[2024.6.18, )", - "resolved": "2024.6.18", - "contentHash": "xb+HP1xXn4/ES8AgXpk9xeoW568LFYw5NTjY6bHwd6vQjHDf2kT1xHMmQ1me5Vfee/Gp69YIMZDXUAUToG7Elg==" + "requested": "[2024.8.13, )", + "resolved": "2024.8.13", + "contentHash": "xYZBHQJcwSF5wABtJIZlmpNwZ7jXWafe6vid6/YEWSxpk1fcYLxz42bHSTYcGjpu4wVz1p1ZG/QC4Eu0SbGhrg==" }, "BepInEx.AutoPlugin": { "type": "Direct",