Decompiled source of UltraCooldownInfo v0.0.2

UltraCooldownInfo.dll

Decompiled 5 hours 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 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.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("UltraCooldownInfo")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("UltraCooldownInfo")]
[assembly: AssemblyTitle("UltraCooldownInfo")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

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

		public static KeyCode showGUIKeyCode = (KeyCode)0;

		public static bool showGUIKeyToggle;

		public static bool modEnabled = true;

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

		private string barImageFile = Path.Combine(DefaultParentFolder, "bar.png") ?? "";

		public static string[] weaponNames = new string[22]
		{
			"Piercer Revolver Alt", "Marksman Revolver Alt", "Sharpshooter Revolver Alt", "Piercer Slab Fire", "Marksman Slab Fire", "Sharpshooter Slab Fire", "Sawed-On Shotgun Alt", "Core Eject Jackhammer Fire", "Pump Charge Jackhammer Fire", "Sawed-On Jackhammer Fire",
			"Attractor Nailgun Alt", "Overheat Nailgun Alt", "Jumpstart Nailgun Alt", "Attractor Nailgun Fire", "Railcannon", "Freezeframe Rocket Launcher Alt", "S.R.S. Rocket Launcher Alt", "Firestarter Rocket Launcher Alt", "Rocket Launcher Fire", "Fist",
			"Core Eject Shotgun Alt", "Pump Charge Shotgun Alt"
		};

		public static bool[] needsUseChargeColors = new bool[22]
		{
			true, false, true, false, false, false, true, true, true, true,
			true, true, true, false, false, false, true, false, false, false,
			true, true
		};

		public static bool[] needsChargeColors = new bool[22]
		{
			true, true, true, true, true, true, true, true, true, true,
			true, true, true, true, true, true, true, true, true, true,
			false, false
		};

		public static UltraCooldownInfoWeapon[] UltraCooldownInfoWeapons = new UltraCooldownInfoWeapon[weaponNames.Length];

		public static Color normalSharpshooterBackgroundChargingColor = new Color(0.5f, 0.5f, 0.5f, 1f);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

		private CustomSoundPlayer csp;

		private float[] chargeAmounts = new float[UltraCooldownInfoWeapons.Length];

		private float[] usingChargeAmounts = new float[UltraCooldownInfoWeapons.Length];

		private Revolver weapon_piercer;

		private Revolver weapon_marksman;

		private Revolver weapon_sharpshooter;

		private GameObject weapon_coreEject;

		private GameObject weapon_pumpCharge;

		private GameObject weapon_sawedOn;

		private Nailgun weapon_attractor;

		private Nailgun weapon_overheat;

		private Nailgun weapon_jumpstart;

		private RocketLauncher weapon_freezeframe;

		private RocketLauncher weapon_srs;

		private RocketLauncher weapon_firestarter;

		private GameObject weapon;

		private GameObject prevWeapon;

		private float[] flashingIconOpacities = new float[UltraCooldownInfoWeapons.Length];

		private bool tempDisable = false;

		public void Start()
		{
			ImageConversion.LoadImage(barTexture, File.ReadAllBytes(barImageFile));
			ImageConversion.LoadImage(weapon_piercerTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_piercer.png") ?? ""));
			ImageConversion.LoadImage(weapon_piercerAltTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_piercerAlt.png") ?? ""));
			ImageConversion.LoadImage(weapon_marksmanTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_marksman.png") ?? ""));
			ImageConversion.LoadImage(weapon_marksmanAltTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_marksmanAlt.png") ?? ""));
			ImageConversion.LoadImage(weapon_sharpshooterTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_sharpshooter.png") ?? ""));
			ImageConversion.LoadImage(weapon_sharpshooterAltTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_sharpshooterAlt.png") ?? ""));
			ImageConversion.LoadImage(weapon_coreejectTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_coreeject.png") ?? ""));
			ImageConversion.LoadImage(weapon_coreejectAltTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_coreejectAlt.png") ?? ""));
			ImageConversion.LoadImage(weapon_pumpchargeTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_pumpcharge.png") ?? ""));
			ImageConversion.LoadImage(weapon_pumpchargeAltTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_pumpchargeAlt.png") ?? ""));
			ImageConversion.LoadImage(weapon_sawedonTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_sawedon.png") ?? ""));
			ImageConversion.LoadImage(weapon_sawedonAltTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_sawedonAlt.png") ?? ""));
			ImageConversion.LoadImage(weapon_attractorTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_attractor.png") ?? ""));
			ImageConversion.LoadImage(weapon_attractorAltTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_attractorAlt.png") ?? ""));
			ImageConversion.LoadImage(weapon_overheatTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_overheat.png") ?? ""));
			ImageConversion.LoadImage(weapon_overheatAltTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_overheatAlt.png") ?? ""));
			ImageConversion.LoadImage(weapon_jumpstartTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_jumpstart.png") ?? ""));
			ImageConversion.LoadImage(weapon_jumpstartAltTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_jumpstartAlt.png") ?? ""));
			ImageConversion.LoadImage(weapon_railcannonTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_railcannon.png") ?? ""));
			ImageConversion.LoadImage(weapon_freezeframeTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_freezeframe.png") ?? ""));
			ImageConversion.LoadImage(weapon_srsTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_srs.png") ?? ""));
			ImageConversion.LoadImage(weapon_firestarterTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_firestarter.png") ?? ""));
			ImageConversion.LoadImage(weapon_fistTexture, File.ReadAllBytes(Path.Combine(DefaultParentFolder, "weapon_fist.png") ?? ""));
		}

		private void Awake()
		{
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Expected O, but got Unknown
			csp = ((Component)this).gameObject.AddComponent<CustomSoundPlayer>();
			for (int i = 0; i < UltraCooldownInfoWeapons.Length; i++)
			{
				chargeAmounts[i] = 1f;
				usingChargeAmounts[i] = 1f;
			}
			for (int j = 0; j < UltraCooldownInfoWeapons.Length; j++)
			{
				UltraCooldownInfoWeapons[j] = new UltraCooldownInfoWeapon(needsUseChargeColors[j], needsChargeColors[j], weaponNames[j]);
				if (j == 12)
				{
					UltraCooldownInfoWeapons[j].usingChargeChargedColorEnabled = false;
				}
			}
			for (int k = 0; k < UltraCooldownInfoWeapons.Length; k++)
			{
				UltraCooldownInfoWeapons[k].chargeAmount = 1f;
			}
			PluginConfig.CreateConfig();
			Harmony val = new Harmony("UltraCooldownInfo");
			val.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin UltraCooldownInfo is loaded!");
		}

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

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

		public void findWeapons()
		{
			if ((Object)(object)weapon != (Object)(object)MonoSingleton<GunControl>.Instance.currentWeapon)
			{
				prevWeapon = weapon;
			}
			weapon = MonoSingleton<GunControl>.Instance.currentWeapon;
			foreach (GameObject item in MonoSingleton<GunControl>.Instance.slot1)
			{
				if (item.GetComponent<Revolver>().gunVariation == 0)
				{
					weapon_piercer = item.GetComponent<Revolver>();
				}
				else if (item.GetComponent<Revolver>().gunVariation == 1)
				{
					weapon_marksman = item.GetComponent<Revolver>();
				}
				else if (item.GetComponent<Revolver>().gunVariation == 2)
				{
					weapon_sharpshooter = item.GetComponent<Revolver>();
				}
			}
			foreach (GameObject item2 in MonoSingleton<GunControl>.Instance.slot2)
			{
				if (!((Object)(object)item2 == (Object)null) && !((Object)(object)item2.GetComponent<Shotgun>() == (Object)null))
				{
					if (item2.GetComponent<Shotgun>().variation == 0)
					{
						weapon_coreEject = item2;
					}
					else if (item2.GetComponent<Shotgun>().variation == 1)
					{
						weapon_pumpCharge = item2;
					}
					else if (item2.GetComponent<Shotgun>().variation == 2)
					{
						weapon_sawedOn = item2;
					}
				}
			}
			foreach (GameObject item3 in MonoSingleton<GunControl>.Instance.slot2)
			{
				if (!((Object)(object)item3 == (Object)null) && !((Object)(object)item3.GetComponent<ShotgunHammer>() == (Object)null))
				{
					if (item3.GetComponent<ShotgunHammer>().variation == 0)
					{
						weapon_coreEject = item3;
					}
					else if (item3.GetComponent<ShotgunHammer>().variation == 1)
					{
						weapon_pumpCharge = item3;
					}
					else if (item3.GetComponent<ShotgunHammer>().variation == 2)
					{
						weapon_sawedOn = item3;
					}
				}
			}
			foreach (GameObject item4 in MonoSingleton<GunControl>.Instance.slot3)
			{
				if (item4.GetComponent<Nailgun>().variation == 1)
				{
					weapon_attractor = item4.GetComponent<Nailgun>();
				}
				else if (item4.GetComponent<Nailgun>().variation == 0)
				{
					weapon_overheat = item4.GetComponent<Nailgun>();
				}
				else if (item4.GetComponent<Nailgun>().variation == 2)
				{
					weapon_jumpstart = item4.GetComponent<Nailgun>();
				}
			}
			foreach (GameObject item5 in MonoSingleton<GunControl>.Instance.slot5)
			{
				if (item5.GetComponent<RocketLauncher>().variation == 0)
				{
					weapon_freezeframe = item5.GetComponent<RocketLauncher>();
				}
				else if (item5.GetComponent<RocketLauncher>().variation == 1)
				{
					weapon_srs = item5.GetComponent<RocketLauncher>();
				}
				else if (item5.GetComponent<RocketLauncher>().variation == 2)
				{
					weapon_firestarter = item5.GetComponent<RocketLauncher>();
				}
			}
		}

		public void findRevolverValues()
		{
			if ((Object)(object)weapon.GetComponent<Revolver>() == (Object)(object)weapon_piercer)
			{
				UltraCooldownInfoWeapons[0].chargeAmount = weapon_piercer.pierceCharge / 100f;
			}
			else
			{
				float num = 1f;
				if (weapon_piercer.altVersion)
				{
					num = 0.5f;
				}
				UltraCooldownInfoWeapons[0].chargeAmount += 40f * Time.deltaTime * num / 100f;
				if (UltraCooldownInfoWeapons[0].chargeAmount >= 1f)
				{
					UltraCooldownInfoWeapons[0].chargeAmount = 1f;
				}
			}
			UltraCooldownInfoWeapons[0].usingChargeAmount = weapon_piercer.pierceShotCharge / 100f;
			if ((Object)(object)weapon.GetComponent<Revolver>() == (Object)(object)weapon_marksman)
			{
				float num2 = 0f;
				for (int i = 0; i < weapon_marksman.coinPanels.Length; i++)
				{
					num2 += weapon_marksman.coinPanels[i].fillAmount;
				}
				UltraCooldownInfoWeapons[1].chargeAmount = num2 / (float)weapon_marksman.coinPanels.Length;
			}
			else
			{
				UltraCooldownInfoWeapons[1].chargeAmount += Time.deltaTime * 0.25f / 4f;
				if (UltraCooldownInfoWeapons[1].chargeAmount >= 1f)
				{
					UltraCooldownInfoWeapons[1].chargeAmount = 1f;
				}
			}
			UltraCooldownInfoWeapons[1].usingChargeAmount = -1f;
			if ((Object)(object)weapon.GetComponent<Revolver>() == (Object)(object)weapon_sharpshooter)
			{
				float num3 = 0f;
				for (int j = 0; j < weapon_sharpshooter.coinPanels.Length; j++)
				{
					num3 += weapon_sharpshooter.coinPanels[j].fillAmount;
				}
				UltraCooldownInfoWeapons[2].chargeAmount = num3 / (float)weapon_sharpshooter.coinPanels.Length;
			}
			else
			{
				float num4 = 0.85f;
				if (weapon_sharpshooter.altVersion)
				{
					num4 = 1.7f;
				}
				UltraCooldownInfoWeapons[2].chargeAmount += Time.deltaTime / 5f / 3f * num4;
				if (UltraCooldownInfoWeapons[2].chargeAmount > 1f)
				{
					UltraCooldownInfoWeapons[2].chargeAmount = 1f;
				}
			}
			UltraCooldownInfoWeapons[2].usingChargeAmount = weapon_sharpshooter.pierceShotCharge / 100f;
			UltraCooldownInfoWeapons[3].chargeAmount = (2f - MonoSingleton<WeaponCharges>.Instance.revaltpickupcharges[0]) / 2f;
			UltraCooldownInfoWeapons[3].usingChargeAmount = -1f;
			UltraCooldownInfoWeapons[4].chargeAmount = (2f - MonoSingleton<WeaponCharges>.Instance.revaltpickupcharges[1]) / 2f;
			UltraCooldownInfoWeapons[4].usingChargeAmount = -1f;
			UltraCooldownInfoWeapons[5].chargeAmount = (2f - MonoSingleton<WeaponCharges>.Instance.revaltpickupcharges[2]) / 2f;
			UltraCooldownInfoWeapons[5].usingChargeAmount = -1f;
		}

		public void findShotgunValues()
		{
			UltraCooldownInfoWeapons[6].chargeAmount = MonoSingleton<WeaponCharges>.Instance.shoSawCharge;
			if ((Object)(object)weapon_sawedOn.GetComponent<Shotgun>() != (Object)null)
			{
				UltraCooldownInfoWeapons[6].usingChargeAmount = weapon_sawedOn.GetComponent<Shotgun>().grenadeForce / 60f;
			}
			else if ((Object)(object)weapon_sawedOn.GetComponent<ShotgunHammer>() != (Object)null)
			{
				UltraCooldownInfoWeapons[6].usingChargeAmount = weapon_sawedOn.GetComponent<ShotgunHammer>().chargeForce / 60f;
			}
			UltraCooldownInfoWeapons[7].chargeAmount = (7f - MonoSingleton<WeaponCharges>.Instance.shoaltcooldowns[0]) / 7f;
			if ((Object)(object)weapon_coreEject.GetComponent<ShotgunHammer>() != (Object)null)
			{
				UltraCooldownInfoWeapons[7].usingChargeAmount = weapon_coreEject.GetComponent<ShotgunHammer>().swingCharge;
			}
			else
			{
				UltraCooldownInfoWeapons[7].usingChargeAmount = -1f;
			}
			UltraCooldownInfoWeapons[8].chargeAmount = (7f - MonoSingleton<WeaponCharges>.Instance.shoaltcooldowns[1]) / 7f;
			if ((Object)(object)weapon_pumpCharge.GetComponent<ShotgunHammer>() != (Object)null)
			{
				UltraCooldownInfoWeapons[8].usingChargeAmount = weapon_pumpCharge.GetComponent<ShotgunHammer>().swingCharge;
			}
			else
			{
				UltraCooldownInfoWeapons[8].usingChargeAmount = -1f;
			}
			UltraCooldownInfoWeapons[9].chargeAmount = (7f - MonoSingleton<WeaponCharges>.Instance.shoaltcooldowns[2]) / 7f;
			if ((Object)(object)weapon_sawedOn.GetComponent<ShotgunHammer>() != (Object)null)
			{
				UltraCooldownInfoWeapons[9].usingChargeAmount = weapon_sawedOn.GetComponent<ShotgunHammer>().swingCharge;
			}
			else
			{
				UltraCooldownInfoWeapons[9].usingChargeAmount = -1f;
			}
			if ((Object)(object)weapon_coreEject.GetComponent<Shotgun>() != (Object)null)
			{
				UltraCooldownInfoWeapons[20].usingChargeAmount = weapon_coreEject.GetComponent<Shotgun>().grenadeForce / 60f;
			}
			else
			{
				UltraCooldownInfoWeapons[20].usingChargeAmount = 0f;
			}
			if ((Object)(object)weapon_coreEject.GetComponent<ShotgunHammer>() != (Object)null)
			{
				UltraCooldownInfoWeapons[20].chargeAmount = MonoSingleton<WeaponCharges>.Instance.shoAltNadeCharge;
			}
			else
			{
				UltraCooldownInfoWeapons[20].chargeAmount = 1f;
			}
			UltraCooldownInfoWeapons[21].chargeAmount = 1f;
			if ((Object)(object)weapon_pumpCharge.GetComponent<Shotgun>() != (Object)null)
			{
				UltraCooldownInfoWeapons[21].usingChargeAmount = (float)weapon_pumpCharge.GetComponent<Shotgun>().primaryCharge / 3f;
			}
			else if ((Object)(object)weapon_pumpCharge.GetComponent<ShotgunHammer>() != (Object)null)
			{
				UltraCooldownInfoWeapons[21].usingChargeAmount = (float)weapon_pumpCharge.GetComponent<ShotgunHammer>().primaryCharge / 3f;
			}
			else
			{
				UltraCooldownInfoWeapons[21].usingChargeAmount = 0f;
			}
		}

		public void findNailgunValues()
		{
			if ((Object)(object)weapon_attractor.wc == (Object)null)
			{
				UltraCooldownInfoWeapons[10].chargeAmount = 1f;
			}
			else
			{
				UltraCooldownInfoWeapons[10].chargeAmount = weapon_attractor.wc.naiMagnetCharge / 3f;
			}
			UltraCooldownInfoWeapons[10].usingChargeAmount = -1f;
			if (weapon_overheat.altVersion)
			{
				if ((double)(MonoSingleton<WeaponCharges>.Instance.naiSawHeatsinks - 1f) < 0.001 && (Object)(object)weapon.GetComponent<Nailgun>() == (Object)(object)weapon_overheat)
				{
					if (!MonoSingleton<InputManager>.Instance.InputSource.Fire1.IsPressed)
					{
						UltraCooldownInfoWeapons[11].chargeAmount += Time.deltaTime / 8.03f;
					}
					if (UltraCooldownInfoWeapons[11].chargeAmount >= 1f)
					{
						if (weapon_overheat.canShoot && !weapon_overheat.burnOut && MonoSingleton<InputManager>.Instance.InputSource.Fire2.WasPerformedThisFrame && (double)weapon_overheat.heatUp >= 0.1)
						{
							UltraCooldownInfoWeapons[11].chargeAmount = 0f;
						}
						else
						{
							UltraCooldownInfoWeapons[11].chargeAmount = 1f;
						}
					}
				}
				else
				{
					UltraCooldownInfoWeapons[11].chargeAmount = MonoSingleton<WeaponCharges>.Instance.naiSawHeatsinks;
				}
			}
			else if ((double)(MonoSingleton<WeaponCharges>.Instance.naiHeatsinks - 2f) < 0.001 && (Object)(object)weapon.GetComponent<Nailgun>() == (Object)(object)weapon_overheat)
			{
				if (!MonoSingleton<InputManager>.Instance.InputSource.Fire1.IsPressed)
				{
					UltraCooldownInfoWeapons[11].chargeAmount += Time.deltaTime / 16.06f;
				}
				if ((double)UltraCooldownInfoWeapons[11].chargeAmount >= 0.5)
				{
					if (weapon_overheat.canShoot && !weapon_overheat.burnOut && MonoSingleton<InputManager>.Instance.InputSource.Fire2.WasPerformedThisFrame && (double)weapon_overheat.heatUp >= 0.1)
					{
						UltraCooldownInfoWeapons[11].chargeAmount += -0.5f;
					}
					else if (UltraCooldownInfoWeapons[11].chargeAmount >= 1f)
					{
						UltraCooldownInfoWeapons[11].chargeAmount = 1f;
					}
				}
			}
			else
			{
				UltraCooldownInfoWeapons[11].chargeAmount = MonoSingleton<WeaponCharges>.Instance.naiHeatsinks / 2f;
			}
			if ((Object)(object)weapon.GetComponent<Nailgun>() != (Object)null)
			{
				UltraCooldownInfoWeapons[11].usingChargeAmount = weapon.GetComponent<Nailgun>().heatUp;
			}
			else
			{
				UltraCooldownInfoWeapons[11].usingChargeAmount += (0f - Time.deltaTime) / 8f;
				if (UltraCooldownInfoWeapons[11].usingChargeAmount < 0f)
				{
					UltraCooldownInfoWeapons[11].usingChargeAmount = 0f;
				}
			}
			if (UltraCooldownInfoWeapons[11].chargeAmount < 1f)
			{
				UltraCooldownInfoWeapons[11].usingChargeAmount = 0f;
			}
			UltraCooldownInfoWeapons[12].chargeAmount = MonoSingleton<WeaponCharges>.Instance.naiZapperRecharge / 5f;
			if ((Object)(object)weapon_jumpstart.currentZapper == (Object)null)
			{
				UltraCooldownInfoWeapons[12].usingChargeAmount = 0f;
			}
			else
			{
				UltraCooldownInfoWeapons[12].usingChargeAmount = weapon_jumpstart.currentZapper.charge / 5f;
			}
			if (weapon_attractor.altVersion)
			{
				UltraCooldownInfoWeapons[13].chargeAmount = MonoSingleton<WeaponCharges>.Instance.naiSaws / 10f;
			}
			else
			{
				UltraCooldownInfoWeapons[13].chargeAmount = MonoSingleton<WeaponCharges>.Instance.naiAmmo / 100f;
			}
			UltraCooldownInfoWeapons[13].usingChargeAmount = -1f;
		}

		public void findRailcannonValues()
		{
			UltraCooldownInfoWeapons[14].chargeAmount = MonoSingleton<WeaponCharges>.Instance.raicharge / 4f;
			UltraCooldownInfoWeapons[14].usingChargeAmount = -1f;
		}

		public void findRocket_LauncherValues()
		{
			UltraCooldownInfoWeapons[15].chargeAmount = MonoSingleton<WeaponCharges>.Instance.rocketFreezeTime / 5f;
			UltraCooldownInfoWeapons[15].usingChargeAmount = -1f;
			UltraCooldownInfoWeapons[16].chargeAmount = MonoSingleton<WeaponCharges>.Instance.rocketCannonballCharge;
			UltraCooldownInfoWeapons[16].usingChargeAmount = weapon_srs.cbCharge;
			UltraCooldownInfoWeapons[17].chargeAmount = MonoSingleton<WeaponCharges>.Instance.rocketNapalmFuel;
			UltraCooldownInfoWeapons[17].usingChargeAmount = -1f;
			if ((Object)(object)weapon.GetComponent<RocketLauncher>() != (Object)null)
			{
				UltraCooldownInfoWeapons[18].chargeAmount = 1f - weapon.GetComponent<RocketLauncher>().cooldown;
			}
			else
			{
				UltraCooldownInfoWeapons[18].chargeAmount += Time.deltaTime;
				if (UltraCooldownInfoWeapons[18].chargeAmount >= 1f)
				{
					UltraCooldownInfoWeapons[18].chargeAmount = 1f;
				}
			}
			UltraCooldownInfoWeapons[18].usingChargeAmount = -1f;
		}

		public void findMiscValues()
		{
			UltraCooldownInfoWeapons[19].chargeAmount = 1f - MonoSingleton<FistControl>.Instance.fistCooldown / 2.3f;
			UltraCooldownInfoWeapons[19].usingChargeAmount = -1f;
		}

		public void onNewFullCharges()
		{
			for (int num = 0; num < UltraCooldownInfoWeapons.Length; num++)
			{
				if (UltraCooldownInfoWeapons[num].soundEnabled)
				{
					if (usingChargeAmounts[num] != UltraCooldownInfoWeapons[num].usingChargeAmount && UltraCooldownInfoWeapons[num].usingChargeAmount >= 1f)
					{
						if (num == 11 && UltraCooldownInfoWeapons[num].chargeAmount < 1f)
						{
							goto IL_04fc;
						}
						csp.PlaySound(UltraCooldownInfoWeapons[num].filePathUsingCharge, num);
					}
					if (UltraCooldownInfoWeapons[num].soundEnabledWhileHeld || ((num != 0 || !((Object)(object)weapon.GetComponent<Revolver>() == (Object)(object)weapon_piercer)) && (num != 1 || !((Object)(object)weapon.GetComponent<Revolver>() == (Object)(object)weapon_marksman)) && (num != 2 || !((Object)(object)weapon.GetComponent<Revolver>() == (Object)(object)weapon_sharpshooter)) && (num != 3 || !((Object)(object)weapon.GetComponent<Revolver>() == (Object)(object)weapon_piercer)) && (num != 4 || !((Object)(object)weapon.GetComponent<Revolver>() == (Object)(object)weapon_marksman)) && (num != 5 || !((Object)(object)weapon.GetComponent<Revolver>() == (Object)(object)weapon_sharpshooter)) && (num != 6 || !((Object)(object)weapon == (Object)(object)weapon_sawedOn)) && (num != 7 || !((Object)(object)weapon == (Object)(object)weapon_coreEject)) && (num != 8 || !((Object)(object)weapon == (Object)(object)weapon_pumpCharge)) && (num != 9 || !((Object)(object)weapon == (Object)(object)weapon_sawedOn)) && (num != 10 || !((Object)(object)weapon.GetComponent<Nailgun>() == (Object)(object)weapon_attractor)) && (num != 11 || !((Object)(object)weapon.GetComponent<Nailgun>() == (Object)(object)weapon_overheat)) && (num != 12 || !((Object)(object)weapon.GetComponent<Nailgun>() == (Object)(object)weapon_jumpstart)) && (num != 13 || !((Object)(object)weapon.GetComponent<Nailgun>() == (Object)(object)weapon_attractor)) && (num != 14 || !((Object)(object)weapon.GetComponent<Railcannon>() != (Object)null)) && (num != 15 || !((Object)(object)weapon.GetComponent<RocketLauncher>() == (Object)(object)weapon_freezeframe)) && (num != 16 || !((Object)(object)weapon.GetComponent<RocketLauncher>() == (Object)(object)weapon_srs)) && (num != 17 || !((Object)(object)weapon.GetComponent<RocketLauncher>() == (Object)(object)weapon_firestarter)) && (num != 18 || !((Object)(object)weapon.GetComponent<RocketLauncher>() != (Object)null)) && (num == 19 || ((num != 20 || !((Object)(object)weapon == (Object)(object)weapon_coreEject)) && (num != 21 || !((Object)(object)weapon == (Object)(object)weapon_pumpCharge))))))
					{
						float num2 = UltraCooldownInfoWeapons[num].chargeAmount * (float)UltraCooldownInfoWeapons[num].soundDivisions - (float)(int)(UltraCooldownInfoWeapons[num].chargeAmount * (float)UltraCooldownInfoWeapons[num].soundDivisions - 0.001f);
						float num3 = chargeAmounts[num] * (float)UltraCooldownInfoWeapons[num].soundDivisions - (float)(int)(chargeAmounts[num] * (float)UltraCooldownInfoWeapons[num].soundDivisions - 0.001f);
						if (num2 > 1f && num3 < 1f)
						{
							csp.PlaySound(UltraCooldownInfoWeapons[num].filePathFractionCharge, num);
						}
						if (chargeAmounts[num] != UltraCooldownInfoWeapons[num].chargeAmount && UltraCooldownInfoWeapons[num].chargeAmount >= 1f)
						{
							csp.PlaySound(UltraCooldownInfoWeapons[num].filePathCharge, num);
						}
					}
				}
				goto IL_04fc;
				IL_04fc:
				float num4 = UltraCooldownInfoWeapons[num].chargeAmount * (float)UltraCooldownInfoWeapons[num].numberFlashes - (float)(int)(UltraCooldownInfoWeapons[num].chargeAmount * (float)UltraCooldownInfoWeapons[num].numberFlashes - 0.001f);
				float num5 = chargeAmounts[num] * (float)UltraCooldownInfoWeapons[num].numberFlashes - (float)(int)(chargeAmounts[num] * (float)UltraCooldownInfoWeapons[num].numberFlashes - 0.001f);
				if (num4 > 1f && num5 < 1f)
				{
					flashingIconOpacities[num] = 1f;
				}
				if (chargeAmounts[num] != UltraCooldownInfoWeapons[num].chargeAmount && UltraCooldownInfoWeapons[num].chargeAmount >= 1f)
				{
					flashingIconOpacities[num] = 1f;
				}
				usingChargeAmounts[num] = UltraCooldownInfoWeapons[num].usingChargeAmount;
				chargeAmounts[num] = UltraCooldownInfoWeapons[num].chargeAmount;
			}
		}

		public void Update()
		{
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			if (!modEnabled || !IsGameplayScene() || IsMenu())
			{
				return;
			}
			if (!showGUIKeyToggle)
			{
				if ((int)showGUIKeyCode != 0 && !Input.GetKey(showGUIKeyCode))
				{
					return;
				}
			}
			else if ((int)showGUIKeyCode != 0 && Input.GetKeyDown(showGUIKeyCode))
			{
				tempDisable = !tempDisable;
			}
			findWeapons();
			findRevolverValues();
			findShotgunValues();
			findNailgunValues();
			findRailcannonValues();
			findRocket_LauncherValues();
			findMiscValues();
			onNewFullCharges();
		}

		public void DrawClassicHUDElement(int i)
		{
			//IL_068c: Unknown result type (might be due to invalid IL or missing references)
			//IL_069f: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0706: Unknown result type (might be due to invalid IL or missing references)
			//IL_056b: Unknown result type (might be due to invalid IL or missing references)
			//IL_057e: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0505: Unknown result type (might be due to invalid IL or missing references)
			//IL_0518: Unknown result type (might be due to invalid IL or missing references)
			//IL_044b: Unknown result type (might be due to invalid IL or missing references)
			//IL_045e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0318: Unknown result type (might be due to invalid IL or missing references)
			//IL_032b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0387: Unknown result type (might be due to invalid IL or missing references)
			//IL_039a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0752: Unknown result type (might be due to invalid IL or missing references)
			//IL_0765: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0807: Unknown result type (might be due to invalid IL or missing references)
			//IL_081a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0861: Unknown result type (might be due to invalid IL or missing references)
			//IL_0874: Unknown result type (might be due to invalid IL or missing references)
			//IL_0636: Unknown result type (might be due to invalid IL or missing references)
			//IL_0649: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0261: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_08cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_08de: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b1a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b1c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b4c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b4e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b7e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b80: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b9b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b9d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bb8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bba: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ee4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ef2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bd5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bd7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f74: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c0d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c0f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ff9: Unknown result type (might be due to invalid IL or missing references)
			//IL_1007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c2a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c2c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1089: Unknown result type (might be due to invalid IL or missing references)
			//IL_1097: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c48: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c4a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c68: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c99: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c9b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ccc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cce: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d01: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d32: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d34: 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_0d52: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d6e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d70: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d8c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d8e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0daa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dac: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dc8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0de3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0de5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e19: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e1b: Unknown result type (might be due to invalid IL or missing references)
			if (tempDisable)
			{
				return;
			}
			UltraCooldownInfoWeapon ultraCooldownInfoWeapon = UltraCooldownInfoWeapons[i];
			if (ultraCooldownInfoWeapon.flipped)
			{
				if ((Object)(object)weapon.GetComponent<Revolver>() == (Object)(object)weapon_sharpshooter && !weapon_sharpshooter.altVersion && (double)UltraCooldownInfoWeapons[i].chargeAmount >= 0.3333 && UltraCooldownInfoWeapons[i].usingChargeAmount > 0f)
				{
					if (UltraCooldownInfoWeapons[i].usingChargeAmount >= 0.995f)
					{
						GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.usingChargeChargedColor, 0f, 0f);
					}
					else
					{
						GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width - ultraCooldownInfoWeapon.width * UltraCooldownInfoWeapons[i].usingChargeAmount, ultraCooldownInfoWeapon.yPos, (0f - ultraCooldownInfoWeapon.width) * (1f - UltraCooldownInfoWeapons[i].usingChargeAmount), ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, normalSharpshooterBackgroundChargingColor, 0f, 0f);
						GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.yPos, (0f - ultraCooldownInfoWeapon.width) * UltraCooldownInfoWeapons[i].usingChargeAmount, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.usingChargeColor, 0f, 0f);
					}
				}
				else if (UltraCooldownInfoWeapons[i].chargeAmount >= 1f)
				{
					GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.chargedColor, 0f, 0f);
					if (UltraCooldownInfoWeapons[i].usingChargeAmount > 0f)
					{
						if (UltraCooldownInfoWeapons[i].usingChargeAmount >= 0.99f)
						{
							GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.usingChargeChargedColor, 0f, 0f);
						}
						else
						{
							GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.yPos, (0f - ultraCooldownInfoWeapon.width) * UltraCooldownInfoWeapons[i].usingChargeAmount, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.usingChargeColor, 0f, 0f);
						}
					}
				}
				else
				{
					GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.yPos, (0f - ultraCooldownInfoWeapon.width) * UltraCooldownInfoWeapons[i].chargeAmount, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.chargingColor, 0f, 0f);
					GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width - ultraCooldownInfoWeapon.width * UltraCooldownInfoWeapons[i].chargeAmount, ultraCooldownInfoWeapon.yPos, (0f - ultraCooldownInfoWeapon.width) * (1f - UltraCooldownInfoWeapons[i].chargeAmount), ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.remainingColor, 0f, 0f);
				}
			}
			else if ((Object)(object)weapon.GetComponent<Revolver>() == (Object)(object)weapon_sharpshooter && !weapon_sharpshooter.altVersion && (double)UltraCooldownInfoWeapons[i].chargeAmount >= 0.3333 && UltraCooldownInfoWeapons[i].usingChargeAmount > 0f)
			{
				if (UltraCooldownInfoWeapons[i].usingChargeAmount >= 0.995f)
				{
					GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.usingChargeChargedColor, 0f, 0f);
				}
				else
				{
					GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * UltraCooldownInfoWeapons[i].usingChargeAmount, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f - UltraCooldownInfoWeapons[i].usingChargeAmount), ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, normalSharpshooterBackgroundChargingColor, 0f, 0f);
					GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * UltraCooldownInfoWeapons[i].usingChargeAmount, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.usingChargeColor, 0f, 0f);
				}
			}
			else if (UltraCooldownInfoWeapons[i].chargeAmount >= 1f)
			{
				GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.chargedColor, 0f, 0f);
				if (UltraCooldownInfoWeapons[i].usingChargeAmount > 0f)
				{
					if (UltraCooldownInfoWeapons[i].usingChargeAmount >= 0.99f)
					{
						GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.usingChargeChargedColor, 0f, 0f);
					}
					else
					{
						GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * UltraCooldownInfoWeapons[i].usingChargeAmount, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.usingChargeColor, 0f, 0f);
					}
				}
			}
			else
			{
				GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * UltraCooldownInfoWeapons[i].chargeAmount, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.chargingColor, 0f, 0f);
				GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * UltraCooldownInfoWeapons[i].chargeAmount, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f - UltraCooldownInfoWeapons[i].chargeAmount), ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.remainingColor, 0f, 0f);
			}
			GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos - (float)ultraCooldownInfoWeapon.borderThickness, ultraCooldownInfoWeapon.yPos - (float)ultraCooldownInfoWeapon.borderThickness, ultraCooldownInfoWeapon.width + (float)(2 * ultraCooldownInfoWeapon.borderThickness), (float)ultraCooldownInfoWeapon.borderThickness), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.backgroundColor, 0f, 0f);
			GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos - (float)ultraCooldownInfoWeapon.borderThickness, ultraCooldownInfoWeapon.height + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width + (float)(2 * ultraCooldownInfoWeapon.borderThickness), (float)ultraCooldownInfoWeapon.borderThickness), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.backgroundColor, 0f, 0f);
			GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos - (float)ultraCooldownInfoWeapon.borderThickness, ultraCooldownInfoWeapon.yPos - (float)ultraCooldownInfoWeapon.borderThickness, (float)ultraCooldownInfoWeapon.borderThickness, ultraCooldownInfoWeapon.height + (float)(2 * ultraCooldownInfoWeapon.borderThickness)), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.backgroundColor, 0f, 0f);
			GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.yPos - (float)ultraCooldownInfoWeapon.borderThickness, (float)ultraCooldownInfoWeapon.borderThickness, ultraCooldownInfoWeapon.height + (float)(2 * ultraCooldownInfoWeapon.borderThickness)), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.backgroundColor, 0f, 0f);
			for (int j = 0; j < ultraCooldownInfoWeapon.numberDivisions - 1; j++)
			{
				GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * ((1f + (float)j) / (float)ultraCooldownInfoWeapon.numberDivisions) - (float)(ultraCooldownInfoWeapon.divisionWidth / 2), ultraCooldownInfoWeapon.yPos, (float)ultraCooldownInfoWeapon.divisionWidth, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.backgroundColor, 0f, 0f);
			}
			if (ultraCooldownInfoWeapon.iconEnabled)
			{
				Color val = default(Color);
				((Color)(ref val))..ctor(1f, 1f, 1f, 1f);
				float num = 0f;
				float num2 = 0f;
				float num3 = 0f;
				Dictionary<string, object> prefMap = MonoSingleton<PrefsManager>.Instance.prefMap;
				if (prefMap.ContainsKey("hudColor.var0.r") && prefMap.ContainsKey("hudColor.var0.g") && prefMap.ContainsKey("hudColor.var0.b"))
				{
					num = Convert.ToSingle(prefMap["hudColor.var0.r"]);
					num2 = Convert.ToSingle(prefMap["hudColor.var0.g"]);
					num3 = Convert.ToSingle(prefMap["hudColor.var0.b"]);
				}
				Color val2 = default(Color);
				((Color)(ref val2))..ctor(num, num2, num3, ultraCooldownInfoWeapon.opacity);
				if (prefMap.ContainsKey("hudColor.var1.r") && prefMap.ContainsKey("hudColor.var1.g") && prefMap.ContainsKey("hudColor.var1.b"))
				{
					num = Convert.ToSingle(prefMap["hudColor.var1.r"]);
					num2 = Convert.ToSingle(prefMap["hudColor.var1.g"]);
					num3 = Convert.ToSingle(prefMap["hudColor.var1.b"]);
				}
				Color val3 = default(Color);
				((Color)(ref val3))..ctor(num, num2, num3, ultraCooldownInfoWeapon.opacity);
				if (prefMap.ContainsKey("hudColor.var2.r") && prefMap.ContainsKey("hudColor.var2.g") && prefMap.ContainsKey("hudColor.var2.b"))
				{
					num = Convert.ToSingle(prefMap["hudColor.var2.r"]);
					num2 = Convert.ToSingle(prefMap["hudColor.var2.g"]);
					num3 = Convert.ToSingle(prefMap["hudColor.var2.b"]);
				}
				Color val4 = default(Color);
				((Color)(ref val4))..ctor(num, num2, num3, ultraCooldownInfoWeapon.opacity);
				Texture2D val5 = barTexture;
				switch (i)
				{
				case 0:
					val = val2;
					val5 = (weapon_piercer.altVersion ? weapon_piercerAltTexture : weapon_piercerTexture);
					break;
				case 1:
					val = val3;
					val5 = (weapon_marksman.altVersion ? weapon_marksmanAltTexture : weapon_marksmanTexture);
					break;
				case 2:
					val = val4;
					val5 = (weapon_sharpshooter.altVersion ? weapon_sharpshooterAltTexture : weapon_sharpshooterTexture);
					break;
				case 3:
					val = val2;
					val5 = weapon_piercerAltTexture;
					break;
				case 4:
					val = val3;
					val5 = weapon_marksmanAltTexture;
					break;
				case 5:
					val = val4;
					val5 = weapon_sharpshooterAltTexture;
					break;
				case 6:
					val = val4;
					val5 = (((Object)(object)weapon_sawedOn.GetComponent<ShotgunHammer>() == (Object)null) ? weapon_sawedonTexture : weapon_sawedonAltTexture);
					break;
				case 7:
					val = val2;
					val5 = weapon_coreejectAltTexture;
					break;
				case 8:
					val = val3;
					val5 = weapon_pumpchargeAltTexture;
					break;
				case 9:
					val = val4;
					val5 = weapon_sawedonAltTexture;
					break;
				case 10:
					val = val2;
					val5 = (weapon_attractor.altVersion ? weapon_attractorAltTexture : weapon_attractorTexture);
					break;
				case 11:
					val = val3;
					val5 = (weapon_overheat.altVersion ? weapon_overheatAltTexture : weapon_overheatTexture);
					break;
				case 12:
					val = val4;
					val5 = (weapon_jumpstart.altVersion ? weapon_jumpstartAltTexture : weapon_jumpstartTexture);
					break;
				case 13:
					val = val2;
					val5 = (weapon_attractor.altVersion ? weapon_attractorAltTexture : weapon_attractorTexture);
					break;
				case 14:
					val = val2;
					val5 = weapon_railcannonTexture;
					break;
				case 15:
					val = val2;
					val5 = weapon_freezeframeTexture;
					break;
				case 16:
					val = val3;
					val5 = weapon_srsTexture;
					break;
				case 17:
					val = val4;
					val5 = weapon_firestarterTexture;
					break;
				case 18:
					val = val2;
					val5 = weapon_freezeframeTexture;
					break;
				case 19:
					val = val2;
					val5 = weapon_fistTexture;
					break;
				case 20:
					val = val2;
					val5 = (((Object)(object)weapon_coreEject.GetComponent<ShotgunHammer>() == (Object)null) ? weapon_coreejectTexture : weapon_coreejectAltTexture);
					break;
				case 21:
					val = val3;
					val5 = (((Object)(object)weapon_pumpCharge.GetComponent<ShotgunHammer>() == (Object)null) ? weapon_pumpchargeTexture : weapon_pumpchargeAltTexture);
					break;
				}
				float num4 = ultraCooldownInfoWeapon.width + (float)(ultraCooldownInfoWeapon.borderThickness * 2);
				float num5 = ultraCooldownInfoWeapon.height + (float)(ultraCooldownInfoWeapon.borderThickness * 2);
				float num6 = 0f;
				float num7 = 0f;
				float num8 = 0f;
				if (ultraCooldownInfoWeapon.flipped)
				{
					num8 = 1f;
				}
				if (ultraCooldownInfoWeapon.iconSide == SideEnum.Left)
				{
					num7 = num5;
					num6 = (float)((Texture)val5).width / (float)((Texture)val5).height * num5;
					GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos - num6 - (float)ultraCooldownInfoWeapon.iconDistance - (float)ultraCooldownInfoWeapon.borderThickness, ultraCooldownInfoWeapon.yPos - (float)ultraCooldownInfoWeapon.borderThickness, num6, num5), (Texture)(object)val5, (ScaleMode)0, true, 0f, val, 0f, 0f);
				}
				else if (ultraCooldownInfoWeapon.iconSide == SideEnum.Right)
				{
					num7 = num5;
					num6 = (float)((Texture)val5).width / (float)((Texture)val5).height * num5;
					GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos + (float)ultraCooldownInfoWeapon.borderThickness + num4 * 2f + (float)ultraCooldownInfoWeapon.iconDistance, ultraCooldownInfoWeapon.yPos - (float)ultraCooldownInfoWeapon.borderThickness, 0f - num6, num7), (Texture)(object)val5, (ScaleMode)0, true, 0f, val, 0f, 0f);
				}
				else if (ultraCooldownInfoWeapon.iconSide == SideEnum.Top)
				{
					num7 = (float)((Texture)val5).height / (float)((Texture)val5).width * num4;
					num6 = num4;
					GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos - (float)ultraCooldownInfoWeapon.borderThickness + num4 * num8, ultraCooldownInfoWeapon.yPos - num7 - (float)ultraCooldownInfoWeapon.iconDistance - (float)ultraCooldownInfoWeapon.borderThickness, num6 * (1f - 2f * num8), num7), (Texture)(object)val5, (ScaleMode)0, true, 0f, val, 0f, 0f);
				}
				else if (ultraCooldownInfoWeapon.iconSide == SideEnum.Bottom)
				{
					num7 = (float)((Texture)val5).height / (float)((Texture)val5).width * num4;
					num6 = num4;
					GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPos - (float)ultraCooldownInfoWeapon.borderThickness + num4 * num8, ultraCooldownInfoWeapon.yPos + num5 + (float)ultraCooldownInfoWeapon.iconDistance - (float)ultraCooldownInfoWeapon.borderThickness, num6 * (1f - 2f * num8), num7), (Texture)(object)val5, (ScaleMode)0, true, 0f, val, 0f, 0f);
				}
			}
		}

		public void DrawWeaponImageSplitHUDElement(int i)
		{
			//IL_03ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0403: Unknown result type (might be due to invalid IL or missing references)
			//IL_0405: Unknown result type (might be due to invalid IL or missing references)
			//IL_040a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0421: Unknown result type (might be due to invalid IL or missing references)
			//IL_0426: Unknown result type (might be due to invalid IL or missing references)
			//IL_0428: Unknown result type (might be due to invalid IL or missing references)
			//IL_042d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0479: Unknown result type (might be due to invalid IL or missing references)
			//IL_047e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0480: Unknown result type (might be due to invalid IL or missing references)
			//IL_0485: Unknown result type (might be due to invalid IL or missing references)
			//IL_0487: Unknown result type (might be due to invalid IL or missing references)
			//IL_048c: Unknown result type (might be due to invalid IL or missing references)
			//IL_045a: Unknown result type (might be due to invalid IL or missing references)
			//IL_045f: Unknown result type (might be due to invalid IL or missing references)
			//IL_044a: Unknown result type (might be due to invalid IL or missing references)
			//IL_044f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0806: Unknown result type (might be due to invalid IL or missing references)
			//IL_0832: Unknown result type (might be due to invalid IL or missing references)
			//IL_0840: Unknown result type (might be due to invalid IL or missing references)
			//IL_0623: Unknown result type (might be due to invalid IL or missing references)
			//IL_0649: Unknown result type (might be due to invalid IL or missing references)
			//IL_0657: 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_0797: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0711: Unknown result type (might be due to invalid IL or missing references)
			//IL_071f: Unknown result type (might be due to invalid IL or missing references)
			//IL_058e: 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_05c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0511: Unknown result type (might be due to invalid IL or missing references)
			//IL_0537: Unknown result type (might be due to invalid IL or missing references)
			//IL_0545: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e7: Unknown result type (might be due to invalid IL or missing references)
			if (tempDisable)
			{
				return;
			}
			UltraCooldownInfoWeapon ultraCooldownInfoWeapon = UltraCooldownInfoWeapons[i];
			Color val = default(Color);
			((Color)(ref val))..ctor(1f, 1f, 1f, 1f);
			Color val2 = default(Color);
			((Color)(ref val2))..ctor(1f, 1f, 1f, 1f);
			Color val3 = default(Color);
			((Color)(ref val3))..ctor(1f, 1f, 1f, 1f);
			float num = ultraCooldownInfoWeapon.chargeAmount;
			if (ultraCooldownInfoWeapon.chargeAmount >= 1f && ultraCooldownInfoWeapon.usingChargeAmount >= 0f)
			{
				num = ultraCooldownInfoWeapon.usingChargeAmount;
			}
			Texture2D val4 = barTexture;
			switch (i)
			{
			case 0:
				val4 = (weapon_piercer.altVersion ? weapon_piercerAltTexture : weapon_piercerTexture);
				break;
			case 1:
				val4 = (weapon_marksman.altVersion ? weapon_marksmanAltTexture : weapon_marksmanTexture);
				break;
			case 2:
				val4 = (weapon_sharpshooter.altVersion ? weapon_sharpshooterAltTexture : weapon_sharpshooterTexture);
				break;
			case 3:
				val4 = weapon_piercerAltTexture;
				break;
			case 4:
				val4 = weapon_marksmanAltTexture;
				break;
			case 5:
				val4 = weapon_sharpshooterAltTexture;
				break;
			case 6:
				val4 = (((Object)(object)weapon_sawedOn.GetComponent<ShotgunHammer>() == (Object)null) ? weapon_sawedonTexture : weapon_sawedonAltTexture);
				break;
			case 7:
				val4 = weapon_coreejectAltTexture;
				break;
			case 8:
				val4 = weapon_pumpchargeAltTexture;
				break;
			case 9:
				val4 = weapon_sawedonAltTexture;
				break;
			case 10:
				val4 = (weapon_attractor.altVersion ? weapon_attractorAltTexture : weapon_attractorTexture);
				break;
			case 11:
				val4 = (weapon_overheat.altVersion ? weapon_overheatAltTexture : weapon_overheatTexture);
				break;
			case 12:
				val4 = (weapon_jumpstart.altVersion ? weapon_jumpstartAltTexture : weapon_jumpstartTexture);
				break;
			case 13:
				val4 = (weapon_attractor.altVersion ? weapon_attractorAltTexture : weapon_attractorTexture);
				break;
			case 14:
				val4 = weapon_railcannonTexture;
				break;
			case 15:
				val4 = weapon_freezeframeTexture;
				break;
			case 16:
				val4 = weapon_srsTexture;
				break;
			case 17:
				val4 = weapon_firestarterTexture;
				break;
			case 18:
				val4 = weapon_freezeframeTexture;
				break;
			case 19:
				val4 = weapon_fistTexture;
				break;
			case 20:
				val4 = (((Object)(object)weapon_coreEject.GetComponent<ShotgunHammer>() == (Object)null) ? weapon_coreejectTexture : weapon_coreejectAltTexture);
				break;
			case 21:
				val4 = (((Object)(object)weapon_pumpCharge.GetComponent<ShotgunHammer>() == (Object)null) ? weapon_pumpchargeTexture : weapon_pumpchargeAltTexture);
				break;
			}
			if (ultraCooldownInfoWeapon.chargeAmount < 1f)
			{
				val = ultraCooldownInfoWeapon.chargingColor;
				val2 = ultraCooldownInfoWeapon.remainingColor;
				val3 = ultraCooldownInfoWeapon.chargedColor;
			}
			if (ultraCooldownInfoWeapon.chargeAmount >= 1f)
			{
				val = ultraCooldownInfoWeapon.chargedColor;
				val2 = ultraCooldownInfoWeapon.chargedColor;
				val3 = ultraCooldownInfoWeapon.chargedColor;
			}
			if (ultraCooldownInfoWeapon.usingChargeAmount > 0f)
			{
				val = ultraCooldownInfoWeapon.usingChargeColor;
				val2 = ultraCooldownInfoWeapon.chargedColor;
				if (i == 2 && !weapon_sharpshooter.altVersion)
				{
					val2 = normalSharpshooterBackgroundChargingColor;
					num = ultraCooldownInfoWeapon.usingChargeAmount;
				}
				val3 = ultraCooldownInfoWeapon.usingChargeColor;
			}
			if (ultraCooldownInfoWeapon.usingChargeAmount >= 0.995f)
			{
				val = ultraCooldownInfoWeapon.usingChargeChargedColor;
				val2 = ultraCooldownInfoWeapon.usingChargeChargedColor;
				val3 = ultraCooldownInfoWeapon.usingChargeChargedColor;
			}
			if (!ultraCooldownInfoWeapon.flipped)
			{
				for (int j = 0; j < ultraCooldownInfoWeapon.numberDivisions; j++)
				{
					float num2 = ((float)j + 0f) / (float)ultraCooldownInfoWeapon.numberDivisions;
					if (num * (float)ultraCooldownInfoWeapon.numberDivisions >= (float)(j + 1))
					{
						GUI.BeginGroup(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num2, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f / (float)ultraCooldownInfoWeapon.numberDivisions), ultraCooldownInfoWeapon.height * 1f));
						GUI.DrawTexture(new Rect((0f - ultraCooldownInfoWeapon.width) * num2, 0f, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)val4, (ScaleMode)0, true, 0f, val3, 0f, 0f);
						GUI.EndGroup();
						continue;
					}
					GUI.BeginGroup(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num2, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (num - num2), ultraCooldownInfoWeapon.height * 1f));
					GUI.DrawTexture(new Rect((0f - ultraCooldownInfoWeapon.width) * num2, 0f, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)val4, (ScaleMode)0, true, 0f, val, 0f, 0f);
					GUI.EndGroup();
					break;
				}
				GUI.BeginGroup(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * 1f, ultraCooldownInfoWeapon.height * 1f));
				GUI.DrawTexture(new Rect((0f - ultraCooldownInfoWeapon.width) * num, 0f, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)val4, (ScaleMode)0, true, 0f, val2, 0f, 0f);
				GUI.EndGroup();
			}
			else
			{
				for (int k = 0; k < ultraCooldownInfoWeapon.numberDivisions; k++)
				{
					float num3 = ((float)k + 0f) / (float)ultraCooldownInfoWeapon.numberDivisions;
					if (num * (float)ultraCooldownInfoWeapon.numberDivisions >= (float)(k + 1))
					{
						GUI.BeginGroup(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num3, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f / (float)ultraCooldownInfoWeapon.numberDivisions), ultraCooldownInfoWeapon.height * 1f));
						GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.width * (1f - num3), 0f, 0f - ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)val4, (ScaleMode)0, true, 0f, val3, 0f, 0f);
						GUI.EndGroup();
						continue;
					}
					GUI.BeginGroup(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num3, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (num - num3), ultraCooldownInfoWeapon.height * 1f));
					GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.width * (1f - num3), 0f, 0f - ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)val4, (ScaleMode)0, true, 0f, val, 0f, 0f);
					GUI.EndGroup();
					break;
				}
				GUI.BeginGroup(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * 1f, ultraCooldownInfoWeapon.height * 1f));
				GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.width * (1f - num), 0f, 0f - ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)val4, (ScaleMode)0, true, 0f, val2, 0f, 0f);
				GUI.EndGroup();
			}
			if (ultraCooldownInfoWeapon.divisionWidth != 0)
			{
				for (int l = 0; l < ultraCooldownInfoWeapon.numberDivisions - 1; l++)
				{
					float num4 = ((float)l + 1f) / (float)ultraCooldownInfoWeapon.numberDivisions;
					GUI.BeginGroup(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num4, ultraCooldownInfoWeapon.yPos, (float)ultraCooldownInfoWeapon.divisionWidth, ultraCooldownInfoWeapon.height * 1f));
					GUI.DrawTexture(new Rect((0f - ultraCooldownInfoWeapon.width) * num4, 0f, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)val4, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.backgroundColor, 0f, 0f);
					GUI.EndGroup();
				}
			}
		}

		public void DrawWeaponImageGradientHUDElement(int i)
		{
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: 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_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_030f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0314: Unknown result type (might be due to invalid IL or missing references)
			//IL_0316: Unknown result type (might be due to invalid IL or missing references)
			//IL_031b: Unknown result type (might be due to invalid IL or missing references)
			//IL_031d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0322: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0254: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a0f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a1d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0952: Unknown result type (might be due to invalid IL or missing references)
			//IL_097e: Unknown result type (might be due to invalid IL or missing references)
			//IL_098c: Unknown result type (might be due to invalid IL or missing references)
			//IL_07da: Unknown result type (might be due to invalid IL or missing references)
			//IL_0800: Unknown result type (might be due to invalid IL or missing references)
			//IL_080e: Unknown result type (might be due to invalid IL or missing references)
			//IL_074f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0775: Unknown result type (might be due to invalid IL or missing references)
			//IL_0783: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aab: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ad1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae0: Unknown result type (might be due to invalid IL or missing references)
			if (tempDisable)
			{
				return;
			}
			UltraCooldownInfoWeapon ultraCooldownInfoWeapon = UltraCooldownInfoWeapons[i];
			Color val = default(Color);
			((Color)(ref val))..ctor(1f, 1f, 1f, 1f);
			Color val2 = default(Color);
			((Color)(ref val2))..ctor(1f, 1f, 1f, 1f);
			Color val3 = default(Color);
			((Color)(ref val3))..ctor(1f, 1f, 1f, 1f);
			float num = ultraCooldownInfoWeapon.chargeAmount;
			if (ultraCooldownInfoWeapon.chargeAmount >= 1f)
			{
				num = ultraCooldownInfoWeapon.usingChargeAmount;
			}
			float num2 = 0f;
			float num3 = 0f;
			float num4 = 0f;
			if (ultraCooldownInfoWeapon.chargeAmount < 1f)
			{
				val = ultraCooldownInfoWeapon.chargedColor;
				val2 = ultraCooldownInfoWeapon.remainingColor;
				float num5 = num * (float)ultraCooldownInfoWeapon.numberDivisions - (float)(int)(num * (float)ultraCooldownInfoWeapon.numberDivisions);
				num2 = ultraCooldownInfoWeapon.chargingColor.r * num5 + ultraCooldownInfoWeapon.remainingColor.r * (1f - num5);
				num3 = ultraCooldownInfoWeapon.chargingColor.g * num5 + ultraCooldownInfoWeapon.remainingColor.g * (1f - num5);
				num4 = ultraCooldownInfoWeapon.chargingColor.b * num5 + ultraCooldownInfoWeapon.remainingColor.b * (1f - num5);
				((Color)(ref val3))..ctor(num2, num3, num4, ultraCooldownInfoWeapon.opacity);
			}
			else
			{
				val = ultraCooldownInfoWeapon.chargedColor;
				val2 = ultraCooldownInfoWeapon.chargedColor;
				val3 = ultraCooldownInfoWeapon.chargedColor;
			}
			if (ultraCooldownInfoWeapon.usingChargeAmount > 0f)
			{
				val = ultraCooldownInfoWeapon.usingChargeChargedColor;
				val2 = ultraCooldownInfoWeapon.chargedColor;
				float num6 = num * (float)ultraCooldownInfoWeapon.numberDivisions - (float)(int)(num * (float)ultraCooldownInfoWeapon.numberDivisions);
				num2 = ultraCooldownInfoWeapon.usingChargeColor.r * num6 + ultraCooldownInfoWeapon.chargedColor.r * (1f - num6);
				num3 = ultraCooldownInfoWeapon.usingChargeColor.g * num6 + ultraCooldownInfoWeapon.chargedColor.g * (1f - num6);
				num4 = ultraCooldownInfoWeapon.usingChargeColor.b * num6 + ultraCooldownInfoWeapon.chargedColor.b * (1f - num6);
				if (i == 2 && !weapon_sharpshooter.altVersion)
				{
					val2 = normalSharpshooterBackgroundChargingColor;
					num = ultraCooldownInfoWeapon.usingChargeAmount;
					num6 = num * (float)ultraCooldownInfoWeapon.numberDivisions - (float)(int)(num * (float)ultraCooldownInfoWeapon.numberDivisions);
					num2 = ultraCooldownInfoWeapon.usingChargeColor.r * num6 + normalSharpshooterBackgroundChargingColor.r * (1f - num6);
					num3 = ultraCooldownInfoWeapon.usingChargeColor.g * num6 + normalSharpshooterBackgroundChargingColor.g * (1f - num6);
					num4 = ultraCooldownInfoWeapon.usingChargeColor.b * num6 + normalSharpshooterBackgroundChargingColor.b * (1f - num6);
				}
				((Color)(ref val3))..ctor(num2, num3, num4, ultraCooldownInfoWeapon.opacity);
			}
			if (ultraCooldownInfoWeapon.usingChargeAmount >= 1f)
			{
				val = ultraCooldownInfoWeapon.usingChargeChargedColor;
				val2 = ultraCooldownInfoWeapon.usingChargeChargedColor;
				val3 = ultraCooldownInfoWeapon.usingChargeChargedColor;
			}
			Texture2D val4 = barTexture;
			switch (i)
			{
			case 0:
				val4 = (weapon_piercer.altVersion ? weapon_piercerAltTexture : weapon_piercerTexture);
				break;
			case 1:
				val4 = (weapon_marksman.altVersion ? weapon_marksmanAltTexture : weapon_marksmanTexture);
				break;
			case 2:
				val4 = (weapon_sharpshooter.altVersion ? weapon_sharpshooterAltTexture : weapon_sharpshooterTexture);
				break;
			case 3:
				val4 = weapon_piercerAltTexture;
				break;
			case 4:
				val4 = weapon_marksmanAltTexture;
				break;
			case 5:
				val4 = weapon_sharpshooterAltTexture;
				break;
			case 6:
				val4 = (((Object)(object)weapon_sawedOn.GetComponent<ShotgunHammer>() == (Object)null) ? weapon_sawedonTexture : weapon_sawedonAltTexture);
				break;
			case 7:
				val4 = weapon_coreejectAltTexture;
				break;
			case 8:
				val4 = weapon_pumpchargeAltTexture;
				break;
			case 9:
				val4 = weapon_sawedonAltTexture;
				break;
			case 10:
				val4 = (weapon_attractor.altVersion ? weapon_attractorAltTexture : weapon_attractorTexture);
				break;
			case 11:
				val4 = (weapon_overheat.altVersion ? weapon_overheatAltTexture : weapon_overheatTexture);
				break;
			case 12:
				val4 = (weapon_jumpstart.altVersion ? weapon_jumpstartAltTexture : weapon_jumpstartTexture);
				break;
			case 13:
				val4 = (weapon_attractor.altVersion ? weapon_attractorAltTexture : weapon_attractorTexture);
				break;
			case 14:
				val4 = weapon_railcannonTexture;
				break;
			case 15:
				val4 = weapon_freezeframeTexture;
				break;
			case 16:
				val4 = weapon_srsTexture;
				break;
			case 17:
				val4 = weapon_firestarterTexture;
				break;
			case 18:
				val4 = weapon_freezeframeTexture;
				break;
			case 19:
				val4 = weapon_fistTexture;
				break;
			case 20:
				val4 = (((Object)(object)weapon_coreEject.GetComponent<ShotgunHammer>() == (Object)null) ? weapon_coreejectTexture : weapon_coreejectAltTexture);
				break;
			case 21:
				val4 = (((Object)(object)weapon_pumpCharge.GetComponent<ShotgunHammer>() == (Object)null) ? weapon_pumpchargeTexture : weapon_pumpchargeAltTexture);
				break;
			}
			bool flag = false;
			if (!ultraCooldownInfoWeapon.flipped)
			{
				for (int j = 0; j < ultraCooldownInfoWeapon.numberDivisions; j++)
				{
					float num7 = ((float)j + 0f) / (float)ultraCooldownInfoWeapon.numberDivisions;
					if (num * (float)ultraCooldownInfoWeapon.numberDivisions >= (float)(j + 1))
					{
						GUI.BeginGroup(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num7, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f / (float)ultraCooldownInfoWeapon.numberDivisions), ultraCooldownInfoWeapon.height * 1f));
						GUI.DrawTexture(new Rect((0f - ultraCooldownInfoWeapon.width) * num7, 0f, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)val4, (ScaleMode)0, true, 0f, val, 0f, 0f);
						GUI.EndGroup();
					}
					else if (flag)
					{
						GUI.BeginGroup(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num7, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f / (float)ultraCooldownInfoWeapon.numberDivisions), ultraCooldownInfoWeapon.height * 1f));
						GUI.DrawTexture(new Rect((0f - ultraCooldownInfoWeapon.width) * num7, 0f, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)val4, (ScaleMode)0, true, 0f, val2, 0f, 0f);
						GUI.EndGroup();
					}
					else
					{
						flag = true;
						GUI.BeginGroup(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num7, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f / (float)ultraCooldownInfoWeapon.numberDivisions), ultraCooldownInfoWeapon.height * 1f));
						GUI.DrawTexture(new Rect((0f - ultraCooldownInfoWeapon.width) * num7, 0f, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)val4, (ScaleMode)0, true, 0f, val3, 0f, 0f);
						GUI.EndGroup();
					}
				}
			}
			else
			{
				for (int k = 0; k < ultraCooldownInfoWeapon.numberDivisions; k++)
				{
					float num8 = ((float)k + 0f) / (float)ultraCooldownInfoWeapon.numberDivisions;
					if (num * (float)ultraCooldownInfoWeapon.numberDivisions >= (float)(k + 1))
					{
						GUI.BeginGroup(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num8, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f / (float)ultraCooldownInfoWeapon.numberDivisions), ultraCooldownInfoWeapon.height * 1f));
						GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.width * (1f - num8), 0f, 0f - ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)val4, (ScaleMode)0, true, 0f, val, 0f, 0f);
						GUI.EndGroup();
					}
					else if (flag)
					{
						GUI.BeginGroup(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num8, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f / (float)ultraCooldownInfoWeapon.numberDivisions), ultraCooldownInfoWeapon.height * 1f));
						GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.width * (1f - num8), 0f, 0f - ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)val4, (ScaleMode)0, true, 0f, val2, 0f, 0f);
						GUI.EndGroup();
					}
					else
					{
						flag = true;
						GUI.BeginGroup(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num8, ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f / (float)ultraCooldownInfoWeapon.numberDivisions), ultraCooldownInfoWeapon.height * 1f));
						GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.width * (1f - num8), 0f, 0f - ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)val4, (ScaleMode)0, true, 0f, val3, 0f, 0f);
						GUI.EndGroup();
					}
				}
			}
			if (ultraCooldownInfoWeapon.divisionWidth != 0)
			{
				for (int l = 0; l < ultraCooldownInfoWeapon.numberDivisions - 1; l++)
				{
					float num9 = ((float)l + 1f) / (float)ultraCooldownInfoWeapon.numberDivisions;
					GUI.BeginGroup(new Rect(ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num9, ultraCooldownInfoWeapon.yPos, (float)ultraCooldownInfoWeapon.divisionWidth, ultraCooldownInfoWeapon.height * 1f));
					GUI.DrawTexture(new Rect((0f - ultraCooldownInfoWeapon.width) * num9, 0f, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)val4, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.backgroundColor, 0f, 0f);
					GUI.EndGroup();
				}
			}
		}

		public void tryDrawFlashingIcon(int i)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_039a: 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_03a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_045e: Unknown result type (might be due to invalid IL or missing references)
			//IL_046b: Unknown result type (might be due to invalid IL or missing references)
			UltraCooldownInfoWeapon ultraCooldownInfoWeapon = UltraCooldownInfoWeapons[i];
			Color colorFlash = ultraCooldownInfoWeapon.colorFlash;
			Texture2D val = barTexture;
			switch (i)
			{
			case 0:
				val = (weapon_piercer.altVersion ? weapon_piercerAltTexture : weapon_piercerTexture);
				break;
			case 1:
				val = (weapon_marksman.altVersion ? weapon_marksmanAltTexture : weapon_marksmanTexture);
				break;
			case 2:
				val = (weapon_sharpshooter.altVersion ? weapon_sharpshooterAltTexture : weapon_sharpshooterTexture);
				break;
			case 3:
				val = weapon_piercerAltTexture;
				break;
			case 4:
				val = weapon_marksmanAltTexture;
				break;
			case 5:
				val = weapon_sharpshooterAltTexture;
				break;
			case 6:
				val = (((Object)(object)weapon_sawedOn.GetComponent<ShotgunHammer>() == (Object)null) ? weapon_sawedonTexture : weapon_sawedonAltTexture);
				break;
			case 7:
				val = weapon_coreejectAltTexture;
				break;
			case 8:
				val = weapon_pumpchargeAltTexture;
				break;
			case 9:
				val = weapon_sawedonAltTexture;
				break;
			case 10:
				val = (weapon_attractor.altVersion ? weapon_attractorAltTexture : weapon_attractorTexture);
				break;
			case 11:
				val = (weapon_overheat.altVersion ? weapon_overheatAltTexture : weapon_overheatTexture);
				break;
			case 12:
				val = (weapon_jumpstart.altVersion ? weapon_jumpstartAltTexture : weapon_jumpstartTexture);
				break;
			case 13:
				val = (weapon_attractor.altVersion ? weapon_attractorAltTexture : weapon_attractorTexture);
				break;
			case 14:
				val = weapon_railcannonTexture;
				break;
			case 15:
				val = weapon_freezeframeTexture;
				break;
			case 16:
				val = weapon_srsTexture;
				break;
			case 17:
				val = weapon_firestarterTexture;
				break;
			case 18:
				val = weapon_freezeframeTexture;
				break;
			case 19:
				val = weapon_fistTexture;
				break;
			}
			if (((ultraCooldownInfoWeapon.chargeAmount >= 1f || ultraCooldownInfoWeapon.chargeAmount < 1f / (float)ultraCooldownInfoWeapon.numberFlashes) && ultraCooldownInfoWeapon.lengthFlash > 0f) || ultraCooldownInfoWeapon.numberFlashes == 1)
			{
				flashingIconOpacities[i] += (0f - Time.deltaTime) / ultraCooldownInfoWeapon.lengthFlash;
			}
			else if (ultraCooldownInfoWeapon.lengthMiniFlash > 0f)
			{
				flashingIconOpacities[i] += (0f - Time.deltaTime) / ultraCooldownInfoWeapon.lengthMiniFlash;
			}
			if (flashingIconOpacities[i] < 0f)
			{
				flashingIconOpacities[i] = 0f;
			}
			float num = 1f;
			if (ultraCooldownInfoWeapon.iconFlipped)
			{
				num = -1f;
			}
			if (ultraCooldownInfoWeapon.flashType == FlashTypeEnum.LinearFade && flashingIconOpacities[i] > 0f)
			{
				((Color)(ref colorFlash))..ctor(colorFlash.r, colorFlash.g, colorFlash.b, flashingIconOpacities[i]);
				GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPosFlash + ultraCooldownInfoWeapon.widthFlash * (1f - num) / 2f, ultraCooldownInfoWeapon.yPosFlash, ultraCooldownInfoWeapon.widthFlash * num, ultraCooldownInfoWeapon.heightFlash), (Texture)(object)val, (ScaleMode)0, true, 0f, colorFlash, 0f, 0f);
			}
			else if (ultraCooldownInfoWeapon.flashType == FlashTypeEnum.NoFade && flashingIconOpacities[i] > 0f)
			{
				GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.xPosFlash + ultraCooldownInfoWeapon.widthFlash * (1f - num) / 2f, ultraCooldownInfoWeapon.yPosFlash, ultraCooldownInfoWeapon.widthFlash * num, ultraCooldownInfoWeapon.heightFlash), (Texture)(object)val, (ScaleMode)0, true, 0f, colorFlash, 0f, 0f);
			}
		}

		private void OnGUI()
		{
			if (!modEnabled || !IsGameplayScene() || IsMenu() || MonoSingleton<NewMovement>.Instance.hp <= 0)
			{
				return;
			}
			for (int i = 0; i < UltraCooldownInfoWeapons.Length; i++)
			{
				UltraCooldownInfoWeapon ultraCooldownInfoWeapon = UltraCooldownInfoWeapons[i];
				if (ultraCooldownInfoWeapon.enabled)
				{
					if (ultraCooldownInfoWeapon.chargeBarType == ChargeBarTypeEnum.Classic)
					{
						DrawClassicHUDElement(i);
					}
					else if (ultraCooldownInfoWeapon.chargeBarType == ChargeBarTypeEnum.WeaponImageSplit)
					{
						DrawWeaponImageSplitHUDElement(i);
					}
					else if (ultraCooldownInfoWeapon.chargeBarType == ChargeBarTypeEnum.WeaponImageGradient)
					{
						DrawWeaponImageGradientHUDElement(i);
					}
				}
				if (ultraCooldownInfoWeapon.iconFlashEnabled)
				{
					tryDrawFlashingIcon(i);
				}
			}
		}
	}
	public enum SideEnum
	{
		Right,
		Top,
		Left,
		Bottom
	}
	public enum ChargeBarTypeEnum
	{
		Classic,
		WeaponImageSplit,
		WeaponImageGradient
	}
	public enum FlashTypeEnum
	{
		LinearFade,
		NoFade
	}
	public class UltraCooldownInfoWeapon
	{
		public ChargeBarTypeEnum chargeBarType;

		public float xPos = 0f;

		public float yPos = 0f;

		public float width = 0f;

		public float height = 0f;

		public bool enabled = false;

		public bool iconEnabled = false;

		public int iconDistance = 0;

		public bool flipped = false;

		public Color backgroundColor = new Color(1f, 1f, 1f);

		public float backgroundOpacity = 1f;

		public float opacity = 1f;

		public Color remainingColor = new Color(1f, 1f, 1f);

		public Color chargingColor = new Color(1f, 1f, 1f);

		public Color chargedColor = new Color(1f, 1f, 1f);

		public bool usingChargeColors = true;

		public bool usingChargeChargedColorEnabled = true;

		public bool chargeColors = true;

		public Color usingChargeColor = new Color(1f, 1f, 1f);

		public Color usingChargeChargedColor = new Color(1f, 1f, 1f);

		public int borderThickness = 0;

		public int numberDivisions = 1;

		public int divisionWidth = 1;

		public SideEnum iconSide;

		public float volumeMult = 1f;

		public string filePathCharge;

		public string filePathFractionCharge;

		public string filePathUsingCharge;

		public bool soundEnabled = false;

		public bool soundEnabledWhileHeld = false;

		public int soundDivisions = 1;

		public float xPosFlash = 0f;

		public float yPosFlash = 0f;

		public float widthFlash = 0f;

		public float heightFlash = 0f;

		public float lengthFlash = 0f;

		public bool iconFlashEnabled = false;

		public bool iconFlipped = false;

		public Color colorFlash = Color.white;

		public FlashTypeEnum flashType = FlashTypeEnum.LinearFade;

		public int numberFlashes;

		public float lengthMiniFlash = 0f;

		public GameObject weapon;

		public float chargeAmount = 1f;

		public float usingChargeAmount = -1f;

		public string name = "UltraCooldownInfo - YOU SHOULD NEVER SEE THIS";

		public UltraCooldownInfoWeapon(bool usingChargeColors, bool chargeColors, string name)
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: 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_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: 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)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: 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_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			this.usingChargeColors = usingChargeColors;
			this.chargeColors = chargeColors;
			this.name = name;
		}
	}
	public class PluginConfig
	{
		public enum KeyEnum
		{
			None,
			Backspace,
			Tab,
			Escape,
			Space,
			UpArrow,
			DownArrow,
			RightArrow,
			LeftArrow,
			A,
			B,
			C,
			D,
			E,
			F,
			G,
			H,
			I,
			J,
			K,
			L,
			M,
			N,
			O,
			P,
			Q,
			R,
			S,
			T,
			U,
			V,
			W,
			X,
			Y,
			Z,
			Alpha1,
			Alpha2,
			Alpha3,
			Alpha4,
			Alpha5,
			Alpha6,
			Alpha7,
			Alpha8,
			Alpha9,
			Alpha0,
			CapsLock,
			RightShift,
			LeftShift,
			RightControl,
			LeftControl,
			RightAlt,
			LeftAlt,
			Mouse1,
			Mouse2,
			Mouse3,
			Mouse4,
			Mouse5,
			Mouse6,
			Mouse7,
			BackQuote,
			EqualsSign,
			Minus,
			LeftBracket,
			RightBracket,
			Semicolon,
			Quote,
			Comma,
			Period,
			Slash,
			Backslash,
			Numlock,
			KeypadDivide,
			KeypadMultiply,
			KeypadMinus,
			KeypadPlus,
			KeypadEnter,
			KeypadPeriod,
			Keypad0,
			Keypad1,
			Keypad2,
			Keypad3,
			Keypad4,
			Keypad5,
			Keypad6,
			Keypad7,
			Keypad8,
			Keypad9,
			Home,
			End,
			PageUp,
			PageDown,
			Enter,
			F1,
			F2,
			F3,
			F4,
			F5,
			F6,
			F7,
			F8,
			F9,
			F10,
			F11,
			F12,
			F13,
			F14,
			F15
		}

		public enum SoundEnum
		{
			None,
			CustomSound1,
			CustomSound2,
			CustomSound3,
			CustomSound4,
			CustomSound5,
			CustomSound6,
			CustomSound7,
			CustomSound8
		}

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

			public static EnumValueChangeEventDelegate<KeyEnum> <>9__7_0;

			public static BoolValueChangeEventDelegate <>9__7_1;

			internal void <CreateConfig>b__7_0(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.showGUIKeyCode = convertKeyEnumToKeyCode(e.value);
			}

			internal void <CreateConfig>b__7_1(BoolValueChangeEvent e)
			{
				Plugin.showGUIKeyToggle = e.value;
			}
		}

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

		public static KeyCode convertKeyEnumToKeyCode(KeyEnum value)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f72: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f73: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f77: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: Unknown result type (might be due to invalid IL or missing references)
			//IL_0239: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0311: Unknown result type (might be due to invalid IL or missing references)
			//IL_0335: Unknown result type (might be due to invalid IL or missing references)
			//IL_0359: Unknown result type (might be due to invalid IL or missing references)
			//IL_037d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_040d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0431: Unknown result type (might be due to invalid IL or missing references)
			//IL_0455: Unknown result type (might be due to invalid IL or missing references)
			//IL_0479: Unknown result type (might be due to invalid IL or missing references)
			//IL_049d: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0509: Unknown result type (might be due to invalid IL or missing references)
			//IL_052d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0551: Unknown result type (might be due to invalid IL or missing references)
			//IL_0575: Unknown result type (might be due to invalid IL or missing references)
			//IL_0599: Unknown result type (might be due to invalid IL or missing references)
			//IL_05bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0605: Unknown result type (might be due to invalid IL or missing references)
			//IL_0629: Unknown result type (might be due to invalid IL or missing references)
			//IL_0650: Unknown result type (might be due to invalid IL or missing references)
			//IL_0677: Unknown result type (might be due to invalid IL or missing references)
			//IL_069e: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_0713: Unknown result type (might be due to invalid IL or missing references)
			//IL_073a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0761: Unknown result type (might be due to invalid IL or missing references)
			//IL_0788: Unknown result type (might be due to invalid IL or missing references)
			//IL_07af: Unknown result type (might be due to invalid IL or missing references)
			//IL_07d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0824: Unknown result type (might be due to invalid IL or missing references)
			//IL_084b: Unknown result type (might be due to invalid IL or missing references)
			//IL_086f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0893: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_08db: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0923: Unknown result type (might be due to invalid IL or missing references)
			//IL_0947: Unknown result type (might be due to invalid IL or missing references)
			//IL_096b: Unknown result type (might be due to invalid IL or missing references)
			//IL_098f: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_09fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a25: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a73: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a9a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ac1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b0f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b36: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b5d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b84: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bab: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bd2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bf9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c20: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c47: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c6e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c95: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cbc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ce3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d0a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d2e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d55: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d7c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0da3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0df1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e18: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e3f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e8d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eb4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0edb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f02: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f26: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f4a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f6e: Unknown result type (might be due to invalid IL or missing references)
			KeyCode result = (KeyCode)0;
			if (value.Equals(KeyEnum.Backspace))
			{
				result = (KeyCode)8;
			}
			else if (value.Equals(KeyEnum.Tab))
			{
				result = (KeyCode)9;
			}
			else if (value.Equals(KeyEnum.Escape))
			{
				result = (KeyCode)27;
			}
			else if (value.Equals(KeyEnum.Space))
			{
				result = (KeyCode)32;
			}
			else if (value.Equals(KeyEnum.UpArrow))
			{
				result = (KeyCode)273;
			}
			else if (value.Equals(KeyEnum.DownArrow))
			{
				result = (KeyCode)274;
			}
			else if (value.Equals(KeyEnum.RightArrow))
			{
				result = (KeyCode)275;
			}
			else if (value.Equals(KeyEnum.LeftArrow))
			{
				result = (KeyCode)276;
			}
			else if (value.Equals(KeyEnum.A))
			{
				result = (KeyCode)97;
			}
			else if (value.Equals(KeyEnum.B))
			{
				result = (KeyCode)98;
			}
			else if (value.Equals(KeyEnum.C))
			{
				result = (KeyCode)99;
			}
			else if (value.Equals(KeyEnum.D))
			{
				result = (KeyCode)100;
			}
			else if (value.Equals(KeyEnum.E))
			{
				result = (KeyCode)101;
			}
			else if (value.Equals(KeyEnum.F))
			{
				result = (KeyCode)102;
			}
			else if (value.Equals(KeyEnum.G))
			{
				result = (KeyCode)103;
			}
			else if (value.Equals(KeyEnum.H))
			{
				result = (KeyCode)104;
			}
			else if (value.Equals(KeyEnum.I))
			{
				result = (KeyCode)105;
			}
			else if (value.Equals(KeyEnum.J))
			{
				result = (KeyCode)106;
			}
			else if (value.Equals(KeyEnum.K))
			{
				result = (KeyCode)107;
			}
			else if (value.Equals(KeyEnum.L))
			{
				result = (KeyCode)108;
			}
			else if (value.Equals(KeyEnum.M))
			{
				result = (KeyCode)109;
			}
			else if (value.Equals(KeyEnum.N))
			{
				result = (KeyCode)110;
			}
			else if (value.Equals(KeyEnum.O))
			{
				result = (KeyCode)111;
			}
			else if (value.Equals(KeyEnum.P))
			{
				result = (KeyCode)112;
			}
			else if (value.Equals(KeyEnum.Q))
			{
				result = (KeyCode)113;
			}
			else if (value.Equals(KeyEnum.R))
			{
				result = (KeyCode)114;
			}
			else if (value.Equals(KeyEnum.S))
			{
				result = (KeyCode)115;
			}
			else if (value.Equals(KeyEnum.T))
			{
				result = (KeyCode)116;
			}
			else if (value.Equals(KeyEnum.U))
			{
				result = (KeyCode)117;
			}
			else if (value.Equals(KeyEnum.V))
			{
				result = (KeyCode)118;
			}
			else if (value.Equals(KeyEnum.W))
			{
				result = (KeyCode)119;
			}
			else if (value.Equals(KeyEnum.X))
			{
				result = (KeyCode)120;
			}
			else if (value.Equals(KeyEnum.Y))
			{
				result = (KeyCode)121;
			}
			else if (value.Equals(KeyEnum.Z))
			{
				result = (KeyCode)122;
			}
			else if (value.Equals(KeyEnum.Alpha1))
			{
				result = (KeyCode)49;
			}
			else if (value.Equals(KeyEnum.Alpha2))
			{
				result = (KeyCode)50;
			}
			else if (value.Equals(KeyEnum.Alpha3))
			{
				result = (KeyCode)51;
			}
			else if (value.Equals(KeyEnum.Alpha4))
			{
				result = (KeyCode)52;
			}
			else if (value.Equals(KeyEnum.Alpha5))
			{
				result = (KeyCode)53;
			}
			else if (value.Equals(KeyEnum.Alpha6))
			{
				result = (KeyCode)54;
			}
			else if (value.Equals(KeyEnum.Alpha7))
			{
				result = (KeyCode)55;
			}
			else if (value.Equals(KeyEnum.Alpha8))
			{
				result = (KeyCode)56;
			}
			else if (value.Equals(KeyEnum.Alpha9))
			{
				result = (KeyCode)57;
			}
			else if (value.Equals(KeyEnum.Alpha0))
			{
				result = (KeyCode)48;
			}
			else if (value.Equals(KeyEnum.CapsLock))
			{
				result = (KeyCode)301;
			}
			else if (value.Equals(KeyEnum.RightShift))
			{
				result = (KeyCode)303;
			}
			else if (value.Equals(KeyEnum.LeftShift))
			{
				result = (KeyCode)304;
			}
			else if (value.Equals(KeyEnum.RightControl))
			{
				result = (KeyCode)305;
			}
			else if (value.Equals(KeyEnum.LeftControl))
			{
				result = (KeyCode)306;
			}
			else if (value.Equals(KeyEnum.RightAlt))
			{
				result = (KeyCode)307;
			}
			else if (value.Equ