Decompiled source of Tanuki Atlyss FluffUtilities v1.0.8

BepInEx/plugins/Tanuki.Atlyss.FluffUtilities.dll

Decompiled a week ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Text;
using BepInEx;
using BepInEx.Configuration;
using Microsoft.CodeAnalysis;
using Mirror;
using Nessie.ATLYSS.EasySettings;
using Tanuki.Atlyss.API.Commands;
using Tanuki.Atlyss.Core.Plugins;
using Tanuki.Atlyss.FluffUtilities.Components;
using Tanuki.Atlyss.FluffUtilities.Managers;
using Tanuki.Atlyss.FluffUtilities.Models.Configuration;
using Tanuki.Atlyss.Game;
using Tanuki.Atlyss.Game.Events.AtlyssNetworkManager;
using Tanuki.Atlyss.Game.Events.GameManager;
using Tanuki.Atlyss.Game.Events.ItemObject;
using Tanuki.Atlyss.Game.Events.LoadSceneManager;
using Tanuki.Atlyss.Game.Events.Player;
using Tanuki.Atlyss.Game.Events.PlayerCasting;
using Tanuki.Atlyss.Game.Events.PlayerMove;
using Tanuki.Atlyss.Game.Events.ScriptablePlayerRace;
using Tanuki.Atlyss.Game.Events.StatusEntity;
using Tanuki.Atlyss.Game.Extensions;
using Tanuki.Atlyss.Game.Fields;
using UnityEngine;
using UnityEngine.Events;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("Tanuki.Atlyss.FluffUtilities")]
[assembly: AssemblyDescription("A multifunctional plugin for the game Atlyss.")]
[assembly: AssemblyCompany("Tanuki")]
[assembly: AssemblyProduct("Tanuki.Atlyss.FluffUtilities")]
[assembly: AssemblyCopyright("Copyright © Tanuki 2025")]
[assembly: ComVisible(false)]
[assembly: Guid("cc8615a7-47a4-4321-be79-11e36887b64a")]
[assembly: AssemblyFileVersion("1.0.8")]
[assembly: TargetFramework(".NETFramework,Version=v4.8.1", FrameworkDisplayName = ".NET Framework 4.8.1")]
[assembly: AssemblyVersion("1.0.8.0")]
[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 Tanuki.Atlyss.FluffUtilities
{
	internal class Configuration
	{
		public static Configuration Instance;

		public Tanuki.Atlyss.FluffUtilities.Models.Configuration.Commands Commands;

		public Tanuki.Atlyss.FluffUtilities.Models.Configuration.PlayerAppearance PlayerAppearance;

		public Tanuki.Atlyss.FluffUtilities.Models.Configuration.GlobalRaceDisplayParameters GlobalRaceDisplayParameters;

		public Tanuki.Atlyss.FluffUtilities.Models.Configuration.FreeCamera FreeCamera;

		public Hotkeys Hotkeys;

		private Configuration()
		{
		}

		public static void Initialize()
		{
			if (Instance == null)
			{
				Instance = new Configuration();
			}
		}

		public void Load(ConfigFile ConfigFile)
		{
			Commands = new Tanuki.Atlyss.FluffUtilities.Models.Configuration.Commands(ref ConfigFile);
			PlayerAppearance = new Tanuki.Atlyss.FluffUtilities.Models.Configuration.PlayerAppearance(ref ConfigFile);
			GlobalRaceDisplayParameters = new Tanuki.Atlyss.FluffUtilities.Models.Configuration.GlobalRaceDisplayParameters(ref ConfigFile);
			FreeCamera = new Tanuki.Atlyss.FluffUtilities.Models.Configuration.FreeCamera(ref ConfigFile);
			Hotkeys = new Hotkeys(ref ConfigFile);
		}
	}
	[BepInPlugin("cc8615a7-47a4-4321-be79-11e36887b64a", "Tanuki.Atlyss.FluffUtilities", "1.0.8")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Main : Plugin
	{
		[CompilerGenerated]
		private sealed class <AnnounceUsage>d__8 : IEnumerator<object>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private object <>2__current;

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

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

			[DebuggerHidden]
			public <AnnounceUsage>d__8(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_002c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0036: Expected O, but got Unknown
				//IL_005b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0065: Expected O, but got Unknown
				//IL_008a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0094: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(0.2f);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					Player._mainPlayer._pVisual.Cmd_VanitySparkleEffect();
					<>2__current = (object)new WaitForSeconds(0.3f);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					Player._mainPlayer._pVisual.Cmd_PoofSmokeEffect();
					<>2__current = (object)new WaitForSeconds(0.3f);
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -1;
					Player._mainPlayer._pVisual.Cmd_PlayTeleportEffect();
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		internal static Main Instance;

		private bool Reloaded;

		private bool UsageAnnounced = true;

		internal void Awake()
		{
			Instance = this;
			Configuration.Initialize();
			Configuration.Instance.Load(((BaseUnityPlugin)this).Config);
			Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Initialize();
			Tanuki.Atlyss.FluffUtilities.Managers.GlobalRaceDisplayParameters.Initialize();
			Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Initialize();
			Hotkey.Initialize();
			NessieEasySettings.Initialize();
		}

		protected override void Load()
		{
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Expected O, but got Unknown
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Expected O, but got Unknown
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Tanuki.Atlyss.FluffUtilities by Timofey Tanuki / tanu.su");
			if (Reloaded)
			{
				((BaseUnityPlugin)this).Config.Reload();
				Configuration.Instance.Load(((BaseUnityPlugin)this).Config);
			}
			Main.Instance.Patch(new Type[4]
			{
				typeof(Enable_GroundCheckToVelocityZero_Postfix),
				typeof(Init_LoadScreenDisable_Postfix),
				typeof(OnStopClient_Prefix),
				typeof(OnStartAuthority_Postfix)
			});
			Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.Load();
			Tanuki.Atlyss.FluffUtilities.Managers.GlobalRaceDisplayParameters.Instance.Load();
			Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.Reload();
			OnStartAuthority_Postfix.OnInvoke += new EventHandler(OnStartAuthority_Postfix_OnInvoke);
			Init_LoadScreenDisable_Postfix.OnInvoke += new EventHandler(Init_LoadScreenDisable_Postfix_OnInvoke);
			ReloadHotkeys();
		}

		internal void ReloadHotkeys()
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: 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_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: 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_0233: Unknown result type (might be due to invalid IL or missing references)
			//IL_0275: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_033b: 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_03bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0401: Unknown result type (might be due to invalid IL or missing references)
			//IL_0443: Unknown result type (might be due to invalid IL or missing references)
			//IL_0485: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c7: 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_0546: Unknown result type (might be due to invalid IL or missing references)
			//IL_0583: Unknown result type (might be due to invalid IL or missing references)
			Hotkey.Instance.Reset();
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_HeadWidth.Increase.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyHeadWidth(Configuration.Instance.Hotkeys.PlayerAppearance_HeadWidth.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_HeadWidth.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_HeadWidth.Decrease.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyHeadWidth(0f - Configuration.Instance.Hotkeys.PlayerAppearance_HeadWidth.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_HeadWidth.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_MuzzleLength.Increase.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyMuzzleLength(Configuration.Instance.Hotkeys.PlayerAppearance_MuzzleLength.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_MuzzleLength.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_MuzzleLength.Decrease.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyMuzzleLength(0f - Configuration.Instance.Hotkeys.PlayerAppearance_MuzzleLength.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_MuzzleLength.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_Height.Increase.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyHeight(Configuration.Instance.Hotkeys.PlayerAppearance_Height.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_Height.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_Height.Decrease.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyHeight(0f - Configuration.Instance.Hotkeys.PlayerAppearance_Height.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_Height.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_Width.Increase.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyWidth(Configuration.Instance.Hotkeys.PlayerAppearance_Width.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_Width.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_Width.Decrease.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyWidth(0f - Configuration.Instance.Hotkeys.PlayerAppearance_Width.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_Width.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_TorsoSize.Increase.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyTorsoSize(Configuration.Instance.Hotkeys.PlayerAppearance_TorsoSize.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_TorsoSize.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_TorsoSize.Decrease.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyTorsoSize(0f - Configuration.Instance.Hotkeys.PlayerAppearance_TorsoSize.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_TorsoSize.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_BreastSize.Increase.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyBreastSize(Configuration.Instance.Hotkeys.PlayerAppearance_BreastSize.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_BreastSize.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_BreastSize.Decrease.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyBreastSize(0f - Configuration.Instance.Hotkeys.PlayerAppearance_BreastSize.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_BreastSize.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_ArmsSize.Increase.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyArmsSize(Configuration.Instance.Hotkeys.PlayerAppearance_ArmsSize.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_ArmsSize.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_ArmsSize.Decrease.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyArmsSize(0f - Configuration.Instance.Hotkeys.PlayerAppearance_ArmsSize.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_ArmsSize.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_BellySize.Increase.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyBellySize(Configuration.Instance.Hotkeys.PlayerAppearance_BellySize.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_BellySize.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_BellySize.Decrease.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyBellySize(0f - Configuration.Instance.Hotkeys.PlayerAppearance_BellySize.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_BellySize.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_BottomSize.Increase.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyBottomSize(Configuration.Instance.Hotkeys.PlayerAppearance_BottomSize.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_BottomSize.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_BottomSize.Decrease.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyBottomSize(0f - Configuration.Instance.Hotkeys.PlayerAppearance_BottomSize.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_BottomSize.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_VoicePitch.Increase.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyVoicePitch(Configuration.Instance.Hotkeys.PlayerAppearance_VoicePitch.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_VoicePitch.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.PlayerAppearance_VoicePitch.Decrease.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.ModifyVoicePitch(0f - Configuration.Instance.Hotkeys.PlayerAppearance_VoicePitch.Step.Value, Configuration.Instance.Hotkeys.PlayerAppearance_VoicePitch.UpdateCharacterFile.Value);
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.FreeCamera_Toggle_Default.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					if (Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.Status && Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.CharacterControlsDisabled)
					{
						Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.Disable();
					}
					else
					{
						Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.Enable(DisableCharacterControls: true);
					}
				}
			});
			Hotkey.Instance.BindAction(Configuration.Instance.Hotkeys.FreeCamera_Toggle_WithControls.Value, delegate
			{
				if (Object.op_Implicit((Object)(object)Player._mainPlayer))
				{
					if (Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.Status && !Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.CharacterControlsDisabled)
					{
						Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.Disable();
					}
					else
					{
						Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.Enable(DisableCharacterControls: false);
					}
				}
			});
		}

		private void Init_LoadScreenDisable_Postfix_OnInvoke()
		{
			if (!UsageAnnounced && !Player._mainPlayer._isHostPlayer)
			{
				UsageAnnounced = true;
				((MonoBehaviour)this).StartCoroutine(AnnounceUsage());
			}
		}

		private void OnStartAuthority_Postfix_OnInvoke()
		{
			UsageAnnounced = false;
		}

		[IteratorStateMachine(typeof(<AnnounceUsage>d__8))]
		private IEnumerator AnnounceUsage()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <AnnounceUsage>d__8(0);
		}

		protected override void Unload()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Expected O, but got Unknown
			Reloaded = true;
			OnStartAuthority_Postfix.OnInvoke -= new EventHandler(OnStartAuthority_Postfix_OnInvoke);
			Init_LoadScreenDisable_Postfix.OnInvoke -= new EventHandler(Init_LoadScreenDisable_Postfix_OnInvoke);
			Tanuki.Atlyss.FluffUtilities.Managers.PlayerAppearance.Instance.Unload();
			Tanuki.Atlyss.FluffUtilities.Managers.GlobalRaceDisplayParameters.Instance.Unload();
			Hotkey.Instance.Reset();
		}
	}
}
namespace Tanuki.Atlyss.FluffUtilities.Models.Configuration
{
	internal class Commands
	{
		private const string Section = "Commands";

		public ConfigEntry<string> SteamProfile_LinkTemplate = ConfigFile.Bind<string>("Commands", "SteamProfile_LinkTemplate", "https://steamcommunity.com/profiles/{0}", (ConfigDescription)null);

		public Commands(ref ConfigFile ConfigFile)
		{
		}
	}
	internal class FreeCamera
	{
		private const string Section = "FreeCamera";

		public ConfigEntry<float> BaseSpeed = ConfigFile.Bind<float>("FreeCamera", "BaseSpeed", 20f, (ConfigDescription)null);

		public ConfigEntry<float> ScrollSpeedStep = ConfigFile.Bind<float>("FreeCamera", "ScrollSpeedStep", 5f, (ConfigDescription)null);

		public FreeCamera(ref ConfigFile ConfigFile)
		{
		}
	}
	internal class Hotkeys
	{
		public class PlayerAppearanceHotkey
		{
			public ConfigEntry<float> Step = ConfigFile.Bind<float>("Hotkeys", Name + "_Step", Step, (ConfigDescription)null);

			public ConfigEntry<bool> UpdateCharacterFile = ConfigFile.Bind<bool>("Hotkeys", Name + "_UpdateCharacterFile", UpdateCharacterFile, (ConfigDescription)null);

			public ConfigEntry<KeyCode> Increase = ConfigFile.Bind<KeyCode>("Hotkeys", Name + "_Increase", Increase, (ConfigDescription)null);

			public ConfigEntry<KeyCode> Decrease = ConfigFile.Bind<KeyCode>("Hotkeys", Name + "_Decrease", Decrease, (ConfigDescription)null);

			public PlayerAppearanceHotkey(ref ConfigFile ConfigFile, string Name, float Step, bool UpdateCharacterFile, KeyCode Decrease, KeyCode Increase)
			{
			}//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)

		}

		private const string Section = "Hotkeys";

		public PlayerAppearanceHotkey PlayerAppearance_HeadWidth = new PlayerAppearanceHotkey(ref ConfigFile, "HeadWidth", 0.25f, UpdateCharacterFile: true, (KeyCode)263, (KeyCode)265);

		public PlayerAppearanceHotkey PlayerAppearance_MuzzleLength = new PlayerAppearanceHotkey(ref ConfigFile, "MuzzleLength", 25f, UpdateCharacterFile: true, (KeyCode)0, (KeyCode)0);

		public PlayerAppearanceHotkey PlayerAppearance_Height = new PlayerAppearanceHotkey(ref ConfigFile, "Height", 0.1f, UpdateCharacterFile: true, (KeyCode)0, (KeyCode)0);

		public PlayerAppearanceHotkey PlayerAppearance_Width = new PlayerAppearanceHotkey(ref ConfigFile, "Width", 0.1f, UpdateCharacterFile: true, (KeyCode)0, (KeyCode)0);

		public PlayerAppearanceHotkey PlayerAppearance_TorsoSize = new PlayerAppearanceHotkey(ref ConfigFile, "TorsoSize", 25f, UpdateCharacterFile: true, (KeyCode)0, (KeyCode)0);

		public PlayerAppearanceHotkey PlayerAppearance_BreastSize = new PlayerAppearanceHotkey(ref ConfigFile, "BreastSize", 25f, UpdateCharacterFile: true, (KeyCode)260, (KeyCode)262);

		public PlayerAppearanceHotkey PlayerAppearance_ArmsSize = new PlayerAppearanceHotkey(ref ConfigFile, "ArmsSize", 25f, UpdateCharacterFile: true, (KeyCode)0, (KeyCode)0);

		public PlayerAppearanceHotkey PlayerAppearance_BellySize = new PlayerAppearanceHotkey(ref ConfigFile, "BellySize", 25f, UpdateCharacterFile: true, (KeyCode)258, (KeyCode)261);

		public PlayerAppearanceHotkey PlayerAppearance_BottomSize = new PlayerAppearanceHotkey(ref ConfigFile, "BottomSize", 25f, UpdateCharacterFile: true, (KeyCode)257, (KeyCode)259);

		public PlayerAppearanceHotkey PlayerAppearance_VoicePitch = new PlayerAppearanceHotkey(ref ConfigFile, "VoicePitch", 0.01f, UpdateCharacterFile: true, (KeyCode)0, (KeyCode)0);

		public ConfigEntry<KeyCode> FreeCamera_Toggle_Default = ConfigFile.Bind<KeyCode>("Hotkeys", "FreeCamera_Toggle_Default", (KeyCode)279, (ConfigDescription)null);

		public ConfigEntry<KeyCode> FreeCamera_Toggle_WithControls = ConfigFile.Bind<KeyCode>("Hotkeys", "FreeCamera_Toggle_WithControls", (KeyCode)0, (ConfigDescription)null);

		public ConfigEntry<KeyCode> FreeCamera_Forward = ConfigFile.Bind<KeyCode>("Hotkeys", "FreeCamera_Forward", (KeyCode)119, (ConfigDescription)null);

		public ConfigEntry<KeyCode> FreeCamera_Right = ConfigFile.Bind<KeyCode>("Hotkeys", "FreeCamera_Right", (KeyCode)100, (ConfigDescription)null);

		public ConfigEntry<KeyCode> FreeCamera_Backward = ConfigFile.Bind<KeyCode>("Hotkeys", "FreeCamera_Backward", (KeyCode)115, (ConfigDescription)null);

		public ConfigEntry<KeyCode> FreeCamera_Left = ConfigFile.Bind<KeyCode>("Hotkeys", "FreeCamera_Left", (KeyCode)97, (ConfigDescription)null);

		public ConfigEntry<KeyCode> FreeCamera_Up = ConfigFile.Bind<KeyCode>("Hotkeys", "FreeCamera_Up", (KeyCode)32, (ConfigDescription)null);

		public ConfigEntry<KeyCode> FreeCamera_Down = ConfigFile.Bind<KeyCode>("Hotkeys", "FreeCamera_Down", (KeyCode)304, (ConfigDescription)null);

		public Hotkeys(ref ConfigFile ConfigFile)
		{
		}
	}
	internal class PlayerAppearance
	{
		private const string Section = "PlayerAppearance";

		public ConfigEntry<bool> DisableParametersCheck = ConfigFile.Bind<bool>("PlayerAppearance", "DisableParametersCheck", true, (ConfigDescription)null);

		public PlayerAppearance(ref ConfigFile ConfigFile)
		{
		}
	}
	internal class GlobalRaceDisplayParameters
	{
		public class RangeParameter
		{
			public ConfigEntry<float> Minimum = ConfigFile.Bind<float>("GlobalRaceDisplayParameters", Name + "_Minimum", Minimum, (ConfigDescription)null);

			public ConfigEntry<float> Maximum = ConfigFile.Bind<float>("GlobalRaceDisplayParameters", Name + "_Maximum", Maximum, (ConfigDescription)null);

			public Vector2 AsVector2 => new Vector2(Minimum.Value, Maximum.Value);

			public RangeParameter(ref ConfigFile ConfigFile, string Name, float Minimum, float Maximum)
			{
			}
		}

		private const string Section = "GlobalRaceDisplayParameters";

		public ConfigEntry<bool> Override = ConfigFile.Bind<bool>("GlobalRaceDisplayParameters", "Enabled", true, (ConfigDescription)null);

		public RangeParameter HeadWidth = new RangeParameter(ref ConfigFile, "HeadWidth", 0f, 4f);

		public RangeParameter MuzzleLength = new RangeParameter(ref ConfigFile, "MuzzleLength", -500f, 1000f);

		public RangeParameter Height = new RangeParameter(ref ConfigFile, "Height", 0f, 5f);

		public RangeParameter Width = new RangeParameter(ref ConfigFile, "Width", 0f, 5f);

		public RangeParameter TorsoSize = new RangeParameter(ref ConfigFile, "TorsoSize", -100f, 1000f);

		public RangeParameter BreastSize = new RangeParameter(ref ConfigFile, "BreastSize", -100f, 1000f);

		public RangeParameter ArmsSize = new RangeParameter(ref ConfigFile, "ArmsSize", -200f, 1000f);

		public RangeParameter BellySize = new RangeParameter(ref ConfigFile, "BellySize", -300f, 1000f);

		public RangeParameter BottomSize = new RangeParameter(ref ConfigFile, "BottomSize", -300f, 1000f);

		public RangeParameter VoicePitch = new RangeParameter(ref ConfigFile, "VoicePitch", 0.05f, 3f);

		public GlobalRaceDisplayParameters(ref ConfigFile ConfigFile)
		{
		}
	}
}
namespace Tanuki.Atlyss.FluffUtilities.Managers
{
	internal class FreeCamera
	{
		public static FreeCamera Instance;

		private Tanuki.Atlyss.FluffUtilities.Components.FreeCamera Component;

		public bool Status;

		public bool CharacterControlsDisabled;

		public KeyCode Forward;

		public KeyCode Right;

		public KeyCode Backward;

		public KeyCode Left;

		public KeyCode Up;

		public KeyCode Down;

		public float Speed;

		public float ScrollSpeedStep;

		private FreeCamera()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			OnStopClient_Prefix.OnInvoke += new EventHandler(OnStopClient_Prefix_OnInvoke);
		}

		public static void Initialize()
		{
			if (Instance == null)
			{
				Instance = new FreeCamera();
			}
		}

		public void Reload()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: 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_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			Forward = Configuration.Instance.Hotkeys.FreeCamera_Forward.Value;
			Right = Configuration.Instance.Hotkeys.FreeCamera_Right.Value;
			Backward = Configuration.Instance.Hotkeys.FreeCamera_Backward.Value;
			Left = Configuration.Instance.Hotkeys.FreeCamera_Left.Value;
			Up = Configuration.Instance.Hotkeys.FreeCamera_Up.Value;
			Down = Configuration.Instance.Hotkeys.FreeCamera_Down.Value;
			Speed = Configuration.Instance.FreeCamera.BaseSpeed.Value;
			ScrollSpeedStep = Configuration.Instance.FreeCamera.ScrollSpeedStep.Value;
		}

		public void Enable(bool DisableCharacterControls)
		{
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			if (Component == null)
			{
				Component = ((Component)CameraFunction._current._mainCamera).gameObject.GetComponent<Tanuki.Atlyss.FluffUtilities.Components.FreeCamera>();
				if (Component == null)
				{
					Component = ((Component)CameraFunction._current._mainCamera).gameObject.AddComponent<Tanuki.Atlyss.FluffUtilities.Components.FreeCamera>();
				}
			}
			if (!Status)
			{
				Component.Speed = Speed;
			}
			Status = true;
			CharacterControlsDisabled = DisableCharacterControls;
			if (DisableCharacterControls)
			{
				((Behaviour)Player._mainPlayer._pMove).enabled = false;
				((Behaviour)Player._mainPlayer._pCombat).enabled = false;
			}
			Tanuki.Atlyss.FluffUtilities.Components.FreeCamera component = Component;
			Quaternion rotation = ((Component)CameraFunction._current._mainCamera).transform.rotation;
			component.Rotation = ((Quaternion)(ref rotation)).eulerAngles;
			((Behaviour)Component).enabled = true;
			((Behaviour)CameraFunction._current).enabled = false;
			((Behaviour)CameraCollision._current).enabled = false;
			Cursor.lockState = (CursorLockMode)1;
			Cursor.visible = false;
		}

		public void Disable()
		{
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			if (Status)
			{
				if (CharacterControlsDisabled)
				{
					((Behaviour)Player._mainPlayer._pMove).enabled = true;
					((Behaviour)Player._mainPlayer._pCombat).enabled = true;
					Player._mainPlayer._pCasting.Init_SkillLibrary();
				}
				((Behaviour)CameraFunction._current).enabled = true;
				((Behaviour)CameraCollision._current).enabled = true;
				((Component)CameraFunction._current._mainCamera).transform.rotation = ((Component)CameraFunction._current).transform.localRotation;
				CameraFunction._current.CameraReset_Lerp();
				Status = false;
				((Behaviour)Component).enabled = false;
			}
		}

		private void OnStopClient_Prefix_OnInvoke()
		{
			if (Status)
			{
				Disable();
			}
			Object.Destroy((Object)(object)Component);
			Component = null;
		}
	}
	internal class GlobalRaceDisplayParameters
	{
		public static GlobalRaceDisplayParameters Instance;

		private bool Enabled;

		private bool Reloaded;

		private GlobalRaceDisplayParameters()
		{
		}

		public static void Initialize()
		{
			if (Instance == null)
			{
				Instance = new GlobalRaceDisplayParameters();
			}
		}

		public void Load()
		{
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Expected O, but got Unknown
			Enabled = Configuration.Instance.PlayerAppearance.DisableParametersCheck.Value;
			if (Enabled)
			{
				if (Reloaded)
				{
					Override();
					return;
				}
				Main.Instance.Patch(typeof(Cache_ScriptableAssets_Postfix));
				Cache_ScriptableAssets_Postfix.OnInvoke += new EventHandler(Override);
			}
		}

		public void Unload()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Expected O, but got Unknown
			Reloaded = true;
			if (Enabled)
			{
				Cache_ScriptableAssets_Postfix.OnInvoke -= new EventHandler(Override);
			}
		}

		public void Override()
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			foreach (ScriptablePlayerRace value in GameManager.Instance.CachedScriptableRaces.Values)
			{
				CharacterParamsGroup raceDisplayParams = value._raceDisplayParams;
				raceDisplayParams._headWidthRange = Configuration.Instance.GlobalRaceDisplayParameters.HeadWidth.AsVector2;
				raceDisplayParams._headModRange = Configuration.Instance.GlobalRaceDisplayParameters.MuzzleLength.AsVector2;
				raceDisplayParams._heightRange = Configuration.Instance.GlobalRaceDisplayParameters.Height.AsVector2;
				raceDisplayParams._widthRange = Configuration.Instance.GlobalRaceDisplayParameters.Width.AsVector2;
				raceDisplayParams._torsoRange = Configuration.Instance.GlobalRaceDisplayParameters.TorsoSize.AsVector2;
				raceDisplayParams._boobRange = Configuration.Instance.GlobalRaceDisplayParameters.BreastSize.AsVector2;
				raceDisplayParams._armRange = Configuration.Instance.GlobalRaceDisplayParameters.ArmsSize.AsVector2;
				raceDisplayParams._bellyRange = Configuration.Instance.GlobalRaceDisplayParameters.BellySize.AsVector2;
				raceDisplayParams._bottomRange = Configuration.Instance.GlobalRaceDisplayParameters.BottomSize.AsVector2;
				raceDisplayParams._pitchRange = Configuration.Instance.GlobalRaceDisplayParameters.VoicePitch.AsVector2;
			}
		}
	}
	internal class Hotkey : MonoBehaviour
	{
		private class HotkeyActionGroup : IComparable<HotkeyActionGroup>
		{
			public KeyCode KeyCode;

			public HashSet<Action> Actions;

			public HotkeyActionGroup(KeyCode KeyCode)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				this.KeyCode = KeyCode;
				Actions = new HashSet<Action>();
				base..ctor();
			}

			public int CompareTo(HotkeyActionGroup HotkeyActionGroup)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				return ((Enum)(KeyCode)(ref KeyCode)).CompareTo((object?)HotkeyActionGroup.KeyCode);
			}
		}

		public static Hotkey Instance;

		private readonly SortedSet<HotkeyActionGroup> HotkeyActionGroups;

		private readonly IInputSystem InputSystem;

		private Hotkey()
		{
			HotkeyActionGroups = new SortedSet<HotkeyActionGroup>();
			InputSystem = UnityInput.Current;
		}

		public static void Initialize()
		{
			if (Instance == null)
			{
				Instance = ((Component)Main.Instance).gameObject.AddComponent<Hotkey>();
				Object.DontDestroyOnLoad((Object)(object)Instance);
			}
		}

		public void BindAction(KeyCode KeyCode, Action Action)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			if ((int)KeyCode != 0)
			{
				HotkeyActionGroup hotkeyActionGroup = HotkeyActionGroups.Where((HotkeyActionGroup x) => x.KeyCode == KeyCode).SingleOrDefault();
				if (hotkeyActionGroup == null)
				{
					hotkeyActionGroup = new HotkeyActionGroup(KeyCode);
					HotkeyActionGroups.Add(hotkeyActionGroup);
				}
				hotkeyActionGroup.Actions.Add(Action);
				((Behaviour)this).enabled = true;
			}
		}

		public void UnbindAction(Action Action)
		{
			List<HotkeyActionGroup> list = new List<HotkeyActionGroup>();
			foreach (HotkeyActionGroup hotkeyActionGroup in HotkeyActionGroups)
			{
				hotkeyActionGroup.Actions.Remove(Action);
				if (hotkeyActionGroup.Actions.Count <= 0)
				{
					list.Add(hotkeyActionGroup);
				}
			}
			list.ForEach(delegate(HotkeyActionGroup x)
			{
				HotkeyActionGroups.Remove(x);
			});
		}

		public void UnbindAction(KeyCode KeyCode, Action Action)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			HotkeyActionGroup hotkeyActionGroup = HotkeyActionGroups.Where((HotkeyActionGroup x) => x.KeyCode == KeyCode).SingleOrDefault();
			if (hotkeyActionGroup != null)
			{
				hotkeyActionGroup.Actions.Remove(Action);
				if (hotkeyActionGroup.Actions.Count == 0)
				{
					HotkeyActionGroups.Remove(hotkeyActionGroup);
				}
			}
		}

		public void Reset()
		{
			((Behaviour)this).enabled = false;
			HotkeyActionGroups.Clear();
		}

		private void Awake()
		{
			((Behaviour)this).enabled = false;
		}

		private void Update()
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			foreach (HotkeyActionGroup hotkeyActionGroup in HotkeyActionGroups)
			{
				if (!InputSystem.GetKeyDown(hotkeyActionGroup.KeyCode))
				{
					continue;
				}
				foreach (Action action in hotkeyActionGroup.Actions)
				{
					action();
				}
			}
		}
	}
	internal class NessieEasySettings
	{
		internal static NessieEasySettings Instance;

		private NessieEasySettings()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			Settings.OnInitialized.AddListener(new UnityAction(NessieEasySettings_OnInitialize));
			Settings.OnApplySettings.AddListener(new UnityAction(NessieEasySettings_OnApplySettings));
		}

		public static void Initialize()
		{
			if (Instance == null)
			{
				Instance = new NessieEasySettings();
			}
		}

		private void NessieEasySettings_OnInitialize()
		{
			SettingsTab modTab = Settings.ModTab;
			modTab.AddHeader("Tanuki.Atlyss.FluffUtilities");
			modTab.AddToggle("Disable player appearance parameters check", Configuration.Instance.PlayerAppearance.DisableParametersCheck);
			modTab.AddSpace();
			modTab.AddKeyButton("Free camera", Configuration.Instance.Hotkeys.FreeCamera_Toggle_Default);
			modTab.AddKeyButton("Free camera (with controls)", Configuration.Instance.Hotkeys.FreeCamera_Toggle_WithControls);
			modTab.AddKeyButton("Free camera • Forward", Configuration.Instance.Hotkeys.FreeCamera_Forward);
			modTab.AddKeyButton("Free camera • Right", Configuration.Instance.Hotkeys.FreeCamera_Right);
			modTab.AddKeyButton("Free camera • Backward", Configuration.Instance.Hotkeys.FreeCamera_Backward);
			modTab.AddKeyButton("Free camera • Left", Configuration.Instance.Hotkeys.FreeCamera_Left);
			modTab.AddKeyButton("Free camera • Up", Configuration.Instance.Hotkeys.FreeCamera_Up);
			modTab.AddKeyButton("Free camera • Down", Configuration.Instance.Hotkeys.FreeCamera_Down);
			modTab.AddAdvancedSlider("Free camera • Base Speed", Configuration.Instance.FreeCamera.BaseSpeed.Value, 0.01f, 100f, true).OnValueChanged.AddListener((UnityAction<float>)delegate(float Value)
			{
				if (!(Configuration.Instance.FreeCamera.BaseSpeed.Value >= Value))
				{
					Configuration.Instance.FreeCamera.BaseSpeed.Value = Value;
				}
			});
			modTab.AddAdvancedSlider("Free camera • Scroll Speed Step", Configuration.Instance.FreeCamera.ScrollSpeedStep.Value, 0.01f, 25f, true).OnValueChanged.AddListener((UnityAction<float>)delegate(float Value)
			{
				if (!(Configuration.Instance.FreeCamera.ScrollSpeedStep.Value >= Value))
				{
					Configuration.Instance.FreeCamera.ScrollSpeedStep.Value = Value;
				}
			});
			modTab.AddSpace();
			modTab.AddKeyButton("Head Width • Decrease", Configuration.Instance.Hotkeys.PlayerAppearance_HeadWidth.Decrease);
			modTab.AddKeyButton("Head Width • Increase", Configuration.Instance.Hotkeys.PlayerAppearance_HeadWidth.Increase);
			modTab.AddToggle("Head Width • Update Character File", Configuration.Instance.Hotkeys.PlayerAppearance_HeadWidth.UpdateCharacterFile);
			modTab.AddAdvancedSlider("Head Width • Step", Configuration.Instance.Hotkeys.PlayerAppearance_HeadWidth.Step.Value, 0f, Configuration.Instance.GlobalRaceDisplayParameters.HeadWidth.Maximum.Value, false).OnValueChanged.AddListener((UnityAction<float>)delegate(float Value)
			{
				if (!(Configuration.Instance.Hotkeys.PlayerAppearance_HeadWidth.Step.Value >= Value))
				{
					Configuration.Instance.Hotkeys.PlayerAppearance_HeadWidth.Step.Value = (float)Math.Round(Value);
				}
			});
			modTab.AddSpace();
			modTab.AddKeyButton("Muzzle Length • Decrease", Configuration.Instance.Hotkeys.PlayerAppearance_MuzzleLength.Decrease);
			modTab.AddKeyButton("Muzzle Length • Increase", Configuration.Instance.Hotkeys.PlayerAppearance_MuzzleLength.Increase);
			modTab.AddToggle("Muzzle Length • Update Character File", Configuration.Instance.Hotkeys.PlayerAppearance_MuzzleLength.UpdateCharacterFile);
			modTab.AddAdvancedSlider("Muzzle Length • Step", Configuration.Instance.Hotkeys.PlayerAppearance_MuzzleLength.Step.Value, 0f, Configuration.Instance.GlobalRaceDisplayParameters.MuzzleLength.Maximum.Value, false).OnValueChanged.AddListener((UnityAction<float>)delegate(float Value)
			{
				if (!(Configuration.Instance.Hotkeys.PlayerAppearance_MuzzleLength.Step.Value >= Value))
				{
					Configuration.Instance.Hotkeys.PlayerAppearance_MuzzleLength.Step.Value = (float)Math.Round(Value);
				}
			});
			modTab.AddSpace();
			modTab.AddKeyButton("Height • Decrease", Configuration.Instance.Hotkeys.PlayerAppearance_Height.Decrease);
			modTab.AddKeyButton("Height • Increase", Configuration.Instance.Hotkeys.PlayerAppearance_Height.Increase);
			modTab.AddToggle("Height • Update Character File", Configuration.Instance.Hotkeys.PlayerAppearance_Height.UpdateCharacterFile);
			modTab.AddAdvancedSlider("Height • Step", Configuration.Instance.Hotkeys.PlayerAppearance_Height.Step.Value, 0f, Configuration.Instance.GlobalRaceDisplayParameters.Height.Maximum.Value, false).OnValueChanged.AddListener((UnityAction<float>)delegate(float Value)
			{
				if (!(Configuration.Instance.Hotkeys.PlayerAppearance_Height.Step.Value >= Value))
				{
					Configuration.Instance.Hotkeys.PlayerAppearance_Height.Step.Value = (float)Math.Round(Value);
				}
			});
			modTab.AddSpace();
			modTab.AddKeyButton("Width • Decrease", Configuration.Instance.Hotkeys.PlayerAppearance_Width.Decrease);
			modTab.AddKeyButton("Width • Increase", Configuration.Instance.Hotkeys.PlayerAppearance_Width.Increase);
			modTab.AddToggle("Width • Update Character File", Configuration.Instance.Hotkeys.PlayerAppearance_Width.UpdateCharacterFile);
			modTab.AddAdvancedSlider("Width • Step", Configuration.Instance.Hotkeys.PlayerAppearance_Width.Step.Value, 0f, Configuration.Instance.GlobalRaceDisplayParameters.Width.Maximum.Value, false).OnValueChanged.AddListener((UnityAction<float>)delegate(float Value)
			{
				if (!(Configuration.Instance.Hotkeys.PlayerAppearance_Width.Step.Value >= Value))
				{
					Configuration.Instance.Hotkeys.PlayerAppearance_Width.Step.Value = (float)Math.Round(Value);
				}
			});
			modTab.AddSpace();
			modTab.AddKeyButton("Torso Size • Decrease", Configuration.Instance.Hotkeys.PlayerAppearance_TorsoSize.Decrease);
			modTab.AddKeyButton("Torso Size • Increase", Configuration.Instance.Hotkeys.PlayerAppearance_TorsoSize.Increase);
			modTab.AddToggle("Torso Size • Update Character File", Configuration.Instance.Hotkeys.PlayerAppearance_TorsoSize.UpdateCharacterFile);
			modTab.AddAdvancedSlider("Torso Size • Step", Configuration.Instance.Hotkeys.PlayerAppearance_TorsoSize.Step.Value, 0f, Configuration.Instance.GlobalRaceDisplayParameters.TorsoSize.Maximum.Value, false).OnValueChanged.AddListener((UnityAction<float>)delegate(float Value)
			{
				if (!(Configuration.Instance.Hotkeys.PlayerAppearance_TorsoSize.Step.Value >= Value))
				{
					Configuration.Instance.Hotkeys.PlayerAppearance_TorsoSize.Step.Value = (float)Math.Round(Value);
				}
			});
			modTab.AddSpace();
			modTab.AddKeyButton("Breast Size • Decrease", Configuration.Instance.Hotkeys.PlayerAppearance_BreastSize.Decrease);
			modTab.AddKeyButton("Breast Size • Increase", Configuration.Instance.Hotkeys.PlayerAppearance_BreastSize.Increase);
			modTab.AddToggle("Breast Size • Update Character File", Configuration.Instance.Hotkeys.PlayerAppearance_BreastSize.UpdateCharacterFile);
			modTab.AddAdvancedSlider("Breast Size • Step", Configuration.Instance.Hotkeys.PlayerAppearance_BreastSize.Step.Value, 0f, Configuration.Instance.GlobalRaceDisplayParameters.BreastSize.Maximum.Value, false).OnValueChanged.AddListener((UnityAction<float>)delegate(float Value)
			{
				if (!(Configuration.Instance.Hotkeys.PlayerAppearance_BreastSize.Step.Value >= Value))
				{
					Configuration.Instance.Hotkeys.PlayerAppearance_BreastSize.Step.Value = (float)Math.Round(Value);
				}
			});
			modTab.AddSpace();
			modTab.AddKeyButton("Arms Size • Decrease", Configuration.Instance.Hotkeys.PlayerAppearance_ArmsSize.Decrease);
			modTab.AddKeyButton("Arms Size • Increase", Configuration.Instance.Hotkeys.PlayerAppearance_ArmsSize.Increase);
			modTab.AddToggle("Arms Size • Update Character File", Configuration.Instance.Hotkeys.PlayerAppearance_ArmsSize.UpdateCharacterFile);
			modTab.AddAdvancedSlider("Arms Size • Step", Configuration.Instance.Hotkeys.PlayerAppearance_ArmsSize.Step.Value, 0f, Configuration.Instance.GlobalRaceDisplayParameters.ArmsSize.Maximum.Value, false).OnValueChanged.AddListener((UnityAction<float>)delegate(float Value)
			{
				if (!(Configuration.Instance.Hotkeys.PlayerAppearance_ArmsSize.Step.Value >= Value))
				{
					Configuration.Instance.Hotkeys.PlayerAppearance_ArmsSize.Step.Value = (float)Math.Round(Value);
				}
			});
			modTab.AddSpace();
			modTab.AddKeyButton("Belly Size • Decrease", Configuration.Instance.Hotkeys.PlayerAppearance_BellySize.Decrease);
			modTab.AddKeyButton("Belly Size • Increase", Configuration.Instance.Hotkeys.PlayerAppearance_BellySize.Increase);
			modTab.AddToggle("Belly Size • Update Character File", Configuration.Instance.Hotkeys.PlayerAppearance_BellySize.UpdateCharacterFile);
			modTab.AddAdvancedSlider("Belly Size • Step", Configuration.Instance.Hotkeys.PlayerAppearance_BellySize.Step.Value, 0f, Configuration.Instance.GlobalRaceDisplayParameters.BellySize.Maximum.Value, false).OnValueChanged.AddListener((UnityAction<float>)delegate(float Value)
			{
				if (!(Configuration.Instance.Hotkeys.PlayerAppearance_BellySize.Step.Value >= Value))
				{
					Configuration.Instance.Hotkeys.PlayerAppearance_BellySize.Step.Value = (float)Math.Round(Value);
				}
			});
			modTab.AddSpace();
			modTab.AddKeyButton("Bottom Size • Decrease", Configuration.Instance.Hotkeys.PlayerAppearance_BottomSize.Decrease);
			modTab.AddKeyButton("Bottom Size • Increase", Configuration.Instance.Hotkeys.PlayerAppearance_BottomSize.Increase);
			modTab.AddToggle("Bottom Size • Update Character File", Configuration.Instance.Hotkeys.PlayerAppearance_BottomSize.UpdateCharacterFile);
			modTab.AddAdvancedSlider("Bottom Size • Step", Configuration.Instance.Hotkeys.PlayerAppearance_BottomSize.Step.Value, 0f, Configuration.Instance.GlobalRaceDisplayParameters.BottomSize.Maximum.Value, false).OnValueChanged.AddListener((UnityAction<float>)delegate(float Value)
			{
				if (!(Configuration.Instance.Hotkeys.PlayerAppearance_BottomSize.Step.Value >= Value))
				{
					Configuration.Instance.Hotkeys.PlayerAppearance_BottomSize.Step.Value = (float)Math.Round(Value);
				}
			});
			modTab.AddSpace();
			modTab.AddKeyButton("Voice Pitch • Decrease", Configuration.Instance.Hotkeys.PlayerAppearance_VoicePitch.Decrease);
			modTab.AddKeyButton("Voice Pitch • Increase", Configuration.Instance.Hotkeys.PlayerAppearance_VoicePitch.Increase);
			modTab.AddToggle("Voice Pitch • Update Character File", Configuration.Instance.Hotkeys.PlayerAppearance_VoicePitch.UpdateCharacterFile);
			modTab.AddAdvancedSlider("Voice Pitch • Step", Configuration.Instance.Hotkeys.PlayerAppearance_VoicePitch.Step.Value, 0f, Configuration.Instance.GlobalRaceDisplayParameters.VoicePitch.Maximum.Value, false).OnValueChanged.AddListener((UnityAction<float>)delegate(float Value)
			{
				if (!(Configuration.Instance.Hotkeys.PlayerAppearance_VoicePitch.Step.Value >= Value))
				{
					Configuration.Instance.Hotkeys.PlayerAppearance_VoicePitch.Step.Value = (float)Math.Round(Value);
				}
			});
		}

		private void NessieEasySettings_OnApplySettings()
		{
			Configuration.Instance.Load(((BaseUnityPlugin)Main.Instance).Config);
			PlayerAppearance.Instance.Reload();
			FreeCamera.Instance.Reload();
			Main.Instance.ReloadHotkeys();
		}
	}
	internal class PlayerAppearance
	{
		public static PlayerAppearance Instance;

		private bool DisableParameterCheck;

		private PlayerAppearance()
		{
		}

		public static void Initialize()
		{
			if (Instance == null)
			{
				Instance = new PlayerAppearance();
			}
		}

		public void Load()
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			DisableParameterCheck = Configuration.Instance.PlayerAppearance.DisableParametersCheck.Value;
			if (DisableParameterCheck)
			{
				Main.Instance.Patch(typeof(Init_ParamsCheck_Prefix));
				Init_ParamsCheck_Prefix.OnInvoke += new EventHandler(Init_ParamsCheck_Prefix_OnInvoke);
			}
		}

		public void Unload()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Expected O, but got Unknown
			if (DisableParameterCheck)
			{
				Init_ParamsCheck_Prefix.OnInvoke -= new EventHandler(Init_ParamsCheck_Prefix_OnInvoke);
			}
		}

		public void Reload()
		{
			Unload();
			Load();
		}

		private void Init_ParamsCheck_Prefix_OnInvoke(PlayerAppearance_Profile PlayerAppearance, ref bool ShouldAllow)
		{
			ShouldAllow = false;
		}

		private void ApplyPlayerAppearanceStruct(ref PlayerAppearanceStruct PlayerAppearanceStruct)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			Player._mainPlayer._pVisual.Network_playerAppearanceStruct = PlayerAppearanceStruct;
			Player._mainPlayer._pVisual.Apply_NetworkedCharacterDisplay();
			if (!Player._mainPlayer._isHostPlayer)
			{
				Player._mainPlayer._pVisual.Cmd_SendNew_PlayerAppearanceStruct(Player._mainPlayer._pVisual._playerAppearanceStruct);
			}
		}

		public void ModifyBreastSize(float Delta, bool UpdateCharacterFile)
		{
			Player._mainPlayer._pVisual._playerAppearanceStruct._boobWeight += Delta;
			if (UpdateCharacterFile)
			{
				ProfileDataManager._current._characterFile._appearanceProfile._boobWeight = Player._mainPlayer._pVisual._playerAppearanceStruct._boobWeight;
			}
			ApplyPlayerAppearanceStruct(ref Player._mainPlayer._pVisual._playerAppearanceStruct);
		}

		public void ModifyArmsSize(float Delta, bool UpdateCharacterFile)
		{
			Player._mainPlayer._pVisual._playerAppearanceStruct._armWeight += Delta;
			if (UpdateCharacterFile)
			{
				ProfileDataManager._current._characterFile._appearanceProfile._armWeight = Player._mainPlayer._pVisual._playerAppearanceStruct._armWeight;
			}
			ApplyPlayerAppearanceStruct(ref Player._mainPlayer._pVisual._playerAppearanceStruct);
		}

		public void ModifyBellySize(float Delta, bool UpdateCharacterFile)
		{
			Player._mainPlayer._pVisual._playerAppearanceStruct._bellyWeight += Delta;
			if (UpdateCharacterFile)
			{
				ProfileDataManager._current._characterFile._appearanceProfile._bellyWeight = Player._mainPlayer._pVisual._playerAppearanceStruct._bellyWeight;
			}
			ApplyPlayerAppearanceStruct(ref Player._mainPlayer._pVisual._playerAppearanceStruct);
		}

		public void ModifyBottomSize(float Delta, bool UpdateCharacterFile)
		{
			Player._mainPlayer._pVisual._playerAppearanceStruct._bottomWeight += Delta;
			if (UpdateCharacterFile)
			{
				ProfileDataManager._current._characterFile._appearanceProfile._bottomWeight = Player._mainPlayer._pVisual._playerAppearanceStruct._bottomWeight;
			}
			ApplyPlayerAppearanceStruct(ref Player._mainPlayer._pVisual._playerAppearanceStruct);
		}

		public void ModifyTorsoSize(float Delta, bool UpdateCharacterFile)
		{
			Player._mainPlayer._pVisual._playerAppearanceStruct._torsoWeight += Delta;
			if (UpdateCharacterFile)
			{
				ProfileDataManager._current._characterFile._appearanceProfile._torsoWeight = Player._mainPlayer._pVisual._playerAppearanceStruct._torsoWeight;
			}
			ApplyPlayerAppearanceStruct(ref Player._mainPlayer._pVisual._playerAppearanceStruct);
		}

		public void ModifyMuzzleLength(float Delta, bool UpdateCharacterFile)
		{
			Player._mainPlayer._pVisual._playerAppearanceStruct._muzzleWeight += Delta;
			if (UpdateCharacterFile)
			{
				ProfileDataManager._current._characterFile._appearanceProfile._muzzleWeight = Player._mainPlayer._pVisual._playerAppearanceStruct._muzzleWeight;
			}
			ApplyPlayerAppearanceStruct(ref Player._mainPlayer._pVisual._playerAppearanceStruct);
		}

		public void ModifyHeight(float Delta, bool UpdateCharacterFile)
		{
			Player._mainPlayer._pVisual._playerAppearanceStruct._heightWeight += Delta;
			if (UpdateCharacterFile)
			{
				ProfileDataManager._current._characterFile._appearanceProfile._heightWeight = Player._mainPlayer._pVisual._playerAppearanceStruct._heightWeight;
			}
			ApplyPlayerAppearanceStruct(ref Player._mainPlayer._pVisual._playerAppearanceStruct);
		}

		public void ModifyWidth(float Delta, bool UpdateCharacterFile)
		{
			Player._mainPlayer._pVisual._playerAppearanceStruct._widthWeight += Delta;
			if (UpdateCharacterFile)
			{
				ProfileDataManager._current._characterFile._appearanceProfile._widthWeight = Player._mainPlayer._pVisual._playerAppearanceStruct._widthWeight;
			}
			ApplyPlayerAppearanceStruct(ref Player._mainPlayer._pVisual._playerAppearanceStruct);
		}

		public void ModifyHeadWidth(float Delta, bool UpdateCharacterFile)
		{
			Player._mainPlayer._pVisual._playerAppearanceStruct._headWidth += Delta;
			if (UpdateCharacterFile)
			{
				ProfileDataManager._current._characterFile._appearanceProfile._headWidth = Player._mainPlayer._pVisual._playerAppearanceStruct._headWidth;
			}
			ApplyPlayerAppearanceStruct(ref Player._mainPlayer._pVisual._playerAppearanceStruct);
		}

		public void ModifyVoicePitch(float Delta, bool UpdateCharacterFile)
		{
			Player._mainPlayer._pVisual._playerAppearanceStruct._voicePitch += Delta;
			if (UpdateCharacterFile)
			{
				ProfileDataManager._current._characterFile._appearanceProfile._voicePitch = Player._mainPlayer._pVisual._playerAppearanceStruct._voicePitch;
			}
			ApplyPlayerAppearanceStruct(ref Player._mainPlayer._pVisual._playerAppearanceStruct);
		}
	}
}
namespace Tanuki.Atlyss.FluffUtilities.Components
{
	internal class FreeCamera : MonoBehaviour
	{
		public float Speed;

		public Vector3 Rotation;

		private Vector3 PositionShift;

		private IInputSystem InputSystem;

		private void Awake()
		{
			((Behaviour)this).enabled = false;
			InputSystem = UnityInput.Current;
		}

		private void Update()
		{
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: 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_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_023b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0216: Unknown result type (might be due to invalid IL or missing references)
			//IL_0220: Unknown result type (might be due to invalid IL or missing references)
			//IL_0225: Unknown result type (might be due to invalid IL or missing references)
			//IL_022a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0284: Unknown result type (might be due to invalid IL or missing references)
			//IL_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0259: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_0268: Unknown result type (might be due to invalid IL or missing references)
			//IL_026d: Unknown result type (might be due to invalid IL or missing references)
			Rotation.x += InputControlManager.current._altVert_input * CameraFunction._current.inputSensitivity;
			Rotation.y += InputControlManager.current._altHoriz_input * CameraFunction._current.inputSensitivity;
			Rotation.x = Mathf.Clamp(Rotation.x, -89.99f, 89.99f);
			((Component)this).transform.rotation = Quaternion.Euler(Rotation);
			Speed += InputSystem.mouseScrollDelta.y * Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.ScrollSpeedStep;
			if (Speed < 0f)
			{
				Speed = 0f;
			}
			PositionShift = Vector3.zero;
			if (UnityInput.Current.GetKey(Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.Left))
			{
				PositionShift -= ((Component)this).transform.right * Speed * Time.deltaTime;
			}
			else if (UnityInput.Current.GetKey(Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.Right))
			{
				PositionShift += ((Component)this).transform.right * Speed * Time.deltaTime;
			}
			if (UnityInput.Current.GetKey(Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.Forward))
			{
				PositionShift += ((Component)this).transform.forward * Speed * Time.deltaTime;
			}
			else if (UnityInput.Current.GetKey(Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.Backward))
			{
				PositionShift -= ((Component)this).transform.forward * Speed * Time.deltaTime;
			}
			if (UnityInput.Current.GetKey(Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.Up))
			{
				PositionShift += Vector3.up * Speed * Time.deltaTime;
			}
			else if (UnityInput.Current.GetKey(Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.Down))
			{
				PositionShift += Vector3.down * Speed * Time.deltaTime;
			}
			Transform transform = ((Component)this).transform;
			transform.position += PositionShift;
		}
	}
}
namespace Tanuki.Atlyss.FluffUtilities.Commands
{
	internal class FreeCamera : ICommand
	{
		public bool Execute(string[] Arguments)
		{
			if (Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.Status)
			{
				Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.Disable();
				Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockoutSound);
			}
			else
			{
				Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.Enable(DisableCharacterControls: true);
				Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockonSound);
			}
			return false;
		}
	}
	internal class NoSkillCooldown : ICommand, IDisposable
	{
		private bool Status;

		public NoSkillCooldown()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			OnStopClient_Prefix.OnInvoke += new EventHandler(Disable);
		}

		public bool Execute(string[] Arguments)
		{
			if (Status)
			{
				Disable();
				Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockoutSound);
			}
			else
			{
				Enable();
				Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockonSound);
			}
			return false;
		}

		private void Enable()
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			if (!Status)
			{
				Status = true;
				Main.Instance.Patch(typeof(New_CooldownSlot_Prefix));
				New_CooldownSlot_Prefix.OnInvoke += new EventHandler(New_CooldownSlot_Prefix_OnInvoke);
			}
		}

		private void Disable()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Expected O, but got Unknown
			if (Status)
			{
				Status = false;
				New_CooldownSlot_Prefix.OnInvoke -= new EventHandler(New_CooldownSlot_Prefix_OnInvoke);
			}
		}

		private void New_CooldownSlot_Prefix_OnInvoke(PlayerCasting PlayerCasting, ref ScriptableSkill ScriptableSkill, ref bool ShouldAllow)
		{
			if (((NetworkBehaviour)PlayerCasting).isLocalPlayer)
			{
				ShouldAllow = false;
			}
		}

		public void Dispose()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			OnStopClient_Prefix.OnInvoke -= new EventHandler(Disable);
			Disable();
		}
	}
	internal class SteamProfile : ICommand
	{
		public bool Execute(string[] Arguments)
		{
			if (Arguments.Length == 0)
			{
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.SteamProfile.NicknameNotSpecified", Array.Empty<object>()));
				return false;
			}
			string value = string.Join(" ", Arguments.Select((string x) => x.ToLower()));
			Player[] array = Object.FindObjectsOfType<Player>();
			foreach (Player val in array)
			{
				if (!((NetworkBehaviour)val).isLocalPlayer && val._nickname.ToLower().Contains(value))
				{
					Application.OpenURL(string.Format(Configuration.Instance.Commands.SteamProfile_LinkTemplate.Value, val._steamID));
					Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockonSound);
					return false;
				}
			}
			ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.SteamProfile.PlayerNotFound", Array.Empty<object>()));
			return false;
		}
	}
	internal class NoSkillTimer : ICommand, IDisposable
	{
		private bool Status;

		public NoSkillTimer()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			OnStopClient_Prefix.OnInvoke += new EventHandler(Disable);
		}

		public bool Execute(string[] Arguments)
		{
			if (Status)
			{
				Disable();
				Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockoutSound);
			}
			else
			{
				Enable();
				Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockonSound);
			}
			return false;
		}

		private void Enable()
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			if (!Status)
			{
				Status = true;
				Main.Instance.Patch(typeof(Cmd_InitSkill_Postfix));
				Cmd_InitSkill_Postfix.OnInvoke += new EventHandler(Cmd_InitSkill_Postfix_OnInvoke);
			}
		}

		private void Cmd_InitSkill_Postfix_OnInvoke(PlayerCasting PlayerCasting)
		{
			if (((NetworkBehaviour)PlayerCasting).isLocalPlayer && Object.op_Implicit((Object)(object)PlayerCasting._currentCastSkill))
			{
				PlayerCasting._cooldownTimer = 0f;
				PlayerCasting._castTimer = float.MaxValue;
				if (!Player._mainPlayer._isHostPlayer)
				{
					PlayerCasting.Cmd_CastInit();
				}
			}
		}

		private void Disable()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Expected O, but got Unknown
			if (Status)
			{
				Status = false;
				Cmd_InitSkill_Postfix.OnInvoke -= new EventHandler(Cmd_InitSkill_Postfix_OnInvoke);
			}
		}

		public void Dispose()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			OnStopClient_Prefix.OnInvoke -= new EventHandler(Disable);
			Disable();
		}
	}
	internal class AutoPickup : ICommand, IDisposable
	{
		private float Distance;

		private bool Status;

		public AutoPickup()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			OnStopClient_Prefix.OnInvoke += new EventHandler(Disable);
		}

		public bool Execute(string[] Arguments)
		{
			if (Arguments.Length != 0)
			{
				if (!float.TryParse(Arguments[0], NumberStyles.Any, CultureInfo.InvariantCulture, out Distance))
				{
					ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.AutoPickup.DistanceNotFloat", Array.Empty<object>()));
					return false;
				}
				if (Distance > 0f)
				{
					Enable();
					ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.AutoPickup.Enabled", new object[1] { Distance }));
					Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockonSound);
					return false;
				}
			}
			if (Status)
			{
				Disable();
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.AutoPickup.Disabled", Array.Empty<object>()));
				Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockoutSound);
			}
			else
			{
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.AutoPickup.DistanceNotSpecified", Array.Empty<object>()));
			}
			return false;
		}

		private void Enable()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Expected O, but got Unknown
			if (!Status)
			{
				Status = true;
				Enable_GroundCheckToVelocityZero_Postfix.OnInvoke += new EventHandler(Enable_GroundCheckToVelocityZero);
			}
		}

		private void Disable()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Expected O, but got Unknown
			if (Status)
			{
				Status = false;
				Enable_GroundCheckToVelocityZero_Postfix.OnInvoke -= new EventHandler(Enable_GroundCheckToVelocityZero);
			}
		}

		private void Enable_GroundCheckToVelocityZero(ItemObject ItemObject)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			if (!ItemObject._isPickedUp && ItemObject._canPickUp && !(Vector3.Distance(((Component)Player._mainPlayer).transform.position, ((Component)ItemObject._interactableCollider).transform.position) > Distance))
			{
				ItemObject.Init_PickupItem(((NetworkBehaviour)Player._mainPlayer).netIdentity);
			}
		}

		public void Dispose()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			OnStopClient_Prefix.OnInvoke -= new EventHandler(Disable);
			Disable();
		}
	}
	internal class Currency : ICommand
	{
		public bool Execute(string[] Arguments)
		{
			if (Arguments.Length == 0)
			{
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Currency.DeltaNotSpecified", Array.Empty<object>()));
				return false;
			}
			if (!int.TryParse(Arguments[0], out var result))
			{
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Currency.DeltaNotInteger", Array.Empty<object>()));
				return false;
			}
			if (result < 0)
			{
				Player._mainPlayer._pInventory.Cmd_SubtractCurrency(-result);
			}
			else
			{
				Player._mainPlayer._pInventory.Cmd_AddCurrency(result);
			}
			return false;
		}
	}
	internal class Disenchant : ICommand
	{
		public bool Execute(string[] Arguments)
		{
			ItemData item = PlayerInventory.GetItem(Player._mainPlayer._pInventory, 0, false, (ItemType)0);
			if (item == null)
			{
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Disenchant.FirstEquipmentSlotIsEmpty", Array.Empty<object>()));
				return false;
			}
			item._modifierID = 0;
			item._useDamageTypeOverride = false;
			Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockonSound);
			return false;
		}
	}
	internal class Enchant : ICommand
	{
		public bool Execute(string[] Arguments)
		{
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Expected O, but got Unknown
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			ItemData item = PlayerInventory.GetItem(Player._mainPlayer._pInventory, 0, false, (ItemType)0);
			if (item == null)
			{
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Enchant.FirstEquipmentSlotIsEmpty", Array.Empty<object>()));
				return false;
			}
			ScriptableEquipment val = (ScriptableEquipment)GameManager._current.Locate_Item(item._itemName);
			byte b = ((((object)val).GetType() == typeof(ScriptableWeapon)) ? ((byte)1) : ((byte)0));
			if (Arguments.Length == 0)
			{
				if (b == 0)
				{
					DisplayModifiers(val._statModifierTable);
				}
				else
				{
					DisplayDamageTypes();
				}
				return false;
			}
			bool useDamageTypeOverride = item._useDamageTypeOverride;
			DamageType damageTypeOverride = item._damageTypeOverride;
			int result = item._modifierID;
			if (b > 0)
			{
				if (!ushort.TryParse(Arguments[0], out var result2))
				{
					ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Enchant.DamageTypeNotInteger", Array.Empty<object>()));
					return false;
				}
				if (result2 >= Enum.GetNames(typeof(DamageType)).Length)
				{
					DisplayDamageTypes();
					return false;
				}
				damageTypeOverride = (DamageType)(byte)result2;
				useDamageTypeOverride = true;
			}
			if (Arguments.Length > b)
			{
				if (!int.TryParse(Arguments[b], out result))
				{
					ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Enchant.ModifierNotInteger", Array.Empty<object>()));
					return false;
				}
				ScriptableStatModifier val2 = null;
				StatModifierSlot[] statModifierSlots = val._statModifierTable._statModifierSlots;
				foreach (StatModifierSlot val3 in statModifierSlots)
				{
					if (val3._equipModifier._modifierID == result)
					{
						val2 = val3._equipModifier;
						break;
					}
				}
				if (val2 == null)
				{
					DisplayModifiers(val._statModifierTable);
					return false;
				}
				result = val2._modifierID;
			}
			item._damageTypeOverride = damageTypeOverride;
			item._useDamageTypeOverride = useDamageTypeOverride;
			item._modifierID = result;
			Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._purchaseItemSound);
			return false;
		}

		private void DisplayDamageTypes()
		{
			Type typeFromHandle = typeof(DamageType);
			List<string> list = new List<string>();
			byte b = 0;
			string[] names = Enum.GetNames(typeFromHandle);
			foreach (string text in names)
			{
				list.Add(((Plugin)Main.Instance).Translate("Commands.Enchant.DamageTypes.DamageType", new object[2] { b, text }));
				b++;
			}
			ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Enchant.DamageTypes", new object[1] { string.Join(((Plugin)Main.Instance).Translate("Commands.Enchant.DamageTypes.Separator", Array.Empty<object>()), list) }));
		}

		private void DisplayModifiers(ScriptableStatModifierTable ScriptableStatModifierTable)
		{
			List<string> list = new List<string>();
			StatModifierSlot[] statModifierSlots = ScriptableStatModifierTable._statModifierSlots;
			foreach (StatModifierSlot val in statModifierSlots)
			{
				list.Add(((Plugin)Main.Instance).Translate("Commands.Enchant.Modifiers.Modifier", new object[2]
				{
					val._equipModifier._modifierID,
					val._equipModifier._modifierTag
				}));
			}
			ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Enchant.Modifiers", new object[1] { string.Join(((Plugin)Main.Instance).Translate("Commands.Enchant.Modifiers.Separator", Array.Empty<object>()), list) }));
		}
	}
	internal class Experience : ICommand
	{
		public bool Execute(string[] Arguments)
		{
			if (!Player._mainPlayer._isHostPlayer)
			{
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Experience.NotHost", Array.Empty<object>()));
				return false;
			}
			if (Arguments.Length == 0)
			{
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Experience.DeltaNotSpecified", Array.Empty<object>()));
				return false;
			}
			if (!int.TryParse(Arguments[0], out var result))
			{
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Experience.DeltaNotInteger", Array.Empty<object>()));
				return false;
			}
			if (result < 0)
			{
				result = -result;
				int num = Player._mainPlayer._pStats._currentLevel;
				int num2 = Player._mainPlayer._pStats._currentExp;
				while (result > num2 && num != 1)
				{
					num--;
					result -= num2;
					num2 = (int)GameManager._current._statLogics._experienceCurve.Evaluate((float)num);
				}
				num2 -= result;
				if (num2 < 0)
				{
					num2 = 0;
				}
				if (Player._mainPlayer._pStats._currentLevel != num)
				{
					Player._mainPlayer._pStats.Network_currentLevel = num;
					Player._mainPlayer._pStats.Apply_StatCalculations();
				}
				Player._mainPlayer._pStats.Network_currentExp = num2;
			}
			else
			{
				PlayerStats pStats = Player._mainPlayer._pStats;
				pStats.Network_currentExp += result;
			}
			Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockonSound);
			return false;
		}
	}
	internal class Heal : ICommand
	{
		public bool Execute(string[] Arguments)
		{
			if (!Player._mainPlayer._isHostPlayer)
			{
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Heal.NotHost", Array.Empty<object>()));
				return false;
			}
			if (Arguments.Length == 0)
			{
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Heal.DeltaNotSpecified", Array.Empty<object>()));
				return false;
			}
			if (!int.TryParse(Arguments[0], out var result))
			{
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Heal.DeltaNotInteger", Array.Empty<object>()));
				return false;
			}
			if (result < 0)
			{
				Player._mainPlayer._statusEntity.Subtract_Health(-result);
			}
			else
			{
				Player._mainPlayer._statusEntity.Add_Health(result);
			}
			Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockonSound);
			return false;
		}
	}
	internal class Immortality : ICommand, IDisposable
	{
		private bool Status;

		public Immortality()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			OnStopClient_Prefix.OnInvoke += new EventHandler(Disable);
		}

		public bool Execute(string[] Arguments)
		{
			if (!Player._mainPlayer._isHostPlayer)
			{
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Immortality.NotHost", Array.Empty<object>()));
				return false;
			}
			if (Status)
			{
				Disable();
				Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockoutSound);
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Immortality.Disabled", Array.Empty<object>()));
			}
			else
			{
				Enable();
				Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockonSound);
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Immortality.Enabled", Array.Empty<object>()));
			}
			return false;
		}

		private void Enable()
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			if (!Status)
			{
				Status = true;
				Main.Instance.Patch(typeof(Take_Damage_Prefix));
				Take_Damage_Prefix.OnInvoke += new EventHandler(Subtract_Health_Before);
			}
		}

		private void Disable()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Expected O, but got Unknown
			if (Status)
			{
				Status = false;
				Take_Damage_Prefix.OnInvoke -= new EventHandler(Subtract_Health_Before);
			}
		}

		private void Subtract_Health_Before(StatusEntity StatusEntity, ref DamageStruct DamageStruct, ref bool ShouldAllow)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Invalid comparison between Unknown and I4
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			if (((NetworkBehaviour)StatusEntity).isLocalPlayer)
			{
				ShouldAllow = false;
				StatusEntity.Rpc_DisplayBlockHitEffect(StatusEntity, 1, false, (int)DamageStruct._damageType == 2, DamageStruct._colliderHitPoint);
			}
		}

		public void Dispose()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			OnStopClient_Prefix.OnInvoke -= new EventHandler(Disable);
			Disable();
		}
	}
	internal class Item : ICommand
	{
		public bool Execute(string[] Arguments)
		{
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: 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_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Expected O, but got Unknown
			if (Arguments.Length == 0 || Arguments.Length > 2)
			{
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Item.InvalidParameters", Array.Empty<object>()));
				return false;
			}
			bool flag = false;
			int result = 1;
			if (Arguments.Length == 2)
			{
				if (!int.TryParse(Arguments[1], out result))
				{
					ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Item.UnparseableQuantity", Array.Empty<object>()));
					return false;
				}
				if (result < 1)
				{
					result = 1;
				}
			}
			ScriptableItem val = GameManager._current.Locate_Item(Arguments[0]);
			if (val == null)
			{
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.Item.ItemNotFound", new object[1] { Arguments[0] }));
				return false;
			}
			while (result > 0)
			{
				int num = ((result > val._maxStackAmount) ? val._maxStackAmount : result);
				if (Player._mainPlayer._pInventory.Check_InventoryFull(val, num))
				{
					num = val._maxStackAmount - Player._mainPlayer._pInventory.Check_ItemQuantity(val);
					if (num < 1)
					{
						break;
					}
					result = 0;
				}
				ItemData val2 = new ItemData
				{
					_itemName = val._itemName,
					_quantity = num,
					_maxQuantity = val._maxStackAmount,
					_isEquipped = false,
					_isAltWeapon = false,
					_slotNumber = 0
				};
				Player._mainPlayer._pInventory.Add_Item(val2, true);
				result -= num;
				flag = true;
			}
			if (flag)
			{
				Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._purchaseItemSound);
			}
			return false;
		}
	}
	internal class ListItems : ICommand
	{
		public bool Execute(string[] Arguments)
		{
			if (Arguments.Length != 0)
			{
				DisplaySearch(string.Join(" ", Arguments));
			}
			else
			{
				DisplayAll();
			}
			return false;
		}

		private void DisplayAll()
		{
			ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.ListItems.All", new object[1] { string.Join(((Plugin)Main.Instance).Translate("Commands.ListItems.Separator", Array.Empty<object>()), from x in GameManager.Instance.CachedScriptableItems.Values
				orderby x._itemName
				select x._itemName) }));
		}

		private void DisplaySearch(string Search)
		{
			SortedSet<string> sortedSet = new SortedSet<string>();
			foreach (ScriptableItem value in GameManager.Instance.CachedScriptableItems.Values)
			{
				string itemName = value._itemName;
				if (itemName.Contains(Search))
				{
					sortedSet.Add(itemName.Replace(Search, ((Plugin)Main.Instance).Translate("Commands.ListItems.Search.Match", new object[1] { Search })));
				}
			}
			ChatBehaviour._current.New_ChatMessage((sortedSet.Count > 0) ? ((Plugin)Main.Instance).Translate("Commands.ListItems.Search", new object[2]
			{
				Search,
				string.Join(((Plugin)Main.Instance).Translate("Commands.ListItems.Separator", Array.Empty<object>()), sortedSet)
			}) : ((Plugin)Main.Instance).Translate("Commands.ListItems.Search.ItemsNotFound", new object[1] { Search }));
		}
	}
	internal class ListPlayers : ICommand
	{
		public bool Execute(string[] Arguments)
		{
			Player[] array = Object.FindObjectsOfType<Player>();
			StringBuilder stringBuilder = new StringBuilder(((Plugin)Main.Instance).Translate("Commands.ListPlayers.Header", new object[1] { array.Length }));
			Player[] array2 = array;
			foreach (Player val in array2)
			{
				stringBuilder.Append(((Plugin)Main.Instance).Translate("Commands.ListPlayers.Entry", new object[5]
				{
					((Plugin)Main.Instance).Translate(val._isHostPlayer ? "Commands.ListPlayers.NetID.Host" : "Commands.ListPlayers.NetID.Client", new object[1] { ((NetworkBehaviour)val).netIdentity.netId }),
					val._nickname,
					(val._nickname != val._globalNickname && !string.IsNullOrEmpty(val._globalNickname)) ? ((Plugin)Main.Instance).Translate("Commands.ListPlayers.GlobalNickname", new object[1] { val._globalNickname }) : string.Empty,
					val._steamID,
					string.IsNullOrEmpty(val._mapName) ? ((Plugin)Main.Instance).Translate("Commands.ListPlayers.NoMap", Array.Empty<object>()) : val._mapName
				}));
			}
			ChatBehaviour._current.New_ChatMessage(stringBuilder.ToString());
			return false;
		}
	}
	internal class InfiniteJumps : ICommand, IDisposable
	{
		private bool Status;

		public InfiniteJumps()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			OnStopClient_Prefix.OnInvoke += new EventHandler(Disable);
		}

		public bool Execute(string[] Arguments)
		{
			if (Status)
			{
				Disable();
				Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockoutSound);
			}
			else
			{
				Enable();
				Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockonSound);
			}
			return false;
		}

		private void Enable()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			if (!Status)
			{
				Main.Instance.Patch(typeof(Init_Jump_Postfix));
				Init_Jump_Postfix.OnInvoke += new EventHandler(Init_Jump_Postfix_OnInvoke);
				Status = true;
			}
		}

		private void Disable()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Expected O, but got Unknown
			if (Status)
			{
				Init_Jump_Postfix.OnInvoke -= new EventHandler(Init_Jump_Postfix_OnInvoke);
				Status = false;
			}
		}

		private void Init_Jump_Postfix_OnInvoke(PlayerMove PlayerMove, float Force, float ForwardForce, float GravityMultiply, bool UseAnim)
		{
			if (((NetworkBehaviour)PlayerMove).isLocalPlayer)
			{
				PlayerMove._currentJumps = 0;
			}
		}

		public void Dispose()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			OnStopClient_Prefix.OnInvoke -= new EventHandler(Disable);
			if (Status)
			{
				Disable();
			}
		}
	}
	internal class MoveSpeed : ICommand
	{
		internal static bool Changed;

		public bool Execute(string[] Arguments)
		{
			if (Arguments.Length == 0)
			{
				if (Changed)
				{
					Changed = false;
					Player._mainPlayer._pMove._movSpeed = GameManager._current._statLogics._baseMoveSpeed;
					ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.MoveSpeed.Reset", Array.Empty<object>()));
					Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockonSound);
				}
				else
				{
					ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.MoveSpeed.SpeedNotSpecified", Array.Empty<object>()));
				}
				return false;
			}
			if (!float.TryParse(Arguments[0], out var result))
			{
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.MoveSpeed.SpeedNotFloat", Array.Empty<object>()));
				return false;
			}
			if (result < 0f)
			{
				result = 0f - result;
			}
			Changed = true;
			Player._mainPlayer._pMove._movSpeed = result;
			ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.MoveSpeed.Enabled", new object[1] { result }));
			Player._mainPlayer._pSound._aSrcGeneral.PlayOneShot(Player._mainPlayer._pSound._lockoutSound);
			return false;
		}
	}
	internal class TeleportToPlayer : ICommand, IDisposable
	{
		private Vector3 Target;

		private bool TeleportingBetweenScenes;

		public TeleportToPlayer()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			OnStopClient_Prefix.OnInvoke += new EventHandler(ResetTeleportationBetweenScenes);
		}

		public bool Execute(string[] Arguments)
		{
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Expected O, but got Unknown
			if (Arguments.Length == 0)
			{
				ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.TeleportToPlayer.NicknameNotSpecified", Array.Empty<object>()));
				return false;
			}
			string value = string.Join(" ", Arguments).ToLower();
			Player[] array = Object.FindObjectsOfType<Player>();
			foreach (Player val in array)
			{
				if (((NetworkBehaviour)val).isLocalPlayer || !val._nickname.ToLower().Contains(value))
				{
					continue;
				}
				Target = ((Component)val).transform.position;
				if (Player._mainPlayer._mapName != val._mapName)
				{
					if (string.IsNullOrEmpty(val._mapName))
					{
						ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.TeleportToPlayer.EmptyMapName", new object[1] { val._mapName }));
						return false;
					}
					foreach (KeyValuePair<string, ScriptableMapData> cachedScriptableMapData in GameManager.Instance.CachedScriptableMapDatas)
					{
						if (!(cachedScriptableMapData.Value._mapCaptionTitle != val._mapName))
						{
							if (!Player._mainPlayer._waypointAttunements.Contains(cachedScriptableMapData.Key))
							{
								break;
							}
							Tanuki.Atlyss.FluffUtilities.Managers.FreeCamera.Instance.Disable();
							Init_LoadScreenDisable_Postfix.OnInvoke += new EventHandler(Teleport);
							TeleportingBetweenScenes = true;
							Player._mainPlayer.Cmd_SceneTransport(cachedScriptableMapData.Value._subScene, cachedScriptableMapData.Value._spawnPointTag, (ZoneDifficulty)1);
							return false;
						}
					}
					ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translate("Commands.TeleportToPlayer.SubSceneNotFound", new object[1] { val._mapName }));
				}
				else
				{
					Teleport();
				}
				return false;
			}
			ChatBehaviour._current.New_ChatMessage(((Plugin)Main.Instance).Translation.Translate("Commands.TeleportToPlayer.PlayerNotFound", Array.Empty<object>()));
			return false;
		}

		private void ResetTeleportationBetweenScenes()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Expected O, but got Unknown
			if (TeleportingBetweenScenes)
			{
				TeleportingBetweenScenes = false;
				Init_LoadScreenDisable_Postfix.OnInvoke -= new EventHandler(Teleport);
			}
		}

		private void Teleport()
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			if (TeleportingBetweenScenes)
			{
				TeleportingBetweenScenes = false;
				Init_LoadScreenDisable_Postfix.OnInvoke -= new EventHandler(Teleport);
			}
			PlayerMove.Teleport(Player._mainPlayer._pMove, Target);
			Player._mainPlayer._pVisual.Cmd_PlayTeleportEffect();
		}

		public void Dispose()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			OnStopClient_Prefix.OnInvoke -= new EventHandler(ResetTeleportationBetweenScenes);
			ResetTeleportationBetweenScenes();
		}
	}
}