using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Threading.Tasks; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using TMPro; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("test2")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("test2")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("26e7d580-fe54-4f42-ac94-8d7bc3315759")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace MorePlayerList; [BepInPlugin("yazirushi.MorePlayerList", "MorePlayerList", "0.9.92")] public class MorePlayerList : BaseUnityPlugin { public enum Lobby_ListType { Default, Translation, Scroll, Custom } public enum EscMenu_ListType { Split, Integration } private readonly Harmony harmony = new Harmony("yazirushi.MorePlayerList"); internal static ManualLogSource mls; public static ConfigEntry Lobby_List_Type; public static ConfigEntry EscMenu_List_Type; public static ConfigEntry Enable_logging; public static ConfigEntry EscMenu_ResetKey; public static ConfigEntry Scroll_ResetKey; public static ConfigEntry Scroll_Mousescrollspeed; public static ConfigEntry Scroll_Uparrowspeed; public static ConfigEntry Scroll_Downarrowspeed; public static ConfigEntry Scroll_Yinterval; public static ConfigEntry Custom_offsetplayer; public static ConfigEntry Custom_Xoffset; public static ConfigEntry Custom_Yoffset; public static ConfigEntry Custom_Yinterval; private void Awake() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Expected O, but got Unknown //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Expected O, but got Unknown //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Expected O, but got Unknown //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Expected O, but got Unknown //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Expected O, but got Unknown //IL_029e: Unknown result type (might be due to invalid IL or missing references) Lobby_List_Type = ((BaseUnityPlugin)this).Config.Bind("Settings", "Lobby ListType", Lobby_ListType.Default, new ConfigDescription("ListType used in the lobby", (AcceptableValueBase)null, Array.Empty())); EscMenu_List_Type = ((BaseUnityPlugin)this).Config.Bind("Settings", "EscMenu ListType", EscMenu_ListType.Split, new ConfigDescription("ListType used in the escmenu", (AcceptableValueBase)null, Array.Empty())); Enable_logging = ((BaseUnityPlugin)this).Config.Bind("Settings", "Enable logging", false, new ConfigDescription("Enable logging or not", (AcceptableValueBase)null, Array.Empty())); EscMenu_ResetKey = ((BaseUnityPlugin)this).Config.Bind("EscMenu Settings", "EscMenu reset key", (KeyCode)114, new ConfigDescription("Key to reset the ESC menu scroll", (AcceptableValueBase)null, Array.Empty())); Scroll_ResetKey = ((BaseUnityPlugin)this).Config.Bind("Scroll Type Settings", "Scroll reset key", (KeyCode)114, new ConfigDescription("Key to reset the scroll the lobby", (AcceptableValueBase)null, Array.Empty())); Scroll_Mousescrollspeed = ((BaseUnityPlugin)this).Config.Bind("Scroll Type Settings", "Mouse scroll speed", 1f, new ConfigDescription("Scroll speed for mouse scrolling for Scroll Type", (AcceptableValueBase)null, Array.Empty())); Scroll_Uparrowspeed = ((BaseUnityPlugin)this).Config.Bind("Scroll Type Settings", "Up arrow speed", 1f, new ConfigDescription("Scroll speed for upward scrolling for Scroll Type", (AcceptableValueBase)null, Array.Empty())); Scroll_Downarrowspeed = ((BaseUnityPlugin)this).Config.Bind("Scroll Type Settings", "Down arrow speed", 1f, new ConfigDescription("Scroll speed for downward scrolling for Scroll Type", (AcceptableValueBase)null, Array.Empty())); Scroll_Yinterval = ((BaseUnityPlugin)this).Config.Bind("Scroll Type Settings", "Y interval", 32, new ConfigDescription("Interval of the Y-coordinate for Scroll Type", (AcceptableValueBase)null, Array.Empty())); Custom_offsetplayer = ((BaseUnityPlugin)this).Config.Bind("Custom Type Settings", "offset player", 0, new ConfigDescription("Number of people to whom the offset applies for Custom Type", (AcceptableValueBase)null, Array.Empty())); Custom_Xoffset = ((BaseUnityPlugin)this).Config.Bind("Custom Type Settings", "X offset", 0, new ConfigDescription("Offset of the X-coordinate for Custom Type", (AcceptableValueBase)null, Array.Empty())); Custom_Yoffset = ((BaseUnityPlugin)this).Config.Bind("Custom Type Settings", "Y offset", 0, new ConfigDescription("Offset of the Y-coordinate for Custom Type", (AcceptableValueBase)null, Array.Empty())); Custom_Yinterval = ((BaseUnityPlugin)this).Config.Bind("Custom Type Settings", "Y interval", 32, new ConfigDescription("Interval of the Y-coordinate for Custom Type", (AcceptableValueBase)null, Array.Empty())); mls = ((BaseUnityPlugin)this).Logger; mls.LogInfo((object)"\n\n ▐▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▌ \n ▐ ▄█▄ ▄█▄ ▄█▀█▄ █▀▀█▒ █▀▀▀ █▀▀█▒ █▒ ▅▀▀█▒ █▒ █▒ █▀▀▀ █▀▀█▒ ▌ \n ▐ █▒█ █ █▒ █▒ █▒ █▀█▀ █▅▅▒ █▀▀ █▒ █▄▄█▒ ▀█▀ █▅▅▒ █▀█▀ ▌ \n ▐ █▒ █▒ █▒ ▀█▄█▀ █▒ █▒ █▄▄▄▒ █▒ █▄▄▄▒ █▒ █▒ █▒ █▄▄▄▒ █▒ █▒ ▌ \n ▐ ▌ \n ▐ ▅████▅ ▅████▅ █▒ ▀█▀▀ ▅▀▀▅▒ ▀█▀▀▒ ▅████▅ ▅████▅ ▌ \n ▐ █ ◍██ ◍█ █ ◍██ ◍█ █▒ █▒ ▀▅▅▒ █▒ █◍ ██◍ █ █ ◍██ ◍█ ▌ \n ▐ ████████ ████████ █▄▄▄ ▄█▄▄ ▅▄▄█▒ █▒ ████████ ████████ ▌ \n ▐▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▌ \n"); mls.LogInfo((object)"Starting MorePlayerList..."); mls.LogInfo((object)$"MorePlayerList:Config: List Type = {Lobby_List_Type.Value}"); mls.LogInfo((object)$"MorePlayerList:Config: Scroll reset key = {Scroll_ResetKey.Value}"); if (!Enum.IsDefined(typeof(Lobby_ListType), Lobby_List_Type.Value)) { mls.LogError((object)"MorePlayerList: [List Type] setting is incorrect!!!"); Lobby_List_Type.Value = Lobby_ListType.Default; } harmony.PatchAll(); } } [HarmonyPatch(typeof(MenuPlayerListed), "Update")] public class LobbyPlayerList_Patch { [CompilerGenerated] private sealed class d__2 : IEnumerable, IEnumerable, IEnumerator, IDisposable, IEnumerator { private int <>1__state; private CodeInstruction <>2__current; private int <>l__initialThreadId; private IEnumerable instructions; public IEnumerable <>3__instructions; private int 5__1; private int 5__2; private bool 5__3; private IEnumerator <>s__4; private CodeInstruction 5__5; CodeInstruction IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__2(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || (uint)(num - 1) <= 8u) { try { } finally { <>m__Finally1(); } } <>s__4 = null; 5__5 = null; <>1__state = -2; } private bool MoveNext() { //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Expected O, but got Unknown //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Expected O, but got Unknown //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Expected O, but got Unknown //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Expected O, but got Unknown //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Expected O, but got Unknown //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 0; 5__2 = 0; 5__3 = false; <>s__4 = instructions.GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(LobbyPlayerList_Patch), "GetXvalue", (Type[])null, (Type[])null)); <>1__state = 2; return true; case 2: <>1__state = -3; MorePlayerList.mls.LogInfo((object)"MorePlayerList: X ok"); break; case 3: <>1__state = -3; MorePlayerList.mls.LogInfo((object)"MorePlayerList: Y multipul ok"); break; case 4: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Conv_R4, (object)null); <>1__state = 5; return true; case 5: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Ldarg_0, (object)null); <>1__state = 6; return true; case 6: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(LobbyPlayerList_Patch), "GetY_2value", (Type[])null, (Type[])null)); <>1__state = 7; return true; case 7: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Add, (object)null); <>1__state = 8; return true; case 8: <>1__state = -3; MorePlayerList.mls.LogInfo((object)"MorePlayerList: Y ok"); 5__3 = true; break; case 9: <>1__state = -3; 5__5 = null; break; } if (<>s__4.MoveNext()) { 5__5 = <>s__4.Current; if (5__5.opcode == OpCodes.Ldc_R4 && (float)5__5.operand == 0f) { 5__1++; if (5__1 == 2) { <>2__current = new CodeInstruction(OpCodes.Ldarg_0, (object)null); <>1__state = 1; return true; } } if (5__5.opcode == OpCodes.Ldc_I4_S && Convert.ToInt32(5__5.operand) == 32) { <>2__current = new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(LobbyPlayerList_Patch), "GetY_1value", (Type[])null, (Type[])null)); <>1__state = 3; return true; } if (!5__3 && 5__5.opcode == OpCodes.Mul) { 5__2++; if (5__2 == 5) { <>2__current = 5__5; <>1__state = 4; return true; } } <>2__current = 5__5; <>1__state = 9; return true; } <>m__Finally1(); <>s__4 = null; return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__4 != null) { <>s__4.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { d__2 d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; d__ = this; } else { d__ = new d__2(0); } d__.instructions = <>3__instructions; return d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable)this).GetEnumerator(); } } private static int lastChangeFrame = -1; private static float scroll_value = 0f; private static void Postfix() { if (lastChangeFrame == Time.frameCount) { return; } bool keyDown = Input.GetKeyDown((KeyCode)276); bool keyDown2 = Input.GetKeyDown((KeyCode)275); if (keyDown || keyDown2) { lastChangeFrame = Time.frameCount; MorePlayerList.Lobby_ListType[] array = new MorePlayerList.Lobby_ListType[4] { MorePlayerList.Lobby_ListType.Default, MorePlayerList.Lobby_ListType.Translation, MorePlayerList.Lobby_ListType.Scroll, MorePlayerList.Lobby_ListType.Custom }; int num = Array.IndexOf(array, MorePlayerList.Lobby_List_Type.Value); if (keyDown) { num--; } if (keyDown2) { num++; } num = (num % array.Length + array.Length) % array.Length; MorePlayerList.Lobby_List_Type.Value = array[num]; MorePlayerList.mls.LogInfo((object)$"MorePlayerList:ListType Changed : {MorePlayerList.Lobby_List_Type.Value}"); MorePlayerList.mls.LogInfo((object)$"Changer called at frame {Time.frameCount}"); } } [IteratorStateMachine(typeof(d__2))] private static IEnumerable Transpiler(IEnumerable instructions) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__2(-2) { <>3__instructions = instructions }; } public static float GetXvalue(MenuPlayerListed __instance) { FieldInfo fieldInfo = AccessTools.Field(typeof(MenuPlayerListed), "listSpot"); int num = (int)fieldInfo.GetValue(__instance); switch (MorePlayerList.Lobby_List_Type.Value) { case MorePlayerList.Lobby_ListType.Default: if (num >= 10) { return 340f; } break; case MorePlayerList.Lobby_ListType.Translation: if (num >= 7) { return 340f; } break; case MorePlayerList.Lobby_ListType.Scroll: return 0f; case MorePlayerList.Lobby_ListType.Custom: if (num >= MorePlayerList.Custom_offsetplayer.Value) { return MorePlayerList.Custom_Xoffset.Value; } break; } return 0f; } public static int GetY_1value() { return MorePlayerList.Lobby_List_Type.Value switch { MorePlayerList.Lobby_ListType.Default => 20, MorePlayerList.Lobby_ListType.Translation => 30, MorePlayerList.Lobby_ListType.Scroll => MorePlayerList.Scroll_Yinterval.Value, MorePlayerList.Lobby_ListType.Custom => MorePlayerList.Custom_Yinterval.Value, _ => 32, }; } public static float GetY_2value(MenuPlayerListed __instance) { FieldInfo fieldInfo = AccessTools.Field(typeof(MenuPlayerListed), "listSpot"); int num = (int)fieldInfo.GetValue(__instance); switch (MorePlayerList.Lobby_List_Type.Value) { case MorePlayerList.Lobby_ListType.Default: if (num >= 10) { return 200f; } break; case MorePlayerList.Lobby_ListType.Translation: if (num >= 7) { return 305f; } return 5f; case MorePlayerList.Lobby_ListType.Scroll: return Scroll_value(num); case MorePlayerList.Lobby_ListType.Custom: if (num >= MorePlayerList.Custom_offsetplayer.Value) { return MorePlayerList.Custom_Yoffset.Value; } break; } return 0f; } public static float Scroll_value(int __playerCount) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) if (__playerCount == 0) { __playerCount = 1; } float axis = Input.GetAxis("Mouse ScrollWheel"); scroll_value += axis * 200f * MorePlayerList.Scroll_Mousescrollspeed.Value / (float)__playerCount; if (Input.GetKey((KeyCode)273)) { scroll_value += 3f * MorePlayerList.Scroll_Uparrowspeed.Value / (float)__playerCount; } if (Input.GetKey((KeyCode)274)) { scroll_value -= 3f * MorePlayerList.Scroll_Downarrowspeed.Value / (float)__playerCount; } if (Input.GetKeyDown(MorePlayerList.Scroll_ResetKey.Value)) { scroll_value = 0f; } return scroll_value; } } [HarmonyPatch(typeof(MenuPageLobby), "UpdateChatPrompt")] public static class LobbyPlayerList_UI { private static bool flag = true; private static string baseText; private static async void Postfix(TextMeshProUGUI ___chatPromptText) { if (!((Object)(object)___chatPromptText == (Object)null)) { await Task.Delay(200); if (flag) { baseText = ((TMP_Text)___chatPromptText).text; ((TMP_Text)___chatPromptText).text = baseText + "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + $"<- List Type : {MorePlayerList.Lobby_List_Type.Value} ->"; ((TMP_Text)___chatPromptText).transform.localPosition = new Vector3(-30f, -155f, 0f); flag = false; } ((TMP_Text)___chatPromptText).transform.localPosition = new Vector3(-30f, -155f, 0f); ((TMP_Text)___chatPromptText).text = baseText + "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + $"<- List Type : {MorePlayerList.Lobby_List_Type.Value} ->"; MorePlayerList.Lobby_List_Type.SettingChanged += delegate { ((TMP_Text)___chatPromptText).text = baseText + "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + $"<- List Type : {MorePlayerList.Lobby_List_Type.Value} ->"; }; } } } [HarmonyPatch(typeof(MenuPageEsc), "PlayerGainSlidersUpdate")] public class EscPlayerList_Patch { [CompilerGenerated] private sealed class d__0 : IEnumerable, IEnumerable, IEnumerator, IDisposable, IEnumerator { private int <>1__state; private CodeInstruction <>2__current; private int <>l__initialThreadId; private IEnumerable instructions; public IEnumerable <>3__instructions; private int 5__1; private int 5__2; private int 5__3; private bool 5__4; private IEnumerator <>s__5; private CodeInstruction 5__6; CodeInstruction IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__0(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || (uint)(num - 1) <= 11u) { try { } finally { <>m__Finally1(); } } <>s__5 = null; 5__6 = null; <>1__state = -2; } private bool MoveNext() { //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Expected O, but got Unknown //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Expected O, but got Unknown //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Expected O, but got Unknown //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Expected O, but got Unknown //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Expected O, but got Unknown //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Expected O, but got Unknown //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Expected O, but got Unknown //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 0; 5__2 = 0; 5__3 = 0; 5__4 = false; <>s__5 = instructions.GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(EscPlayerList_Patch), "GetXvalue", (Type[])null, (Type[])null)); <>1__state = 2; return true; case 2: <>1__state = -3; MorePlayerList.mls.LogInfo((object)"MorePlayerList: X2 ok"); break; case 3: <>1__state = -3; MorePlayerList.mls.LogInfo((object)"MorePlayerList: Y2 multipul ok"); break; case 4: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Conv_R4, (object)null); <>1__state = 5; return true; case 5: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Ldarg_0, (object)null); <>1__state = 6; return true; case 6: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(EscPlayerList_Patch), "GetY_2value", (Type[])null, (Type[])null)); <>1__state = 7; return true; case 7: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Add, (object)null); <>1__state = 8; return true; case 8: <>1__state = -3; MorePlayerList.mls.LogInfo((object)"MorePlayerList: Y2 ok"); 5__4 = true; break; case 9: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Pop, (object)null); <>1__state = 10; return true; case 10: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Ldc_I4_0, (object)null); <>1__state = 11; return true; case 11: <>1__state = -3; MorePlayerList.mls.LogInfo((object)"MorePlayerList: fld clear ok"); break; case 12: <>1__state = -3; 5__6 = null; break; } if (<>s__5.MoveNext()) { 5__6 = <>s__5.Current; if (5__6.opcode == OpCodes.Ldc_R4 && (float)5__6.operand == 0f) { 5__1++; if (5__1 == 2) { <>2__current = new CodeInstruction(OpCodes.Ldarg_0, (object)null); <>1__state = 1; return true; } } if (5__6.opcode == OpCodes.Ldc_R4 && (float)5__6.operand == 25f) { <>2__current = new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(EscPlayerList_Patch), "GetY_1value", (Type[])null, (Type[])null)); <>1__state = 3; return true; } if (!5__4 && 5__6.opcode == OpCodes.Mul) { 5__2++; if (5__2 == 1) { <>2__current = 5__6; <>1__state = 4; return true; } } if (5__6.opcode == OpCodes.Ldfld) { 5__3++; if (5__3 == 6) { <>2__current = 5__6; <>1__state = 9; return true; } } <>2__current = 5__6; <>1__state = 12; return true; } <>m__Finally1(); <>s__5 = null; return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__5 != null) { <>s__5.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { d__0 d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; d__ = this; } else { d__ = new d__0(0); } d__.instructions = <>3__instructions; return d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable)this).GetEnumerator(); } } [IteratorStateMachine(typeof(d__0))] private static IEnumerable Transpiler(IEnumerable instructions) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__0(-2) { <>3__instructions = instructions }; } public static float GetXvalue(MenuPageEsc __instance) { FieldInfo fieldInfo = AccessTools.Field(typeof(MenuPageEsc), "playerMicGainSliders"); Dictionary dictionary = (Dictionary)fieldInfo.GetValue(__instance); int count = dictionary.Count; switch (MorePlayerList.EscMenu_List_Type.Value) { case MorePlayerList.EscMenu_ListType.Split: if (count >= 10) { return -220f; } return 40f; case MorePlayerList.EscMenu_ListType.Integration: return 40f; default: return 0f; } } public static float GetY_1value() { return 20f; } public static float GetY_2value(MenuPageEsc __instance) { FieldInfo fieldInfo = AccessTools.Field(typeof(MenuPageEsc), "playerMicGainSliders"); Dictionary dictionary = (Dictionary)fieldInfo.GetValue(__instance); int count = dictionary.Count; switch (MorePlayerList.EscMenu_List_Type.Value) { case MorePlayerList.EscMenu_ListType.Split: if (count >= 10) { return -221f; } return -21f; case MorePlayerList.EscMenu_ListType.Integration: return -21f; default: return 0f; } } } [HarmonyPatch(typeof(MenuPageEsc), "Update")] public static class EscPlayerList_Update { private static Dictionary initialPositions = new Dictionary(); public static void Postfix(MenuPageEsc __instance) { //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) Dictionary value = Traverse.Create((object)__instance).Field("playerMicGainSliders").GetValue>(); if (value == null || value.Count == 0) { return; } foreach (KeyValuePair item in value) { if (!((Object)(object)item.Value == (Object)null) && !initialPositions.ContainsKey(item.Key)) { initialPositions[item.Key] = ((Component)item.Value).transform.localPosition; } } float num = 100f * Time.deltaTime; Vector3 zero = Vector3.zero; switch (MorePlayerList.EscMenu_List_Type.Value) { case MorePlayerList.EscMenu_ListType.Split: if (Input.GetKey((KeyCode)275)) { zero.x += num; } if (Input.GetKey((KeyCode)276)) { zero.x -= num; } break; case MorePlayerList.EscMenu_ListType.Integration: if (Input.GetKey((KeyCode)273)) { zero.y += num; } if (Input.GetKey((KeyCode)274)) { zero.y -= num; } break; } if (Input.GetKey(MorePlayerList.EscMenu_ResetKey.Value)) { foreach (KeyValuePair item2 in value) { if (!((Object)(object)item2.Value == (Object)null) && initialPositions.TryGetValue(item2.Key, out var value2)) { ((Component)item2.Value).transform.localPosition = value2; } } return; } foreach (KeyValuePair item3 in value) { if (!((Object)(object)item3.Value == (Object)null)) { Transform transform = ((Component)item3.Value).transform; transform.localPosition += zero; } } } }