Decompiled source of MorePlayerList v0.9.71

plugins/yazirushi-MorePlayerList/MorePlayerList.dll

Decompiled a week ago
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.7")]
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_ListType> Lobby_List_Type;

	public static ConfigEntry<EscMenu_ListType> EscMenu_List_Type;

	public static ConfigEntry<KeyCode> EscMenu_ResetKey;

	public static ConfigEntry<KeyCode> Scroll_ResetKey;

	public static ConfigEntry<float> Scroll_Mousescrollspeed;

	public static ConfigEntry<float> Scroll_Uparrowspeed;

	public static ConfigEntry<float> Scroll_Downarrowspeed;

	public static ConfigEntry<int> Scroll_Yinterval;

	public static ConfigEntry<int> Custom_offsetplayer;

	public static ConfigEntry<int> Custom_Xoffset;

	public static ConfigEntry<int> Custom_Yoffset;

	public static ConfigEntry<int> 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_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Expected O, but got Unknown
		//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00aa: Expected O, but got Unknown
		//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d9: Expected O, but got Unknown
		//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0108: Expected O, but got Unknown
		//IL_012d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0137: Expected O, but got Unknown
		//IL_0159: Unknown result type (might be due to invalid IL or missing references)
		//IL_0163: 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_0206: Unknown result type (might be due to invalid IL or missing references)
		//IL_0210: Expected O, but got Unknown
		//IL_0263: Unknown result type (might be due to invalid IL or missing references)
		Lobby_List_Type = ((BaseUnityPlugin)this).Config.Bind<Lobby_ListType>("Settings", "Lobby ListType", Lobby_ListType.Default, new ConfigDescription("ListType used in the lobby", (AcceptableValueBase)null, Array.Empty<object>()));
		EscMenu_List_Type = ((BaseUnityPlugin)this).Config.Bind<EscMenu_ListType>("Settings", "EscMenu ListType", EscMenu_ListType.Split, new ConfigDescription("ListType used in the escmenu", (AcceptableValueBase)null, Array.Empty<object>()));
		EscMenu_ResetKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("EscMenu Settings", "EscMenu reset key", (KeyCode)114, new ConfigDescription("Key to reset the ESC menu scroll", (AcceptableValueBase)null, Array.Empty<object>()));
		Scroll_ResetKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Scroll Type Settings", "Scroll reset key", (KeyCode)114, new ConfigDescription("Key to reset the scroll the lobby", (AcceptableValueBase)null, Array.Empty<object>()));
		Scroll_Mousescrollspeed = ((BaseUnityPlugin)this).Config.Bind<float>("Scroll Type Settings", "Mouse scroll speed", 1f, new ConfigDescription("Scroll speed for mouse scrolling for Scroll Type", (AcceptableValueBase)null, Array.Empty<object>()));
		Scroll_Uparrowspeed = ((BaseUnityPlugin)this).Config.Bind<float>("Scroll Type Settings", "Up arrow speed", 1f, new ConfigDescription("Scroll speed for upward scrolling for Scroll Type", (AcceptableValueBase)null, Array.Empty<object>()));
		Scroll_Downarrowspeed = ((BaseUnityPlugin)this).Config.Bind<float>("Scroll Type Settings", "Down arrow speed", 1f, new ConfigDescription("Scroll speed for downward scrolling for Scroll Type", (AcceptableValueBase)null, Array.Empty<object>()));
		Scroll_Yinterval = ((BaseUnityPlugin)this).Config.Bind<int>("Scroll Type Settings", "Y interval", 32, new ConfigDescription("Interval of the Y-coordinate for Scroll Type", (AcceptableValueBase)null, Array.Empty<object>()));
		Custom_offsetplayer = ((BaseUnityPlugin)this).Config.Bind<int>("Custom Type Settings", "offset player", 0, new ConfigDescription("Number of people to whom the offset applies for Custom Type", (AcceptableValueBase)null, Array.Empty<object>()));
		Custom_Xoffset = ((BaseUnityPlugin)this).Config.Bind<int>("Custom Type Settings", "X offset", 0, new ConfigDescription("Offset of the X-coordinate for Custom Type", (AcceptableValueBase)null, Array.Empty<object>()));
		Custom_Yoffset = ((BaseUnityPlugin)this).Config.Bind<int>("Custom Type Settings", "Y offset", 0, new ConfigDescription("Offset of the Y-coordinate for Custom Type", (AcceptableValueBase)null, Array.Empty<object>()));
		Custom_Yinterval = ((BaseUnityPlugin)this).Config.Bind<int>("Custom Type Settings", "Y interval", 32, new ConfigDescription("Interval of the Y-coordinate for Custom Type", (AcceptableValueBase)null, Array.Empty<object>()));
		mls = ((BaseUnityPlugin)this).Logger;
		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 <Transpiler>d__0 : IEnumerable<CodeInstruction>, IEnumerable, IEnumerator<CodeInstruction>, IDisposable, IEnumerator
	{
		private int <>1__state;

		private CodeInstruction <>2__current;

		private int <>l__initialThreadId;

		private IEnumerable<CodeInstruction> instructions;

		public IEnumerable<CodeInstruction> <>3__instructions;

		private int <found_X>5__1;

		private int <found_Y_2>5__2;

		private int <found_Changer>5__3;

		private bool <patchedY>5__4;

		private IEnumerator<CodeInstruction> <>s__5;

		private CodeInstruction <code>5__6;

		CodeInstruction IEnumerator<CodeInstruction>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <Transpiler>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) <= 10u)
			{
				try
				{
				}
				finally
				{
					<>m__Finally1();
				}
			}
			<>s__5 = null;
			<code>5__6 = null;
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Expected O, but got Unknown
			//IL_02a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ac: Expected O, but got Unknown
			//IL_02c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d3: Expected O, but got Unknown
			//IL_0305: Unknown result type (might be due to invalid IL or missing references)
			//IL_030f: Expected O, but got Unknown
			//IL_032c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0336: Expected O, but got Unknown
			//IL_03e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f2: Expected O, but got Unknown
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Expected O, but got Unknown
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Expected O, but got Unknown
			try
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<found_X>5__1 = 0;
					<found_Y_2>5__2 = 0;
					<found_Changer>5__3 = 0;
					<patchedY>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(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");
					<patchedY>5__4 = true;
					break;
				case 9:
					<>1__state = -3;
					<>2__current = new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(LobbyPlayerList_Patch), "Changer", (Type[])null, (Type[])null));
					<>1__state = 10;
					return true;
				case 10:
					<>1__state = -3;
					MorePlayerList.mls.LogInfo((object)"MorePlayerList: Changer ok");
					break;
				case 11:
					<>1__state = -3;
					<code>5__6 = null;
					break;
				}
				if (<>s__5.MoveNext())
				{
					<code>5__6 = <>s__5.Current;
					if (<code>5__6.opcode == OpCodes.Ldc_R4 && (float)<code>5__6.operand == 0f)
					{
						<found_X>5__1++;
						if (<found_X>5__1 == 2)
						{
							<>2__current = new CodeInstruction(OpCodes.Ldarg_0, (object)null);
							<>1__state = 1;
							return true;
						}
					}
					if (<code>5__6.opcode == OpCodes.Ldc_I4_S && Convert.ToInt32(<code>5__6.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 (!<patchedY>5__4 && <code>5__6.opcode == OpCodes.Mul)
					{
						<found_Y_2>5__2++;
						if (<found_Y_2>5__2 == 4)
						{
							<>2__current = <code>5__6;
							<>1__state = 4;
							return true;
						}
					}
					if (<code>5__6.opcode == OpCodes.Callvirt)
					{
						<found_Changer>5__3++;
						if (<found_Changer>5__3 == 18)
						{
							<>2__current = <code>5__6;
							<>1__state = 9;
							return true;
						}
					}
					<>2__current = <code>5__6;
					<>1__state = 11;
					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<CodeInstruction> IEnumerable<CodeInstruction>.GetEnumerator()
		{
			<Transpiler>d__0 <Transpiler>d__;
			if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
			{
				<>1__state = 0;
				<Transpiler>d__ = this;
			}
			else
			{
				<Transpiler>d__ = new <Transpiler>d__0(0);
			}
			<Transpiler>d__.instructions = <>3__instructions;
			return <Transpiler>d__;
		}

		[DebuggerHidden]
		IEnumerator IEnumerable.GetEnumerator()
		{
			return ((IEnumerable<CodeInstruction>)this).GetEnumerator();
		}
	}

	private static float scroll_value;

	[IteratorStateMachine(typeof(<Transpiler>d__0))]
	private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <Transpiler>d__0(-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();
		case MorePlayerList.Lobby_ListType.Custom:
			if (num >= MorePlayerList.Custom_offsetplayer.Value)
			{
				return MorePlayerList.Custom_Yoffset.Value;
			}
			break;
		}
		return 0f;
	}

	public static float Scroll_value()
	{
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		float axis = Input.GetAxis("Mouse ScrollWheel");
		scroll_value += axis * 200f * MorePlayerList.Scroll_Mousescrollspeed.Value;
		if (Input.GetKey((KeyCode)273))
		{
			scroll_value += 3f * MorePlayerList.Scroll_Uparrowspeed.Value;
		}
		if (Input.GetKey((KeyCode)274))
		{
			scroll_value -= 3f * MorePlayerList.Scroll_Downarrowspeed.Value;
		}
		if (Input.GetKeyDown(MorePlayerList.Scroll_ResetKey.Value))
		{
			scroll_value = 0f;
		}
		return scroll_value;
	}

	public static void Changer()
	{
		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 (Input.GetKeyDown((KeyCode)276))
		{
			num--;
		}
		if (Input.GetKeyDown((KeyCode)275))
		{
			num++;
		}
		num = (num % array.Length + array.Length) % array.Length;
		MorePlayerList.Lobby_List_Type.Value = array[num];
	}
}
[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" + $"<color=#00ffff><size=20><- List Type : {MorePlayerList.Lobby_List_Type.Value} -></size></color>";
				((TMP_Text)___chatPromptText).transform.localPosition = new Vector3(-30f, -155f, 0f);
				flag = false;
			}
			((TMP_Text)___chatPromptText).text = baseText + "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + $"<color=#00ffff><size=20><- List Type : {MorePlayerList.Lobby_List_Type.Value} -></size></color>";
			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" + $"<color=#00ffff><size=20><- List Type : {MorePlayerList.Lobby_List_Type.Value} -></size></color>";
			};
		}
	}
}
[HarmonyPatch(typeof(MenuPageEsc), "PlayerGainSlidersUpdate")]
public class EscPlayerList_Patch
{
	[CompilerGenerated]
	private sealed class <Transpiler>d__0 : IEnumerable<CodeInstruction>, IEnumerable, IEnumerator<CodeInstruction>, IDisposable, IEnumerator
	{
		private int <>1__state;

