Decompiled source of WeaponVariantBinds v0.1.7

WeaponVariantBinds.dll

Decompiled 2 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using PluginConfig.API;
using PluginConfig.API.Decorators;
using PluginConfig.API.Fields;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("WeaponVariantBinds")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("WeaponVariantBinds")]
[assembly: AssemblyTitle("WeaponVariantBinds")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace WeaponVariantBinds
{
	[BepInPlugin("WeaponVariantBinds", "WeaponVariantBinds", "0.01")]
	public class Plugin : BaseUnityPlugin
	{
		public static bool tempDisableAutoSwitch = false;

		public static bool modEnabled = true;

		public static bool SwapVariationIgnoreMod = false;

		public static bool ScrollVariationIgnoreMod = false;

		public static KeyCode[,] weaponKeyCodes = new KeyCode[5, 3];

		public static bool[,] ignoreWeaponInCycle = new bool[5, 3];

		private int slot = 0;

		private int lastSlot = 0;

		private int variation = 0;

		private int lastVariation = 0;

		private GameObject weapon = null;

		private void Awake()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			PluginConfig.WeaponVariantBindsConfig();
			Harmony val = new Harmony("WeaponVariantBinds");
			val.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin WeaponVariantBinds is loaded!");
		}

		public static bool IsGameplayScene()
		{
			string[] source = new string[6] { "Intro", "Bootstrap", "Main Menu", "Level 2-S", "Intermission1", "Intermission2" };
			if (SceneHelper.CurrentScene == null)
			{
				return false;
			}
			return !source.Contains(SceneHelper.CurrentScene);
		}

		private void setLastUsedWeapon()
		{
			MonoSingleton<GunControl>.Instance.lastUsedSlot = lastSlot;
			MonoSingleton<GunControl>.Instance.lastUsedVariation = lastVariation;
		}

		private bool switchToNextWeaponWithSameKeyCode(KeyCode code, int i, int j)
		{
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			int num = j;
			for (int k = i; k < weaponKeyCodes.GetLength(0); k++)
			{
				for (int l = num; l < weaponKeyCodes.GetLength(1); l++)
				{
					if (i == k && j == l)
					{
						l++;
					}
					if (l > 2)
					{
						l = 0;
						k++;
					}
					if (l == 0 && k == 5)
					{
						goto end_IL_017a;
					}
					if (weaponKeyCodes[k, l] == code)
					{
						switch (k)
						{
						case 0:
							MonoSingleton<GunControl>.Instance.ForceWeapon(MonoSingleton<GunControl>.Instance.slot1[l], true);
							break;
						case 1:
							MonoSingleton<GunControl>.Instance.ForceWeapon(MonoSingleton<GunControl>.Instance.slot2[l], true);
							break;
						case 2:
							MonoSingleton<GunControl>.Instance.ForceWeapon(MonoSingleton<GunControl>.Instance.slot3[l], true);
							break;
						case 3:
							MonoSingleton<GunControl>.Instance.ForceWeapon(MonoSingleton<GunControl>.Instance.slot4[l], true);
							break;
						case 4:
							MonoSingleton<GunControl>.Instance.ForceWeapon(MonoSingleton<GunControl>.Instance.slot5[l], true);
							break;
						}
						tempDisableAutoSwitch = true;
						weapon = MonoSingleton<GunControl>.Instance.currentWeapon;
						return true;
					}
				}
				num = 0;
				continue;
				end_IL_017a:
				break;
			}
			for (int m = 0; m < weaponKeyCodes.GetLength(0); m++)
			{
				for (int n = 0; n < weaponKeyCodes.GetLength(1); n++)
				{
					if (i == m && j == n)
					{
						return false;
					}
					if (weaponKeyCodes[m, n] == code)
					{
						switch (m)
						{
						case 0:
							MonoSingleton<GunControl>.Instance.ForceWeapon(MonoSingleton<GunControl>.Instance.slot1[n], true);
							break;
						case 1:
							MonoSingleton<GunControl>.Instance.ForceWeapon(MonoSingleton<GunControl>.Instance.slot2[n], true);
							break;
						case 2:
							MonoSingleton<GunControl>.Instance.ForceWeapon(MonoSingleton<GunControl>.Instance.slot3[n], true);
							break;
						case 3:
							MonoSingleton<GunControl>.Instance.ForceWeapon(MonoSingleton<GunControl>.Instance.slot4[n], true);
							break;
						case 4:
							MonoSingleton<GunControl>.Instance.ForceWeapon(MonoSingleton<GunControl>.Instance.slot5[n], true);
							break;
						}
						tempDisableAutoSwitch = true;
						weapon = MonoSingleton<GunControl>.Instance.currentWeapon;
						return true;
					}
				}
			}
			Debug.Log((object)"WeaponVariantBinds - Should have never gotten here.");
			return false;
		}

		public void Update()
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0396: Unknown result type (might be due to invalid IL or missing references)
			//IL_039b: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03de: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e3: Unknown result type (might be due to invalid IL or missing references)
			if (!IsGameplayScene() || !modEnabled)
			{
				return;
			}
			int num = 0;
			while (true)
			{
				if (num < weaponKeyCodes.GetLength(0))
				{
					for (int i = 0; i < weaponKeyCodes.GetLength(1); i++)
					{
						if (!Input.GetKeyDown(weaponKeyCodes[num, i]))
						{
							continue;
						}
						MonoSingleton<GunControl>.Instance.lastUsedSlot = MonoSingleton<GunControl>.Instance.currentSlot;
						MonoSingleton<GunControl>.Instance.lastUsedVariation = MonoSingleton<GunControl>.Instance.currentVariation;
						if (MonoSingleton<GunControl>.Instance.currentSlot != num + 1 || MonoSingleton<GunControl>.Instance.currentVariation != i)
						{
							continue;
						}
						Debug.Log((object)"WeaponVariantBinds - try to switch to next wep with same keycode");
						if (!switchToNextWeaponWithSameKeyCode(weaponKeyCodes[num, i], num, i))
						{
							continue;
						}
						goto IL_00c7;
					}
					num++;
					continue;
				}
				for (int j = 0; j < weaponKeyCodes.GetLength(0); j++)
				{
					int num2 = 0;
					while (num2 < weaponKeyCodes.GetLength(1))
					{
						if (!Input.GetKeyDown(weaponKeyCodes[j, num2]))
						{
							num2++;
							continue;
						}
						goto IL_0146;
					}
					continue;
					IL_0146:
					MonoSingleton<GunControl>.Instance.lastUsedSlot = MonoSingleton<GunControl>.Instance.currentSlot;
					MonoSingleton<GunControl>.Instance.lastUsedVariation = MonoSingleton<GunControl>.Instance.currentVariation;
					switch (j)
					{
					case 0:
						MonoSingleton<GunControl>.Instance.ForceWeapon(MonoSingleton<GunControl>.Instance.slot1[num2], true);
						break;
					case 1:
						MonoSingleton<GunControl>.Instance.ForceWeapon(MonoSingleton<GunControl>.Instance.slot2[num2], true);
						break;
					case 2:
						MonoSingleton<GunControl>.Instance.ForceWeapon(MonoSingleton<GunControl>.Instance.slot3[num2], true);
						break;
					case 3:
						MonoSingleton<GunControl>.Instance.ForceWeapon(MonoSingleton<GunControl>.Instance.slot4[num2], true);
						break;
					case 4:
						MonoSingleton<GunControl>.Instance.ForceWeapon(MonoSingleton<GunControl>.Instance.slot5[num2], true);
						break;
					}
					tempDisableAutoSwitch = true;
					weapon = MonoSingleton<GunControl>.Instance.currentWeapon;
					Debug.Log((object)"WeaponVariantBinds - key pressed");
					break;
				}
				break;
				IL_00c7:
				Debug.Log((object)"WeaponVariantBinds - switched to next wep with same keycode");
				break;
			}
			slot = MonoSingleton<GunControl>.Instance.currentSlot;
			lastSlot = MonoSingleton<GunControl>.Instance.lastUsedSlot;
			variation = MonoSingleton<GunControl>.Instance.currentVariation;
			lastVariation = MonoSingleton<GunControl>.Instance.lastUsedVariation;
			List<GameObject> list = null;
			if (slot == 1)
			{
				list = MonoSingleton<GunControl>.Instance.slot1;
			}
			else if (slot == 2)
			{
				list = MonoSingleton<GunControl>.Instance.slot2;
			}
			else if (slot == 3)
			{
				list = MonoSingleton<GunControl>.Instance.slot3;
			}
			else if (slot == 4)
			{
				list = MonoSingleton<GunControl>.Instance.slot4;
			}
			else if (slot == 5)
			{
				list = MonoSingleton<GunControl>.Instance.slot5;
			}
			WeaponActions val = MonoSingleton<InputManager>.Instance.InputSource.Actions.Weapon;
			if (!((WeaponActions)(ref val)).VariationSlot1.WasPressedThisFrame())
			{
				val = MonoSingleton<InputManager>.Instance.InputSource.Actions.Weapon;
				if (!((WeaponActions)(ref val)).VariationSlot2.WasPressedThisFrame())
				{
					val = MonoSingleton<InputManager>.Instance.InputSource.Actions.Weapon;
					if (!((WeaponActions)(ref val)).VariationSlot3.WasPressedThisFrame())
					{
						goto IL_0412;
					}
				}
			}
			tempDisableAutoSwitch = true;
			weapon = MonoSingleton<GunControl>.Instance.currentWeapon;
			goto IL_0412;
			IL_0412:
			if (MonoSingleton<InputManager>.Instance.InputSource.LastWeapon.WasCanceledThisFrame)
			{
				tempDisableAutoSwitch = true;
				weapon = MonoSingleton<GunControl>.Instance.currentWeapon;
			}
			if ((MonoSingleton<InputManager>.Instance.InputSource.NextVariation.WasPerformedThisFrame || MonoSingleton<InputManager>.Instance.InputSource.PreviousVariation.WasCanceledThisFrame) && SwapVariationIgnoreMod)
			{
				tempDisableAutoSwitch = true;
				weapon = MonoSingleton<GunControl>.Instance.currentWeapon;
			}
			bool flag = false;
			bool flag2 = false;
			bool flag3 = false;
			if (MonoSingleton<PrefsManager>.Instance.prefMap.ContainsKey("scrollEnabled"))
			{
				flag = (bool)MonoSingleton<PrefsManager>.Instance.prefMap["scrollEnabled"];
			}
			if (MonoSingleton<PrefsManager>.Instance.prefMap.ContainsKey("scrollVariations"))
			{
				flag2 = (bool)MonoSingleton<PrefsManager>.Instance.prefMap["scrollVariations"];
			}
			if (MonoSingleton<PrefsManager>.Instance.prefMap.ContainsKey("scrollReversed"))
			{
				flag3 = (bool)MonoSingleton<PrefsManager>.Instance.prefMap["scrollReversed"];
			}
			if ((double)Math.Abs(Input.GetAxis("Mouse ScrollWheel")) >= 0.1 && flag && flag2 && ScrollVariationIgnoreMod)
			{
				tempDisableAutoSwitch = true;
				weapon = MonoSingleton<GunControl>.Instance.currentWeapon;
			}
			if (slot <= 5 && MonoSingleton<GunControl>.Instance.currentVariation <= 2 && !tempDisableAutoSwitch && list != null && ignoreWeaponInCycle[slot - 1, MonoSingleton<GunControl>.Instance.currentVariation])
			{
				int num3 = 0;
				for (int k = 0; k < list.Count; k++)
				{
					if (list.Count <= 3 && ignoreWeaponInCycle[slot - 1, k])
					{
						num3++;
					}
				}
				bool flag4 = false;
				if (num3 == list.Count)
				{
					flag4 = true;
					Debug.Log((object)"WeaponVariantBinds - Too many igonres");
				}
				if (!flag4)
				{
					bool flag5 = false;
					bool flag6 = false;
					if (flag && flag2)
					{
						float axis = Input.GetAxis("Mouse ScrollWheel");
						flag6 = ((!flag3) ? (Math.Abs(axis) >= 0.1f && axis < 0f) : (Math.Abs(axis) >= 0.1f && axis > 0f));
					}
					if (MonoSingleton<InputManager>.Instance.InputSource.PreviousVariation.WasCanceledThisFrame)
					{
						flag6 = true;
					}
					Debug.Log((object)("WeaponVariantBinds - current: " + MonoSingleton<GunControl>.Instance.currentSlot + " " + MonoSingleton<GunControl>.Instance.currentVariation));
					Debug.Log((object)"WeaponVariantBinds - weapon about to be forced");
					if (!flag6)
					{
						if (list.Count > 1 && MonoSingleton<GunControl>.Instance.currentVariation == 0 && ignoreWeaponInCycle[slot - 1, MonoSingleton<GunControl>.Instance.currentVariation])
						{
							MonoSingleton<GunControl>.Instance.ForceWeapon(list[1], true);
							flag5 = true;
						}
						if (list.Count > 2 && MonoSingleton<GunControl>.Instance.currentVariation == 1 && ignoreWeaponInCycle[slot - 1, MonoSingleton<GunControl>.Instance.currentVariation])
						{
							MonoSingleton<GunControl>.Instance.ForceWeapon(list[2], true);
							flag5 = true;
						}
						if (list.Count > 3 && MonoSingleton<GunControl>.Instance.currentVariation == 2 && ignoreWeaponInCycle[slot - 1, MonoSingleton<GunControl>.Instance.currentVariation])
						{
							MonoSingleton<GunControl>.Instance.ForceWeapon(list[3], true);
							flag5 = true;
						}
						else if (MonoSingleton<GunControl>.Instance.currentVariation == 2 && ignoreWeaponInCycle[slot - 1, MonoSingleton<GunControl>.Instance.currentVariation])
						{
							MonoSingleton<GunControl>.Instance.ForceWeapon(list[0], true);
							flag5 = true;
						}
						if (flag5)
						{
							setLastUsedWeapon();
						}
					}
					else
					{
						if (MonoSingleton<GunControl>.Instance.currentVariation == 2 && ignoreWeaponInCycle[slot - 1, MonoSingleton<GunControl>.Instance.currentVariation])
						{
							MonoSingleton<GunControl>.Instance.ForceWeapon(list[1], true);
							flag5 = true;
						}
						if (MonoSingleton<GunControl>.Instance.currentVariation == 1 && ignoreWeaponInCycle[slot - 1, MonoSingleton<GunControl>.Instance.currentVariation])
						{
							MonoSingleton<GunControl>.Instance.ForceWeapon(list[0], true);
							flag5 = true;
						}
						if (MonoSingleton<GunControl>.Instance.currentVariation == 0 && ignoreWeaponInCycle[slot - 1, MonoSingleton<GunControl>.Instance.currentVariation])
						{
							MonoSingleton<GunControl>.Instance.ForceWeapon(list[list.Count - 1], true);
							flag5 = true;
						}
						if (flag5)
						{
							setLastUsedWeapon();
						}
					}
					Debug.Log((object)("WeaponVariantBinds - after: " + MonoSingleton<GunControl>.Instance.currentSlot + " " + MonoSingleton<GunControl>.Instance.currentVariation));
				}
			}
			if ((Object)(object)weapon != (Object)(object)MonoSingleton<GunControl>.Instance.currentWeapon)
			{
				tempDisableAutoSwitch = false;
				Debug.Log((object)("WeaponVariantBinds - old weapon: " + ((object)weapon)?.ToString() + " new: " + (object)MonoSingleton<GunControl>.Instance.currentWeapon));
			}
			weapon = MonoSingleton<GunControl>.Instance.currentWeapon;
		}
	}
	public class PluginConfig
	{
		public enum KeyEnum
		{
			None,
			Backspace,
			Tab,
			Escape,
			Space,
			UpArrow,
			DownArrow,
			RightArrow,
			LeftArrow,
			A,
			B,
			C,
			D,
			E,
			F,
			G,
			H,
			I,
			J,
			K,
			L,
			M,
			N,
			O,
			P,
			Q,
			R,
			S,
			T,
			U,
			V,
			W,
			X,
			Y,
			Z,
			Alpha1,
			Alpha2,
			Alpha3,
			Alpha4,
			Alpha5,
			Alpha6,
			Alpha7,
			Alpha8,
			Alpha9,
			Alpha0,
			CapsLock,
			RightShift,
			LeftShift,
			RightControl,
			LeftControl,
			RightAlt,
			LeftAlt,
			Mouse1,
			Mouse2,
			Mouse3,
			Mouse4,
			Mouse5,
			Mouse6,
			Mouse7,
			BackQuote,
			EqualsSign,
			Minus,
			LeftBracket,
			RightBracket,
			Semicolon,
			Quote,
			Comma,
			Period,
			Slash,
			Backslash,
			Numlock,
			KeypadDivide,
			KeypadMultiply,
			KeypadMinus,
			KeypadPlus,
			KeypadEnter,
			KeypadPeriod,
			Keypad0,
			Keypad1,
			Keypad2,
			Keypad3,
			Keypad4,
			Keypad5,
			Keypad6,
			Keypad7,
			Keypad8,
			Keypad9,
			Home,
			End,
			PageUp,
			PageDown,
			Enter,
			F1,
			F2,
			F3,
			F4,
			F5,
			F6,
			F7,
			F8,
			F9,
			F10,
			F11,
			F12,
			F13,
			F14,
			F15
		}

		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static BoolValueChangeEventDelegate <>9__4_1;

			public static BoolValueChangeEventDelegate <>9__4_2;

			public static EnumValueChangeEventDelegate<KeyEnum> <>9__4_3;

			public static EnumValueChangeEventDelegate<KeyEnum> <>9__4_4;

			public static EnumValueChangeEventDelegate<KeyEnum> <>9__4_5;

			public static BoolValueChangeEventDelegate <>9__4_6;

			public static BoolValueChangeEventDelegate <>9__4_7;

			public static BoolValueChangeEventDelegate <>9__4_8;

			public static EnumValueChangeEventDelegate<KeyEnum> <>9__4_9;

			public static EnumValueChangeEventDelegate<KeyEnum> <>9__4_10;

			public static EnumValueChangeEventDelegate<KeyEnum> <>9__4_11;

			public static BoolValueChangeEventDelegate <>9__4_12;

			public static BoolValueChangeEventDelegate <>9__4_13;

			public static BoolValueChangeEventDelegate <>9__4_14;

			public static EnumValueChangeEventDelegate<KeyEnum> <>9__4_15;

			public static EnumValueChangeEventDelegate<KeyEnum> <>9__4_16;

			public static EnumValueChangeEventDelegate<KeyEnum> <>9__4_17;

			public static BoolValueChangeEventDelegate <>9__4_18;

			public static BoolValueChangeEventDelegate <>9__4_19;

			public static BoolValueChangeEventDelegate <>9__4_20;

			public static EnumValueChangeEventDelegate<KeyEnum> <>9__4_21;

			public static EnumValueChangeEventDelegate<KeyEnum> <>9__4_22;

			public static EnumValueChangeEventDelegate<KeyEnum> <>9__4_23;

			public static BoolValueChangeEventDelegate <>9__4_24;

			public static BoolValueChangeEventDelegate <>9__4_25;

			public static BoolValueChangeEventDelegate <>9__4_26;

			public static EnumValueChangeEventDelegate<KeyEnum> <>9__4_27;

			public static EnumValueChangeEventDelegate<KeyEnum> <>9__4_28;

			public static EnumValueChangeEventDelegate<KeyEnum> <>9__4_29;

			public static BoolValueChangeEventDelegate <>9__4_30;

			public static BoolValueChangeEventDelegate <>9__4_31;

			public static BoolValueChangeEventDelegate <>9__4_32;

			internal void <WeaponVariantBindsConfig>b__4_1(BoolValueChangeEvent e)
			{
				Plugin.SwapVariationIgnoreMod = e.value;
			}

			internal void <WeaponVariantBindsConfig>b__4_2(BoolValueChangeEvent e)
			{
				Plugin.ScrollVariationIgnoreMod = e.value;
			}

			internal void <WeaponVariantBindsConfig>b__4_3(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[0, 0] = convertKeyEnumToKeyCode(e.value);
			}

			internal void <WeaponVariantBindsConfig>b__4_4(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[0, 1] = convertKeyEnumToKeyCode(e.value);
			}

			internal void <WeaponVariantBindsConfig>b__4_5(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[0, 2] = convertKeyEnumToKeyCode(e.value);
			}

			internal void <WeaponVariantBindsConfig>b__4_6(BoolValueChangeEvent e)
			{
				Plugin.ignoreWeaponInCycle[0, 0] = e.value;
			}

			internal void <WeaponVariantBindsConfig>b__4_7(BoolValueChangeEvent e)
			{
				Plugin.ignoreWeaponInCycle[0, 1] = e.value;
			}

			internal void <WeaponVariantBindsConfig>b__4_8(BoolValueChangeEvent e)
			{
				Plugin.ignoreWeaponInCycle[0, 2] = e.value;
			}

			internal void <WeaponVariantBindsConfig>b__4_9(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[1, 0] = convertKeyEnumToKeyCode(e.value);
			}

			internal void <WeaponVariantBindsConfig>b__4_10(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[1, 1] = convertKeyEnumToKeyCode(e.value);
			}

			internal void <WeaponVariantBindsConfig>b__4_11(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[1, 2] = convertKeyEnumToKeyCode(e.value);
			}

			internal void <WeaponVariantBindsConfig>b__4_12(BoolValueChangeEvent e)
			{
				Plugin.ignoreWeaponInCycle[1, 0] = e.value;
			}

			internal void <WeaponVariantBindsConfig>b__4_13(BoolValueChangeEvent e)
			{
				Plugin.ignoreWeaponInCycle[1, 1] = e.value;
			}

			internal void <WeaponVariantBindsConfig>b__4_14(BoolValueChangeEvent e)
			{
				Plugin.ignoreWeaponInCycle[1, 2] = e.value;
			}

			internal void <WeaponVariantBindsConfig>b__4_15(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[2, 0] = convertKeyEnumToKeyCode(e.value);
			}

			internal void <WeaponVariantBindsConfig>b__4_16(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[2, 1] = convertKeyEnumToKeyCode(e.value);
			}

			internal void <WeaponVariantBindsConfig>b__4_17(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[2, 2] = convertKeyEnumToKeyCode(e.value);
			}

			internal void <WeaponVariantBindsConfig>b__4_18(BoolValueChangeEvent e)
			{
				Plugin.ignoreWeaponInCycle[2, 0] = e.value;
			}

			internal void <WeaponVariantBindsConfig>b__4_19(BoolValueChangeEvent e)
			{
				Plugin.ignoreWeaponInCycle[2, 1] = e.value;
			}

			internal void <WeaponVariantBindsConfig>b__4_20(BoolValueChangeEvent e)
			{
				Plugin.ignoreWeaponInCycle[2, 2] = e.value;
			}

			internal void <WeaponVariantBindsConfig>b__4_21(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[3, 0] = convertKeyEnumToKeyCode(e.value);
			}

			internal void <WeaponVariantBindsConfig>b__4_22(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[3, 1] = convertKeyEnumToKeyCode(e.value);
			}

			internal void <WeaponVariantBindsConfig>b__4_23(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[3, 2] = convertKeyEnumToKeyCode(e.value);
			}

			internal void <WeaponVariantBindsConfig>b__4_24(BoolValueChangeEvent e)
			{
				Plugin.ignoreWeaponInCycle[3, 0] = e.value;
			}

			internal void <WeaponVariantBindsConfig>b__4_25(BoolValueChangeEvent e)
			{
				Plugin.ignoreWeaponInCycle[3, 1] = e.value;
			}

			internal void <WeaponVariantBindsConfig>b__4_26(BoolValueChangeEvent e)
			{
				Plugin.ignoreWeaponInCycle[3, 2] = e.value;
			}

			internal void <WeaponVariantBindsConfig>b__4_27(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[4, 0] = convertKeyEnumToKeyCode(e.value);
			}

			internal void <WeaponVariantBindsConfig>b__4_28(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[4, 1] = convertKeyEnumToKeyCode(e.value);
			}

			internal void <WeaponVariantBindsConfig>b__4_29(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[4, 2] = convertKeyEnumToKeyCode(e.value);
			}

			internal void <WeaponVariantBindsConfig>b__4_30(BoolValueChangeEvent e)
			{
				Plugin.ignoreWeaponInCycle[4, 0] = e.value;
			}

			internal void <WeaponVariantBindsConfig>b__4_31(BoolValueChangeEvent e)
			{
				Plugin.ignoreWeaponInCycle[4, 1] = e.value;
			}

			internal void <WeaponVariantBindsConfig>b__4_32(BoolValueChangeEvent e)
			{
				Plugin.ignoreWeaponInCycle[4, 2] = e.value;
			}
		}

		public static string DefaultParentFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? "";

		public static KeyCode convertKeyEnumToKeyCode(KeyEnum value)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f72: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f73: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f77: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: Unknown result type (might be due to invalid IL or missing references)
			//IL_0239: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0311: Unknown result type (might be due to invalid IL or missing references)
			//IL_0335: Unknown result type (might be due to invalid IL or missing references)
			//IL_0359: Unknown result type (might be due to invalid IL or missing references)
			//IL_037d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_040d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0431: Unknown result type (might be due to invalid IL or missing references)
			//IL_0455: Unknown result type (might be due to invalid IL or missing references)
			//IL_0479: Unknown result type (might be due to invalid IL or missing references)
			//IL_049d: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0509: Unknown result type (might be due to invalid IL or missing references)
			//IL_052d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0551: Unknown result type (might be due to invalid IL or missing references)
			//IL_0575: Unknown result type (might be due to invalid IL or missing references)
			//IL_0599: Unknown result type (might be due to invalid IL or missing references)
			//IL_05bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0605: Unknown result type (might be due to invalid IL or missing references)
			//IL_0629: Unknown result type (might be due to invalid IL or missing references)
			//IL_0650: Unknown result type (might be due to invalid IL or missing references)
			//IL_0677: Unknown result type (might be due to invalid IL or missing references)
			//IL_069e: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_0713: Unknown result type (might be due to invalid IL or missing references)
			//IL_073a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0761: Unknown result type (might be due to invalid IL or missing references)
			//IL_0788: Unknown result type (might be due to invalid IL or missing references)
			//IL_07af: Unknown result type (might be due to invalid IL or missing references)
			//IL_07d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0824: Unknown result type (might be due to invalid IL or missing references)
			//IL_084b: Unknown result type (might be due to invalid IL or missing references)
			//IL_086f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0893: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_08db: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0923: Unknown result type (might be due to invalid IL or missing references)
			//IL_0947: Unknown result type (might be due to invalid IL or missing references)
			//IL_096b: Unknown result type (might be due to invalid IL or missing references)
			//IL_098f: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_09fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a25: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a73: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a9a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ac1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b0f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b36: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b5d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b84: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bab: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bd2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bf9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c20: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c47: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c6e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c95: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cbc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ce3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d0a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d2e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d55: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d7c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0da3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0df1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e18: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e3f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e8d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eb4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0edb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f02: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f26: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f4a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f6e: Unknown result type (might be due to invalid IL or missing references)
			KeyCode result = (KeyCode)0;
			if (value.Equals(KeyEnum.Backspace))
			{
				result = (KeyCode)8;
			}
			else if (value.Equals(KeyEnum.Tab))
			{
				result = (KeyCode)9;
			}
			else if (value.Equals(KeyEnum.Escape))
			{
				result = (KeyCode)27;
			}
			else if (value.Equals(KeyEnum.Space))
			{
				result = (KeyCode)32;
			}
			else if (value.Equals(KeyEnum.UpArrow))
			{
				result = (KeyCode)273;
			}
			else if (value.Equals(KeyEnum.DownArrow))
			{
				result = (KeyCode)274;
			}
			else if (value.Equals(KeyEnum.RightArrow))
			{
				result = (KeyCode)275;
			}
			else if (value.Equals(KeyEnum.LeftArrow))
			{
				result = (KeyCode)276;
			}
			else if (value.Equals(KeyEnum.A))
			{
				result = (KeyCode)97;
			}
			else if (value.Equals(KeyEnum.B))
			{
				result = (KeyCode)98;
			}
			else if (value.Equals(KeyEnum.C))
			{
				result = (KeyCode)99;
			}
			else if (value.Equals(KeyEnum.D))
			{
				result = (KeyCode)100;
			}
			else if (value.Equals(KeyEnum.E))
			{
				result = (KeyCode)101;
			}
			else if (value.Equals(KeyEnum.F))
			{
				result = (KeyCode)102;
			}
			else if (value.Equals(KeyEnum.G))
			{
				result = (KeyCode)103;
			}
			else if (value.Equals(KeyEnum.H))
			{
				result = (KeyCode)104;
			}
			else if (value.Equals(KeyEnum.I))
			{
				result = (KeyCode)105;
			}
			else if (value.Equals(KeyEnum.J))
			{
				result = (KeyCode)106;
			}
			else if (value.Equals(KeyEnum.K))
			{
				result = (KeyCode)107;
			}
			else if (value.Equals(KeyEnum.L))
			{
				result = (KeyCode)108;
			}
			else if (value.Equals(KeyEnum.M))
			{
				result = (KeyCode)109;
			}
			else if (value.Equals(KeyEnum.N))
			{
				result = (KeyCode)110;
			}
			else if (value.Equals(KeyEnum.O))
			{
				result = (KeyCode)111;
			}
			else if (value.Equals(KeyEnum.P))
			{
				result = (KeyCode)112;
			}
			else if (value.Equals(KeyEnum.Q))
			{
				result = (KeyCode)113;
			}
			else if (value.Equals(KeyEnum.R))
			{
				result = (KeyCode)114;
			}
			else if (value.Equals(KeyEnum.S))
			{
				result = (KeyCode)115;
			}
			else if (value.Equals(KeyEnum.T))
			{
				result = (KeyCode)116;
			}
			else if (value.Equals(KeyEnum.U))
			{
				result = (KeyCode)117;
			}
			else if (value.Equals(KeyEnum.V))
			{
				result = (KeyCode)118;
			}
			else if (value.Equals(KeyEnum.W))
			{
				result = (KeyCode)119;
			}
			else if (value.Equals(KeyEnum.X))
			{
				result = (KeyCode)120;
			}
			else if (value.Equals(KeyEnum.Y))
			{
				result = (KeyCode)121;
			}
			else if (value.Equals(KeyEnum.Z))
			{
				result = (KeyCode)122;
			}
			else if (value.Equals(KeyEnum.Alpha1))
			{
				result = (KeyCode)49;
			}
			else if (value.Equals(KeyEnum.Alpha2))
			{
				result = (KeyCode)50;
			}
			else if (value.Equals(KeyEnum.Alpha3))
			{
				result = (KeyCode)51;
			}
			else if (value.Equals(KeyEnum.Alpha4))
			{
				result = (KeyCode)52;
			}
			else if (value.Equals(KeyEnum.Alpha5))
			{
				result = (KeyCode)53;
			}
			else if (value.Equals(KeyEnum.Alpha6))
			{
				result = (KeyCode)54;
			}
			else if (value.Equals(KeyEnum.Alpha7))
			{
				result = (KeyCode)55;
			}
			else if (value.Equals(KeyEnum.Alpha8))
			{
				result = (KeyCode)56;
			}
			else if (value.Equals(KeyEnum.Alpha9))
			{
				result = (KeyCode)57;
			}
			else if (value.Equals(KeyEnum.Alpha0))
			{
				result = (KeyCode)48;
			}
			else if (value.Equals(KeyEnum.CapsLock))
			{
				result = (KeyCode)301;
			}
			else if (value.Equals(KeyEnum.RightShift))
			{
				result = (KeyCode)303;
			}
			else if (value.Equals(KeyEnum.LeftShift))
			{
				result = (KeyCode)304;
			}
			else if (value.Equals(KeyEnum.RightControl))
			{
				result = (KeyCode)305;
			}
			else if (value.Equals(KeyEnum.LeftControl))
			{
				result = (KeyCode)306;
			}
			else if (value.Equals(KeyEnum.RightAlt))
			{
				result = (KeyCode)307;
			}
			else if (value.Equals(KeyEnum.LeftAlt))
			{
				result = (KeyCode)308;
			}
			else if (value.Equals(KeyEnum.Mouse1))
			{
				result = (KeyCode)323;
			}
			else if (value.Equals(KeyEnum.Mouse2))
			{
				result = (KeyCode)324;
			}
			else if (value.Equals(KeyEnum.Mouse3))
			{
				result = (KeyCode)325;
			}
			else if (value.Equals(KeyEnum.Mouse4))
			{
				result = (KeyCode)326;
			}
			else if (value.Equals(KeyEnum.Mouse5))
			{
				result = (KeyCode)327;
			}
			else if (value.Equals(KeyEnum.Mouse6))
			{
				result = (KeyCode)328;
			}
			else if (value.Equals(KeyEnum.Mouse7))
			{
				result = (KeyCode)329;
			}
			else
			{
				if (value.Equals(KeyEnum.BackQuote))
				{
					return (KeyCode)96;
				}
				if (value.Equals(KeyEnum.EqualsSign))
				{
					return (KeyCode)61;
				}
				if (value.Equals(KeyEnum.Minus))
				{
					return (KeyCode)45;
				}
				if (value.Equals(KeyEnum.LeftBracket))
				{
					return (KeyCode)91;
				}
				if (value.Equals(KeyEnum.RightBracket))
				{
					return (KeyCode)93;
				}
				if (value.Equals(KeyEnum.Semicolon))
				{
					return (KeyCode)59;
				}
				if (value.Equals(KeyEnum.Quote))
				{
					return (KeyCode)39;
				}
				if (value.Equals(KeyEnum.Comma))
				{
					return (KeyCode)44;
				}
				if (value.Equals(KeyEnum.Period))
				{
					return (KeyCode)46;
				}
				if (value.Equals(KeyEnum.Slash))
				{
					return (KeyCode)47;
				}
				if (value.Equals(KeyEnum.Backslash))
				{
					return (KeyCode)92;
				}
				if (value.Equals(KeyEnum.Numlock))
				{
					return (KeyCode)300;
				}
				if (value.Equals(KeyEnum.KeypadDivide))
				{
					return (KeyCode)267;
				}
				if (value.Equals(KeyEnum.KeypadMultiply))
				{
					return (KeyCode)268;
				}
				if (value.Equals(KeyEnum.KeypadMinus))
				{
					return (KeyCode)269;
				}
				if (value.Equals(KeyEnum.KeypadPlus))
				{
					return (KeyCode)270;
				}
				if (value.Equals(KeyEnum.KeypadEnter))
				{
					return (KeyCode)271;
				}
				if (value.Equals(KeyEnum.KeypadPeriod))
				{
					return (KeyCode)266;
				}
				if (value.Equals(KeyEnum.Keypad0))
				{
					return (KeyCode)256;
				}
				if (value.Equals(KeyEnum.Keypad1))
				{
					return (KeyCode)257;
				}
				if (value.Equals(KeyEnum.Keypad2))
				{
					return (KeyCode)258;
				}
				if (value.Equals(KeyEnum.Keypad3))
				{
					return (KeyCode)259;
				}
				if (value.Equals(KeyEnum.Keypad4))
				{
					return (KeyCode)260;
				}
				if (value.Equals(KeyEnum.Keypad5))
				{
					return (KeyCode)261;
				}
				if (value.Equals(KeyEnum.Keypad6))
				{
					return (KeyCode)262;
				}
				if (value.Equals(KeyEnum.Keypad7))
				{
					return (KeyCode)263;
				}
				if (value.Equals(KeyEnum.Keypad8))
				{
					return (KeyCode)264;
				}
				if (value.Equals(KeyEnum.Keypad9))
				{
					return (KeyCode)265;
				}
				if (value.Equals(KeyEnum.Home))
				{
					return (KeyCode)278;
				}
				if (value.Equals(KeyEnum.End))
				{
					return (KeyCode)279;
				}
				if (value.Equals(KeyEnum.PageUp))
				{
					return (KeyCode)280;
				}
				if (value.Equals(KeyEnum.PageDown))
				{
					return (KeyCode)281;
				}
				if (value.Equals(KeyEnum.Enter))
				{
					return (KeyCode)13;
				}
				if (value.Equals(KeyEnum.F1))
				{
					return (KeyCode)282;
				}
				if (value.Equals(KeyEnum.F2))
				{
					return (KeyCode)283;
				}
				if (value.Equals(KeyEnum.F3))
				{
					return (KeyCode)284;
				}
				if (value.Equals(KeyEnum.F4))
				{
					return (KeyCode)285;
				}
				if (value.Equals(KeyEnum.F5))
				{
					return (KeyCode)286;
				}
				if (value.Equals(KeyEnum.F6))
				{
					return (KeyCode)287;
				}
				if (value.Equals(KeyEnum.F7))
				{
					return (KeyCode)288;
				}
				if (value.Equals(KeyEnum.F8))
				{
					return (KeyCode)289;
				}
				if (value.Equals(KeyEnum.F9))
				{
					return (KeyCode)290;
				}
				if (value.Equals(KeyEnum.F10))
				{
					return (KeyCode)291;
				}
				if (value.Equals(KeyEnum.F11))
				{
					return (KeyCode)292;
				}
				if (value.Equals(KeyEnum.F12))
				{
					return (KeyCode)293;
				}
				if (value.Equals(KeyEnum.F13))
				{
					return (KeyCode)294;
				}
				if (value.Equals(KeyEnum.F14))
				{
					return (KeyCode)295;
				}
				if (value.Equals(KeyEnum.F15))
				{
					return (KeyCode)296;
				}
			}
			return result;
		}

		private static void SetDisplayNames(EnumField<KeyEnum> field)
		{
			field.SetEnumDisplayName(KeyEnum.Minus, "-");
			field.SetEnumDisplayName(KeyEnum.EqualsSign, "=");
			field.SetEnumDisplayName(KeyEnum.LeftBracket, "[");
			field.SetEnumDisplayName(KeyEnum.RightBracket, "]");
			field.SetEnumDisplayName(KeyEnum.CapsLock, "Caps Lock");
			field.SetEnumDisplayName(KeyEnum.LeftShift, "Left Shift");
			field.SetEnumDisplayName(KeyEnum.RightShift, "Right Shift");
			field.SetEnumDisplayName(KeyEnum.LeftControl, "Left Control");
			field.SetEnumDisplayName(KeyEnum.RightControl, "Right Control");
			field.SetEnumDisplayName(KeyEnum.LeftAlt, "Left Alt");
			field.SetEnumDisplayName(KeyEnum.RightAlt, "Right Alt");
			field.SetEnumDisplayName(KeyEnum.BackQuote, "`");
			field.SetEnumDisplayName(KeyEnum.Quote, "'");
			field.SetEnumDisplayName(KeyEnum.Semicolon, ";");
			field.SetEnumDisplayName(KeyEnum.Slash, "/");
			field.SetEnumDisplayName(KeyEnum.Backslash, "\\");
			field.SetEnumDisplayName(KeyEnum.Keypad0, "Keypad 0");
			field.SetEnumDisplayName(KeyEnum.Keypad1, "Keypad 1");
			field.SetEnumDisplayName(KeyEnum.Keypad2, "Keypad 2");
			field.SetEnumDisplayName(KeyEnum.Keypad3, "Keypad 3");
			field.SetEnumDisplayName(KeyEnum.Keypad4, "Keypad 4");
			field.SetEnumDisplayName(KeyEnum.Keypad5, "Keypad 5");
			field.SetEnumDisplayName(KeyEnum.Keypad6, "Keypad 6");
			field.SetEnumDisplayName(KeyEnum.Keypad7, "Keypad 7");
			field.SetEnumDisplayName(KeyEnum.Keypad8, "Keypad 8");
			field.SetEnumDisplayName(KeyEnum.Keypad9, "Keypad 9");
			field.SetEnumDisplayName(KeyEnum.KeypadDivide, "Keypad /");
			field.SetEnumDisplayName(KeyEnum.KeypadMultiply, "Keypad *");
			field.SetEnumDisplayName(KeyEnum.KeypadPlus, "Keypad Plus");
			field.SetEnumDisplayName(KeyEnum.KeypadMinus, "Keypad Minus");
			field.SetEnumDisplayName(KeyEnum.KeypadEnter, "Keypad Enter");
			field.SetEnumDisplayName(KeyEnum.KeypadPeriod, "Keypad .");
			field.SetEnumDisplayName(KeyEnum.Period, ".");
			field.SetEnumDisplayName(KeyEnum.Comma, ",");
			field.SetEnumDisplayName(KeyEnum.PageUp, "Page Up");
			field.SetEnumDisplayName(KeyEnum.PageDown, "Page Down");
			field.SetEnumDisplayName(KeyEnum.UpArrow, "Up Arrow");
			field.SetEnumDisplayName(KeyEnum.DownArrow, "Down Arrow");
			field.SetEnumDisplayName(KeyEnum.LeftArrow, "Left Arrow");
			field.SetEnumDisplayName(KeyEnum.RightArrow, "Right Arrow");
			field.SetEnumDisplayName(KeyEnum.Alpha0, "0");
			field.SetEnumDisplayName(KeyEnum.Alpha1, "1");
			field.SetEnumDisplayName(KeyEnum.Alpha2, "2");
			field.SetEnumDisplayName(KeyEnum.Alpha3, "3");
			field.SetEnumDisplayName(KeyEnum.Alpha4, "4");
			field.SetEnumDisplayName(KeyEnum.Alpha5, "5");
			field.SetEnumDisplayName(KeyEnum.Alpha6, "6");
			field.SetEnumDisplayName(KeyEnum.Alpha7, "7");
			field.SetEnumDisplayName(KeyEnum.Alpha8, "8");
			field.SetEnumDisplayName(KeyEnum.Alpha9, "9");
			field.SetEnumDisplayName(KeyEnum.Mouse1, "Mouse 1");
			field.SetEnumDisplayName(KeyEnum.Mouse2, "Mouse 2");
			field.SetEnumDisplayName(KeyEnum.Mouse3, "Mouse 3");
			field.SetEnumDisplayName(KeyEnum.Mouse4, "Mouse 4");
			field.SetEnumDisplayName(KeyEnum.Mouse5, "Mouse 5");
			field.SetEnumDisplayName(KeyEnum.Mouse6, "Mouse 6");
			field.SetEnumDisplayName(KeyEnum.Mouse7, "Mouse 7");
		}

		public static void WeaponVariantBindsConfig()
		{
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Expected O, but got Unknown
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Expected O, but got Unknown
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Expected O, but got Unknown
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Expected O, but got Unknown
			//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_00ca: Expected O, but got Unknown
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Expected O, but got Unknown
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Expected O, but got Unknown
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Expected O, but got Unknown
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_0253: Unknown result type (might be due to invalid IL or missing references)
			//IL_0258: Unknown result type (might be due to invalid IL or missing references)
			//IL_026a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0271: Expected O, but got Unknown
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bf: Expected O, but got Unknown
			//IL_0287: Unknown result type (might be due to invalid IL or missing references)
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0292: Expected O, but got Unknown
			//IL_0306: Unknown result type (might be due to invalid IL or missing references)
			//IL_030d: Expected O, but got Unknown
			//IL_02d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02da: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e0: Expected O, but got Unknown
			//IL_036f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0376: Expected O, but got Unknown
			//IL_037f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0386: Expected O, but got Unknown
			//IL_0392: Unknown result type (might be due to invalid IL or missing references)
			//IL_0323: Unknown result type (might be due to invalid IL or missing references)
			//IL_0328: Unknown result type (might be due to invalid IL or missing references)
			//IL_032e: Expected O, but got Unknown
			//IL_03e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0439: Unknown result type (might be due to invalid IL or missing references)
			//IL_043e: Unknown result type (might be due to invalid IL or missing references)
			//IL_048c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0491: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04aa: Expected O, but got Unknown
			//IL_04f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f8: Expected O, but got Unknown
			//IL_04c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cb: Expected O, but got Unknown
			//IL_053f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0546: Expected O, but got Unknown
			//IL_050e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0513: Unknown result type (might be due to invalid IL or missing references)
			//IL_0519: Expected O, but got Unknown
			//IL_05a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05af: Expected O, but got Unknown
			//IL_05b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05bf: Expected O, but got Unknown
			//IL_05cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_055c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0561: Unknown result type (might be due to invalid IL or missing references)
			//IL_0567: Expected O, but got Unknown
			//IL_061f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0624: Unknown result type (might be due to invalid IL or missing references)
			//IL_0672: Unknown result type (might be due to invalid IL or missing references)
			//IL_0677: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_06dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e3: Expected O, but got Unknown
			//IL_072a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0731: Expected O, but got Unknown
			//IL_06f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0704: Expected O, but got Unknown
			//IL_0778: Unknown result type (might be due to invalid IL or missing references)
			//IL_077f: Expected O, but got Unknown
			//IL_0747: Unknown result type (might be due to invalid IL or missing references)
			//IL_074c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0752: Expected O, but got Unknown
			//IL_07e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e8: Expected O, but got Unknown
			//IL_07f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f8: Expected O, but got Unknown
			//IL_0804: Unknown result type (might be due to invalid IL or missing references)
			//IL_0795: Unknown result type (might be due to invalid IL or missing references)
			//IL_079a: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a0: Expected O, but got Unknown
			//IL_0858: Unknown result type (might be due to invalid IL or missing references)
			//IL_085d: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_08fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0903: Unknown result type (might be due to invalid IL or missing references)
			//IL_0915: Unknown result type (might be due to invalid IL or missing references)
			//IL_091c: Expected O, but got Unknown
			//IL_0963: Unknown result type (might be due to invalid IL or missing references)
			//IL_096a: Expected O, but got Unknown
			//IL_0932: Unknown result type (might be due to invalid IL or missing references)
			//IL_0937: Unknown result type (might be due to invalid IL or missing references)
			//IL_093d: Expected O, but got Unknown
			//IL_09b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b8: Expected O, but got Unknown
			//IL_0980: Unknown result type (might be due to invalid IL or missing references)
			//IL_0985: Unknown result type (might be due to invalid IL or missing references)
			//IL_098b: Expected O, but got Unknown
			//IL_0a1a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a21: Expected O, but got Unknown
			//IL_0a2a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a31: Expected O, but got Unknown
			//IL_0a3d: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d9: Expected O, but got Unknown
			//IL_0a91: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a96: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b37: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b3c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b4e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b55: Expected O, but got Unknown
			//IL_0b9c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ba3: Expected O, but got Unknown
			//IL_0b6b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b70: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b76: Expected O, but got Unknown
			//IL_0bea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bf1: Expected O, but got Unknown
			//IL_0bb9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bbe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bc4: Expected O, but got Unknown
			//IL_0c07: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c0c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c12: Expected O, but got Unknown
			PluginConfigurator val = PluginConfigurator.Create("WeaponVariantBinds", "WeaponVariantBinds");
			val.SetIconWithURL(Path.Combine(DefaultParentFolder, "icon.png") ?? "");
			BoolField val2 = new BoolField(val.rootPanel, "Mod Enabled", "modEnabled", true);
			ConfigDivision division = new ConfigDivision(val.rootPanel, "division");
			val2.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e)
			{
				Plugin.modEnabled = e.value;
				((ConfigField)division).interactable = e.value;
			};
			Plugin.modEnabled = val2.value;
			((ConfigField)division).interactable = val2.value;
			BoolField val3 = new BoolField((ConfigPanel)(object)division, "Swap variation ignores autoswitch?", "swapVariationIgnoreMod", true);
			object obj = <>c.<>9__4_1;
			if (obj == null)
			{
				BoolValueChangeEventDelegate val4 = delegate(BoolValueChangeEvent e)
				{
					Plugin.SwapVariationIgnoreMod = e.value;
				};
				<>c.<>9__4_1 = val4;
				obj = (object)val4;
			}
			val3.onValueChange += (BoolValueChangeEventDelegate)obj;
			Plugin.SwapVariationIgnoreMod = val3.value;
			BoolField val5 = new BoolField((ConfigPanel)(object)division, "Scroll variation ignores autoswitch?", "scrollVariationIgnoreMod", true);
			object obj2 = <>c.<>9__4_2;
			if (obj2 == null)
			{
				BoolValueChangeEventDelegate val6 = delegate(BoolValueChangeEvent e)
				{
					Plugin.ScrollVariationIgnoreMod = e.value;
				};
				<>c.<>9__4_2 = val6;
				obj2 = (object)val6;
			}
			val5.onValueChange += (BoolValueChangeEventDelegate)obj2;
			Plugin.ScrollVariationIgnoreMod = val5.value;
			ConfigPanel val7 = new ConfigPanel((ConfigPanel)(object)division, "Revolver", "revolverPanel");
			ConfigHeader val8 = new ConfigHeader(val7, "These settings are based off of the weapon order that you have set in the weapon terminal for this weapon.", 24);
			val8.textSize = 16;
			val8.textColor = Color.white;
			EnumField<KeyEnum> val9 = new EnumField<KeyEnum>(val7, "Revolver Variant 1 Bind", "revolverVariant1Bind", KeyEnum.None);
			val9.onValueChange += delegate(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[0, 0] = convertKeyEnumToKeyCode(e.value);
			};
			Plugin.weaponKeyCodes[0, 0] = convertKeyEnumToKeyCode(val9.value);
			EnumField<KeyEnum> val10 = new EnumField<KeyEnum>(val7, "Revolver Variant 2 Bind", "revolverVariant2Bind", KeyEnum.None);
			val10.onValueChange += delegate(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[0, 1] = convertKeyEnumToKeyCode(e.value);
			};
			Plugin.weaponKeyCodes[0, 1] = convertKeyEnumToKeyCode(val10.value);
			EnumField<KeyEnum> val11 = new EnumField<KeyEnum>(val7, "Revolver Variant 3 Bind", "revolverVariant3Bind", KeyEnum.None);
			val11.onValueChange += delegate(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[0, 2] = convertKeyEnumToKeyCode(e.value);
			};
			Plugin.weaponKeyCodes[0, 2] = convertKeyEnumToKeyCode(val11.value);
			BoolField val12 = new BoolField(val7, "Autoswitch Variant 1 in Cycle", "ignoreRevolver1InCycle", false);
			object obj3 = <>c.<>9__4_6;
			if (obj3 == null)
			{
				BoolValueChangeEventDelegate val13 = delegate(BoolValueChangeEvent e)
				{
					Plugin.ignoreWeaponInCycle[0, 0] = e.value;
				};
				<>c.<>9__4_6 = val13;
				obj3 = (object)val13;
			}
			val12.onValueChange += (BoolValueChangeEventDelegate)obj3;
			Plugin.ignoreWeaponInCycle[0, 0] = val12.value;
			BoolField val14 = new BoolField(val7, "Autoswitch Variant 2 in Cycle", "ignoreRevolver2InCycle", false);
			object obj4 = <>c.<>9__4_7;
			if (obj4 == null)
			{
				BoolValueChangeEventDelegate val15 = delegate(BoolValueChangeEvent e)
				{
					Plugin.ignoreWeaponInCycle[0, 1] = e.value;
				};
				<>c.<>9__4_7 = val15;
				obj4 = (object)val15;
			}
			val14.onValueChange += (BoolValueChangeEventDelegate)obj4;
			Plugin.ignoreWeaponInCycle[0, 1] = val14.value;
			BoolField val16 = new BoolField(val7, "Autoswitch Variant 3 in Cycle", "ignoreRevolver3InCycle", false);
			object obj5 = <>c.<>9__4_8;
			if (obj5 == null)
			{
				BoolValueChangeEventDelegate val17 = delegate(BoolValueChangeEvent e)
				{
					Plugin.ignoreWeaponInCycle[0, 2] = e.value;
				};
				<>c.<>9__4_8 = val17;
				obj5 = (object)val17;
			}
			val16.onValueChange += (BoolValueChangeEventDelegate)obj5;
			Plugin.ignoreWeaponInCycle[0, 2] = val16.value;
			SetDisplayNames(val9);
			SetDisplayNames(val10);
			SetDisplayNames(val11);
			ConfigPanel val18 = new ConfigPanel((ConfigPanel)(object)division, "Shotgun", "shotgunPanel");
			ConfigHeader val19 = new ConfigHeader(val18, "These settings are based off of the weapon order that you have set in the weapon terminal for this weapon.", 24);
			val19.textSize = 16;
			val19.textColor = Color.white;
			EnumField<KeyEnum> val20 = new EnumField<KeyEnum>(val18, "Shotgun Variant 1 Bind", "shotgunVariant1Bind", KeyEnum.None);
			val20.onValueChange += delegate(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[1, 0] = convertKeyEnumToKeyCode(e.value);
			};
			Plugin.weaponKeyCodes[1, 0] = convertKeyEnumToKeyCode(val20.value);
			EnumField<KeyEnum> val21 = new EnumField<KeyEnum>(val18, "Shotgun Variant 2 Bind", "shotgunVariant2Bind", KeyEnum.None);
			val21.onValueChange += delegate(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[1, 1] = convertKeyEnumToKeyCode(e.value);
			};
			Plugin.weaponKeyCodes[1, 1] = convertKeyEnumToKeyCode(val21.value);
			EnumField<KeyEnum> val22 = new EnumField<KeyEnum>(val18, "Shotgun Variant 3 Bind", "shotgunVariant3Bind", KeyEnum.None);
			val22.onValueChange += delegate(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[1, 2] = convertKeyEnumToKeyCode(e.value);
			};
			Plugin.weaponKeyCodes[1, 2] = convertKeyEnumToKeyCode(val22.value);
			BoolField val23 = new BoolField(val18, "Autoswitch Variant 1 in Cycle", "ignoreShotgun1InCycle", false);
			object obj6 = <>c.<>9__4_12;
			if (obj6 == null)
			{
				BoolValueChangeEventDelegate val24 = delegate(BoolValueChangeEvent e)
				{
					Plugin.ignoreWeaponInCycle[1, 0] = e.value;
				};
				<>c.<>9__4_12 = val24;
				obj6 = (object)val24;
			}
			val23.onValueChange += (BoolValueChangeEventDelegate)obj6;
			Plugin.ignoreWeaponInCycle[1, 0] = val23.value;
			BoolField val25 = new BoolField(val18, "Autoswitch Variant 2 in Cycle", "ignoreShotgun2InCycle", false);
			object obj7 = <>c.<>9__4_13;
			if (obj7 == null)
			{
				BoolValueChangeEventDelegate val26 = delegate(BoolValueChangeEvent e)
				{
					Plugin.ignoreWeaponInCycle[1, 1] = e.value;
				};
				<>c.<>9__4_13 = val26;
				obj7 = (object)val26;
			}
			val25.onValueChange += (BoolValueChangeEventDelegate)obj7;
			Plugin.ignoreWeaponInCycle[1, 1] = val25.value;
			BoolField val27 = new BoolField(val18, "Autoswitch Variant 3 in Cycle", "ignoreShotgun3InCycle", false);
			object obj8 = <>c.<>9__4_14;
			if (obj8 == null)
			{
				BoolValueChangeEventDelegate val28 = delegate(BoolValueChangeEvent e)
				{
					Plugin.ignoreWeaponInCycle[1, 2] = e.value;
				};
				<>c.<>9__4_14 = val28;
				obj8 = (object)val28;
			}
			val27.onValueChange += (BoolValueChangeEventDelegate)obj8;
			Plugin.ignoreWeaponInCycle[1, 2] = val27.value;
			SetDisplayNames(val20);
			SetDisplayNames(val21);
			SetDisplayNames(val22);
			ConfigPanel val29 = new ConfigPanel((ConfigPanel)(object)division, "Nailgun", "nailgunPanel");
			ConfigHeader val30 = new ConfigHeader(val29, "These settings are based off of the weapon order that you have set in the weapon terminal for this weapon.", 24);
			val30.textSize = 16;
			val30.textColor = Color.white;
			EnumField<KeyEnum> val31 = new EnumField<KeyEnum>(val29, "Nailgun Variant 1 Bind", "nailgunVariant1Bind", KeyEnum.None);
			val31.onValueChange += delegate(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[2, 0] = convertKeyEnumToKeyCode(e.value);
			};
			Plugin.weaponKeyCodes[2, 0] = convertKeyEnumToKeyCode(val31.value);
			EnumField<KeyEnum> val32 = new EnumField<KeyEnum>(val29, "Nailgun Variant 2 Bind", "nailgunVariant2Bind", KeyEnum.None);
			val32.onValueChange += delegate(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[2, 1] = convertKeyEnumToKeyCode(e.value);
			};
			Plugin.weaponKeyCodes[2, 1] = convertKeyEnumToKeyCode(val32.value);
			EnumField<KeyEnum> val33 = new EnumField<KeyEnum>(val29, "Nailgun Variant 3 Bind", "nailgunVariant3Bind", KeyEnum.None);
			val33.onValueChange += delegate(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[2, 2] = convertKeyEnumToKeyCode(e.value);
			};
			Plugin.weaponKeyCodes[2, 2] = convertKeyEnumToKeyCode(val33.value);
			BoolField val34 = new BoolField(val29, "Autoswitch Variant 1 in Cycle", "ignoreNailgun1InCycle", false);
			object obj9 = <>c.<>9__4_18;
			if (obj9 == null)
			{
				BoolValueChangeEventDelegate val35 = delegate(BoolValueChangeEvent e)
				{
					Plugin.ignoreWeaponInCycle[2, 0] = e.value;
				};
				<>c.<>9__4_18 = val35;
				obj9 = (object)val35;
			}
			val34.onValueChange += (BoolValueChangeEventDelegate)obj9;
			Plugin.ignoreWeaponInCycle[2, 0] = val34.value;
			BoolField val36 = new BoolField(val29, "Autoswitch Variant 2 in Cycle", "ignoreNailgun2InCycle", false);
			object obj10 = <>c.<>9__4_19;
			if (obj10 == null)
			{
				BoolValueChangeEventDelegate val37 = delegate(BoolValueChangeEvent e)
				{
					Plugin.ignoreWeaponInCycle[2, 1] = e.value;
				};
				<>c.<>9__4_19 = val37;
				obj10 = (object)val37;
			}
			val36.onValueChange += (BoolValueChangeEventDelegate)obj10;
			Plugin.ignoreWeaponInCycle[2, 1] = val36.value;
			BoolField val38 = new BoolField(val29, "Autoswitch Variant 3 in Cycle", "ignoreNailgun3InCycle", false);
			object obj11 = <>c.<>9__4_20;
			if (obj11 == null)
			{
				BoolValueChangeEventDelegate val39 = delegate(BoolValueChangeEvent e)
				{
					Plugin.ignoreWeaponInCycle[2, 2] = e.value;
				};
				<>c.<>9__4_20 = val39;
				obj11 = (object)val39;
			}
			val38.onValueChange += (BoolValueChangeEventDelegate)obj11;
			Plugin.ignoreWeaponInCycle[2, 2] = val38.value;
			SetDisplayNames(val31);
			SetDisplayNames(val32);
			SetDisplayNames(val33);
			ConfigPanel val40 = new ConfigPanel((ConfigPanel)(object)division, "Railcannon", "railcannonPanel");
			ConfigHeader val41 = new ConfigHeader(val40, "These settings are based off of the weapon order that you have set in the weapon terminal for this weapon.", 24);
			val41.textSize = 16;
			val41.textColor = Color.white;
			EnumField<KeyEnum> val42 = new EnumField<KeyEnum>(val40, "Railcannon Variant 1 Bind", "railcannonVariant1Bind", KeyEnum.None);
			val42.onValueChange += delegate(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[3, 0] = convertKeyEnumToKeyCode(e.value);
			};
			Plugin.weaponKeyCodes[3, 0] = convertKeyEnumToKeyCode(val42.value);
			EnumField<KeyEnum> val43 = new EnumField<KeyEnum>(val40, "Railcannon Variant 2 Bind", "railcannonVariant2Bind", KeyEnum.None);
			val43.onValueChange += delegate(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[3, 1] = convertKeyEnumToKeyCode(e.value);
			};
			Plugin.weaponKeyCodes[3, 1] = convertKeyEnumToKeyCode(val43.value);
			EnumField<KeyEnum> val44 = new EnumField<KeyEnum>(val40, "Railcannon Variant 3 Bind", "railcannonVariant3Bind", KeyEnum.None);
			val44.onValueChange += delegate(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[3, 2] = convertKeyEnumToKeyCode(e.value);
			};
			Plugin.weaponKeyCodes[3, 2] = convertKeyEnumToKeyCode(val44.value);
			BoolField val45 = new BoolField(val40, "Autoswitch Variant 1 in Cycle", "ignoreRailcannon1InCycle", false);
			object obj12 = <>c.<>9__4_24;
			if (obj12 == null)
			{
				BoolValueChangeEventDelegate val46 = delegate(BoolValueChangeEvent e)
				{
					Plugin.ignoreWeaponInCycle[3, 0] = e.value;
				};
				<>c.<>9__4_24 = val46;
				obj12 = (object)val46;
			}
			val45.onValueChange += (BoolValueChangeEventDelegate)obj12;
			Plugin.ignoreWeaponInCycle[3, 0] = val45.value;
			BoolField val47 = new BoolField(val40, "Autoswitch Variant 2 in Cycle", "ignoreRailcannon2InCycle", false);
			object obj13 = <>c.<>9__4_25;
			if (obj13 == null)
			{
				BoolValueChangeEventDelegate val48 = delegate(BoolValueChangeEvent e)
				{
					Plugin.ignoreWeaponInCycle[3, 1] = e.value;
				};
				<>c.<>9__4_25 = val48;
				obj13 = (object)val48;
			}
			val47.onValueChange += (BoolValueChangeEventDelegate)obj13;
			Plugin.ignoreWeaponInCycle[3, 1] = val47.value;
			BoolField val49 = new BoolField(val40, "Autoswitch Variant 3 in Cycle", "ignoreRailcannon3InCycle", false);
			object obj14 = <>c.<>9__4_26;
			if (obj14 == null)
			{
				BoolValueChangeEventDelegate val50 = delegate(BoolValueChangeEvent e)
				{
					Plugin.ignoreWeaponInCycle[3, 2] = e.value;
				};
				<>c.<>9__4_26 = val50;
				obj14 = (object)val50;
			}
			val49.onValueChange += (BoolValueChangeEventDelegate)obj14;
			Plugin.ignoreWeaponInCycle[3, 2] = val49.value;
			SetDisplayNames(val42);
			SetDisplayNames(val43);
			SetDisplayNames(val44);
			ConfigPanel val51 = new ConfigPanel((ConfigPanel)(object)division, "Rocket Launcher", "rocket_launcherPanel");
			ConfigHeader val52 = new ConfigHeader(val51, "These settings are based off of the weapon order that you have set in the weapon terminal for this weapon.", 24);
			val52.textSize = 16;
			val52.textColor = Color.white;
			EnumField<KeyEnum> val53 = new EnumField<KeyEnum>(val51, "Rocket Launcher Variant 1 Bind", "rocket_launcherVariant1Bind", KeyEnum.None);
			val53.onValueChange += delegate(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[4, 0] = convertKeyEnumToKeyCode(e.value);
			};
			Plugin.weaponKeyCodes[4, 0] = convertKeyEnumToKeyCode(val53.value);
			EnumField<KeyEnum> val54 = new EnumField<KeyEnum>(val51, "Rocket Launcher Variant 2 Bind", "rocket_launcherVariant2Bind", KeyEnum.None);
			val54.onValueChange += delegate(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[4, 1] = convertKeyEnumToKeyCode(e.value);
			};
			Plugin.weaponKeyCodes[4, 1] = convertKeyEnumToKeyCode(val54.value);
			EnumField<KeyEnum> val55 = new EnumField<KeyEnum>(val51, "Rocket Launcher Variant 3 Bind", "rocket_launcherVariant3Bind", KeyEnum.None);
			val55.onValueChange += delegate(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				Plugin.weaponKeyCodes[4, 2] = convertKeyEnumToKeyCode(e.value);
			};
			Plugin.weaponKeyCodes[4, 2] = convertKeyEnumToKeyCode(val55.value);
			BoolField val56 = new BoolField(val51, "Autoswitch Variant 1 in Cycle", "ignoreRocket_launcher1InCycle", false);
			object obj15 = <>c.<>9__4_30;
			if (obj15 == null)
			{
				BoolValueChangeEventDelegate val57 = delegate(BoolValueChangeEvent e)
				{
					Plugin.ignoreWeaponInCycle[4, 0] = e.value;
				};
				<>c.<>9__4_30 = val57;
				obj15 = (object)val57;
			}
			val56.onValueChange += (BoolValueChangeEventDelegate)obj15;
			Plugin.ignoreWeaponInCycle[4, 0] = val56.value;
			BoolField val58 = new BoolField(val51, "Autoswitch Variant 2 in Cycle", "ignoreRocket_launcher2InCycle", false);
			object obj16 = <>c.<>9__4_31;
			if (obj16 == null)
			{
				BoolValueChangeEventDelegate val59 = delegate(BoolValueChangeEvent e)
				{
					Plugin.ignoreWeaponInCycle[4, 1] = e.value;
				};
				<>c.<>9__4_31 = val59;
				obj16 = (object)val59;
			}
			val58.onValueChange += (BoolValueChangeEventDelegate)obj16;
			Plugin.ignoreWeaponInCycle[4, 1] = val58.value;
			BoolField val60 = new BoolField(val51, "Autoswitch Variant 3 in Cycle", "ignoreRocket_launcher3InCycle", false);
			object obj17 = <>c.<>9__4_32;
			if (obj17 == null)
			{
				BoolValueChangeEventDelegate val61 = delegate(BoolValueChangeEvent e)
				{
					Plugin.ignoreWeaponInCycle[4, 2] = e.value;
				};
				<>c.<>9__4_32 = val61;
				obj17 = (object)val61;
			}
			val60.onValueChange += (BoolValueChangeEventDelegate)obj17;
			Plugin.ignoreWeaponInCycle[4, 2] = val60.value;
			SetDisplayNames(val53);
			SetDisplayNames(val54);
			SetDisplayNames(val55);
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "WeaponVariantBinds";

		public const string PLUGIN_NAME = "WeaponVariantBinds";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}