fix repeating options

This commit is contained in:
Gurge44 committed 2025-12-17 09:58:49 +01:00
1 parent c5c740d88d
commit baae2393d7
2 files changed
+15 -1

No files matched your search

+14
View File
@@ -13,6 +13,8 @@ public static class OptionShower
public static int CurrentPage;
public static List<string> Pages = [];
public static string LastText = string.Empty;
private static bool Running;
private static bool InQueue;
static OptionShower() { }
@@ -33,6 +35,16 @@ public static class OptionShower
public static IEnumerator GetText()
{
if (Running)
{
if (InQueue) yield break;
InQueue = true;
while (Running) yield return null;
InQueue = false;
}
Running = true;
StringBuilder sb = new();
Pages =
@@ -122,6 +134,8 @@ public static class OptionShower
}
if (CurrentPage >= Pages.Count) CurrentPage = Pages.Count - 1;
Running = false;
}
public static void Next()
+1 -1
View File
@@ -473,7 +473,7 @@ internal static class RPCHandlerPatch
// Sync Settings
foreach (OptionItem option in listOptions)
{
try { option.SetValue(reader.ReadPackedInt32()); }
try { option.SetValue(reader.ReadPackedInt32(), false, false); }
catch { }
try