		private CodeInstruction <>2__current;

		private int <>l__initialThreadId;

		private IEnumerable<CodeInstruction> instructions;

		public IEnumerable<CodeInstruction> <>3__instructions;

		private int <found_X>5__1;

		private int <found_Y_2>5__2;

		private int <found_test>5__3;

		private bool <patchedY>5__4;

		private IEnumerator<CodeInstruction> <>s__5;

		private CodeInstruction <code>5__6;

		CodeInstruction IEnumerator<CodeInstruction>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <Transpiler>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;
			<code>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;
					<found_X>5__1 = 0;
					<found_Y_2>5__2 = 0;
					<found_test>5__3 = 0;
					<patchedY>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");
					<patchedY>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;
					<code>5__6 = null;
					break;
				}
				if (<>s__5.MoveNext())
				{
					<code>5__6 = <>s__5.Current;
					if (<code>5__6.opcode == OpCodes.Ldc_R4 && (float)<code>5__6.operand == 0f)
					{
						<found_X>5__1++;
						if (<found_X>5__1 == 2)
						{
							<>2__current = new CodeInstruction(OpCodes.Ldarg_0, (object)null);
							<>1__state = 1;
							return true;
						}
					}
					if (<code>5__6.opcode == OpCodes.Ldc_R4 && (float)<code>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 (!<patchedY>5__4 && <code>5__6.opcode == OpCodes.Mul)
					{
						<found_Y_2>5__2++;
						if (<found_Y_2>5__2 == 1)
						{
							<>2__current = <code>5__6;
							<>1__state = 4;
							return true;
						}
					}
					if (<code>5__6.opcode == OpCodes.Ldfld)
					{
						<found_test>5__3++;
						if (<found_test>5__3 == 6)
						{
							<>2__current = <code>5__6;
							<>1__state = 9;
							return true;
						}
					}
					<>2__current = <code>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<CodeInstruction> IEnumerable<CodeInstruction>.GetEnumerator()
		{
			<Transpiler>d__0 <Transpiler>d__;
			if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
			{
				<>1__state = 0;
				<Transpiler>d__ = this;
			}
			else
			{
				<Transpiler>d__ = new <Transpiler>d__0(0);
			}
			<Transpiler>d__.instructions = <>3__instructions;
			return <Transpiler>d__;
		}

		[DebuggerHidden]
		IEnumerator IEnumerable.GetEnumerator()
		{
			return ((IEnumerable<CodeInstruction>)this).GetEnumerator();
		}
	}

	[IteratorStateMachine(typeof(<Transpiler>d__0))]
	private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <Transpiler>d__0(-2)
		{
			<>3__instructions = instructions
		};
	}

