Decompiled source of UltraTimeManipulation v1.2.4

UltraTimeManipulation.dll

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

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

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace UltraTimeManipulation
{
	public class AudioSourcePitchAlterer : MonoBehaviour
	{
		public AudioSource audioSource = null;

		public float currentBasePitch = 0f;

		public float lastPitch = 0f;

		public static string[] arrMusicSourceNames = new string[9] { "MusicChanger", "BossTheme", "BattleTheme", "CleanTheme", "VersusIntro", "Versus 2", "UndergroundHum", "SlowMo", "Sourire" };

		public static string[] arrMusicSongNames = new string[0];

		public static string[] arrParrySourceNames = new string[2] { "ParryLight(Clone)", "PunchSpecial(Clone)" };

		public static string[] arrIgnoreSourceNames = new string[0];

		private void Start()
		{
		}

		public unsafe static int FloatToInt32Bits(float f)
		{
			return *(int*)(&f);
		}

		private void Update()
		{
			if ((Object)(object)audioSource == (Object)null || (Object)(object)MonoSingleton<AudioMixerController>.Instance == (Object)null)
			{
				return;
			}
			AudioMixerController instance = MonoSingleton<AudioMixerController>.Instance;
			float num = Plugin.currentSlowdownMult * Plugin.soundSlowdownFactor + 1f * (1f - Plugin.soundSlowdownFactor);
			float num2 = Plugin.currentSlowdownMult * Plugin.musicSlowdownFactor + 1f * (1f - Plugin.musicSlowdownFactor);
			float num3 = Plugin.currentSlowdownMult * Plugin.parrySoundSlowdownFactor + 1f * (1f - Plugin.parrySoundSlowdownFactor);
			if (!Plugin.modEnabled || !Plugin.soundEnabled || !Plugin.soundDistortionEnabled || !audioSource.isPlaying)
			{
				return;
			}
			if (Plugin.muffleMusicSlowDown && (Object)(object)instance.musicSound != (Object)null)
			{
				instance.musicSound.SetFloat("lowPassVolume", -80f * (1f - Plugin.timeInRampup / Plugin.rampUpTime));
			}
			else if ((Object)(object)instance.musicSound != (Object)null)
			{
				instance.musicSound.SetFloat("lowPassVolume", -80f);
			}
			bool flag = false;
			if ((Object)(object)audioSource.clip != (Object)null)
			{
				flag = ((Object)audioSource).name.ToLower().Contains("music") || ((Object)audioSource).name.ToLower().Contains("song") || ((Object)audioSource.clip).name.ToLower().Contains("music") || ((Object)audioSource.clip).name.ToLower().Contains("song");
			}
			bool flag2 = arrIgnoreSourceNames.Contains(((Object)audioSource).name);
			bool flag3 = false;
			if ((Object)(object)audioSource.clip != (Object)null)
			{
				flag3 = arrMusicSourceNames.Contains(((Object)audioSource).name) || arrMusicSongNames.Contains(((Object)audioSource.clip).name) || flag;
			}
			bool flag4 = arrParrySourceNames.Contains(((Object)audioSource).name);
			if (FloatToInt32Bits(audioSource.pitch) != FloatToInt32Bits(lastPitch))
			{
				currentBasePitch = audioSource.pitch;
			}
			if (!flag2)
			{
				if (flag3)
				{
					audioSource.pitch = num2 * currentBasePitch;
				}
				else if (flag4)
				{
					audioSource.pitch = num3 * currentBasePitch;
				}
				else
				{
					audioSource.pitch = num * currentBasePitch;
				}
			}
			lastPitch = audioSource.pitch;
		}
	}
	public class CustomSoundPlayer : MonoBehaviour
	{
		private static CustomSoundPlayer _instance;

		public AudioSource source;

		private string soundPath;

		public static CustomSoundPlayer Instance
		{
			get
			{
				return _instance;
			}
			set
			{
				throw new NotImplementedException();
			}
		}

		private void Start()
		{
			_instance = this;
			source = ((Component)this).gameObject.AddComponent<AudioSource>();
		}

		public void PlaySound(string file)
		{
			if (!string.IsNullOrEmpty(file))
			{
				if (!File.Exists(file))
				{
					Debug.LogError((object)("Could not find audio file '" + file + "'"));
					return;
				}
				soundPath = file;
				((Component)this).gameObject.SetActive(true);
				((MonoBehaviour)this).StartCoroutine(PlaySoundRoutine());
			}
		}

		private IEnumerator PlaySoundRoutine()
		{
			new FileInfo(soundPath);
			AudioType audioType = (AudioType)20;
			UnityWebRequest request = UnityWebRequestMultimedia.GetAudioClip(new Uri(soundPath).AbsoluteUri, audioType);
			try
			{
				DownloadHandler downloadHandler = request.downloadHandler;
				DownloadHandlerAudioClip handler = (DownloadHandlerAudioClip)(object)((downloadHandler is DownloadHandlerAudioClip) ? downloadHandler : null);
				handler.streamAudio = false;
				request.SendWebRequest();
				yield return request;
				source.Stop();
				source.clip = handler.audioClip;
				source.volume = 1f * Plugin.volumeMult * MonoSingleton<PrefsManager>.Instance.GetFloat("sfxVolume", 0f);
				source.Play();
			}
			finally
			{
				((IDisposable)request)?.Dispose();
			}
		}
	}
	[BepInPlugin("UltraTimeManipulation", "UltraTimeManipulation", "0.01")]
	public class Plugin : BaseUnityPlugin
	{
		private class particleInfo
		{
			public float x;

			public float y;

			public float xVel;

			public float yVel;

			public float timeLeft;

			public Color color;

			public particleInfo(float x, float y, float xVel, float yVel, float timeLeft)
			{
				//IL_0080: Unknown result type (might be due to invalid IL or missing references)
				//IL_0085: Unknown result type (might be due to invalid IL or missing references)
				this.x = x;
				this.y = y;
				this.xVel = xVel;
				this.yVel = yVel;
				this.timeLeft = timeLeft;
				float num = 0.45f;
				float num2 = 0.8f + 0.2f * (float)rnd.NextDouble();
				float num3 = 0.8f + 0.2f * (float)rnd.NextDouble();
				float num4 = 0.6f + 0.4f * (float)rnd.NextDouble();
				color = new Color(num, num2, num3, num4);
			}
		}

		public static Random rnd = new Random();

		public static bool modEnabled = true;

		public static float realTimeDelta = 1f;

		public static float rechargeMultiplier = 0.75f;

		public static float maxTimeAccumulated = 6f;

		public static float rampUpTime = 0.2f;

		public static float slowdownMult = 0.4f;

		public static bool keyToggleFunctionality = false;

		public static KeyCode slowdownCode = (KeyCode)326;

		public static float volumeMult = 0.7f;

		public static bool soundEnabled = true;

		public static bool soundPitchOverride = true;

		public static bool soundDistortionEnabled = true;

		public static float soundSlowdownFactor = 1f;

		public static float musicSlowdownFactor = 1f;

		public static float parrySoundSlowdownFactor = 1f;

		public static bool allSoundPitchEnabled = true;

		public static bool doorSoundPitchEnabled = true;

		public static bool goreSoundPitchEnabled = true;

		public static bool unfreezeableSoundPitchEnabled = true;

		public static bool muffleMusicSlowDown = true;

		public static bool visualsEnabled = true;

		public static float slowdownColorCompression = 1f;

		public static float slowdownDarkness = 1f;

		public static bool slowdownFades = true;

		public static float slowdownFadeTime = 1f;

		public static bool legacyDisplay = false;

		public static bool HUDFlashing = true;

		public static bool HUDSparks = true;

		public static float HUDSparksFadeOutTime = 2f;

		public static float HUDScale = 1f;

		public static bool minimalHUD = false;

		public static int HUDQuadrant = 3;

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

		public static string underlayImageFile = Path.Combine(DefaultParentFolder, "underlay.png") ?? "";

		public static string underlayTopImageFile = Path.Combine(DefaultParentFolder, "underlayTop.png") ?? "";

		public static string filledBarImageFile = Path.Combine(DefaultParentFolder, "filledBar.png") ?? "";

		public static string emptyBarImageFile = Path.Combine(DefaultParentFolder, "emptyBar.png") ?? "";

		public static string spark0ImageFile = Path.Combine(DefaultParentFolder, "spark0.png") ?? "";

		public static string spark10ImageFile = Path.Combine(DefaultParentFolder, "spark10.png") ?? "";

		public static string spark20ImageFile = Path.Combine(DefaultParentFolder, "spark20.png") ?? "";

		public static string spark30ImageFile = Path.Combine(DefaultParentFolder, "spark30.png") ?? "";

		public static string spark40ImageFile = Path.Combine(DefaultParentFolder, "spark40.png") ?? "";

		public static string spark50ImageFile = Path.Combine(DefaultParentFolder, "spark50.png") ?? "";

		public static string spark60ImageFile = Path.Combine(DefaultParentFolder, "spark60.png") ?? "";

		public static string spark70ImageFile = Path.Combine(DefaultParentFolder, "spark70.png") ?? "";

		public static string spark80ImageFile = Path.Combine(DefaultParentFolder, "spark80.png") ?? "";

		public static string spark90ImageFile = Path.Combine(DefaultParentFolder, "spark90.png") ?? "";

		public static string speedupSound = Path.Combine(DefaultParentFolder, "speedup.wav") ?? "";

		public static string slowdownSound = Path.Combine(DefaultParentFolder, "slowdown.wav") ?? "";

		private CustomSoundPlayer csp;

		private readonly Harmony harmony = new Harmony("daemon.UltraTimeManipulation");

		public static ManualLogSource logger = null;

		public static bool modEnabledTemporary = true;

		private Texture2D underlayTexture = new Texture2D(0, 0, (TextureFormat)4, false);

		private Texture2D underlayTopTexture = new Texture2D(0, 0, (TextureFormat)4, false);

		private Texture2D filledBarTexture = new Texture2D(0, 0, (TextureFormat)4, false);

		private Texture2D emptyBarTexture = new Texture2D(0, 0, (TextureFormat)4, false);

		private Texture2D spark0Texture = new Texture2D(0, 0, (TextureFormat)4, false);

		private Texture2D spark10Texture = new Texture2D(0, 0, (TextureFormat)4, false);

		private Texture2D spark20Texture = new Texture2D(0, 0, (TextureFormat)4, false);

		private Texture2D spark30Texture = new Texture2D(0, 0, (TextureFormat)4, false);

		private Texture2D spark40Texture = new Texture2D(0, 0, (TextureFormat)4, false);

		private Texture2D spark50Texture = new Texture2D(0, 0, (TextureFormat)4, false);

		private Texture2D spark60Texture = new Texture2D(0, 0, (TextureFormat)4, false);

		private Texture2D spark70Texture = new Texture2D(0, 0, (TextureFormat)4, false);

		private Texture2D spark80Texture = new Texture2D(0, 0, (TextureFormat)4, false);

		private Texture2D spark90Texture = new Texture2D(0, 0, (TextureFormat)4, false);

		private double timeUntilFlash = 0.0;

		private double timeUntilFlashEnd = 0.20000000298023224;

		private double timeUntilMiniFlashRefresh = 0.10000000149011612;

		private double[] valueMultsSmallFlash = new double[11];

		private Color[] miniFlashes = (Color[])(object)new Color[11];

		private int sparkSideCounter = 0;

		private Texture2D currentSparkTex;

		private float sparkTimer = 0f;

		private List<particleInfo> particles = new List<particleInfo>();

		public static bool speedupPlayedForcefully = false;

		public static bool slowdownKeyActive = false;

		public static float currentSlowdownMult = 1f;

		public static float timeAccumulated = 0f;

		public static float timeInRampup = 0f;

		public static AudioSource[] audioSources = null;

		public static AudioSource[] oldAudioSources = null;

		public static Dictionary<AudioSource, float> audioSourcePitches = new Dictionary<AudioSource, float>();

		public static bool slowdownEnded = false;

		public static int tickCount = 0;

		public static int soundUpdateDelay = 8;

		private void determineTimeDelta()
		{
			if (currentSlowdownMult != 0f && !inMenu())
			{
				realTimeDelta = Time.deltaTime / currentSlowdownMult;
			}
			else
			{
				realTimeDelta = Time.unscaledDeltaTime;
			}
		}

		public static bool inMenu()
		{
			if ((Object)(object)MonoSingleton<OptionsManager>.Instance != (Object)null && !MonoSingleton<OptionsManager>.Instance.paused && !MonoSingleton<FistControl>.Instance.shopping && (Object)(object)GameStateManager.Instance != (Object)null && !GameStateManager.Instance.PlayerInputLocked)
			{
				return false;
			}
			return true;
		}

		private void Awake()
		{
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Expected O, but got Unknown
			ShaderEffects.DiscoverCamera();
			PluginConfig.UltraTimeManipulationConfig();
			ShaderEffects.LoadShader();
			csp = ((Component)this).gameObject.AddComponent<CustomSoundPlayer>();
			harmony.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"UltraTimeManipulation Started");
			logger = new ManualLogSource("UltraTimeManipulation");
			Logger.Sources.Add((ILogSource)(object)logger);
		}

		[HarmonyPatch(typeof(LeaderboardController), "SubmitCyberGrindScore")]
		[HarmonyPrefix]
		public static bool no(LeaderboardController __instance)
		{
			return !modEnabled;
		}

		[HarmonyPatch(typeof(LeaderboardController), "SubmitLevelScore")]
		[HarmonyPrefix]
		public static bool nope(LeaderboardController __instance)
		{
			return !modEnabled;
		}

		[HarmonyPatch(typeof(LeaderboardController), "SubmitFishSize")]
		[HarmonyPrefix]
		public static bool notevenfish(LeaderboardController __instance)
		{
			return !modEnabled;
		}

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

		public void Start()
		{
			ImageConversion.LoadImage(underlayTexture, File.ReadAllBytes(underlayImageFile));
			ImageConversion.LoadImage(underlayTopTexture, File.ReadAllBytes(underlayTopImageFile));
			ImageConversion.LoadImage(filledBarTexture, File.ReadAllBytes(filledBarImageFile));
			ImageConversion.LoadImage(emptyBarTexture, File.ReadAllBytes(emptyBarImageFile));
			ImageConversion.LoadImage(spark0Texture, File.ReadAllBytes(spark0ImageFile));
			ImageConversion.LoadImage(spark10Texture, File.ReadAllBytes(spark10ImageFile));
			ImageConversion.LoadImage(spark20Texture, File.ReadAllBytes(spark20ImageFile));
			ImageConversion.LoadImage(spark30Texture, File.ReadAllBytes(spark30ImageFile));
			ImageConversion.LoadImage(spark40Texture, File.ReadAllBytes(spark40ImageFile));
			ImageConversion.LoadImage(spark50Texture, File.ReadAllBytes(spark50ImageFile));
			ImageConversion.LoadImage(spark60Texture, File.ReadAllBytes(spark60ImageFile));
			ImageConversion.LoadImage(spark70Texture, File.ReadAllBytes(spark70ImageFile));
			ImageConversion.LoadImage(spark80Texture, File.ReadAllBytes(spark80ImageFile));
			ImageConversion.LoadImage(spark90Texture, File.ReadAllBytes(spark90ImageFile));
		}

		private float OnGUIx(int i)
		{
			return (float)(100 + 40 * i) * HUDScale;
		}

		private void OnGUI()
		{
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Expected O, but got Unknown
			//IL_004b: 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_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_0483: Unknown result type (might be due to invalid IL or missing references)
			//IL_0488: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0501: Unknown result type (might be due to invalid IL or missing references)
			//IL_0408: Unknown result type (might be due to invalid IL or missing references)
			//IL_040d: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_065d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0677: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cdc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d2c: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)MonoSingleton<NewMovement>.Instance == (Object)null || !modEnabled || !modEnabledTemporary)
			{
				return;
			}
			if (legacyDisplay)
			{
				GUIStyle val = new GUIStyle();
				val.normal.textColor = Color.cyan;
				val.fontSize = (int)Math.Round(48f * HUDScale * 4f);
				val.alignment = (TextAnchor)4;
				GUI.backgroundColor = Color.black;
				string text = "";
				for (int i = 0; (double)i < Math.Round(10.0 / (double)maxTimeAccumulated * (double)(maxTimeAccumulated - timeAccumulated)); i++)
				{
					text += "*";
				}
				GUI.Box(new Rect(240f * HUDScale, (float)Screen.height - 280f * HUDScale, 600f * HUDScale, 240f * HUDScale), text, val);
				return;
			}
			int num = 0;
			int num2 = 0;
			if (HUDQuadrant == 1)
			{
				num = 1;
				num2 = 1;
			}
			else if (HUDQuadrant == 2)
			{
				num = 1;
				num2 = 0;
			}
			else if (HUDQuadrant == 3)
			{
				num = 0;
				num2 = 0;
			}
			else if (HUDQuadrant == 4)
			{
				num = 0;
				num2 = 1;
			}
			if (!minimalHUD)
			{
				GUI.DrawTexture(new Rect((float)(Screen.width * num2), (float)(Screen.height * (1 - num)), (float)((Texture)underlayTexture).width * HUDScale * (float)(1 - 2 * num2), (float)((Texture)underlayTexture).height * HUDScale * (float)(2 * num - 1)), (Texture)(object)underlayTexture, (ScaleMode)0);
			}
			double num3 = 1.0;
			Color val2 = default(Color);
			((Color)(ref val2))..ctor((float)num3, (float)num3, (float)num3, 1f);
			if (HUDFlashing)
			{
				num3 = 1.0;
				timeUntilFlash += 0f - realTimeDelta;
				if (timeUntilFlash < 0.0)
				{
					timeUntilFlashEnd += 0f - realTimeDelta;
					num3 = 1.0 - 0.9 * (1.0 - 10.0 * Math.Abs(0.10000000149011612 - timeUntilFlashEnd));
					if (timeUntilFlashEnd < 0.0)
					{
						timeUntilFlash = 1.899999976158142 * rnd.NextDouble() + 1.7999999523162842;
						if (rnd.NextDouble() < 0.38)
						{
							timeUntilFlash = 0.05 + 0.2 * rnd.NextDouble();
						}
						timeUntilFlashEnd = 0.20000000298023224;
					}
				}
				((Color)(ref val2))..ctor((float)num3, (float)num3, (float)num3, 1f);
				timeUntilMiniFlashRefresh += 0f - realTimeDelta;
				if (timeUntilMiniFlashRefresh < 0.0)
				{
					timeUntilMiniFlashRefresh = 0.1;
					for (int j = 0; j < miniFlashes.Length; j++)
					{
						valueMultsSmallFlash[j] = 0.9 + 0.1 * rnd.NextDouble();
					}
				}
				for (int k = 0; k < miniFlashes.Length; k++)
				{
					miniFlashes[k] = new Color((float)(valueMultsSmallFlash[k] * num3), (float)(valueMultsSmallFlash[k] * num3), (float)(valueMultsSmallFlash[k] * num3), 1f);
				}
			}
			else
			{
				num3 = 1.0;
				((Color)(ref val2))..ctor((float)num3, (float)num3, (float)num3, 1f);
				for (int l = 0; l < valueMultsSmallFlash.Length; l++)
				{
					valueMultsSmallFlash[l] = 1.0;
					miniFlashes[l] = new Color(1f, 1f, 1f, 1f);
				}
			}
			GUI.DrawTexture(new Rect((float)(Screen.width * num2), (float)(Screen.height * (1 - num)), (float)((Texture)underlayTexture).width * HUDScale * (float)(1 - 2 * num2), (float)((Texture)underlayTexture).height * HUDScale * (float)(2 * num - 1)), (Texture)(object)underlayTopTexture, (ScaleMode)0, true, 0f, val2, 0f, 0f);
			int num4 = (int)Math.Round(11.0 / (double)maxTimeAccumulated * (double)(maxTimeAccumulated - timeAccumulated));
			float num5 = 44f * HUDScale;
			float num6 = (float)((Texture)filledBarTexture).width * HUDScale;
			float num7 = (float)((Texture)emptyBarTexture).height * HUDScale;
			for (int m = 0; m < num4; m++)
			{
				GUI.DrawTexture(new Rect(((float)Screen.width - OnGUIx(m)) * (float)num2 + OnGUIx(m) * (float)(1 - num2), num5 * (float)num + ((float)Screen.height - num5) * (float)(1 - num), num6 * (float)(1 - 2 * num2), num7 * (float)(2 * num - 1)), (Texture)(object)filledBarTexture, (ScaleMode)0, true, 0f, miniFlashes[m], 0f, 0f);
			}
			for (int n = num4; n < 11; n++)
			{
				GUI.DrawTexture(new Rect(((float)Screen.width - OnGUIx(n)) * (float)num2 + OnGUIx(n) * (float)(1 - num2), num5 * (float)num + ((float)Screen.height - num5) * (float)(1 - num), num6 * (float)(1 - 2 * num2), num7 * (float)(2 * num - 1)), (Texture)(object)emptyBarTexture, (ScaleMode)0, true, 0f, miniFlashes[n], 0f, 0f);
			}
			if (!HUDSparks)
			{
				return;
			}
			if ((timeInRampup > 0f || (slowdownKeyActive && !inMenu())) && timeAccumulated < maxTimeAccumulated)
			{
				sparkTimer += 0f - realTimeDelta;
				if (sparkTimer < 0f)
				{
					sparkSideCounter++;
					float x;
					float y;
					if (sparkSideCounter % 3 == 0)
					{
						x = ((float)Screen.width - 36f * HUDScale) * (float)num2 + 36f * HUDScale * (float)(1 - num2);
						y = ((float)Screen.height - 92f * HUDScale) * (float)(1 - num) + (float)num * HUDScale * 92f;
					}
					else if (sparkSideCounter % 3 == 1)
					{
						x = ((float)Screen.width - 592f * HUDScale) * (float)num2 + 592f * HUDScale * (float)(1 - num2);
						y = ((float)Screen.height - 144f * HUDScale) * (float)(1 - num) + (float)num * HUDScale * 144f;
					}
					else
					{
						x = ((float)Screen.width - 612f * HUDScale) * (float)num2 + 612f * HUDScale * (float)(1 - num2);
						y = ((float)Screen.height - 80f * HUDScale) * (float)(1 - num) + (float)num * HUDScale * 80f;
					}
					sparkTimer = 0.04f;
					double num8 = rnd.NextDouble() * Math.PI * 2.0;
					double num9 = 200.0 + 100.0 * rnd.NextDouble();
					double num10 = num9 * Math.Cos(num8) * 0.75;
					double num11 = num9 * Math.Sin(num8);
					particles.Add(new particleInfo(x, y, (float)num10, (float)num11, HUDSparksFadeOutTime));
				}
			}
			for (int num12 = 0; num12 < particles.Count; num12++)
			{
				particleInfo particleInfo = particles[num12];
				double num13 = Math.Atan(particleInfo.yVel / particleInfo.xVel);
				if (particleInfo.xVel < 0f)
				{
					num13 = Math.PI + num13;
				}
				if (num13 < 0.0)
				{
					num13 += Math.PI * 2.0;
				}
				if (num13 > Math.PI * 2.0)
				{
					num13 += Math.PI * -2.0;
				}
				currentSparkTex = spark0Texture;
				if (num13 > Math.PI)
				{
					num13 += -Math.PI;
				}
				if (num13 < Math.PI / 36.0)
				{
					currentSparkTex = spark90Texture;
				}
				else if (num13 < Math.PI / 12.0)
				{
					currentSparkTex = spark80Texture;
				}
				else if (num13 < Math.PI * 5.0 / 36.0)
				{
					currentSparkTex = spark70Texture;
				}
				else if (num13 < Math.PI * 7.0 / 36.0)
				{
					currentSparkTex = spark60Texture;
				}
				else if (num13 < Math.PI / 4.0)
				{
					currentSparkTex = spark50Texture;
				}
				else if (num13 < 0.9599310885968813)
				{
					currentSparkTex = spark40Texture;
				}
				else if (num13 < Math.PI * 13.0 / 36.0)
				{
					currentSparkTex = spark30Texture;
				}
				else if (num13 < Math.PI * 5.0 / 12.0)
				{
					currentSparkTex = spark20Texture;
				}
				else if (num13 < Math.PI * 17.0 / 36.0)
				{
					currentSparkTex = spark10Texture;
				}
				else if (num13 < 1.6580627893946132)
				{
					currentSparkTex = spark0Texture;
				}
				else if (num13 < 1.8325957145940461)
				{
					currentSparkTex = spark10Texture;
				}
				else if (num13 < Math.PI * 23.0 / 36.0)
				{
					currentSparkTex = spark20Texture;
				}
				else if (num13 < 2.1816615649929116)
				{
					currentSparkTex = spark30Texture;
				}
				else if (num13 < Math.PI * 3.0 / 4.0)
				{
					currentSparkTex = spark40Texture;
				}
				else if (num13 < 2.5307274153917776)
				{
					currentSparkTex = spark50Texture;
				}
				else if (num13 < Math.PI * 31.0 / 36.0)
				{
					currentSparkTex = spark60Texture;
				}
				else if (num13 < Math.PI * 11.0 / 12.0)
				{
					currentSparkTex = spark70Texture;
				}
				else if (num13 < 3.0543261909900763)
				{
					currentSparkTex = spark80Texture;
				}
				else if (num13 < Math.PI)
				{
					currentSparkTex = spark90Texture;
				}
				int num14 = 0;
				if (num13 > Math.PI / 2.0)
				{
					num14 = 1;
				}
				float num15 = (float)((1 - 2 * num14) * ((Texture)currentSparkTex).width) * HUDScale * 1.5f;
				float num16 = (float)((Texture)currentSparkTex).height * HUDScale * 1.5f;
				GUI.DrawTexture(new Rect(particleInfo.x - num15 / 2f, particleInfo.y - num16 / 2f, num15, num16), (Texture)(object)currentSparkTex, (ScaleMode)0, true, 0f, new Color(particleInfo.color.r, particleInfo.color.g, particleInfo.color.b, particleInfo.color.a * particleInfo.timeLeft / HUDSparksFadeOutTime), 0f, 0f);
			}
			for (int num17 = 0; num17 < particles.Count; num17++)
			{
				particleInfo particleInfo2 = particles[num17];
				particleInfo2.timeLeft -= realTimeDelta;
				if (particleInfo2.timeLeft < 0f)
				{
					particles.RemoveAt(num17);
				}
			}
			for (int num18 = 0; num18 < particles.Count; num18++)
			{
				particleInfo particleInfo3 = particles[num18];
				particleInfo3.x += particleInfo3.xVel * realTimeDelta * HUDScale * 4f;
				particleInfo3.y += (0f - particleInfo3.yVel) * realTimeDelta * HUDScale * 4f;
				particleInfo3.yVel += -90f * realTimeDelta * (float)(2 * num - 1);
				if (particleInfo3.x < 0f || particleInfo3.x > (float)Screen.width || particleInfo3.y > (float)Screen.height)
				{
					particles.RemoveAt(num18);
				}
			}
		}

		public void FixSoundsPre(AudioSource audioSource)
		{
			if ((Object)(object)audioSource.clip == (Object)null)
			{
				return;
			}
			if (((Object)audioSource).name == "Rocket Launcher Cannonball(Clone)" && ((Object)audioSource.clip).name == "RocketFire5")
			{
				RocketLauncher val = null;
				foreach (GameObject item in MonoSingleton<GunControl>.Instance.slot5)
				{
					if (item.GetComponent<RocketLauncher>().variation == 1)
					{
						val = item.GetComponent<RocketLauncher>();
					}
				}
				if ((Object)(object)val != (Object)null && val.cooldown == 1f)
				{
					audioSourcePitches[audioSource] = audioSource.pitch;
				}
				if ((Object)(object)val != (Object)null && MonoSingleton<WeaponCharges>.Instance.rocketCannonballCharge == 0f)
				{
					audioSourcePitches[audioSource] = audioSource.pitch;
				}
			}
			else if (((Object)audioSource).name == "Rocket Launcher Freeze(Clone)" && ((Object)audioSource.clip).name == "RocketFire5")
			{
				RocketLauncher val2 = null;
				foreach (GameObject item2 in MonoSingleton<GunControl>.Instance.slot5)
				{
					if (item2.GetComponent<RocketLauncher>().variation == 0)
					{
						val2 = item2.GetComponent<RocketLauncher>();
					}
				}
				if ((Object)(object)val2 != (Object)null && val2.cooldown == 1f)
				{
					audioSourcePitches[audioSource] = audioSource.pitch;
				}
			}
			else
			{
				if (!(((Object)audioSource).name == "Rocket Launcher Napalm(Clone)") || !(((Object)audioSource.clip).name == "RocketFire5"))
				{
					return;
				}
				RocketLauncher val3 = null;
				foreach (GameObject item3 in MonoSingleton<GunControl>.Instance.slot5)
				{
					if (item3.GetComponent<RocketLauncher>().variation == 2)
					{
						val3 = item3.GetComponent<RocketLauncher>();
					}
				}
				if ((Object)(object)val3 != (Object)null && val3.cooldown == 1f)
				{
					audioSourcePitches[audioSource] = audioSource.pitch;
				}
			}
		}

		public void FixSoundsPost(AudioSource audioSource)
		{
			if (!((Object)(object)audioSource.clip == (Object)null) && ((Object)audioSource).name == "Monitor (1)" && ((Object)audioSource.clip).name == "Charging")
			{
				audioSource.pitch *= 0.6f;
			}
		}

		public void SlowdownAlterAudioLogic()
		{
			if ((Object)(object)MonoSingleton<AudioMixerController>.Instance == (Object)null)
			{
				return;
			}
			AudioMixerController instance = MonoSingleton<AudioMixerController>.Instance;
			float num = currentSlowdownMult;
			num = num * soundSlowdownFactor + 1f * (1f - soundSlowdownFactor);
			float num2 = currentSlowdownMult;
			num2 = num2 * musicSlowdownFactor + 1f * (1f - musicSlowdownFactor);
			float num3 = currentSlowdownMult;
			num3 = num3 * parrySoundSlowdownFactor + 1f * (1f - parrySoundSlowdownFactor);
			string[] array = new string[9] { "MusicChanger", "BossTheme", "BattleTheme", "CleanTheme", "VersusIntro", "Versus 2", "UndergroundHum", "SlowMo", "Sourire" };
			string[] array2 = new string[0];
			string[] array3 = new string[2] { "ParryLight(Clone)", "PunchSpecial(Clone)" };
			string[] array4 = new string[6] { "ElectricChargeBubble(Clone)", "WallCheck", "ChargeEffect", "Hammer", "HologramDisplay", "Barrel_L" };
			if (tickCount % soundUpdateDelay == 0)
			{
				audioSources = Object.FindObjectsOfType(typeof(AudioSource)) as AudioSource[];
			}
			tickCount++;
			if (!soundEnabled || !soundDistortionEnabled || inMenu() || !(timeInRampup > 0f))
			{
				return;
			}
			AudioSource[] array5 = audioSources;
			foreach (AudioSource val in array5)
			{
				if (!((Object)(object)val == (Object)null) && (Object)(object)((Component)val).gameObject.GetComponent<AudioSourcePitchAlterer>() == (Object)null)
				{
					AudioSourcePitchAlterer audioSourcePitchAlterer = ((Component)val).gameObject.AddComponent<AudioSourcePitchAlterer>();
					audioSourcePitchAlterer.audioSource = val;
				}
			}
		}

		public void Update()
		{
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: 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_00eb: Unknown result type (might be due to invalid IL or missing references)
			determineTimeDelta();
			if ((Object)(object)MonoSingleton<NewMovement>.Instance == (Object)null)
			{
				return;
			}
			if (IsGameplayScene())
			{
				modEnabledTemporary = true;
			}
			else
			{
				modEnabledTemporary = false;
			}
			if (!modEnabled || !modEnabledTemporary)
			{
				return;
			}
			if (MonoSingleton<NewMovement>.Instance.hp <= 0)
			{
				timeAccumulated = 0f;
			}
			if (!keyToggleFunctionality)
			{
				if (Input.GetKey(slowdownCode))
				{
					slowdownKeyActive = true;
				}
				else
				{
					slowdownKeyActive = false;
				}
				if (Input.GetKeyDown(slowdownCode))
				{
					if (soundEnabled && !inMenu())
					{
						csp.PlaySound(slowdownSound);
					}
					speedupPlayedForcefully = false;
				}
				if (Input.GetKeyUp(slowdownCode) && timeAccumulated < maxTimeAccumulated && soundEnabled && !inMenu() && !speedupPlayedForcefully)
				{
					csp.PlaySound(speedupSound);
				}
				if (timeAccumulated >= maxTimeAccumulated && !speedupPlayedForcefully)
				{
					if (soundEnabled)
					{
						csp.PlaySound(speedupSound);
					}
					speedupPlayedForcefully = true;
				}
			}
			else
			{
				if (Input.GetKeyDown(slowdownCode))
				{
					slowdownKeyActive = !slowdownKeyActive;
					if (soundEnabled)
					{
						if (slowdownKeyActive)
						{
							csp.PlaySound(slowdownSound);
						}
						else
						{
							csp.PlaySound(speedupSound);
						}
					}
				}
				if (timeAccumulated >= maxTimeAccumulated)
				{
					slowdownKeyActive = false;
					csp.PlaySound(speedupSound);
				}
			}
			if (MonoSingleton<NewMovement>.Instance.hp <= 0)
			{
				return;
			}
			if (Time.timeScale > slowdownMult - 0.01f && timeInRampup >= 0f && !slowdownEnded)
			{
				Time.timeScale = Math.Min(currentSlowdownMult, 1f);
				if (timeInRampup == 0f)
				{
					Time.timeScale = 1f;
					slowdownEnded = true;
				}
			}
			if (slowdownKeyActive && timeAccumulated < maxTimeAccumulated && !speedupPlayedForcefully)
			{
				float num = Time.deltaTime / currentSlowdownMult;
				if (num > 0.1f)
				{
					num = 0.1f;
				}
				timeAccumulated += num;
				timeInRampup += Time.deltaTime / currentSlowdownMult;
				if (timeInRampup > rampUpTime)
				{
					timeInRampup = rampUpTime;
				}
				slowdownEnded = false;
			}
			else
			{
				timeAccumulated += (0f - Time.deltaTime) * rechargeMultiplier / currentSlowdownMult;
				timeInRampup += (0f - Time.deltaTime) / currentSlowdownMult;
				if (timeInRampup < 0f)
				{
					timeInRampup = 0f;
				}
			}
			if (slowdownKeyActive && speedupPlayedForcefully)
			{
				timeAccumulated += (0f - Time.deltaTime) * rechargeMultiplier / currentSlowdownMult;
			}
			currentSlowdownMult = slowdownMult + (1f - slowdownMult) * Math.Max(rampUpTime - timeInRampup, 0f) / rampUpTime;
			if ((Object)(object)ShaderEffects.hudCamera == (Object)null && Time.frameCount % 128 == 0)
			{
				ShaderEffects.DiscoverCamera();
			}
			if ((Object)(object)ShaderEffects.hudCamera != (Object)null && visualsEnabled && timeInRampup >= rampUpTime)
			{
				ShaderEffects.enableHandColorShader();
			}
			ShaderEffects.UpdateShaderValues();
			SlowdownAlterAudioLogic();
			if (timeAccumulated <= 0f)
			{
				timeAccumulated = 0f;
			}
		}
	}
	public class PluginConfig
	{
		public enum KeyEnum
		{
			Backspace,
			Tab,
			Escape,
			Space,
			UpArrow,
			DownArrow,
			RightArrow,
			LeftArrow,
			A,
			B,
			C,
			D,
			E,
			F,
			G,
			H,
			I,
			J,
			K,
			L,
			M,
			N,
			O,
			P,
			Q,
			R,
			S,
			T,
			U,
			V,
			W,
			X,
			Y,
			Z,
			Alpha1,
			Alpha2,
			Alpha3,
			Alpha4,
			Alpha5,
			Alpha6,
			Alpha7,
			Alpha8,
			Alpha9,
			Alpha0,
			CapsLock,
			RightShift,
			LeftShift,
			RightControl,
			LeftControl,
			RightAlt,
			LeftAlt,
			Mouse1,
			Mouse2,
			Mouse3,
			Mouse4,
			Mouse5,
			Mouse6,
			Mouse7,
			BackQuote,
			EqualsSign,
			Minus,
			LeftBracket,
			RightBracket,
			Semicolon,
			Quote,
			Comma,
			Period,
			Slash,
			Backslash,
			Numlock,
			KeypadDivide,
			KeypadMultiply,
			KeypadMinus,
			KeypadPlus,
			KeypadEnter,
			KeypadPeriod,
			Keypad0,
			Keypad1,
			Keypad2,
			Keypad3,
			Keypad4,
			Keypad5,
			Keypad6,
			Keypad7,
			Keypad8,
			Keypad9,
			Home,
			End,
			PageUp,
			PageDown,
			Enter,
			F1,
			F2,
			F3,
			F4,
			F5,
			F6,
			F7,
			F8,
			F9,
			F10,
			F11,
			F12,
			F13,
			F14,
			F15
		}

		public enum QuadrantEnum
		{
			One,
			Two,
			Three,
			Four
		}

		public enum IntensityEnum
		{
			None,
			VeryLight,
			Light,
			Medium,
			MediumHeavy,
			Heavy,
			VeryHeavy,
			Nightmare
		}

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

			public static FloatValueChangeEventDelegate <>9__9_2;

			public static FloatValueChangeEventDelegate <>9__9_4;

			public static FloatValueChangeEventDelegate <>9__9_5;

			public static FloatValueChangeEventDelegate <>9__9_6;

			public static BoolValueChangeEventDelegate <>9__9_7;

			public static IntValueChangeEventDelegate <>9__9_8;

			public static BoolValueChangeEventDelegate <>9__9_9;

			public static EnumValueChangeEventDelegate<IntensityEnum> <>9__9_10;

			public static EnumValueChangeEventDelegate<IntensityEnum> <>9__9_11;

			public static FloatValueChangeEventDelegate <>9__9_12;

			public static ColorValueChangeEventDelegate <>9__9_17;

			public static FloatValueChangeEventDelegate <>9__9_18;

			public static FloatValueChangeEventDelegate <>9__9_19;

			public static FloatValueChangeEventDelegate <>9__9_20;

			public static FloatValueChangeEventDelegate <>9__9_21;

			public static FloatValueChangeEventDelegate <>9__9_22;

			public static EnumValueChangeEventDelegate<KeyEnum> <>9__9_23;

			public static BoolValueChangeEventDelegate <>9__9_24;

			public static FloatValueChangeEventDelegate <>9__9_25;

			public static EnumValueChangeEventDelegate<QuadrantEnum> <>9__9_26;

			public static BoolValueChangeEventDelegate <>9__9_27;

			public static BoolValueChangeEventDelegate <>9__9_28;

			public static BoolValueChangeEventDelegate <>9__9_29;

			public static FloatValueChangeEventDelegate <>9__9_30;

			public static FloatValueChangeEventDelegate <>9__9_31;

			public static FloatValueChangeEventDelegate <>9__9_32;

			public static FloatValueChangeEventDelegate <>9__9_33;

			public static FloatValueChangeEventDelegate <>9__9_34;

			internal void <UltraTimeManipulationConfig>b__9_2(FloatValueChangeEvent e)
			{
				Plugin.volumeMult = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_4(FloatValueChangeEvent e)
			{
				Plugin.soundSlowdownFactor = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_5(FloatValueChangeEvent e)
			{
				Plugin.musicSlowdownFactor = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_6(FloatValueChangeEvent e)
			{
				Plugin.parrySoundSlowdownFactor = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_7(BoolValueChangeEvent e)
			{
				Plugin.muffleMusicSlowDown = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_8(IntValueChangeEvent e)
			{
				Plugin.soundUpdateDelay = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_9(BoolValueChangeEvent e)
			{
				Plugin.visualsEnabled = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_10(EnumValueChangeEvent<IntensityEnum> e)
			{
				Plugin.slowdownColorCompression = convertIntensityEnumToColorCompressionFloat(e.value);
			}

			internal void <UltraTimeManipulationConfig>b__9_11(EnumValueChangeEvent<IntensityEnum> e)
			{
				Plugin.slowdownDarkness = convertIntensityEnumToGammaFloat(e.value);
			}

			internal void <UltraTimeManipulationConfig>b__9_12(FloatValueChangeEvent e)
			{
				Plugin.slowdownFadeTime = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_17(ColorValueChangeEvent e)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				ShaderEffects.colorHandsColor = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_18(FloatValueChangeEvent e)
			{
				ShaderEffects.colorChangeDepth = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_19(FloatValueChangeEvent e)
			{
				ShaderEffects.visualNoiseIntensity = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_20(FloatValueChangeEvent e)
			{
				ShaderEffects.visualNoiseFrequency = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_21(FloatValueChangeEvent e)
			{
				ShaderEffects.grainIntensity = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_22(FloatValueChangeEvent e)
			{
				ShaderEffects.colorGrainIntensity = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_23(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				Plugin.slowdownCode = convertKeyEnumToKeyCode(e.value);
			}

			internal void <UltraTimeManipulationConfig>b__9_24(BoolValueChangeEvent e)
			{
				Plugin.keyToggleFunctionality = e.value;
				Debug.Log((object)e.value);
			}

			internal void <UltraTimeManipulationConfig>b__9_25(FloatValueChangeEvent e)
			{
				Plugin.HUDScale = e.value / 4f;
			}

			internal void <UltraTimeManipulationConfig>b__9_26(EnumValueChangeEvent<QuadrantEnum> e)
			{
				Plugin.HUDQuadrant = convertQuadrantEnumToInt(e.value);
			}

			internal void <UltraTimeManipulationConfig>b__9_27(BoolValueChangeEvent e)
			{
				Plugin.minimalHUD = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_28(BoolValueChangeEvent e)
			{
				Plugin.HUDFlashing = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_29(BoolValueChangeEvent e)
			{
				Plugin.HUDSparks = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_30(FloatValueChangeEvent e)
			{
				Plugin.HUDSparksFadeOutTime = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_31(FloatValueChangeEvent e)
			{
				Plugin.slowdownMult = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_32(FloatValueChangeEvent e)
			{
				Plugin.maxTimeAccumulated = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_33(FloatValueChangeEvent e)
			{
				Plugin.rampUpTime = e.value;
			}

			internal void <UltraTimeManipulationConfig>b__9_34(FloatValueChangeEvent e)
			{
				Plugin.rechargeMultiplier = e.value;
			}
		}

		public static KeyCode convertKeyEnumToKeyCode(KeyEnum value)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f71: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f72: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f76: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: 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_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0280: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_0310: Unknown result type (might be due to invalid IL or missing references)
			//IL_0334: Unknown result type (might be due to invalid IL or missing references)
			//IL_0358: Unknown result type (might be due to invalid IL or missing references)
			//IL_037c: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_040c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0430: Unknown result type (might be due to invalid IL or missing references)
			//IL_0454: Unknown result type (might be due to invalid IL or missing references)
			//IL_0478: Unknown result type (might be due to invalid IL or missing references)
			//IL_049c: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0508: Unknown result type (might be due to invalid IL or missing references)
			//IL_052c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0550: Unknown result type (might be due to invalid IL or missing references)
			//IL_0574: Unknown result type (might be due to invalid IL or missing references)
			//IL_0598: Unknown result type (might be due to invalid IL or missing references)
			//IL_05bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0604: Unknown result type (might be due to invalid IL or missing references)
			//IL_0628: Unknown result type (might be due to invalid IL or missing references)
			//IL_064f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0676: Unknown result type (might be due to invalid IL or missing references)
			//IL_069d: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0712: Unknown result type (might be due to invalid IL or missing references)
			//IL_0739: Unknown result type (might be due to invalid IL or missing references)
			//IL_0760: Unknown result type (might be due to invalid IL or missing references)
			//IL_0787: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_07d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0823: Unknown result type (might be due to invalid IL or missing references)
			//IL_084a: Unknown result type (might be due to invalid IL or missing references)
			//IL_086e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0892: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_08da: Unknown result type (might be due to invalid IL or missing references)
			//IL_08fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0922: Unknown result type (might be due to invalid IL or missing references)
			//IL_0946: Unknown result type (might be due to invalid IL or missing references)
			//IL_096a: Unknown result type (might be due to invalid IL or missing references)
			//IL_098e: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_09fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a24: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a72: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a99: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ac0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b0e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b35: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b5c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b83: Unknown result type (might be due to invalid IL or missing references)
			//IL_0baa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bd1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bf8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c1f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c46: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c6d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c94: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cbb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ce2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d09: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d2d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d54: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d7b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0da2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dc9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0df0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e17: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e3e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e65: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e8c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eb3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eda: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f01: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f25: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f49: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f6d: Unknown result type (might be due to invalid IL or missing references)
			KeyCode result = (KeyCode)0;
			if (value.Equals(KeyEnum.Backspace))
			{
				result = (KeyCode)8;
			}
			else if (value.Equals(KeyEnum.Tab))
			{
				result = (KeyCode)9;
			}
			else if (value.Equals(KeyEnum.Escape))
			{
				result = (KeyCode)27;
			}
			else if (value.Equals(KeyEnum.Space))
			{
				result = (KeyCode)32;
			}
			else if (value.Equals(KeyEnum.UpArrow))
			{
				result = (KeyCode)273;
			}
			else if (value.Equals(KeyEnum.DownArrow))
			{
				result = (KeyCode)274;
			}
			else if (value.Equals(KeyEnum.RightArrow))
			{
				result = (KeyCode)275;
			}
			else if (value.Equals(KeyEnum.LeftArrow))
			{
				result = (KeyCode)276;
			}
			else if (value.Equals(KeyEnum.A))
			{
				result = (KeyCode)97;
			}
			else if (value.Equals(KeyEnum.B))
			{
				result = (KeyCode)98;
			}
			else if (value.Equals(KeyEnum.C))
			{
				result = (KeyCode)99;
			}
			else if (value.Equals(KeyEnum.D))
			{
				result = (KeyCode)100;
			}
			else if (value.Equals(KeyEnum.E))
			{
				result = (KeyCode)101;
			}
			else if (value.Equals(KeyEnum.F))
			{
				result = (KeyCode)102;
			}
			else if (value.Equals(KeyEnum.G))
			{
				result = (KeyCode)103;
			}
			else if (value.Equals(KeyEnum.H))
			{
				result = (KeyCode)104;
			}
			else if (value.Equals(KeyEnum.I))
			{
				result = (KeyCode)105;
			}
			else if (value.Equals(KeyEnum.J))
			{
				result = (KeyCode)106;
			}
			else if (value.Equals(KeyEnum.K))
			{
				result = (KeyCode)107;
			}
			else if (value.Equals(KeyEnum.L))
			{
				result = (KeyCode)108;
			}
			else if (value.Equals(KeyEnum.M))
			{
				result = (KeyCode)109;
			}
			else if (value.Equals(KeyEnum.N))
			{
				result = (KeyCode)110;
			}
			else if (value.Equals(KeyEnum.O))
			{
				result = (KeyCode)111;
			}
			else if (value.Equals(KeyEnum.P))
			{
				result = (KeyCode)112;
			}
			else if (value.Equals(KeyEnum.Q))
			{
				result = (KeyCode)113;
			}
			else if (value.Equals(KeyEnum.R))
			{
				result = (KeyCode)114;
			}
			else if (value.Equals(KeyEnum.S))
			{
				result = (KeyCode)115;
			}
			else if (value.Equals(KeyEnum.T))
			{
				result = (KeyCode)116;
			}
			else if (value.Equals(KeyEnum.U))
			{
				result = (KeyCode)117;
			}
			else if (value.Equals(KeyEnum.V))
			{
				result = (KeyCode)118;
			}
			else if (value.Equals(KeyEnum.W))
			{
				result = (KeyCode)119;
			}
			else if (value.Equals(KeyEnum.X))
			{
				result = (KeyCode)120;
			}
			else if (value.Equals(KeyEnum.Y))
			{
				result = (KeyCode)121;
			}
			else if (value.Equals(KeyEnum.Z))
			{
				result = (KeyCode)122;
			}
			else if (value.Equals(KeyEnum.Alpha1))
			{
				result = (KeyCode)49;
			}
			else if (value.Equals(KeyEnum.Alpha2))
			{
				result = (KeyCode)50;
			}
			else if (value.Equals(KeyEnum.Alpha3))
			{
				result = (KeyCode)51;
			}
			else if (value.Equals(KeyEnum.Alpha4))
			{
				result = (KeyCode)52;
			}
			else if (value.Equals(KeyEnum.Alpha5))
			{
				result = (KeyCode)53;
			}
			else if (value.Equals(KeyEnum.Alpha6))
			{
				result = (KeyCode)54;
			}
			else if (value.Equals(KeyEnum.Alpha7))
			{
				result = (KeyCode)55;
			}
			else if (value.Equals(KeyEnum.Alpha8))
			{
				result = (KeyCode)56;
			}
			else if (value.Equals(KeyEnum.Alpha9))
			{
				result = (KeyCode)57;
			}
			else if (value.Equals(KeyEnum.Alpha0))
			{
				result = (KeyCode)48;
			}
			else if (value.Equals(KeyEnum.CapsLock))
			{
				result = (KeyCode)301;
			}
			else if (value.Equals(KeyEnum.RightShift))
			{
				result = (KeyCode)303;
			}
			else if (value.Equals(KeyEnum.LeftShift))
			{
				result = (KeyCode)304;
			}
			else if (value.Equals(KeyEnum.RightControl))
			{
				result = (KeyCode)305;
			}
			else if (value.Equals(KeyEnum.LeftControl))
			{
				result = (KeyCode)306;
			}
			else if (value.Equals(KeyEnum.RightAlt))
			{
				result = (KeyCode)307;
			}
			else if (value.Equals(KeyEnum.LeftAlt))
			{
				result = (KeyCode)308;
			}
			else if (value.Equals(KeyEnum.Mouse1))
			{
				result = (KeyCode)323;
			}
			else if (value.Equals(KeyEnum.Mouse2))
			{
				result = (KeyCode)324;
			}
			else if (value.Equals(KeyEnum.Mouse3))
			{
				result = (KeyCode)325;
			}
			else if (value.Equals(KeyEnum.Mouse4))
			{
				result = (KeyCode)326;
			}
			else if (value.Equals(KeyEnum.Mouse5))
			{
				result = (KeyCode)327;
			}
			else if (value.Equals(KeyEnum.Mouse6))
			{
				result = (KeyCode)328;
			}
			else if (value.Equals(KeyEnum.Mouse7))
			{
				result = (KeyCode)329;
			}
			else
			{
				if (value.Equals(KeyEnum.BackQuote))
				{
					return (KeyCode)96;
				}
				if (value.Equals(KeyEnum.EqualsSign))
				{
					return (KeyCode)61;
				}
				if (value.Equals(KeyEnum.Minus))
				{
					return (KeyCode)45;
				}
				if (value.Equals(KeyEnum.LeftBracket))
				{
					return (KeyCode)91;
				}
				if (value.Equals(KeyEnum.RightBracket))
				{
					return (KeyCode)93;
				}
				if (value.Equals(KeyEnum.Semicolon))
				{
					return (KeyCode)59;
				}
				if (value.Equals(KeyEnum.Quote))
				{
					return (KeyCode)39;
				}
				if (value.Equals(KeyEnum.Comma))
				{
					return (KeyCode)44;
				}
				if (value.Equals(KeyEnum.Period))
				{
					return (KeyCode)46;
				}
				if (value.Equals(KeyEnum.Slash))
				{
					return (KeyCode)47;
				}
				if (value.Equals(KeyEnum.Backslash))
				{
					return (KeyCode)92;
				}
				if (value.Equals(KeyEnum.Numlock))
				{
					return (KeyCode)300;
				}
				if (value.Equals(KeyEnum.KeypadDivide))
				{
					return (KeyCode)267;
				}
				if (value.Equals(KeyEnum.KeypadMultiply))
				{
					return (KeyCode)268;
				}
				if (value.Equals(KeyEnum.KeypadMinus))
				{
					return (KeyCode)269;
				}
				if (value.Equals(KeyEnum.KeypadPlus))
				{
					return (KeyCode)270;
				}
				if (value.Equals(KeyEnum.KeypadEnter))
				{
					return (KeyCode)271;
				}
				if (value.Equals(KeyEnum.KeypadPeriod))
				{
					return (KeyCode)266;
				}
				if (value.Equals(KeyEnum.Keypad0))
				{
					return (KeyCode)256;
				}
				if (value.Equals(KeyEnum.Keypad1))
				{
					return (KeyCode)257;
				}
				if (value.Equals(KeyEnum.Keypad2))
				{
					return (KeyCode)258;
				}
				if (value.Equals(KeyEnum.Keypad3))
				{
					return (KeyCode)259;
				}
				if (value.Equals(KeyEnum.Keypad4))
				{
					return (KeyCode)260;
				}
				if (value.Equals(KeyEnum.Keypad5))
				{
					return (KeyCode)261;
				}
				if (value.Equals(KeyEnum.Keypad6))
				{
					return (KeyCode)262;
				}
				if (value.Equals(KeyEnum.Keypad7))
				{
					return (KeyCode)263;
				}
				if (value.Equals(KeyEnum.Keypad8))
				{
					return (KeyCode)264;
				}
				if (value.Equals(KeyEnum.Keypad9))
				{
					return (KeyCode)265;
				}
				if (value.Equals(KeyEnum.Home))
				{
					return (KeyCode)278;
				}
				if (value.Equals(KeyEnum.End))
				{
					return (KeyCode)279;
				}
				if (value.Equals(KeyEnum.PageUp))
				{
					return (KeyCode)280;
				}
				if (value.Equals(KeyEnum.PageDown))
				{
					return (KeyCode)281;
				}
				if (value.Equals(KeyEnum.Enter))
				{
					return (KeyCode)13;
				}
				if (value.Equals(KeyEnum.F1))
				{
					return (KeyCode)282;
				}
				if (value.Equals(KeyEnum.F2))
				{
					return (KeyCode)283;
				}
				if (value.Equals(KeyEnum.F3))
				{
					return (KeyCode)284;
				}
				if (value.Equals(KeyEnum.F4))
				{
					return (KeyCode)285;
				}
				if (value.Equals(KeyEnum.F5))
				{
					return (KeyCode)286;
				}
				if (value.Equals(KeyEnum.F6))
				{
					return (KeyCode)287;
				}
				if (value.Equals(KeyEnum.F7))
				{
					return (KeyCode)288;
				}
				if (value.Equals(KeyEnum.F8))
				{
					return (KeyCode)289;
				}
				if (value.Equals(KeyEnum.F9))
				{
					return (KeyCode)290;
				}
				if (value.Equals(KeyEnum.F10))
				{
					return (KeyCode)291;
				}
				if (value.Equals(KeyEnum.F11))
				{
					return (KeyCode)292;
				}
				if (value.Equals(KeyEnum.F12))
				{
					return (KeyCode)293;
				}
				if (value.Equals(KeyEnum.F13))
				{
					return (KeyCode)294;
				}
				if (value.Equals(KeyEnum.F14))
				{
					return (KeyCode)295;
				}
				if (value.Equals(KeyEnum.F15))
				{
					return (KeyCode)296;
				}
			}
			return result;
		}

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

		public static int convertQuadrantEnumToInt(QuadrantEnum value)
		{
			int result = 0;
			if (value.Equals(QuadrantEnum.One))
			{
				result = 1;
			}
			else if (value.Equals(QuadrantEnum.Two))
			{
				result = 2;
			}
			else if (value.Equals(QuadrantEnum.Three))
			{
				result = 3;
			}
			else if (value.Equals(QuadrantEnum.Four))
			{
				result = 4;
			}
			return result;
		}

		public static float convertIntensityEnumToColorCompressionFloat(IntensityEnum value)
		{
			float result = 0f;
			if (value.Equals(IntensityEnum.None))
			{
				result = -20f;
			}
			if (value.Equals(IntensityEnum.VeryLight))
			{
				result = -0.5f;
			}
			if (value.Equals(IntensityEnum.Light))
			{
				result = 0f;
			}
			if (value.Equals(IntensityEnum.Medium))
			{
				result = 0.2f;
			}
			if (value.Equals(IntensityEnum.MediumHeavy))
			{
				result = 0.4f;
			}
			if (value.Equals(IntensityEnum.Heavy))
			{
				result = 0.6f;
			}
			if (value.Equals(IntensityEnum.VeryHeavy))
			{
				result = 1f;
			}
			if (value.Equals(IntensityEnum.Nightmare))
			{
				result = 1.5f;
			}
			return result;
		}

		public static float convertIntensityEnumToGammaFloat(IntensityEnum value)
		{
			float result = 0f;
			if (value.Equals(IntensityEnum.None))
			{
				result = 0f;
			}
			if (value.Equals(IntensityEnum.VeryLight))
			{
				result = 0.1f;
			}
			if (value.Equals(IntensityEnum.Light))
			{
				result = 0.25f;
			}
			if (value.Equals(IntensityEnum.Medium))
			{
				result = 0.4f;
			}
			if (value.Equals(IntensityEnum.MediumHeavy))
			{
				result = 0.6f;
			}
			if (value.Equals(IntensityEnum.Heavy))
			{
				result = 0.8f;
			}
			if (value.Equals(IntensityEnum.VeryHeavy))
			{
				result = 1f;
			}
			if (value.Equals(IntensityEnum.Nightmare))
			{
				result = 1.5f;
			}
			return result;
		}

		public static void OpenSoundFolder()
		{
			Application.OpenURL(Plugin.DefaultParentFolder);
		}

		public static void UltraTimeManipulationConfig()
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Expected O, but got Unknown
			//IL_0053: 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_0075: Expected O, but got Unknown
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Expected O, but got Unknown
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Expected O, but got Unknown
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Expected O, but got Unknown
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Expected O, but got Unknown
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Expected O, but got Unknown
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Expected O, but got Unknown
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Expected O, but got Unknown
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Expected O, but got Unknown
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Expected O, but got Unknown
			//IL_01de: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e8: Expected O, but got Unknown
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fb: Expected O, but got Unknown
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: Expected O, but got Unknown
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Expected O, but got Unknown
			//IL_0293: Unknown result type (might be due to invalid IL or missing references)
			//IL_029a: Expected O, but got Unknown
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Expected O, but got Unknown
			//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: Expected O, but got Unknown
			//IL_02b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bb: Expected O, but got Unknown
			//IL_0337: Unknown result type (might be due to invalid IL or missing references)
			//IL_033e: Expected O, but got Unknown
			//IL_0309: Unknown result type (might be due to invalid IL or missing references)
			//IL_030e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0314: Expected O, but got Unknown
			//IL_037e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0385: Expected O, but got Unknown
			//IL_0391: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b7: Expected O, but got Unknown
			//IL_0354: Unknown result type (might be due to invalid IL or missing references)
			//IL_0359: Unknown result type (might be due to invalid IL or missing references)
			//IL_035f: Expected O, but got Unknown
			//IL_03f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fd: Expected O, but got Unknown
			//IL_0406: Unknown result type (might be due to invalid IL or missing references)
			//IL_0410: Expected O, but got Unknown
			//IL_0421: Unknown result type (might be due to invalid IL or missing references)
			//IL_0428: Expected O, but got Unknown
			//IL_0435: Unknown result type (might be due to invalid IL or missing references)
			//IL_043c: Expected O, but got Unknown
			//IL_03cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d8: Expected O, but got Unknown
			//IL_0452: Unknown result type (might be due to invalid IL or missing references)
			//IL_0457: Unknown result type (might be due to invalid IL or missing references)
			//IL_045d: Expected O, but got Unknown
			//IL_0568: Unknown result type (might be due to invalid IL or missing references)
			//IL_056f: Expected O, but got Unknown
			//IL_058b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0595: Expected O, but got Unknown
			//IL_05d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e3: Expected O, but got Unknown
			//IL_0618: Unknown result type (might be due to invalid IL or missing references)
			//IL_0622: Expected O, but got Unknown
			//IL_062f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0639: Expected O, but got Unknown
			//IL_0652: Unknown result type (might be due to invalid IL or missing references)
			//IL_065c: Expected O, but got Unknown
			//IL_05af: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ba: Expected O, but got Unknown
			//IL_0694: Unknown result type (might be due to invalid IL or missing references)
			//IL_069b: Expected O, but got Unknown
			//IL_06a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ae: Expected O, but got Unknown
			//IL_06d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_06df: Expected O, but got Unknown
			//IL_06eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0707: Unknown result type (might be due to invalid IL or missing references)
			//IL_070e: Expected O, but got Unknown
			//IL_0717: Unknown result type (might be due to invalid IL or missing references)
			//IL_0721: Expected O, but got Unknown
			//IL_0766: Unknown result type (might be due to invalid IL or missing references)
			//IL_076b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0772: Expected O, but got Unknown
			//IL_079b: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_07cb: Expected O, but got Unknown
			//IL_0788: Unknown result type (might be due to invalid IL or missing references)
			//IL_078d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0793: Expected O, but got Unknown
			//IL_081d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0824: Expected O, but got Unknown
			//IL_07e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ec: Expected O, but got Unknown
			//IL_0876: Unknown result type (might be due to invalid IL or missing references)
			//IL_087d: Expected O, but got Unknown
			//IL_083a: Unknown result type (might be due to invalid IL or missing references)
			//IL_083f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0845: Expected O, but got Unknown
			//IL_08cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d6: Expected O, but got Unknown
			//IL_0893: Unknown result type (might be due to invalid IL or missing references)
			//IL_0898: Unknown result type (might be due to invalid IL or missing references)
			//IL_089e: Expected O, but got Unknown
			//IL_0928: Unknown result type (might be due to invalid IL or missing references)
			//IL_092f: Expected O, but got Unknown
			//IL_08ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f7: Expected O, but got Unknown
			//IL_0972: Unknown result type (might be due to invalid IL or missing references)
			//IL_0979: Expected O, but got Unknown
			//IL_0945: Unknown result type (might be due to invalid IL or missing references)
			//IL_094a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0950: Expected O, but got Unknown
			//IL_09bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_09c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_09db: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e2: Expected O, but got Unknown
			//IL_0a25: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a2c: Expected O, but got Unknown
			//IL_0a47: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4e: Expected O, but got Unknown
			//IL_09f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_09fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a03: Expected O, but got Unknown
			//IL_0a64: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a69: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a6f: Expected O, but got Unknown
			//IL_0ae0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae7: Expected O, but got Unknown
			//IL_0b27: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b2e: Expected O, but got Unknown
			//IL_0afd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b02: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b08: Expected O, but got Unknown
			//IL_0b6e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b75: Expected O, but got Unknown
			//IL_0b44: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b49: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b4f: Expected O, but got Unknown
			//IL_0bc3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bca: Expected O, but got Unknown
			//IL_0b8b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b90: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b96: Expected O, but got Unknown
			//IL_0c0d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c14: Expected O, but got Unknown
			//IL_0c2f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c36: Expected O, but got Unknown
			//IL_0be0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0be5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0beb: Expected O, but got Unknown
			//IL_0c84: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c8b: Expected O, but got Unknown
			//IL_0c4c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c51: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c57: Expected O, but got Unknown
			//IL_0cd9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ce0: Expected O, but got Unknown
			//IL_0ca1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ca6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cac: Expected O, but got Unknown
			//IL_0d2e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d35: Expected O, but got Unknown
			//IL_0cf6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cfb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d01: Expected O, but got Unknown
			//IL_0d4b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d50: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d56: Expected O, but got Unknown
			PluginConfigurator val = PluginConfigurator.Create("UltraTimeManipulation", "UltraTimeManipulation");
			val.SetIconWithURL(Path.Combine(Plugin.DefaultParentFolder, "icon.png") ?? "");
			ConfigHeader val2 = new ConfigHeader(val.rootPanel, "This mod disables score submissions when enabled.", 24);
			val2.textSize = 20;
			val2.textColor = Color.red;
			BoolField val3 = new BoolField(val.rootPanel, "Mod Enabled", "modEnabled", true);
			ConfigDivision division = new ConfigDivision(val.rootPanel, "division");
			val3.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e)
			{
				Plugin.modEnabled = e.value;
				((ConfigField)division).interactable = e.value;
				Time.timeScale = 1f;
			};
			Plugin.modEnabled = val3.value;
			((ConfigField)division).interactable = val3.value;
			Time.timeScale = 1f;
			ConfigPanel val4 = new ConfigPanel((ConfigPanel)(object)division, "Sounds", "sfxPanel");
			BoolField val5 = new BoolField(val4, "Sounds Enabled", "soundsEnabled", true);
			ConfigDivision soundDivision = new ConfigDivision(val4, "soundDivision");
			val5.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e)
			{
				Plugin.soundEnabled = e.value;
				((ConfigField)soundDivision).interactable = e.value;
			};
			Plugin.soundEnabled = val5.value;
			((ConfigField)soundDivision).interactable = val5.value;
			FloatField val6 = new FloatField((ConfigPanel)(object)soundDivision, "Slowdown Enter/Leave Volume Mult.", "volumeMultiplier", 0.7f, 0f, 1f);
			object obj = <>c.<>9__9_2;
			if (obj == null)
			{
				FloatValueChangeEventDelegate val7 = delegate(FloatValueChangeEvent e)
				{
					Plugin.volumeMult = e.value;
				};
				<>c.<>9__9_2 = val7;
				obj = (object)val7;
			}
			val6.onValueChange += (FloatValueChangeEventDelegate)obj;
			Plugin.volumeMult = val6.value;
			ConfigHeader val8 = new ConfigHeader((ConfigPanel)(object)soundDivision, "May need to restart game to reset some sounds.", 24);
			val8.textSize = 16;
			val8.textColor = Color.red;
			BoolField val9 = new BoolField((ConfigPanel)(object)soundDivision, "Sound Distortion Enabled", "soundDistortionEnabled", true);
			ConfigDivision soundDistortionDivision = new ConfigDivision((ConfigPanel)(object)soundDivision, "soundDistortiongDivision");
			val9.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e)
			{
				Plugin.soundDistortionEnabled = e.value;
				((ConfigField)soundDistortionDivision).interactable = e.value;
			};
			Plugin.soundDistortionEnabled = val9.value;
			((ConfigField)soundDistortionDivision).interactable = val9.value;
			FloatField val10 = new FloatField((ConfigPanel)(object)soundDistortionDivision, "General Sound Slowdown Multiplier", "soundSlowdownAmount", 1f, 0f, 1f);
			object obj2 = <>c.<>9__9_4;
			if (obj2 == null)
			{
				FloatValueChangeEventDelegate val11 = delegate(FloatValueChangeEvent e)
				{
					Plugin.soundSlowdownFactor = e.value;
				};
				<>c.<>9__9_4 = val11;
				obj2 = (object)val11;
			}
			val10.onValueChange += (FloatValueChangeEventDelegate)obj2;
			Plugin.soundSlowdownFactor = val10.value;
			FloatField val12 = new FloatField((ConfigPanel)(object)soundDistortionDivision, "Music Slowdown Multiplier", "musicSlowdownAmount", 0.66f, 0f, 1f);
			object obj3 = <>c.<>9__9_5;
			if (obj3 == null)
			{
				FloatValueChangeEventDelegate val13 = delegate(FloatValueChangeEvent e)
				{
					Plugin.musicSlowdownFactor = e.value;
				};
				<>c.<>9__9_5 = val13;
				obj3 = (object)val13;
			}
			val12.onValueChange += (FloatValueChangeEventDelegate)obj3;
			Plugin.musicSlowdownFactor = val12.value;
			FloatField val14 = new FloatField((ConfigPanel)(object)soundDistortionDivision, "Parry Sound Slowdown Multiplier", "parrySoundSlowdownAmount", 0f, 0f, 1f);
			object obj4 = <>c.<>9__9_6;
			if (obj4 == null)
			{
				FloatValueChangeEventDelegate val15 = delegate(FloatValueChangeEvent e)
				{
					Plugin.parrySoundSlowdownFactor = e.value;
				};
				<>c.<>9__9_6 = val15;
				obj4 = (object)val15;
			}
			val14.onValueChange += (FloatValueChangeEventDelegate)obj4;
			Plugin.parrySoundSlowdownFactor = val14.value;
			BoolField val16 = new BoolField((ConfigPanel)(object)soundDistortionDivision, "Muffle Music in Slowdown", "muffleMusicSlowdown", true);
			object obj5 = <>c.<>9__9_7;
			if (obj5 == null)
			{
				BoolValueChangeEventDelegate val17 = delegate(BoolValueChangeEvent e)
				{
					Plugin.muffleMusicSlowDown = e.value;
				};
				<>c.<>9__9_7 = val17;
				obj5 = (object)val17;
			}
			val16.onValueChange += (BoolValueChangeEventDelegate)obj5;
			Plugin.muffleMusicSlowDown = val16.value;
			ConfigHeader val18 = new ConfigHeader((ConfigPanel)(object)soundDivision, "Finding every sound in the game is an expensive operation. The below field changes how often this operation occurs, measured in frames. Higher values save performance but reduce quality.", 24);
			val18.textSize = 16;
			val18.textColor = Color.red;
			IntField val19 = new IntField((ConfigPanel)(object)soundDivision, "Sound Update Delay", "soundUpdateDelay", 8, 1, 100);
			object obj6 = <>c.<>9__9_8;
			if (obj6 == null)
			{
				IntValueChangeEventDelegate val20 = delegate(IntValueChangeEvent e)
				{
					Plugin.soundUpdateDelay = e.value;
				};
				<>c.<>9__9_8 = val20;
				obj6 = (object)val20;
			}
			val19.onValueChange += (IntValueChangeEventDelegate)obj6;
			Plugin.soundUpdateDelay = val19.value;
			ButtonField val21 = new ButtonField(val4, "Open Sounds Folder", "button.openfolder");
			val21.onClick += new OnClick(OpenSoundFolder);
			ConfigPanel val22 = new ConfigPanel((ConfigPanel)(object)division, "Visuals", "visualsPanel");
			BoolField val23 = new BoolField(val22, "Visuals Enabled", "visualsEnabled", true);
			object obj7 = <>c.<>9__9_9;
			if (obj7 == null)
			{
				BoolValueChangeEventDelegate val24 = delegate(BoolValueChangeEvent e)
				{
					Plugin.visualsEnabled = e.value;
				};
				<>c.<>9__9_9 = val24;
				obj7 = (object)val24;
			}
			val23.onValueChange += (BoolValueChangeEventDelegate)obj7;
			Plugin.visualsEnabled = val23.value;
			EnumField<IntensityEnum> val25 = new EnumField<IntensityEnum>(val22, "Slowdown Color Compression", "slowdownColorCompression", IntensityEnum.Medium);
			val25.SetEnumDisplayName(IntensityEnum.VeryLight, "Very Light");
			val25.SetEnumDisplayName(IntensityEnum.MediumHeavy, "Medium-Heavy");
			val25.SetEnumDisplayName(IntensityEnum.VeryHeavy, "Very Heavy");
			val25.onValueChange += delegate(EnumValueChangeEvent<IntensityEnum> e)
			{
				Plugin.slowdownColorCompression = convertIntensityEnumToColorCompressionFloat(e.value);
			};
			Plugin.slowdownColorCompression = convertIntensityEnumToColorCompressionFloat(val25.value);
			EnumField<IntensityEnum> val26 = new EnumField<IntensityEnum>(val22, "Slowdown Gamma Reduction", "slowdownDarkness", IntensityEnum.Medium);
			val26.SetEnumDisplayName(IntensityEnum.VeryLight, "Very Light");
			val26.SetEnumDisplayName(IntensityEnum.MediumHeavy, "Medium-Heavy");
			val26.SetEnumDisplayName(IntensityEnum.VeryHeavy, "Very Heavy");
			val26.onValueChange += delegate(EnumValueChangeEvent<IntensityEnum> e)
			{
				Plugin.slowdownDarkness = convertIntensityEnumToGammaFloat(e.value);
			};
			Plugin.slowdownDarkness = convertIntensityEnumToGammaFloat(val26.value);
			BoolField val27 = new BoolField(val22, "End of Slowdown Fading", "slowdownFades", true);
			FloatField slowdownFadeTimeField = new FloatField(val22, "End of Slowdown Fade Time", "slowdownFadeTime", 1f, 0.01f, 100f);
			FloatField obj8 = slowdownFadeTimeField;
			object obj9 = <>c.<>9__9_12;
			if (obj9 == null)
			{
				FloatValueChangeEventDelegate val28 = delegate(FloatValueChangeEvent e)
				{
					Plugin.slowdownFadeTime = e.value;
				};
				<>c.<>9__9_12 = val28;
				obj9 = (object)val28;
			}
			obj8.onValueChange += (FloatValueChangeEventDelegate)obj9;
			Plugin.slowdownFadeTime = slowdownFadeTimeField.value;
			val27.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e)
			{
				Plugin.slowdownFades = e.value;
				((ConfigField)slowdownFadeTimeField).interactable = e.value;
			};
			Plugin.slowdownFades = val27.value;
			((ConfigField)slowdownFadeTimeField).interactable = val27.value;
			ConfigDivision customShadersDivision = null;
			BoolField useCustomShadersField = new BoolField(val22, "Use Custom Shaders? (experimental)", "slowdownUseCustomShaders", false);
			useCustomShadersField.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e)
			{
				ShaderEffects.visualsCustomShadersEnabled = e.value;
				((ConfigField)customShadersDivision).interactable = e.value;
				ShaderEffects.slowdownColorsTargets = ShaderEffects.slowdownColorsTargets && e.value;
				ShaderEffects.colorHands = ShaderEffects.colorHands && e.value;
			};
			ShaderEffects.visualsCustomShadersEnabled = useCustomShadersField.value;
			customShadersDivision = new ConfigDivision(val22, "customShadersDivision");
			((ConfigField)customShadersDivision).interactable = useCustomShadersField.value && useCustomShadersField.value;
			BoolField val29 = new BoolField((ConfigPanel)(object)customShadersDivision, "Slowdown Colors Hands?", "slowdownColorHands", true);
			val29.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e)
			{
				ShaderEffects.colorHands = e.value && useCustomShadersField.value;
			};
			ShaderEffects.colorHands = val29.value && useCustomShadersField.value;
			ConfigHeader val30 = new ConfigHeader((ConfigPanel)(object)customShadersDivision, "Below option disables certain game shaders for targets (enemies and projectiles). Currently disabled because it is not functional.", 24);
			val30.textSize = 12;
			val30.textColor = Color.red;
			BoolField val31 = new BoolField((ConfigPanel)(object)customShadersDivision, "Slowdown Brightens Targets?", "slowdownColorTargets", false);
			val31.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e)
			{
				ShaderEffects.slowdownColorsTargets = e.value && useCustomShadersField.value;
			};
			ShaderEffects.slowdownColorsTargets = val31.value && useCustomShadersField.value;
			((ConfigField)val31).interactable = false;
			ColorField val32 = new ColorField((ConfigPanel)(object)customShadersDivision, "Color of Hands", "slowdownColorHandsColor", new Color(0f, 13f / 15f, 1f));
			object obj10 = <>c.<>9__9_17;
			if (obj10 == null)
			{
				ColorValueChangeEventDelegate val33 = delegate(ColorValueChangeEvent e)
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0007: Unknown result type (might be due to invalid IL or missing references)
					ShaderEffects.colorHandsColor = e.value;
				};
				<>c.<>9__9_17 = val33;
				obj10 = (object)val33;
			}
			val32.onValueChange += (ColorValueChangeEventDelegate)obj10;
			ShaderEffects.colorHandsColor = val32.value;
			FloatField val34 = new FloatField((ConfigPanel)(object)customShadersDivision, "Color of Hands Depth", "slowdownColorHandsDepth", 0.8f, 0f, 1f);
			object obj11 = <>c.<>9__9_18;
			if (obj11 == null)
			{
				FloatValueChangeEventDelegate val35 = delegate(FloatValueChangeEvent e)
				{
					ShaderEffects.colorChangeDepth = e.value;
				};
				<>c.<>9__9_18 = val35;
				obj11 = (object)val35;
			}
			val34.onValueChange += (FloatValueChangeEventDelegate)obj11;
			ShaderEffects.colorChangeDepth = val34.value;
			FloatField val36 = new FloatField((ConfigPanel)(object)customShadersDivision, "Patterned Noise Intensity", "visualNoiseIntensity", 0.12f, 0f, 1f);
			object obj12 = <>c.<>9__9_19;
			if (obj12 == null)
			{
				FloatValueChangeEventDelegate val37 = delegate(FloatValueChangeEvent e)
				{
					ShaderEffects.visualNoiseIntensity = e.value;
				};
				<>c.<>9__9_19 = val37;
				obj12 = (object)val37;
			}
			val36.onValueChange += (FloatValueChangeEventDelegate)obj12;
			ShaderEffects.visualNoiseIntensity = val36.value;
			FloatField val38 = new FloatField((ConfigPanel)(object)customShadersDivision, "Patterned Noise Frequency", "visualNoiseFrequency", 100f, 0.1f, 100000f);
			object obj13 = <>c.<>9__9_20;
			if (obj13 == null)
			{
				FloatValueChangeEventDelegate val39 = delegate(FloatValueChangeEvent e)
				{
					ShaderEffects.visualNoiseFrequency = e.value;
				};
				<>c.<>9__9_20 = val39;
				obj13 = (object)val39;
			}
			val38.onValueChange += (FloatValueChangeEventDelegate)obj13;
			ShaderEffects.visualNoiseFrequency = val38.value;
			FloatField val40 = new FloatField((ConfigPanel)(object)customShadersDivision, "Opacity Grain Intensity", "visualGrainIntensity", 0.25f, 0f, 1f);
			object obj14 = <>c.<>9__9_21;
			if (obj14 == null)
			{
				FloatValueChangeEventDelegate val41 = delegate(FloatValueChangeEvent e)
				{
					ShaderEffects.grainIntensity = e.value;
				};
				<>c.<>9__9_21 = val41;
				obj14 = (object)val41;
			}
			val40.onValueChange += (FloatValueChangeEventDelegate)obj14;
			ShaderEffects.grainIntensity = val40.value;
			FloatField val42 = new FloatField((ConfigPanel)(object)customShadersDivision, "Color Grain Intensity", "visualColorGrainIntensity", 0.07f, 0f, 1f);
			object obj15 = <>c.<>9__9_22;
			if (obj15 == null)
			{
				FloatValueChangeEventDelegate val43 = delegate(FloatValueChangeEvent e)
				{
					ShaderEffects.colorGrainIntensity = e.value;
				};
				<>c.<>9__9_22 = val43;
				obj15 = (object)val43;
			}
			val42.onValueChange += (FloatValueChangeEventDelegate)obj15;
			ShaderEffects.colorGrainIntensity = val42.value;
			ConfigPanel val44 = new ConfigPanel((ConfigPanel)(object)division, "Input", "inputPanel");
			EnumField<KeyEnum> val45 = new EnumField<KeyEnum>(val44, "Slowdown Key", "keyID", KeyEnum.Mouse4);
			val45.onValueChange += delegate(EnumValueChangeEvent<KeyEnum> e)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				Plugin.slowdownCode = convertKeyEnumToKeyCode(e.value);
			};
			Plugin.slowdownCode = convertKeyEnumToKeyCode(val45.value);
			SetDisplayNames(val45);
			BoolField val46 = new BoolField(val44, "Toggle Instead Of Hold", "keyToggleFunctionality", false);
			object obj16 = <>c.<>9__9_24;
			if (obj16 == null)
			{
				BoolValueChangeEventDelegate val47 = delegate(BoolValueChangeEvent e)
				{
					Plugin.keyToggleFunctionality = e.value;
					Debug.Log((object)e.value);
				};
				<>c.<>9__9_24 = val47;
				obj16 = (object)val47;
			}
			val46.onValueChange += (BoolValueChangeEventDelegate)obj16;
			Plugin.keyToggleFunctionality = val46.value;
			ConfigPanel val48 = new ConfigPanel((ConfigPanel)(object)division, "HUD", "HUDPanel");
			FloatField val49 = new FloatField(val48, "HUD Scale", "HUDScale", 1f, 0.01f, 20f);
			object obj17 = <>c.<>9__9_25;
			if (obj17 == null)
			{
				FloatValueChangeEventDelegate val50 = delegate(FloatValueChangeEvent e)
				{
					Plugin.HUDScale = e.value / 4f;
				};
				<>c.<>9__9_25 = val50;
				obj17 = (object)val50;
			}
			val49.onValueChange += (FloatValueChangeEventDelegate)obj17;
			Plugin.HUDScale = val49.value / 4f;
			EnumField<QuadrantEnum> val51 = new EnumField<QuadrantEnum>(val48, "HUD Quadrant", "HUDQuadrant", QuadrantEnum.Two);
			val51.onValueChange += delegate(EnumValueChangeEvent<QuadrantEnum> e)
			{
				Plugin.HUDQuadrant = convertQuadrantEnumToInt(e.value);
			};
			Plugin.HUDQuadrant = convertQuadrantEnumToInt(val51.value);
			BoolField val52 = new BoolField(val48, "Minimal HUD", "minimalHUD", false);
			object obj18 = <>c.<>9__9_27;
			if (obj18 == null)
			{
				BoolValueChangeEventDelegate val53 = delegate(BoolValueChangeEvent e)
				{
					Plugin.minimalHUD = e.value;
				};
				<>c.<>9__9_27 = val53;
				obj18 = (object)val53;
			}
			val52.onValueChange += (BoolValueChangeEventDelegate)obj18;
			Plugin.minimalHUD = val52.value;
			BoolField val54 = new BoolField(val48, "Slowdown HUD Flickering", "flashingHUD", true);
			object obj19 = <>c.<>9__9_28;
			if (obj19 == null)
			{
				BoolValueChangeEventDelegate val55 = delegate(BoolValueChangeEvent e)
				{
					Plugin.HUDFlashing = e.value;
				};
				<>c.<>9__9_28 = val55;
				obj19 = (object)val55;
			}
			val54.onValueChange += (BoolValueChangeEventDelegate)obj19;
			Plugin.HUDFlashing = val54.value;
			BoolField val56 = new BoolField(val48, "Slowdown HUD Sparks", "sparkingHUD", true);
			object obj20 = <>c.<>9__9_29;
			if (obj20 == null)
			{
				BoolValueChangeEventDelegate val57 = delegate(BoolValueChangeEvent e)
				{
					Plugin.HUDSparks = e.value;
				};
				<>c.<>9__9_29 = val57;
				obj20 = (object)val57;
			}
			val56.onValueChange += (BoolValueChangeEventDelegate)obj20;
			Plugin.HUDSparks = val56.value;
			FloatField val58 = new FloatField(val48, "Slowdown HUD Sparks Lifetime", "sparkingLifetimeHUD", 0.8f, 0.01f, 10f);
			object obj21 = <>c.<>9__9_30;
			if (obj21 == null)
			{
				FloatValueChangeEventDelegate val59 = delegate(FloatValueChangeEvent e)
				{
					Plugin.HUDSparksFadeOutTime = e.value;
				};
				<>c.<>9__9_30 = val59;
				obj21 = (object)val59;
			}
			val58.onValueChange += (FloatValueChangeEventDelegate)obj21;
			Plugin.HUDSparksFadeOutTime = val58.value;
			ConfigPanel val60 = new ConfigPanel((ConfigPanel)(object)division, "Slowdown Effect", "slowdownEffectPanel");
			FloatField val61 = new FloatField(val60, "Slowdown Speed Multiplier", "slowdownMultiplier", 0.4f, 0.01f, 1f);
			object obj22 = <>c.<>9__9_31;
			if (obj22 == null)
			{
				FloatValueChangeEventDelegate val62 = delegate(FloatValueChangeEvent e)
				{
					Plugin.slowdownMult = e.value;
				};
				<>c.<>9__9_31 = val62;
				obj22 = (object)val62;
			}
			val61.onValueChange += (FloatValueChangeEventDelegate)obj22;
			Plugin.slowdownMult = val61.value;
			FloatField val63 = new FloatField(val60, "Slowdown Max Duration (s)", "maxTime", 6f, 0.05f, 1E+09f);
			object obj23 = <>c.<>9__9_32;
			if (obj23 == null)
			{
				FloatValueChangeEventDelegate val64 = delegate(FloatValueChangeEvent e)
				{
					Plugin.maxTimeAccumulated = e.value;
				};
				<>c.<>9__9_32 = val64;
				obj23 = (object)val64;
			}
			val63.onValueChange += (FloatValueChangeEventDelegate)obj23;
			Plugin.maxTimeAccumulated = val63.value;
			FloatField val65 = new FloatField(val60, "Slowdown Rampup Time (s)", "rampUpTime", 0.2f, 0.001f, 1E+09f);
			object obj24 = <>c.<>9__9_33;
			if (obj24 == null)
			{
				FloatValueChangeEventDelegate val66 = delegate(FloatValueChangeEvent e)
				{
					Plugin.rampUpTime = e.value;
				};
				<>c.<>9__9_33 = val66;
				obj24 = (object)val66;
			}
			val65.onValueChange += (FloatValueChangeEventDelegate)obj24;
			Plugin.rampUpTime = val65.value;
			FloatField val67 = new FloatField(val60, "Recharge Rate (seconds use / s)", "rechargeMultiplier", 0.75f, 0f, 1000f);
			object obj25 = <>c.<>9__9_34;
			if (obj25 == null)
			{
				FloatValueChangeEventDelegate val68 = delegate(FloatValueChangeEvent e)
				{
					Plugin.rechargeMultiplier = e.value;
				};
				<>c.<>9__9_34 = val68;
				obj25 = (object)val68;
			}
			val67.onValueChange += (FloatValueChangeEventDelegate)obj25;
			Plugin.rechargeMultiplier = val67.value;
		}
	}
	[HarmonyPatch(typeof(NewMovement))]
	internal class Effects
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void Darken()
		{
			if (!Plugin.modEnabled || !Plugin.visualsEnabled)
			{
				return;
			}
			float num = Plugin.timeInRampup / Plugin.rampUpTime;
			float num2 = num;
			if (Plugin.slowdownFades)
			{
				if (Plugin.speedupPlayedForcefully)
				{
					num2 = 0f;
				}
				if (Plugin.maxTimeAccumulated - Plugin.timeAccumulated < Plugin.slowdownFadeTime)
				{
					num2 = num2 * (Plugin.maxTimeAccumulated - Plugin.timeAccumulated) / Plugin.slowdownFadeTime;
				}
				if (num2 > 1f)
				{
					num2 = 1f;
				}
			}
			int num3 = 0;
			float num4 = 0f;
			switch (MonoSingleton<PrefsManager>.Instance.GetInt("colorCompression", 0))
			{
			case 0:
				num3 = 2048;
				num4 = 8f;
				break;
			case 1:
				num3 = 64;
				num4 = 3f;
				break;
			case 2:
				num3 = 32;
				num4 = 2f;
				break;
			case 3:
				num3 = 16;
				num4 = 1f;
				break;
			case 4:
				num3 = 8;
				num4 = 0f;
				break;
			case 5:
				num3 = 3;
				num4 = 0.5f;
				break;
			}
			num4 += Plugin.slowdownColorCompression;
			int num5 = (int)((double)num3 / Math.Pow(2.0, num2 * num4));
			if (num5 < 0)
			{
				num5 = 0;
			}
			if (num5 > num3)
			{
				num5 = num3;
			}
			Shader.SetGlobalInt("_ColorPrecision", num5);
			float @float = MonoSingleton<PrefsManager>.Instance.GetFloat("gamma", 0f);
			float num6 = @float - num2 * Plugin.slowdownDarkness;
			Shader.SetGlobalFloat("_Gamma", num6);
		}
	}
	public class ShaderEffects
	{
		[HarmonyPatch(typeof(GunControl), "ForceWeapon")]
		public class GunControlForceWeaponPatch
		{
			[HarmonyPostfix]
			private static void Postfix()
			{
				if (colorHands)
				{
					AddShaderToWeapon();
				}
			}
		}

		[HarmonyPatch(typeof(Enemy), "Start")]
		public class EnemyStartPatch
		{
			[HarmonyPostfix]
			private static void Postfix(Enemy __instance)
			{
				if (!slowdownColorsTargets)
				{
					return;
				}
				string name = ((Object)__instance).name;
				if (name.Contains("Puppet"))
				{
					return;
				}
				if (name.Contains("Malicious Face"))
				{
					GameObject gameObject = ((Component)((Component)__instance).transform.GetChild(0)).gameObject;
					GameObject gameObject2 = ((Component)gameObject.transform.GetChild(5)).gameObject;
					SkinnedMeshRenderer component = gameObject2.GetComponent<SkinnedMeshRenderer>();
					((Renderer)component).material.shader = targetShader;
				}
				else if (name.Contains("Providence"))
				{
					GameObject gameObject3 = ((Component)((Component)__instance).transform.GetChild(4)).gameObject;
					GameObject gameObject4 = ((Component)gameObject3.transform.GetChild(20)).gameObject;
					GameObject gameObject5 = ((Component)gameObject3.transform.GetChild(21)).gameObject;
					GameObject gameObject6 = ((Component)gameObject3.transform.GetChild(24)).gameObject;
					SkinnedMeshRenderer component2 = gameObject4.GetComponent<SkinnedMeshRenderer>();
					SkinnedMeshRenderer component3 = gameObject5.GetComponent<SkinnedMeshRenderer>();
					SkinnedMeshRenderer component4 = gameObject6.GetComponent<SkinnedMeshRenderer>();
					((Renderer)component2).material.shader = targetShader;
					((Renderer)component3).material.shader = targetShader;
					((Renderer)component4).material.shader = targetShader;
				}
				else
				{
					if (name.Contains("MinosBoss") || name.Contains("Leviathan") || name.Contains("Flesh Prison") || name.Contains("Flesh Panopticon"))
					{
						return;
					}
					if (name.Contains("CentaurMortar"))
					{
						GameObject gameObject7 = ((Component)((Component)__instance).transform.GetChild(1)).gameObject;
						SkinnedMeshRenderer component5 = gameObject7.GetComponent<SkinnedMeshRenderer>();
						((Renderer)component5).material.shader = targetShader;
					}
					else if (name.Contains("CentaurTower"))
					{
						GameObject gameObject8 = ((Component)((Component)__instance).transform.GetChild(1)).gameObject;
						SkinnedMeshRenderer component6 = gameObject8.GetComponent<SkinnedMeshRenderer>();
						((Renderer)component6).material.shader = targetShader;
					}
					else if (name.Contains("CentaurRocketLauncher"))
					{
						GameObject gameObject9 = ((Component)((Component)__instance).transform.GetChild(2)).gameObject;
						SkinnedMeshRenderer component7 = gameObject9.GetComponent<SkinnedMeshRenderer>();
						((Renderer)component7).material.shader = targetShader;
					}
					else if (__instance.IsZombie())
					{
						SkinnedMeshRenderer val = null;
						Zombie component8 = ((Component)__instance).GetComponent<Zombie>();
						if (name.Contains("Soldier"))
						{
							GameObject gameObject10 = ((Component)((Component)component8).transform.GetChild(0)).gameObject;
							GameObject gameObject11 = ((Component)gameObject10.transform.GetChild(0)).gameObject;
							GameObject gameObject12 = ((Component)gameObject11.transform.GetChild(0)).gameObject;
							GameObject gameObject13 = ((Component)gameObject12.transform.GetChild(0)).gameObject;
							val = gameObject13.GetComponent<SkinnedMeshRenderer>();
						}
						else if (name.Contains("Filth"))
						{
							GameObject gameObject14 = ((Component)((Component)component8).transform.GetChild(2)).gameObject;
							GameObject gameObject15 = ((Component)gameObject14.transform.GetChild(0)).gameObject;
							GameObject gameObject16 = ((Component)gameObject15.transform.GetChild(0)).gameObject;
							GameObject gameObject17 = ((Component)gameObject16.transform.GetChild(1)).gameObject;
							val = gameObject17.GetComponent<SkinnedMeshRenderer>();
						}
						else
						{
							GameObject gameObject18 = ((Component)((Component)component8).transform.GetChild(2)).gameObject;
							GameObject gameObject19 = ((Component)gameObject18.transform.GetChild(0)).gameObject;
							GameObject gameObject20 = ((Component)gameObject19.transform.GetChild(1)).gameObject;
							GameObject gameObject21 = ((Component)gameObject20.transform.GetChild(1)).gameObject;
							val = gameObject21.GetComponent<SkinnedMeshRenderer