	public static float GetXvalue(MenuPageEsc __instance)
	{
		FieldInfo fieldInfo = AccessTools.Field(typeof(MenuPageEsc), "playerMicGainSliders");
		Dictionary<PlayerAvatar, MenuSliderPlayerMicGain> dictionary = (Dictionary<PlayerAvatar, MenuSliderPlayerMicGain>)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<PlayerAvatar, MenuSliderPlayerMicGain> dictionary = (Dictionary<PlayerAvatar, MenuSliderPlayerMicGain>)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<PlayerAvatar, Vector3> initialPositions = new Dictionary<PlayerAvatar, Vector3>();

	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<PlayerAvatar, MenuSliderPlayerMicGain> value = Traverse.Create((object)__instance).Field("playerMicGainSliders").GetValue<Dictionary<PlayerAvatar, MenuSliderPlayerMicGain>>();
		if (value == null || value.Count == 0)
		{
			return;
		}
		foreach (KeyValuePair<PlayerAvatar, MenuSliderPlayerMicGain> 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<PlayerAvatar, MenuSliderPlayerMicGain> 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<PlayerAvatar, MenuSliderPlayerMicGain> item3 in value)
		{
			if (!((Object)(object)item3.Value == (Object)null))
			{
				Transform transform = ((Component)item3.Value).transform;
				transform.localPosition += zero;
			}
		}
	}
}