using System; using System.Collections; 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 Microsoft.CodeAnalysis; using PluginConfig.API; using PluginConfig.API.Decorators; using PluginConfig.API.Fields; using PluginConfig.API.Functionals; using UnityEngine; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("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] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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 bool showIconsInMenu = false; 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 int[] arrayVariant0 = new int[7] { 0, 3, 7, 10, 13, 15, 20 }; public static int[] arrayVariant1 = new int[6] { 1, 4, 8, 11, 16, 21 }; public static int[] arrayVariant2 = new int[6] { 2, 5, 6, 9, 12, 17 }; 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; private bool configCreated = false; public static Color[] GetVariantColors(float opacity, float colorDeepness) { //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) Color val = default(Color); ((Color)(ref val))..ctor(MonoSingleton.Instance.variationColors[0].r * colorDeepness, MonoSingleton.Instance.variationColors[0].g * colorDeepness, MonoSingleton.Instance.variationColors[0].b * colorDeepness, opacity); Color val2 = default(Color); ((Color)(ref val2))..ctor(MonoSingleton.Instance.variationColors[1].r * colorDeepness, MonoSingleton.Instance.variationColors[1].g * colorDeepness, MonoSingleton.Instance.variationColors[1].b * colorDeepness, opacity); Color val3 = default(Color); ((Color)(ref val3))..ctor(MonoSingleton.Instance.variationColors[2].r * colorDeepness, MonoSingleton.Instance.variationColors[2].g * colorDeepness, MonoSingleton.Instance.variationColors[2].b * colorDeepness, opacity); return (Color[])(object)new Color[3] { val, val2, val3 }; } 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() { csp = ((Component)this).gameObject.AddComponent(); 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; } ((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 ((Object)(object)MonoSingleton.Instance != (Object)null && !MonoSingleton.Instance.paused && (Object)(object)MonoSingleton.Instance != (Object)null && !MonoSingleton.Instance.shopping && (Object)(object)GameStateManager.Instance != (Object)null && !GameStateManager.Instance.PlayerInputLocked) { return false; } return true; } public Texture2D GetTextureByIndex(int i) { Texture2D result = barTexture; if (i == 0 && (Object)(object)weapon_piercer != (Object)null) { result = (weapon_piercer.altVersion ? weapon_piercerAltTexture : weapon_piercerTexture); } else if (i == 1 && (Object)(object)weapon_marksman != (Object)null) { result = (weapon_marksman.altVersion ? weapon_marksmanAltTexture : weapon_marksmanTexture); } else if (i == 2 && (Object)(object)weapon_sharpshooter != (Object)null) { result = (weapon_sharpshooter.altVersion ? weapon_sharpshooterAltTexture : weapon_sharpshooterTexture); } else if (i == 3) { result = weapon_piercerAltTexture; } else if (i == 4) { result = weapon_marksmanAltTexture; } else if (i == 5) { result = weapon_sharpshooterAltTexture; } else if (i == 6 && (Object)(object)weapon_sawedOn != (Object)null) { result = (((Object)(object)weapon_sawedOn.GetComponent() == (Object)null) ? weapon_sawedonTexture : weapon_sawedonAltTexture); } else if (i == 7) { result = weapon_coreejectAltTexture; } else if (i == 8) { result = weapon_pumpchargeAltTexture; } else if (i == 9) { result = weapon_sawedonAltTexture; } else if (i == 10 && (Object)(object)weapon_attractor != (Object)null) { result = (weapon_attractor.altVersion ? weapon_attractorAltTexture : weapon_attractorTexture); } else if (i == 11 && (Object)(object)weapon_overheat != (Object)null) { result = (weapon_overheat.altVersion ? weapon_overheatAltTexture : weapon_overheatTexture); } else if (i == 12 && (Object)(object)weapon_jumpstart != (Object)null) { result = (weapon_jumpstart.altVersion ? weapon_jumpstartAltTexture : weapon_jumpstartTexture); } else if (i == 13 && (Object)(object)weapon_attractor != (Object)null) { result = (weapon_attractor.altVersion ? weapon_attractorAltTexture : weapon_attractorTexture); } else if (i == 14) { result = weapon_railcannonTexture; } else if (i == 15) { result = weapon_freezeframeTexture; } else if (i == 16) { result = weapon_srsTexture; } else if (i == 17) { result = weapon_firestarterTexture; } else if (i == 18) { result = weapon_freezeframeTexture; } else if (i == 19) { result = weapon_fistTexture; } else if (i == 20 && (Object)(object)weapon_coreEject != (Object)null) { result = (((Object)(object)weapon_coreEject.GetComponent() == (Object)null) ? weapon_coreejectTexture : weapon_coreejectAltTexture); } else if (i == 21 && (Object)(object)weapon_pumpCharge != (Object)null) { result = (((Object)(object)weapon_pumpCharge.GetComponent() == (Object)null) ? weapon_pumpchargeTexture : weapon_pumpchargeAltTexture); } return result; } public void findWeapons() { if ((Object)(object)weapon != (Object)(object)MonoSingleton.Instance.currentWeapon) { prevWeapon = weapon; } weapon = MonoSingleton.Instance.currentWeapon; foreach (GameObject item in MonoSingleton.Instance.slot1) { if (item.GetComponent().gunVariation == 0) { weapon_piercer = item.GetComponent(); } else if (item.GetComponent().gunVariation == 1) { weapon_marksman = item.GetComponent(); } else if (item.GetComponent().gunVariation == 2) { weapon_sharpshooter = item.GetComponent(); } } foreach (GameObject item2 in MonoSingleton.Instance.slot2) { if (!((Object)(object)item2 == (Object)null) && !((Object)(object)item2.GetComponent() == (Object)null)) { if (item2.GetComponent().variation == 0) { weapon_coreEject = item2; } else if (item2.GetComponent().variation == 1) { weapon_pumpCharge = item2; } else if (item2.GetComponent().variation == 2) { weapon_sawedOn = item2; } } } foreach (GameObject item3 in MonoSingleton.Instance.slot2) { if (!((Object)(object)item3 == (Object)null) && !((Object)(object)item3.GetComponent() == (Object)null)) { if (item3.GetComponent().variation == 0) { weapon_coreEject = item3; } else if (item3.GetComponent().variation == 1) { weapon_pumpCharge = item3; } else if (item3.GetComponent().variation == 2) { weapon_sawedOn = item3; } } } foreach (GameObject item4 in MonoSingleton.Instance.slot3) { if (item4.GetComponent().variation == 1) { weapon_attractor = item4.GetComponent(); } else if (item4.GetComponent().variation == 0) { weapon_overheat = item4.GetComponent(); } else if (item4.GetComponent().variation == 2) { weapon_jumpstart = item4.GetComponent(); } } foreach (GameObject item5 in MonoSingleton.Instance.slot5) { if (item5.GetComponent().variation == 0) { weapon_freezeframe = item5.GetComponent(); } else if (item5.GetComponent().variation == 1) { weapon_srs = item5.GetComponent(); } else if (item5.GetComponent().variation == 2) { weapon_firestarter = item5.GetComponent(); } } } public void findRevolverValues() { if ((Object)(object)weapon_piercer != (Object)null) { if ((Object)(object)weapon.GetComponent() == (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_marksman != (Object)null) { if ((Object)(object)weapon.GetComponent() == (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_sharpshooter != (Object)null) { if ((Object)(object)weapon.GetComponent() == (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.Instance.revaltpickupcharges[0]) / 2f; UltraCooldownInfoWeapons[3].usingChargeAmount = -1f; UltraCooldownInfoWeapons[4].chargeAmount = (2f - MonoSingleton.Instance.revaltpickupcharges[1]) / 2f; UltraCooldownInfoWeapons[4].usingChargeAmount = -1f; UltraCooldownInfoWeapons[5].chargeAmount = (2f - MonoSingleton.Instance.revaltpickupcharges[2]) / 2f; UltraCooldownInfoWeapons[5].usingChargeAmount = -1f; } public void findShotgunValues() { UltraCooldownInfoWeapons[6].chargeAmount = MonoSingleton.Instance.shoSawCharge; if ((Object)(object)weapon_sawedOn != (Object)null && (Object)(object)weapon_sawedOn.GetComponent() != (Object)null) { UltraCooldownInfoWeapons[6].usingChargeAmount = weapon_sawedOn.GetComponent().grenadeForce / 60f; } else if ((Object)(object)weapon_sawedOn != (Object)null && (Object)(object)weapon_sawedOn.GetComponent() != (Object)null) { UltraCooldownInfoWeapons[6].usingChargeAmount = weapon_sawedOn.GetComponent().chargeForce / 60f; } UltraCooldownInfoWeapons[7].chargeAmount = (7f - MonoSingleton.Instance.shoaltcooldowns[0]) / 7f; if ((Object)(object)weapon_coreEject != (Object)null && (Object)(object)weapon_coreEject.GetComponent() != (Object)null) { UltraCooldownInfoWeapons[7].usingChargeAmount = weapon_coreEject.GetComponent().swingCharge; } else { UltraCooldownInfoWeapons[7].usingChargeAmount = -1f; } UltraCooldownInfoWeapons[8].chargeAmount = (7f - MonoSingleton.Instance.shoaltcooldowns[1]) / 7f; if ((Object)(object)weapon_pumpCharge != (Object)null && (Object)(object)weapon_pumpCharge.GetComponent() != (Object)null) { UltraCooldownInfoWeapons[8].usingChargeAmount = weapon_pumpCharge.GetComponent().swingCharge; } else { UltraCooldownInfoWeapons[8].usingChargeAmount = -1f; } UltraCooldownInfoWeapons[9].chargeAmount = (7f - MonoSingleton.Instance.shoaltcooldowns[2]) / 7f; if ((Object)(object)weapon_sawedOn != (Object)null && (Object)(object)weapon_sawedOn.GetComponent() != (Object)null) { UltraCooldownInfoWeapons[9].usingChargeAmount = weapon_sawedOn.GetComponent().swingCharge; } else { UltraCooldownInfoWeapons[9].usingChargeAmount = -1f; } if ((Object)(object)weapon_coreEject != (Object)null && (Object)(object)weapon_coreEject.GetComponent() != (Object)null) { UltraCooldownInfoWeapons[20].usingChargeAmount = weapon_coreEject.GetComponent().grenadeForce / 60f; } else { UltraCooldownInfoWeapons[20].usingChargeAmount = 0f; } if ((Object)(object)weapon_coreEject != (Object)null && (Object)(object)weapon_coreEject.GetComponent() != (Object)null) { UltraCooldownInfoWeapons[20].chargeAmount = MonoSingleton.Instance.shoAltNadeCharge; } else { UltraCooldownInfoWeapons[20].chargeAmount = 1f; } UltraCooldownInfoWeapons[21].chargeAmount = 1f; if ((Object)(object)weapon_pumpCharge != (Object)null && (Object)(object)weapon_pumpCharge.GetComponent() != (Object)null) { UltraCooldownInfoWeapons[21].usingChargeAmount = (float)weapon_pumpCharge.GetComponent().primaryCharge / 3f; } else if ((Object)(object)weapon_pumpCharge != (Object)null && (Object)(object)weapon_pumpCharge.GetComponent() != (Object)null) { UltraCooldownInfoWeapons[21].usingChargeAmount = (float)weapon_pumpCharge.GetComponent().primaryCharge / 3f; } else { UltraCooldownInfoWeapons[21].usingChargeAmount = 0f; } } public void findNailgunValues() { if ((Object)(object)weapon_attractor != (Object)null) { 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 ((Object)(object)weapon_overheat != (Object)null) { if (weapon_overheat.altVersion) { if ((double)(MonoSingleton.Instance.naiSawHeatsinks - 1f) < 0.001 && (Object)(object)weapon.GetComponent() == (Object)(object)weapon_overheat) { if (!MonoSingleton.Instance.InputSource.Fire1.IsPressed) { UltraCooldownInfoWeapons[11].chargeAmount += Time.deltaTime / 8.03f; } if (UltraCooldownInfoWeapons[11].chargeAmount >= 1f) { if (weapon_overheat.canShoot && !weapon_overheat.burnOut && MonoSingleton.Instance.InputSource.Fire2.WasPerformedThisFrame && (double)weapon_overheat.heatUp >= 0.1) { UltraCooldownInfoWeapons[11].chargeAmount = 0f; } else { UltraCooldownInfoWeapons[11].chargeAmount = 1f; } } } else { UltraCooldownInfoWeapons[11].chargeAmount = MonoSingleton.Instance.naiSawHeatsinks; } } else if ((double)(MonoSingleton.Instance.naiHeatsinks - 2f) < 0.001 && (Object)(object)weapon.GetComponent() == (Object)(object)weapon_overheat) { if (!MonoSingleton.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.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.Instance.naiHeatsinks / 2f; } } if ((Object)(object)weapon.GetComponent() != (Object)null) { UltraCooldownInfoWeapons[11].usingChargeAmount = weapon.GetComponent().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.Instance.naiZapperRecharge / 5f; if ((Object)(object)weapon_jumpstart != (Object)null) { if ((Object)(object)weapon_jumpstart.currentZapper == (Object)null) { UltraCooldownInfoWeapons[12].usingChargeAmount = 0f; } else { UltraCooldownInfoWeapons[12].usingChargeAmount = weapon_jumpstart.currentZapper.charge / 5f; } } if ((Object)(object)weapon_attractor != (Object)null) { if (weapon_attractor.altVersion) { UltraCooldownInfoWeapons[13].chargeAmount = MonoSingleton.Instance.naiSaws / 10f; } else { UltraCooldownInfoWeapons[13].chargeAmount = MonoSingleton.Instance.naiAmmo / 100f; } } UltraCooldownInfoWeapons[13].usingChargeAmount = -1f; } public void findRailcannonValues() { UltraCooldownInfoWeapons[14].chargeAmount = MonoSingleton.Instance.raicharge / 4f; UltraCooldownInfoWeapons[14].usingChargeAmount = -1f; } public void findRocket_LauncherValues() { UltraCooldownInfoWeapons[15].chargeAmount = MonoSingleton.Instance.rocketFreezeTime / 5f; UltraCooldownInfoWeapons[15].usingChargeAmount = -1f; UltraCooldownInfoWeapons[16].chargeAmount = MonoSingleton.Instance.rocketCannonballCharge; if ((Object)(object)weapon_srs != (Object)null) { UltraCooldownInfoWeapons[16].usingChargeAmount = weapon_srs.cbCharge; } UltraCooldownInfoWeapons[17].chargeAmount = MonoSingleton.Instance.rocketNapalmFuel; UltraCooldownInfoWeapons[17].usingChargeAmount = -1f; if ((Object)(object)weapon.GetComponent() != (Object)null) { UltraCooldownInfoWeapons[18].chargeAmount = 1f - weapon.GetComponent().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.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() == (Object)(object)weapon_piercer)) && (num != 1 || !((Object)(object)weapon.GetComponent() == (Object)(object)weapon_marksman)) && (num != 2 || !((Object)(object)weapon.GetComponent() == (Object)(object)weapon_sharpshooter)) && (num != 3 || !((Object)(object)weapon.GetComponent() == (Object)(object)weapon_piercer)) && (num != 4 || !((Object)(object)weapon.GetComponent() == (Object)(object)weapon_marksman)) && (num != 5 || !((Object)(object)weapon.GetComponent() == (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() == (Object)(object)weapon_attractor)) && (num != 11 || !((Object)(object)weapon.GetComponent() == (Object)(object)weapon_overheat)) && (num != 12 || !((Object)(object)weapon.GetComponent() == (Object)(object)weapon_jumpstart)) && (num != 13 || !((Object)(object)weapon.GetComponent() == (Object)(object)weapon_attractor)) && (num != 14 || !((Object)(object)weapon.GetComponent() != (Object)null)) && (num != 15 || !((Object)(object)weapon.GetComponent() == (Object)(object)weapon_freezeframe)) && (num != 16 || !((Object)(object)weapon.GetComponent() == (Object)(object)weapon_srs)) && (num != 17 || !((Object)(object)weapon.GetComponent() == (Object)(object)weapon_firestarter)) && (num != 18 || !((Object)(object)weapon.GetComponent() != (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_0090: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) if (!configCreated && (Object)(object)MonoSingleton.Instance != (Object)null) { PluginConfig.CreateConfig(); configCreated = true; } 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 int[] getExtraXY(UltraCooldownInfoWeapon UCIWepConf) { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) int num = 0; int num2 = 0; if ((Object)(object)MonoSingleton.Instance != (Object)null && (Object)(object)MonoSingleton.Instance.currentWeapon != (Object)null) { Vector3 localPosition = ((Component)((Component)MonoSingleton.Instance.currentWeapon.transform.parent).transform.parent.GetChild(1)).transform.localPosition; num = -(int)(localPosition.x * (float)Screen.width / (10f * PluginConfig.movingHUDAmount)); num2 = (int)(localPosition.y * (float)Screen.height / (10f * PluginConfig.movingHUDAmount)); float num3 = (float)(Screen.width / 2) - UCIWepConf.xPos; float num4 = (float)(Screen.height / 2) - UCIWepConf.yPos; int num5 = (int)(num3 * (0f - localPosition.z) / (10f * PluginConfig.movingHUDAmount)); int num6 = (int)(num4 * (0f - localPosition.z) / (10f * PluginConfig.movingHUDAmount)); if (localPosition.z / (10f * PluginConfig.movingHUDAmount) > 1f) { num5 = (int)num3; num6 = (int)num4; } num += num5; num2 += num6; } return new int[2] { num, num2 }; } public void DrawClassicHUDElement(int i) { //IL_0728: Unknown result type (might be due to invalid IL or missing references) //IL_073b: Unknown result type (might be due to invalid IL or missing references) //IL_0795: Unknown result type (might be due to invalid IL or missing references) //IL_07a8: Unknown result type (might be due to invalid IL or missing references) //IL_05f5: Unknown result type (might be due to invalid IL or missing references) //IL_0608: 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_0549: Unknown result type (might be due to invalid IL or missing references) //IL_0589: Unknown result type (might be due to invalid IL or missing references) //IL_059c: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04d9: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_07fa: Unknown result type (might be due to invalid IL or missing references) //IL_080d: Unknown result type (might be due to invalid IL or missing references) //IL_085a: Unknown result type (might be due to invalid IL or missing references) //IL_086d: Unknown result type (might be due to invalid IL or missing references) //IL_08bb: Unknown result type (might be due to invalid IL or missing references) //IL_08ce: Unknown result type (might be due to invalid IL or missing references) //IL_091b: Unknown result type (might be due to invalid IL or missing references) //IL_092e: Unknown result type (might be due to invalid IL or missing references) //IL_06cc: Unknown result type (might be due to invalid IL or missing references) //IL_06df: Unknown result type (might be due to invalid IL or missing references) //IL_0675: Unknown result type (might be due to invalid IL or missing references) //IL_0688: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: 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_098b: Unknown result type (might be due to invalid IL or missing references) //IL_099e: Unknown result type (might be due to invalid IL or missing references) //IL_09e0: Unknown result type (might be due to invalid IL or missing references) //IL_09e5: Unknown result type (might be due to invalid IL or missing references) //IL_0aa1: Unknown result type (might be due to invalid IL or missing references) //IL_0aaf: Unknown result type (might be due to invalid IL or missing references) //IL_0b29: Unknown result type (might be due to invalid IL or missing references) //IL_0b37: Unknown result type (might be due to invalid IL or missing references) //IL_0bc2: Unknown result type (might be due to invalid IL or missing references) //IL_0bd0: Unknown result type (might be due to invalid IL or missing references) //IL_0c5b: Unknown result type (might be due to invalid IL or missing references) //IL_0c69: Unknown result type (might be due to invalid IL or missing references) if (tempDisable) { return; } UltraCooldownInfoWeapon ultraCooldownInfoWeapon = UltraCooldownInfoWeapons[i]; int num = 0; int num2 = 0; if (ultraCooldownInfoWeapon.movingHUD) { int[] extraXY = getExtraXY(ultraCooldownInfoWeapon); num = extraXY[0]; num2 = extraXY[1]; } if (ultraCooldownInfoWeapon.flipped) { if ((Object)(object)weapon != (Object)null && (Object)(object)weapon.GetComponent() == (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((float)num + ultraCooldownInfoWeapon.xPos, (float)num2 + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.usingChargeChargedColor, 0f, 0f); } else { GUI.DrawTexture(new Rect((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width - ultraCooldownInfoWeapon.width * UltraCooldownInfoWeapons[i].usingChargeAmount, (float)num2 + 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((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width, (float)num2 + 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((float)num + ultraCooldownInfoWeapon.xPos, (float)num2 + 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((float)num + ultraCooldownInfoWeapon.xPos, (float)num2 + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.usingChargeChargedColor, 0f, 0f); } else { GUI.DrawTexture(new Rect((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width, (float)num2 + 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((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width, (float)num2 + 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((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width - ultraCooldownInfoWeapon.width * UltraCooldownInfoWeapons[i].chargeAmount, (float)num2 + 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 != (Object)null && (Object)(object)weapon.GetComponent() == (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((float)num + ultraCooldownInfoWeapon.xPos, (float)num2 + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.usingChargeChargedColor, 0f, 0f); } else { GUI.DrawTexture(new Rect((float)num + 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((float)num + ultraCooldownInfoWeapon.xPos, (float)num2 + 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((float)num + ultraCooldownInfoWeapon.xPos, (float)num2 + 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((float)num + ultraCooldownInfoWeapon.xPos, (float)num2 + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.usingChargeChargedColor, 0f, 0f); } else { GUI.DrawTexture(new Rect((float)num + ultraCooldownInfoWeapon.xPos, (float)num2 + 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((float)num + ultraCooldownInfoWeapon.xPos, (float)num2 + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * UltraCooldownInfoWeapons[i].chargeAmount, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.chargingColor, 0f, 0f); GUI.DrawTexture(new Rect((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * UltraCooldownInfoWeapons[i].chargeAmount, (float)num2 + 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((float)num + ultraCooldownInfoWeapon.xPos - (float)ultraCooldownInfoWeapon.borderThickness, (float)num2 + 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((float)num + ultraCooldownInfoWeapon.xPos - (float)ultraCooldownInfoWeapon.borderThickness, (float)num2 + 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((float)num + ultraCooldownInfoWeapon.xPos - (float)ultraCooldownInfoWeapon.borderThickness, (float)num2 + 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((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width, (float)num2 + 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((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * ((1f + (float)j) / (float)ultraCooldownInfoWeapon.numberDivisions) - (float)(ultraCooldownInfoWeapon.divisionWidth / 2), (float)num2 + ultraCooldownInfoWeapon.yPos, (float)ultraCooldownInfoWeapon.divisionWidth, ultraCooldownInfoWeapon.height), (Texture)(object)barTexture, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.backgroundColor, 0f, 0f); } if (ultraCooldownInfoWeapon.iconEnabled) { Color chargeBarIconColor = ultraCooldownInfoWeapon.chargeBarIconColor; Texture2D val = barTexture; val = GetTextureByIndex(i); float num3 = ultraCooldownInfoWeapon.width + (float)(ultraCooldownInfoWeapon.borderThickness * 2); float num4 = ultraCooldownInfoWeapon.height + (float)(ultraCooldownInfoWeapon.borderThickness * 2); float num5 = 0f; float num6 = 0f; float num7 = 0f; if (ultraCooldownInfoWeapon.flipped) { num7 = 1f; } if (ultraCooldownInfoWeapon.iconSide == SideEnum.Left) { num6 = num4; num5 = (float)((Texture)val).width / (float)((Texture)val).height * num4; GUI.DrawTexture(new Rect((float)num + ultraCooldownInfoWeapon.xPos - num5 - (float)ultraCooldownInfoWeapon.iconDistance - (float)ultraCooldownInfoWeapon.borderThickness, (float)num2 + ultraCooldownInfoWeapon.yPos - (float)ultraCooldownInfoWeapon.borderThickness, num5, num4), (Texture)(object)val, (ScaleMode)0, true, 0f, chargeBarIconColor, 0f, 0f); } else if (ultraCooldownInfoWeapon.iconSide == SideEnum.Right) { num6 = num4; num5 = (float)((Texture)val).width / (float)((Texture)val).height * num4; GUI.DrawTexture(new Rect((float)num + ultraCooldownInfoWeapon.xPos + (float)ultraCooldownInfoWeapon.borderThickness + num3 * 2f + (float)ultraCooldownInfoWeapon.iconDistance, (float)num2 + ultraCooldownInfoWeapon.yPos - (float)ultraCooldownInfoWeapon.borderThickness, 0f - num5, num6), (Texture)(object)val, (ScaleMode)0, true, 0f, chargeBarIconColor, 0f, 0f); } else if (ultraCooldownInfoWeapon.iconSide == SideEnum.Top) { num6 = (float)((Texture)val).height / (float)((Texture)val).width * num3; num5 = num3; GUI.DrawTexture(new Rect((float)num + ultraCooldownInfoWeapon.xPos - (float)ultraCooldownInfoWeapon.borderThickness + num3 * num7, (float)num2 + ultraCooldownInfoWeapon.yPos - num6 - (float)ultraCooldownInfoWeapon.iconDistance - (float)ultraCooldownInfoWeapon.borderThickness, num5 * (1f - 2f * num7), num6), (Texture)(object)val, (ScaleMode)0, true, 0f, chargeBarIconColor, 0f, 0f); } else if (ultraCooldownInfoWeapon.iconSide == SideEnum.Bottom) { num6 = (float)((Texture)val).height / (float)((Texture)val).width * num3; num5 = num3; GUI.DrawTexture(new Rect((float)num + ultraCooldownInfoWeapon.xPos - (float)ultraCooldownInfoWeapon.borderThickness + num3 * num7, (float)num2 + ultraCooldownInfoWeapon.yPos + num4 + (float)ultraCooldownInfoWeapon.iconDistance - (float)ultraCooldownInfoWeapon.borderThickness, num5 * (1f - 2f * num7), num6), (Texture)(object)val, (ScaleMode)0, true, 0f, chargeBarIconColor, 0f, 0f); } } } public void DrawWeaponImageSplitHUDElement(int i) { //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: 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_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_019d: 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_01a4: 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_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0556: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_04e1: Unknown result type (might be due to invalid IL or missing references) //IL_04ef: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0609: Unknown result type (might be due to invalid IL or missing references) //IL_062f: Unknown result type (might be due to invalid IL or missing references) //IL_063e: Unknown result type (might be due to invalid IL or missing references) if (tempDisable) { return; } UltraCooldownInfoWeapon ultraCooldownInfoWeapon = UltraCooldownInfoWeapons[i]; int num = 0; int num2 = 0; if (ultraCooldownInfoWeapon.movingHUD) { int[] extraXY = getExtraXY(ultraCooldownInfoWeapon); num = extraXY[0]; num2 = extraXY[1]; } 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 num3 = ultraCooldownInfoWeapon.chargeAmount; if (ultraCooldownInfoWeapon.chargeAmount >= 1f && ultraCooldownInfoWeapon.usingChargeAmount >= 0f) { num3 = ultraCooldownInfoWeapon.usingChargeAmount; } Texture2D textureByIndex = GetTextureByIndex(i); 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; num3 = 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 num4 = ((float)j + 0f) / (float)ultraCooldownInfoWeapon.numberDivisions; if (num3 * (float)ultraCooldownInfoWeapon.numberDivisions >= (float)(j + 1)) { GUI.BeginGroup(new Rect((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num4, (float)num2 + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f / (float)ultraCooldownInfoWeapon.numberDivisions), ultraCooldownInfoWeapon.height * 1f)); GUI.DrawTexture(new Rect((0f - ultraCooldownInfoWeapon.width) * num4, 0f, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)textureByIndex, (ScaleMode)0, true, 0f, val3, 0f, 0f); GUI.EndGroup(); continue; } GUI.BeginGroup(new Rect((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num4, (float)num2 + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (num3 - num4), ultraCooldownInfoWeapon.height * 1f)); GUI.DrawTexture(new Rect((0f - ultraCooldownInfoWeapon.width) * num4, 0f, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)textureByIndex, (ScaleMode)0, true, 0f, val, 0f, 0f); GUI.EndGroup(); break; } GUI.BeginGroup(new Rect((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num3, (float)num2 + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * 1f, ultraCooldownInfoWeapon.height * 1f)); GUI.DrawTexture(new Rect((0f - ultraCooldownInfoWeapon.width) * num3, 0f, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)textureByIndex, (ScaleMode)0, true, 0f, val2, 0f, 0f); GUI.EndGroup(); } else { for (int k = 0; k < ultraCooldownInfoWeapon.numberDivisions; k++) { float num5 = ((float)k + 0f) / (float)ultraCooldownInfoWeapon.numberDivisions; if (num3 * (float)ultraCooldownInfoWeapon.numberDivisions >= (float)(k + 1)) { GUI.BeginGroup(new Rect((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num5, (float)num2 + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f / (float)ultraCooldownInfoWeapon.numberDivisions), ultraCooldownInfoWeapon.height * 1f)); GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.width * (1f - num5), 0f, 0f - ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)textureByIndex, (ScaleMode)0, true, 0f, val3, 0f, 0f); GUI.EndGroup(); continue; } GUI.BeginGroup(new Rect((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num5, (float)num2 + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (num3 - num5), ultraCooldownInfoWeapon.height * 1f)); GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.width * (1f - num5), 0f, 0f - ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)textureByIndex, (ScaleMode)0, true, 0f, val, 0f, 0f); GUI.EndGroup(); break; } GUI.BeginGroup(new Rect((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num3, (float)num2 + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * 1f, ultraCooldownInfoWeapon.height * 1f)); GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.width * (1f - num3), 0f, 0f - ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)textureByIndex, (ScaleMode)0, true, 0f, val2, 0f, 0f); GUI.EndGroup(); } if (ultraCooldownInfoWeapon.divisionWidth != 0) { for (int l = 0; l < ultraCooldownInfoWeapon.numberDivisions - 1; l++) { float num6 = ((float)l + 1f) / (float)ultraCooldownInfoWeapon.numberDivisions; GUI.BeginGroup(new Rect((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num6, (float)num2 + ultraCooldownInfoWeapon.yPos, (float)ultraCooldownInfoWeapon.divisionWidth, ultraCooldownInfoWeapon.height * 1f)); GUI.DrawTexture(new Rect((0f - ultraCooldownInfoWeapon.width) * num6, 0f, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)textureByIndex, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.backgroundColor, 0f, 0f); GUI.EndGroup(); } } } public void DrawWeaponImageGradientHUDElement(int i) { //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: 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_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_05f7: 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_0631: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Unknown result type (might be due to invalid IL or missing references) //IL_075b: Unknown result type (might be due to invalid IL or missing references) //IL_0769: Unknown result type (might be due to invalid IL or missing references) //IL_0697: Unknown result type (might be due to invalid IL or missing references) //IL_06c3: Unknown result type (might be due to invalid IL or missing references) //IL_06d1: Unknown result type (might be due to invalid IL or missing references) //IL_0512: Unknown result type (might be due to invalid IL or missing references) //IL_0538: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_07fe: 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_0833: Unknown result type (might be due to invalid IL or missing references) if (tempDisable) { return; } UltraCooldownInfoWeapon ultraCooldownInfoWeapon = UltraCooldownInfoWeapons[i]; int num = 0; int num2 = 0; if (ultraCooldownInfoWeapon.movingHUD) { int[] extraXY = getExtraXY(ultraCooldownInfoWeapon); num = extraXY[0]; num2 = extraXY[1]; } 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 num3 = ultraCooldownInfoWeapon.chargeAmount; if (ultraCooldownInfoWeapon.chargeAmount >= 1f) { num3 = ultraCooldownInfoWeapon.usingChargeAmount; } float num4 = 0f; float num5 = 0f; float num6 = 0f; if (ultraCooldownInfoWeapon.chargeAmount < 1f) { val = ultraCooldownInfoWeapon.chargedColor; val2 = ultraCooldownInfoWeapon.remainingColor; float num7 = num3 * (float)ultraCooldownInfoWeapon.numberDivisions - (float)(int)(num3 * (float)ultraCooldownInfoWeapon.numberDivisions); num4 = ultraCooldownInfoWeapon.chargingColor.r * num7 + ultraCooldownInfoWeapon.remainingColor.r * (1f - num7); num5 = ultraCooldownInfoWeapon.chargingColor.g * num7 + ultraCooldownInfoWeapon.remainingColor.g * (1f - num7); num6 = ultraCooldownInfoWeapon.chargingColor.b * num7 + ultraCooldownInfoWeapon.remainingColor.b * (1f - num7); ((Color)(ref val3))..ctor(num4, num5, num6, ultraCooldownInfoWeapon.opacity); } else { val = ultraCooldownInfoWeapon.chargedColor; val2 = ultraCooldownInfoWeapon.chargedColor; val3 = ultraCooldownInfoWeapon.chargedColor; } if (ultraCooldownInfoWeapon.usingChargeAmount > 0f) { val = ultraCooldownInfoWeapon.usingChargeChargedColor; val2 = ultraCooldownInfoWeapon.chargedColor; float num8 = num3 * (float)ultraCooldownInfoWeapon.numberDivisions - (float)(int)(num3 * (float)ultraCooldownInfoWeapon.numberDivisions); num4 = ultraCooldownInfoWeapon.usingChargeColor.r * num8 + ultraCooldownInfoWeapon.chargedColor.r * (1f - num8); num5 = ultraCooldownInfoWeapon.usingChargeColor.g * num8 + ultraCooldownInfoWeapon.chargedColor.g * (1f - num8); num6 = ultraCooldownInfoWeapon.usingChargeColor.b * num8 + ultraCooldownInfoWeapon.chargedColor.b * (1f - num8); if (i == 2 && !weapon_sharpshooter.altVersion) { val2 = normalSharpshooterBackgroundChargingColor; num3 = ultraCooldownInfoWeapon.usingChargeAmount; num8 = num3 * (float)ultraCooldownInfoWeapon.numberDivisions - (float)(int)(num3 * (float)ultraCooldownInfoWeapon.numberDivisions); num4 = ultraCooldownInfoWeapon.usingChargeColor.r * num8 + normalSharpshooterBackgroundChargingColor.r * (1f - num8); num5 = ultraCooldownInfoWeapon.usingChargeColor.g * num8 + normalSharpshooterBackgroundChargingColor.g * (1f - num8); num6 = ultraCooldownInfoWeapon.usingChargeColor.b * num8 + normalSharpshooterBackgroundChargingColor.b * (1f - num8); } ((Color)(ref val3))..ctor(num4, num5, num6, ultraCooldownInfoWeapon.opacity); } if (ultraCooldownInfoWeapon.usingChargeAmount >= 1f) { val = ultraCooldownInfoWeapon.usingChargeChargedColor; val2 = ultraCooldownInfoWeapon.usingChargeChargedColor; val3 = ultraCooldownInfoWeapon.usingChargeChargedColor; } Texture2D textureByIndex = GetTextureByIndex(i); bool flag = false; if (!ultraCooldownInfoWeapon.flipped) { for (int j = 0; j < ultraCooldownInfoWeapon.numberDivisions; j++) { float num9 = ((float)j + 0f) / (float)ultraCooldownInfoWeapon.numberDivisions; if (num3 * (float)ultraCooldownInfoWeapon.numberDivisions >= (float)(j + 1)) { GUI.BeginGroup(new Rect((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num9, (float)num2 + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f / (float)ultraCooldownInfoWeapon.numberDivisions), ultraCooldownInfoWeapon.height * 1f)); GUI.DrawTexture(new Rect((0f - ultraCooldownInfoWeapon.width) * num9, 0f, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)textureByIndex, (ScaleMode)0, true, 0f, val, 0f, 0f); GUI.EndGroup(); } else if (flag) { GUI.BeginGroup(new Rect((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num9, (float)num2 + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f / (float)ultraCooldownInfoWeapon.numberDivisions), ultraCooldownInfoWeapon.height * 1f)); GUI.DrawTexture(new Rect((0f - ultraCooldownInfoWeapon.width) * num9, 0f, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)textureByIndex, (ScaleMode)0, true, 0f, val2, 0f, 0f); GUI.EndGroup(); } else { flag = true; GUI.BeginGroup(new Rect((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num9, (float)num2 + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f / (float)ultraCooldownInfoWeapon.numberDivisions), ultraCooldownInfoWeapon.height * 1f)); GUI.DrawTexture(new Rect((0f - ultraCooldownInfoWeapon.width) * num9, 0f, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)textureByIndex, (ScaleMode)0, true, 0f, val3, 0f, 0f); GUI.EndGroup(); } } } else { for (int k = 0; k < ultraCooldownInfoWeapon.numberDivisions; k++) { float num10 = ((float)k + 0f) / (float)ultraCooldownInfoWeapon.numberDivisions; if (num3 * (float)ultraCooldownInfoWeapon.numberDivisions >= (float)(k + 1)) { GUI.BeginGroup(new Rect((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num10, (float)num2 + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f / (float)ultraCooldownInfoWeapon.numberDivisions), ultraCooldownInfoWeapon.height * 1f)); GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.width * (1f - num10), 0f, 0f - ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)textureByIndex, (ScaleMode)0, true, 0f, val, 0f, 0f); GUI.EndGroup(); } else if (flag) { GUI.BeginGroup(new Rect((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num10, (float)num2 + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f / (float)ultraCooldownInfoWeapon.numberDivisions), ultraCooldownInfoWeapon.height * 1f)); GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.width * (1f - num10), 0f, 0f - ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)textureByIndex, (ScaleMode)0, true, 0f, val2, 0f, 0f); GUI.EndGroup(); } else { flag = true; GUI.BeginGroup(new Rect((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num10, (float)num2 + ultraCooldownInfoWeapon.yPos, ultraCooldownInfoWeapon.width * (1f / (float)ultraCooldownInfoWeapon.numberDivisions), ultraCooldownInfoWeapon.height * 1f)); GUI.DrawTexture(new Rect(ultraCooldownInfoWeapon.width * (1f - num10), 0f, 0f - ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)textureByIndex, (ScaleMode)0, true, 0f, val3, 0f, 0f); GUI.EndGroup(); } } } if (ultraCooldownInfoWeapon.divisionWidth != 0) { for (int l = 0; l < ultraCooldownInfoWeapon.numberDivisions - 1; l++) { float num11 = ((float)l + 1f) / (float)ultraCooldownInfoWeapon.numberDivisions; GUI.BeginGroup(new Rect((float)num + ultraCooldownInfoWeapon.xPos + ultraCooldownInfoWeapon.width * num11, (float)num2 + ultraCooldownInfoWeapon.yPos, (float)ultraCooldownInfoWeapon.divisionWidth, ultraCooldownInfoWeapon.height * 1f)); GUI.DrawTexture(new Rect((0f - ultraCooldownInfoWeapon.width) * num11, 0f, ultraCooldownInfoWeapon.width, ultraCooldownInfoWeapon.height), (Texture)(object)textureByIndex, (ScaleMode)0, true, 0f, ultraCooldownInfoWeapon.backgroundColor, 0f, 0f); GUI.EndGroup(); } } } public void tryDrawFlashingIcon(int i) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014a: 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_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) UltraCooldownInfoWeapon ultraCooldownInfoWeapon = UltraCooldownInfoWeapons[i]; int num = 0; int num2 = 0; if (ultraCooldownInfoWeapon.movingHUD) { int[] extraXY = getExtraXY(ultraCooldownInfoWeapon); num = extraXY[0]; num2 = extraXY[1]; } Color colorFlash = ultraCooldownInfoWeapon.colorFlash; Texture2D textureByIndex = GetTextureByIndex(i); 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 num3 = 1f; if (ultraCooldownInfoWeapon.iconFlipped) { num3 = -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((float)num + ultraCooldownInfoWeapon.xPosFlash + ultraCooldownInfoWeapon.widthFlash * (1f - num3) / 2f, (float)num2 + ultraCooldownInfoWeapon.yPosFlash, ultraCooldownInfoWeapon.widthFlash * num3, ultraCooldownInfoWeapon.heightFlash), (Texture)(object)textureByIndex, (ScaleMode)0, true, 0f, colorFlash, 0f, 0f); } else if (ultraCooldownInfoWeapon.flashType == FlashTypeEnum.NoFade && flashingIconOpacities[i] > 0f) { GUI.DrawTexture(new Rect((float)num + ultraCooldownInfoWeapon.xPosFlash + ultraCooldownInfoWeapon.widthFlash * (1f - num3) / 2f, (float)num2 + ultraCooldownInfoWeapon.yPosFlash, ultraCooldownInfoWeapon.widthFlash * num3, ultraCooldownInfoWeapon.heightFlash), (Texture)(object)textureByIndex, (ScaleMode)0, true, 0f, colorFlash, 0f, 0f); } } private void OnGUI() { if (!modEnabled || !IsGameplayScene() || (IsMenu() && !showIconsInMenu) || MonoSingleton.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 (flashingIconOpacities[i] > 0f) { 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 chargeBarIconColor = new Color(1f, 1f, 1f); 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 bool movingHUD = true; 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: 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_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: 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 <>9__9_0; public static BoolValueChangeEventDelegate <>9__9_1; public static BoolValueChangeEventDelegate <>9__9_2; public static BoolValueChangeEventDelegate <>9__9_3; public static FloatValueChangeEventDelegate <>9__9_4; internal void b__9_0(EnumValueChangeEvent 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 b__9_1(BoolValueChangeEvent e) { Plugin.showGUIKeyToggle = e.value; } internal void b__9_2(BoolValueChangeEvent e) { settingsColorsActivated = e.value; } internal void b__9_3(BoolValueChangeEvent e) { Plugin.showIconsInMenu = e.value; } internal void b__9_4(FloatValueChangeEvent e) { movingHUDAmount = e.value; } } public static float movingHUDAmount = 1f; public static string DefaultParentFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? ""; public static bool settingsColorsActivated = true; public static KeyCode convertKeyEnumToKeyCode(KeyEnum value) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0f72: Unknown result type (might be due to invalid IL or missing references) //IL_0f73: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0f77: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_052d: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_0575: Unknown result type (might be due to invalid IL or missing references) //IL_0599: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: Unknown result type (might be due to invalid IL or missing references) //IL_0605: Unknown result type (might be due to invalid IL or missing references) //IL_0629: Unknown result type (might be due to invalid IL or missing references) //IL_0650: Unknown result type (might be due to invalid IL or missing references) //IL_0677: Unknown result type (might be due to invalid IL or missing references) //IL_069e: Unknown result type (might be due to invalid IL or missing references) //IL_06c5: Unknown result type (might be due to invalid IL or missing references) //IL_06ec: Unknown result type (might be due to invalid IL or missing references) //IL_0713: Unknown result type (might be due to invalid IL or missing references) //IL_073a: Unknown result type (might be due to invalid IL or missing references) //IL_0761: Unknown result type (might be due to invalid IL or missing references) //IL_0788: Unknown result type (might be due to invalid IL or missing references) //IL_07af: Unknown result type (might be due to invalid IL or missing references) //IL_07d6: Unknown result type (might be due to invalid IL or missing references) //IL_07fd: Unknown result type (might be due to invalid IL or missing references) //IL_0824: Unknown result type (might be due to invalid IL or missing references) //IL_084b: Unknown result type (might be due to invalid IL or missing references) //IL_086f: Unknown result type (might be due to invalid IL or missing references) //IL_0893: Unknown result type (might be due to invalid IL or missing references) //IL_08b7: Unknown result type (might be due to invalid IL or missing references) //IL_08db: Unknown result type (might be due to invalid IL or missing references) //IL_08ff: Unknown result type (might be due to invalid IL or missing references) //IL_0923: Unknown result type (might be due to invalid IL or missing references) //IL_0947: Unknown result type (might be due to invalid IL or missing references) //IL_096b: Unknown result type (might be due to invalid IL or missing references) //IL_098f: Unknown result type (might be due to invalid IL or missing references) //IL_09b3: Unknown result type (might be due to invalid IL or missing references) //IL_09d7: Unknown result type (might be due to invalid IL or missing references) //IL_09fe: Unknown result type (might be due to invalid IL or missing references) //IL_0a25: Unknown result type (might be due to invalid IL or missing references) //IL_0a4c: Unknown result type (might be due to invalid IL or missing references) //IL_0a73: Unknown result type (might be due to invalid IL or missing references) //IL_0a9a: Unknown result type (might be due to invalid IL or missing references) //IL_0ac1: Unknown result type (might be due to invalid IL or missing references) //IL_0ae8: Unknown result type (might be due to invalid IL or missing references) //IL_0b0f: Unknown result type (might be due to invalid IL or missing references) //IL_0b36: Unknown result type (might be due to invalid IL or missing references) //IL_0b5d: Unknown result type (might be due to invalid IL or missing references) //IL_0b84: Unknown result type (might be due to invalid IL or missing references) //IL_0bab: Unknown result type (might be due to invalid IL or missing references) //IL_0bd2: Unknown result type (might be due to invalid IL or missing references) //IL_0bf9: Unknown result type (might be due to invalid IL or missing references) //IL_0c20: Unknown result type (might be due to invalid IL or missing references) //IL_0c47: Unknown result type (might be due to invalid IL or missing references) //IL_0c6e: Unknown result type (might be due to invalid IL or missing references) //IL_0c95: Unknown result type (might be due to invalid IL or missing references) //IL_0cbc: Unknown result type (might be due to invalid IL or missing references) //IL_0ce3: Unknown result type (might be due to invalid IL or missing references) //IL_0d0a: Unknown result type (might be due to invalid IL or missing references) //IL_0d2e: Unknown result type (might be due to invalid IL or missing references) //IL_0d55: Unknown result type (might be due to invalid IL or missing references) //IL_0d7c: Unknown result type (might be due to invalid IL or missing references) //IL_0da3: Unknown result type (might be due to invalid IL or missing references) //IL_0dca: Unknown result type (might be due to invalid IL or missing references) //IL_0df1: Unknown result type (might be due to invalid IL or missing references) //IL_0e18: Unknown result type (might be due to invalid IL or missing references) //IL_0e3f: Unknown result type (might be due to invalid IL or missing references) //IL_0e66: Unknown result type (might be due to invalid IL or missing references) //IL_0e8d: Unknown result type (might be due to invalid IL or missing references) //IL_0eb4: Unknown result type (might be due to invalid IL or missing references) //IL_0edb: Unknown result type (might be due to invalid IL or missing references) //IL_0f02: Unknown result type (might be due to invalid IL or missing references) //IL_0f26: Unknown result type (might be due to invalid IL or missing references) //IL_0f4a: Unknown result type (might be due to invalid IL or missing references) //IL_0f6e: Unknown result type (might be due to invalid IL or missing references) KeyCode result = (KeyCode)0; if (value.Equals(KeyEnum.Backspace)) { result = (KeyCode)8; } else if (value.Equals(KeyEnum.Tab)) { result = (KeyCode)9; } else if (value.Equals(KeyEnum.Escape)) { result = (KeyCode)27; } else if (value.Equals(KeyEnum.Space)) { result = (KeyCode)32; } else if (value.Equals(KeyEnum.UpArrow)) { result = (KeyCode)273; } else if (value.Equals(KeyEnum.DownArrow)) { result = (KeyCode)274; } else if (value.Equals(KeyEnum.RightArrow)) { result = (KeyCode)275; } else if (value.Equals(KeyEnum.LeftArrow)) { result = (KeyCode)276; } else if (value.Equals(KeyEnum.A)) { result = (KeyCode)97; } else if (value.Equals(KeyEnum.B)) { result = (KeyCode)98; } else if (value.Equals(KeyEnum.C)) { result = (KeyCode)99; } else if (value.Equals(KeyEnum.D)) { result = (KeyCode)100; } else if (value.Equals(KeyEnum.E)) { result = (KeyCode)101; } else if (value.Equals(KeyEnum.F)) { result = (KeyCode)102; } else if (value.Equals(KeyEnum.G)) { result = (KeyCode)103; } else if (value.Equals(KeyEnum.H)) { result = (KeyCode)104; } else if (value.Equals(KeyEnum.I)) { result = (KeyCode)105; } else if (value.Equals(KeyEnum.J)) { result = (KeyCode)106; } else if (value.Equals(KeyEnum.K)) { result = (KeyCode)107; } else if (value.Equals(KeyEnum.L)) { result = (KeyCode)108; } else if (value.Equals(KeyEnum.M)) { result = (KeyCode)109; } else if (value.Equals(KeyEnum.N)) { result = (KeyCode)110; } else if (value.Equals(KeyEnum.O)) { result = (KeyCode)111; } else if (value.Equals(KeyEnum.P)) { result = (KeyCode)112; } else if (value.Equals(KeyEnum.Q)) { result = (KeyCode)113; } else if (value.Equals(KeyEnum.R)) { result = (KeyCode)114; } else if (value.Equals(KeyEnum.S)) { result = (KeyCode)115; } else if (value.Equals(KeyEnum.T)) { result = (KeyCode)116; } else if (value.Equals(KeyEnum.U)) { result = (KeyCode)117; } else if (value.Equals(KeyEnum.V)) { result = (KeyCode)118; } else if (value.Equals(KeyEnum.W)) { result = (KeyCode)119; } else if (value.Equals(KeyEnum.X)) { result = (KeyCode)120; } else if (value.Equals(KeyEnum.Y)) { result = (KeyCode)121; } else if (value.Equals(KeyEnum.Z)) { result = (KeyCode)122; } else if (value.Equals(KeyEnum.Alpha1)) { result = (KeyCode)49; } else if (value.Equals(KeyEnum.Alpha2)) { result = (KeyCode)50; } else if (value.Equals(KeyEnum.Alpha3)) { result = (KeyCode)51; } else if (value.Equals(KeyEnum.Alpha4)) { result = (KeyCode)52; } else if (value.Equals(KeyEnum.Alpha5)) { result = (KeyCode)53; } else if (value.Equals(KeyEnum.Alpha6)) { result = (KeyCode)54; } else if (value.Equals(KeyEnum.Alpha7)) { result = (KeyCode)55; } else if (value.Equals(KeyEnum.Alpha8)) { result = (KeyCode)56; } else if (value.Equals(KeyEnum.Alpha9)) { result = (KeyCode)57; } else if (value.Equals(KeyEnum.Alpha0)) { result = (KeyCode)48; } else if (value.Equals(KeyEnum.CapsLock)) { result = (KeyCode)301; } else if (value.Equals(KeyEnum.RightShift)) { result = (KeyCode)303; } else if (value.Equals(KeyEnum.LeftShift)) { result = (KeyCode)304; } else if (value.Equals(KeyEnum.RightControl)) { result = (KeyCode)305; } else if (value.Equals(KeyEnum.LeftControl)) { result = (KeyCode)306; } else if (value.Equals(KeyEnum.RightAlt)) { result = (KeyCode)307; } else if (value.Equals(KeyEnum.LeftAlt)) { result = (KeyCode)308; } else if (value.Equals(KeyEnum.Mouse1)) { result = (KeyCode)323; } else if (value.Equals(KeyEnum.Mouse2)) { result = (KeyCode)324; } else if (value.Equals(KeyEnum.Mouse3)) { result = (KeyCode)325; } else if (value.Equals(KeyEnum.Mouse4)) { result = (KeyCode)326; } else if (value.Equals(KeyEnum.Mouse5)) { result = (KeyCode)327; } else if (value.Equals(KeyEnum.Mouse6)) { result = (KeyCode)328; } else if (value.Equals(KeyEnum.Mouse7)) { result = (KeyCode)329; } else { if (value.Equals(KeyEnum.BackQuote)) { return (KeyCode)96; } if (value.Equals(KeyEnum.EqualsSign)) { return (KeyCode)61; } if (value.Equals(KeyEnum.Minus)) { return (KeyCode)45; } if (value.Equals(KeyEnum.LeftBracket)) { return (KeyCode)91; } if (value.Equals(KeyEnum.RightBracket)) { return (KeyCode)93; } if (value.Equals(KeyEnum.Semicolon)) { return (KeyCode)59; } if (value.Equals(KeyEnum.Quote)) { return (KeyCode)39; } if (value.Equals(KeyEnum.Comma)) { return (KeyCode)44; } if (value.Equals(KeyEnum.Period)) { return (KeyCode)46; } if (value.Equals(KeyEnum.Slash)) { return (KeyCode)47; } if (value.Equals(KeyEnum.Backslash)) { return (KeyCode)92; } if (value.Equals(KeyEnum.Numlock)) { return (KeyCode)300; } if (value.Equals(KeyEnum.KeypadDivide)) { return (KeyCode)267; } if (value.Equals(KeyEnum.KeypadMultiply)) { return (KeyCode)268; } if (value.Equals(KeyEnum.KeypadMinus)) { return (KeyCode)269; } if (value.Equals(KeyEnum.KeypadPlus)) { return (KeyCode)270; } if (value.Equals(KeyEnum.KeypadEnter)) { return (KeyCode)271; } if (value.Equals(KeyEnum.KeypadPeriod)) { return (KeyCode)266; } if (value.Equals(KeyEnum.Keypad0)) { return (KeyCode)256; } if (value.Equals(KeyEnum.Keypad1)) { return (KeyCode)257; } if (value.Equals(KeyEnum.Keypad2)) { return (KeyCode)258; } if (value.Equals(KeyEnum.Keypad3)) { return (KeyCode)259; } if (value.Equals(KeyEnum.Keypad4)) { return (KeyCode)260; } if (value.Equals(KeyEnum.Keypad5)) { return (KeyCode)261; } if (value.Equals(KeyEnum.Keypad6)) { return (KeyCode)262; } if (value.Equals(KeyEnum.Keypad7)) { return (KeyCode)263; } if (value.Equals(KeyEnum.Keypad8)) { return (KeyCode)264; } if (value.Equals(KeyEnum.Keypad9)) { return (KeyCode)265; } if (value.Equals(KeyEnum.Home)) { return (KeyCode)278; } if (value.Equals(KeyEnum.End)) { return (KeyCode)279; } if (value.Equals(KeyEnum.PageUp)) { return (KeyCode)280; } if (value.Equals(KeyEnum.PageDown)) { return (KeyCode)281; } if (value.Equals(KeyEnum.Enter)) { return (KeyCode)13; } if (value.Equals(KeyEnum.F1)) { return (KeyCode)282; } if (value.Equals(KeyEnum.F2)) { return (KeyCode)283; } if (value.Equals(KeyEnum.F3)) { return (KeyCode)284; } if (value.Equals(KeyEnum.F4)) { return (KeyCode)285; } if (value.Equals(KeyEnum.F5)) { return (KeyCode)286; } if (value.Equals(KeyEnum.F6)) { return (KeyCode)287; } if (value.Equals(KeyEnum.F7)) { return (KeyCode)288; } if (value.Equals(KeyEnum.F8)) { return (KeyCode)289; } if (value.Equals(KeyEnum.F9)) { return (KeyCode)290; } if (value.Equals(KeyEnum.F10)) { return (KeyCode)291; } if (value.Equals(KeyEnum.F11)) { return (KeyCode)292; } if (value.Equals(KeyEnum.F12)) { return (KeyCode)293; } if (value.Equals(KeyEnum.F13)) { return (KeyCode)294; } if (value.Equals(KeyEnum.F14)) { return (KeyCode)295; } if (value.Equals(KeyEnum.F15)) { return (KeyCode)296; } } return result; } private static void SetDisplayNames(EnumField field) { field.SetEnumDisplayName(KeyEnum.Minus, "-"); field.SetEnumDisplayName(KeyEnum.EqualsSign, "="); field.SetEnumDisplayName(KeyEnum.LeftBracket, "["); field.SetEnumDisplayName(KeyEnum.RightBracket, "]"); field.SetEnumDisplayName(KeyEnum.CapsLock, "Caps Lock"); field.SetEnumDisplayName(KeyEnum.LeftShift, "Left Shift"); field.SetEnumDisplayName(KeyEnum.RightShift, "Right Shift"); field.SetEnumDisplayName(KeyEnum.LeftControl, "Left Control"); field.SetEnumDisplayName(KeyEnum.RightControl, "Right Control"); field.SetEnumDisplayName(KeyEnum.LeftAlt, "Left Alt"); field.SetEnumDisplayName(KeyEnum.RightAlt, "Right Alt"); field.SetEnumDisplayName(KeyEnum.BackQuote, "`"); field.SetEnumDisplayName(KeyEnum.Quote, "'"); field.SetEnumDisplayName(KeyEnum.Semicolon, ";"); field.SetEnumDisplayName(KeyEnum.Slash, "/"); field.SetEnumDisplayName(KeyEnum.Backslash, "\\"); field.SetEnumDisplayName(KeyEnum.Keypad0, "Keypad 0"); field.SetEnumDisplayName(KeyEnum.Keypad1, "Keypad 1"); field.SetEnumDisplayName(KeyEnum.Keypad2, "Keypad 2"); field.SetEnumDisplayName(KeyEnum.Keypad3, "Keypad 3"); field.SetEnumDisplayName(KeyEnum.Keypad4, "Keypad 4"); field.SetEnumDisplayName(KeyEnum.Keypad5, "Keypad 5"); field.SetEnumDisplayName(KeyEnum.Keypad6, "Keypad 6"); field.SetEnumDisplayName(KeyEnum.Keypad7, "Keypad 7"); field.SetEnumDisplayName(KeyEnum.Keypad8, "Keypad 8"); field.SetEnumDisplayName(KeyEnum.Keypad9, "Keypad 9"); field.SetEnumDisplayName(KeyEnum.KeypadDivide, "Keypad /"); field.SetEnumDisplayName(KeyEnum.KeypadMultiply, "Keypad *"); field.SetEnumDisplayName(KeyEnum.KeypadPlus, "Keypad Plus"); field.SetEnumDisplayName(KeyEnum.KeypadMinus, "Keypad Minus"); field.SetEnumDisplayName(KeyEnum.KeypadEnter, "Keypad Enter"); field.SetEnumDisplayName(KeyEnum.KeypadPeriod, "Keypad ."); field.SetEnumDisplayName(KeyEnum.Period, "."); field.SetEnumDisplayName(KeyEnum.Comma, ","); field.SetEnumDisplayName(KeyEnum.PageUp, "Page Up"); field.SetEnumDisplayName(KeyEnum.PageDown, "Page Down"); field.SetEnumDisplayName(KeyEnum.UpArrow, "Up Arrow"); field.SetEnumDisplayName(KeyEnum.DownArrow, "Down Arrow"); field.SetEnumDisplayName(KeyEnum.LeftArrow, "Left Arrow"); field.SetEnumDisplayName(KeyEnum.RightArrow, "Right Arrow"); field.SetEnumDisplayName(KeyEnum.Alpha0, "0"); field.SetEnumDisplayName(KeyEnum.Alpha1, "1"); field.SetEnumDisplayName(KeyEnum.Alpha2, "2"); field.SetEnumDisplayName(KeyEnum.Alpha3, "3"); field.SetEnumDisplayName(KeyEnum.Alpha4, "4"); field.SetEnumDisplayName(KeyEnum.Alpha5, "5"); field.SetEnumDisplayName(KeyEnum.Alpha6, "6"); field.SetEnumDisplayName(KeyEnum.Alpha7, "7"); field.SetEnumDisplayName(KeyEnum.Alpha8, "8"); field.SetEnumDisplayName(KeyEnum.Alpha9, "9"); field.SetEnumDisplayName(KeyEnum.Mouse1, "Mouse 1"); field.SetEnumDisplayName(KeyEnum.Mouse2, "Mouse 2"); field.SetEnumDisplayName(KeyEnum.Mouse3, "Mouse 3"); field.SetEnumDisplayName(KeyEnum.Mouse4, "Mouse 4"); field.SetEnumDisplayName(KeyEnum.Mouse5, "Mouse 5"); field.SetEnumDisplayName(KeyEnum.Mouse6, "Mouse 6"); field.SetEnumDisplayName(KeyEnum.Mouse7, "Mouse 7"); } public static string convertSoundEnumToFile(SoundEnum value) { string result = ""; switch (value) { case SoundEnum.CustomSound1: result = Path.Combine(DefaultParentFolder, "customSound1.wav") ?? ""; break; case SoundEnum.CustomSound2: result = Path.Combine(DefaultParentFolder, "customSound2.wav") ?? ""; break; case SoundEnum.CustomSound3: result = Path.Combine(DefaultParentFolder, "customSound3.wav") ?? ""; break; case SoundEnum.CustomSound4: result = Path.Combine(DefaultParentFolder, "customSound4.wav") ?? ""; break; case SoundEnum.CustomSound5: result = Path.Combine(DefaultParentFolder, "customSound5.wav") ?? ""; break; case SoundEnum.CustomSound6: result = Path.Combine(DefaultParentFolder, "customSound6.wav") ?? ""; break; case SoundEnum.CustomSound7: result = Path.Combine(DefaultParentFolder, "customSound7.wav") ?? ""; break; case SoundEnum.CustomSound8: result = Path.Combine(DefaultParentFolder, "customSound8.wav") ?? ""; break; } return result; } public static void OpenSoundFolder() { Application.OpenURL(DefaultParentFolder); } public static void CreateConfig() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Expected O, but got Unknown //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Expected O, but got Unknown //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Expected O, but got Unknown //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Expected O, but got Unknown //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Expected O, but got Unknown //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_057e: Expected O, but got Unknown //IL_0580: 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_05bb: Expected O, but got Unknown //IL_05c4: Unknown result type (might be due to invalid IL or missing references) //IL_05cb: Expected O, but got Unknown //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_0609: Expected O, but got Unknown //IL_0613: Unknown result type (might be due to invalid IL or missing references) //IL_061d: Expected O, but got Unknown //IL_0664: Unknown result type (might be due to invalid IL or missing references) //IL_066b: Expected O, but got Unknown //IL_0675: Unknown result type (might be due to invalid IL or missing references) //IL_067f: Expected O, but got Unknown //IL_06c7: Unknown result type (might be due to invalid IL or missing references) //IL_06ce: Expected O, but got Unknown //IL_06d8: Unknown result type (might be due to invalid IL or missing references) //IL_06e2: Expected O, but got Unknown //IL_072a: Unknown result type (might be due to invalid IL or missing references) //IL_0731: Expected O, but got Unknown //IL_073b: Unknown result type (might be due to invalid IL or missing references) //IL_0745: Expected O, but got Unknown //IL_078d: Unknown result type (might be due to invalid IL or missing references) //IL_0794: Expected O, but got Unknown //IL_079e: Unknown result type (might be due to invalid IL or missing references) //IL_07a8: Expected O, but got Unknown //IL_07ea: Unknown result type (might be due to invalid IL or missing references) //IL_07f1: Expected O, but got Unknown //IL_07fb: Unknown result type (might be due to invalid IL or missing references) //IL_0805: Expected O, but got Unknown //IL_0854: Unknown result type (might be due to invalid IL or missing references) //IL_085b: Expected O, but got Unknown //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_0a3e: Unknown result type (might be due to invalid IL or missing references) //IL_0a43: Unknown result type (might be due to invalid IL or missing references) //IL_0a4d: Expected O, but got Unknown //IL_0a5c: Unknown result type (might be due to invalid IL or missing references) //IL_0a66: Expected O, but got Unknown //IL_0a75: Unknown result type (might be due to invalid IL or missing references) //IL_0a86: Unknown result type (might be due to invalid IL or missing references) //IL_0a97: Unknown result type (might be due to invalid IL or missing references) //IL_0aad: Unknown result type (might be due to invalid IL or missing references) //IL_0ab2: Unknown result type (might be due to invalid IL or missing references) //IL_08d1: Unknown result type (might be due to invalid IL or missing references) //IL_08d6: Unknown result type (might be due to invalid IL or missing references) //IL_08e0: Expected O, but got Unknown //IL_08ef: Unknown result type (might be due to invalid IL or missing references) //IL_08f9: Expected O, but got Unknown //IL_0908: Unknown result type (might be due to invalid IL or missing references) //IL_0919: Unknown result type (might be due to invalid IL or missing references) //IL_092a: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Unknown result type (might be due to invalid IL or missing references) //IL_0945: Unknown result type (might be due to invalid IL or missing references) //IL_0987: 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_0996: Expected O, but got Unknown //IL_09a5: Unknown result type (might be due to invalid IL or missing references) //IL_09af: Expected O, but got Unknown //IL_09be: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_09e0: Unknown result type (might be due to invalid IL or missing references) //IL_09f6: Unknown result type (might be due to invalid IL or missing references) //IL_09fb: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_0502: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_0c6b: Unknown result type (might be due to invalid IL or missing references) //IL_0c75: Expected O, but got Unknown //IL_0b1a: Unknown result type (might be due to invalid IL or missing references) //IL_0b1f: Unknown result type (might be due to invalid IL or missing references) //IL_0b29: Expected O, but got Unknown //IL_0b38: Unknown result type (might be due to invalid IL or missing references) //IL_0b42: Expected O, but got Unknown //IL_0b51: Unknown result type (might be due to invalid IL or missing references) //IL_0b62: Unknown result type (might be due to invalid IL or missing references) //IL_0b73: Unknown result type (might be due to invalid IL or missing references) //IL_0b89: Unknown result type (might be due to invalid IL or missing references) //IL_0b8e: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0d81: Unknown result type (might be due to invalid IL or missing references) //IL_0d8b: Expected O, but got Unknown //IL_0ccc: Unknown result type (might be due to invalid IL or missing references) //IL_0cd1: Unknown result type (might be due to invalid IL or missing references) //IL_0cd8: Expected O, but got Unknown //IL_0ce2: Unknown result type (might be due to invalid IL or missing references) //IL_0cec: Expected O, but got Unknown //IL_0cef: Unknown result type (might be due to invalid IL or missing references) //IL_0cfb: Unknown result type (might be due to invalid IL or missing references) //IL_0d07: Unknown result type (might be due to invalid IL or missing references) //IL_0d1d: Unknown result type (might be due to invalid IL or missing references) //IL_0d22: Unknown result type (might be due to invalid IL or missing references) //IL_0be6: Unknown result type (might be due to invalid IL or missing references) //IL_0beb: Unknown result type (might be due to invalid IL or missing references) //IL_0bf5: Expected O, but got Unknown //IL_0c04: Unknown result type (might be due to invalid IL or missing references) //IL_0c0e: Expected O, but got Unknown //IL_0c1d: Unknown result type (might be due to invalid IL or missing references) //IL_0c2e: Unknown result type (might be due to invalid IL or missing references) //IL_0c3f: Unknown result type (might be due to invalid IL or missing references) //IL_0c55: Unknown result type (might be due to invalid IL or missing references) //IL_0c5a: Unknown result type (might be due to invalid IL or missing references) //IL_0432: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_0e47: Unknown result type (might be due to invalid IL or missing references) //IL_0e4e: Expected O, but got Unknown //IL_0e58: Unknown result type (might be due to invalid IL or missing references) //IL_0e62: Expected O, but got Unknown //IL_0ea9: Unknown result type (might be due to invalid IL or missing references) //IL_0eb0: Expected O, but got Unknown //IL_0eba: Unknown result type (might be due to invalid IL or missing references) //IL_0ec4: Expected O, but got Unknown //IL_0f0a: Unknown result type (might be due to invalid IL or missing references) //IL_0f11: Expected O, but got Unknown //IL_0f1b: Unknown result type (might be due to invalid IL or missing references) //IL_0f25: Expected O, but got Unknown //IL_0fd6: Unknown result type (might be due to invalid IL or missing references) //IL_0fdd: Expected O, but got Unknown //IL_0fe7: Unknown result type (might be due to invalid IL or missing references) //IL_0ff1: Expected O, but got Unknown //IL_0486: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_1049: Unknown result type (might be due to invalid IL or missing references) //IL_104e: Unknown result type (might be due to invalid IL or missing references) //IL_1069: Unknown result type (might be due to invalid IL or missing references) //IL_106e: Unknown result type (might be due to invalid IL or missing references) //IL_10c2: Unknown result type (might be due to invalid IL or missing references) //IL_10c4: Unknown result type (might be due to invalid IL or missing references) //IL_10cb: Expected O, but got Unknown //IL_10d5: Unknown result type (might be due to invalid IL or missing references) //IL_10df: Expected O, but got Unknown //IL_10e9: Unknown result type (might be due to invalid IL or missing references) //IL_10ee: Unknown result type (might be due to invalid IL or missing references) //IL_112b: Unknown result type (might be due to invalid IL or missing references) //IL_1132: Expected O, but got Unknown //IL_113c: Unknown result type (might be due to invalid IL or missing references) //IL_1146: Expected O, but got Unknown //IL_1195: Unknown result type (might be due to invalid IL or missing references) //IL_119c: Expected O, but got Unknown //IL_11e5: Unknown result type (might be due to invalid IL or missing references) //IL_11ea: Unknown result type (might be due to invalid IL or missing references) //IL_11f4: Expected O, but got Unknown //IL_11fe: Unknown result type (might be due to invalid IL or missing references) //IL_1208: Expected O, but got Unknown //IL_122b: Unknown result type (might be due to invalid IL or missing references) //IL_1235: Expected O, but got Unknown //IL_1244: Unknown result type (might be due to invalid IL or missing references) //IL_1255: Unknown result type (might be due to invalid IL or missing references) //IL_1266: Unknown result type (might be due to invalid IL or missing references) //IL_127c: Unknown result type (might be due to invalid IL or missing references) //IL_1281: Unknown result type (might be due to invalid IL or missing references) //IL_12b2: Unknown result type (might be due to invalid IL or missing references) //IL_12b9: Expected O, but got Unknown //IL_12c2: Unknown result type (might be due to invalid IL or missing references) //IL_12c9: Expected O, but got Unknown //IL_1300: Unknown result type (might be due to invalid IL or missing references) //IL_1307: Expected O, but got Unknown //IL_1311: Unknown result type (might be due to invalid IL or missing references) //IL_131b: Expected O, but got Unknown //IL_135c: Unknown result type (might be due to invalid IL or missing references) //IL_1363: Expected O, but got Unknown //IL_136d: Unknown result type (might be due to invalid IL or missing references) //IL_1377: Expected O, but got Unknown //IL_13c6: Unknown result type (might be due to invalid IL or missing references) //IL_13cd: Expected O, but got Unknown //IL_13d7: Unknown result type (might be due to invalid IL or missing references) //IL_13e1: Expected O, but got Unknown //IL_1428: Unknown result type (might be due to invalid IL or missing references) //IL_142f: Expected O, but got Unknown //IL_1439: Unknown result type (might be due to invalid IL or missing references) //IL_1443: Expected O, but got Unknown //IL_1089: Unknown result type (might be due to invalid IL or missing references) //IL_108e: Unknown result type (might be due to invalid IL or missing references) //IL_1597: Unknown result type (might be due to invalid IL or missing references) //IL_159e: Expected O, but got Unknown //IL_15b4: Unknown result type (might be due to invalid IL or missing references) //IL_15bb: Expected O, but got Unknown //IL_15c4: Unknown result type (might be due to invalid IL or missing references) //IL_15ce: Expected O, but got Unknown //IL_15fb: Unknown result type (might be due to invalid IL or missing references) //IL_1602: Expected O, but got Unknown //IL_160b: Unknown result type (might be due to invalid IL or missing references) //IL_1612: Expected O, but got Unknown //IL_1649: Unknown result type (might be due to invalid IL or missing references) //IL_1650: Expected O, but got Unknown //IL_165a: Unknown result type (might be due to invalid IL or missing references) //IL_1664: Expected O, but got Unknown //IL_16ab: Unknown result type (might be due to invalid IL or missing references) //IL_16b2: Expected O, but got Unknown //IL_16bc: Unknown result type (might be due to invalid IL or missing references) //IL_16c6: Expected O, but got Unknown //IL_170e: Unknown result type (might be due to invalid IL or missing references) //IL_1715: Expected O, but got Unknown //IL_171f: Unknown result type (might be due to invalid IL or missing references) //IL_1729: Expected O, but got Unknown //IL_1771: Unknown result type (might be due to invalid IL or missing references) //IL_1778: Expected O, but got Unknown //IL_1782: Unknown result type (might be due to invalid IL or missing references) //IL_178c: Expected O, but got Unknown //IL_17d4: Unknown result type (might be due to invalid IL or missing references) //IL_17db: Expected O, but got Unknown //IL_17e5: Unknown result type (might be due to invalid IL or missing references) //IL_17ef: Expected O, but got Unknown //IL_1831: Unknown result type (might be due to invalid IL or missing references) //IL_1838: Expected O, but got Unknown //IL_1842: Unknown result type (might be due to invalid IL or missing references) //IL_184c: Expected O, but got Unknown //IL_1913: Unknown result type (might be due to invalid IL or missing references) //IL_191a: Expected O, but got Unknown //IL_1924: Unknown result type (might be due to invalid IL or missing references) //IL_192e: Expected O, but got Unknown //IL_196e: Unknown result type (might be due to invalid IL or missing references) //IL_1973: Unknown result type (might be due to invalid IL or missing references) //IL_197a: Expected O, but got Unknown //IL_1984: Unknown result type (might be due to invalid IL or missing references) //IL_198e: Expected O, but got Unknown //IL_1998: Unknown result type (might be due to invalid IL or missing references) //IL_199d: Unknown result type (might be due to invalid IL or missing references) //IL_19d5: Unknown result type (might be due to invalid IL or missing references) //IL_19dc: Expected O, but got Unknown //IL_19e6: Unknown result type (might be due to invalid IL or missing references) //IL_19f0: Expected O, but got Unknown //IL_1a3f: Unknown result type (might be due to invalid IL or missing references) //IL_1a46: Expected O, but got Unknown //IL_1a50: Unknown result type (might be due to invalid IL or missing references) //IL_1a5a: Expected O, but got Unknown //IL_1a9b: Unknown result type (might be due to invalid IL or missing references) //IL_1aa2: Expected O, but got Unknown //IL_1aac: Unknown result type (might be due to invalid IL or missing references) //IL_1ab6: Expected O, but got Unknown PluginConfigurator val = PluginConfigurator.Create("UltraCooldownInfo", "UltraCooldownInfo"); val.SetIconWithURL(Path.Combine(DefaultParentFolder, "icon.png") ?? ""); ConfigHeader val2 = new ConfigHeader(val.rootPanel, "Everything in this mod must be configured by the user, there are no default presets. Consult the readme.md if you need help configuring.", 24); val2.textSize = 12; ConfigPanel val3 = new ConfigPanel(val.rootPanel, "Global Settings", "globalSettings"); BoolField val4 = new BoolField(val3, "Mod Enabled", "modEnabled", true); EnumField val5 = new EnumField(val3, "Key to show charge meters", "showKey", KeyEnum.None); val5.onValueChange += delegate(EnumValueChangeEvent 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); }; SetDisplayNames(val5); Plugin.showGUIKeyCode = convertKeyEnumToKeyCode(val5.value); BoolField val6 = new BoolField(val3, "Key is toggle instead of hold", "showKeyToggle", false); object obj = <>c.<>9__9_1; if (obj == null) { BoolValueChangeEventDelegate val7 = delegate(BoolValueChangeEvent e) { Plugin.showGUIKeyToggle = e.value; }; <>c.<>9__9_1 = val7; obj = (object)val7; } val6.onValueChange += (BoolValueChangeEventDelegate)obj; Plugin.showGUIKeyToggle = val6.value; BoolField val8 = new BoolField(val3, "Setng. Panel Colors (Must restart)", "settingsColorsActivated", true); object obj2 = <>c.<>9__9_2; if (obj2 == null) { BoolValueChangeEventDelegate val9 = delegate(BoolValueChangeEvent e) { settingsColorsActivated = e.value; }; <>c.<>9__9_2 = val9; obj2 = (object)val9; } val8.onValueChange += (BoolValueChangeEventDelegate)obj2; settingsColorsActivated = val8.value; BoolField val10 = new BoolField(val3, "Show UI in menu?", "ShowIconsInMenu", false); object obj3 = <>c.<>9__9_3; if (obj3 == null) { BoolValueChangeEventDelegate val11 = delegate(BoolValueChangeEvent e) { Plugin.showIconsInMenu = e.value; }; <>c.<>9__9_3 = val11; obj3 = (object)val11; } val10.onValueChange += (BoolValueChangeEventDelegate)obj3; Plugin.showIconsInMenu = val10.value; FloatField val12 = new FloatField(val3, "Moving HUD stability", "MovingHUDAmount", 1f, 0f, 100f); object obj4 = <>c.<>9__9_4; if (obj4 == null) { FloatValueChangeEventDelegate val13 = delegate(FloatValueChangeEvent e) { movingHUDAmount = e.value; }; <>c.<>9__9_4 = val13; obj4 = (object)val13; } val12.onValueChange += (FloatValueChangeEventDelegate)obj4; movingHUDAmount = val12.value; ConfigDivision division = new ConfigDivision(val.rootPanel, "division"); val4.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e) { Plugin.modEnabled = e.value; ((ConfigField)division).interactable = e.value; }; Plugin.modEnabled = val4.value; ((ConfigField)division).interactable = val4.value; int[] array = new int[22] { 3, 4, 5, 0, 1, 2, 7, 8, 9, 20, 21, 6, 13, 10, 11, 12, 14, 18, 15, 16, 17, 19 }; int[] array2 = array; Color white = default(Color); Color white2 = default(Color); Color white3 = default(Color); Color fieldColor = default(Color); Color val31 = default(Color); foreach (int num2 in array2) { UltraCooldownInfoWeapon UCIWepConf = Plugin.UltraCooldownInfoWeapons[num2]; ((Color)(ref white))..ctor(1f, 0.7f, 0.7f); ((Color)(ref white2))..ctor(0.7f, 1f, 0.7f); ((Color)(ref white3))..ctor(0.7f, 0.7f, 1f); if (!settingsColorsActivated) { white = Color.white; white2 = Color.white; white3 = Color.white; } switch (num2) { case 0: new ConfigHeader((ConfigPanel)(object)division, "Revolver Alt Fire", 24).textColor = white3; break; case 3: new ConfigHeader((ConfigPanel)(object)division, "Slab Revolver Primary Fire", 24).textColor = white; break; case 20: new ConfigHeader((ConfigPanel)(object)division, "Shotgun Alt Fire", 24).textColor = white3; break; case 7: new ConfigHeader((ConfigPanel)(object)division, "Jackhammer Primary Fire", 24).textColor = white; break; case 10: new ConfigHeader((ConfigPanel)(object)division, "Nailgun/Saw Alt Fire", 24).textColor = white3; break; case 13: new ConfigHeader((ConfigPanel)(object)division, "Nailgun/Saw Primary Fire", 24).textColor = white; break; case 14: new ConfigHeader((ConfigPanel)(object)division, "Railcannon Fire", 24).textColor = white2; break; case 15: new ConfigHeader((ConfigPanel)(object)division, "Rocket Launcher Alt Fire", 24).textColor = white3; break; case 18: new ConfigHeader((ConfigPanel)(object)division, "Rocket Launcher Primary Fire", 24).textColor = white; break; case 19: new ConfigHeader((ConfigPanel)(object)division, "Misc.", 24).textColor = white2; break; } Color[] variantColors = Plugin.GetVariantColors(1f, 0.3f); ((Color)(ref fieldColor))..ctor(0.1f, 0.1f, 0.1f); if (settingsColorsActivated) { if (Plugin.arrayVariant0.Contains(num2)) { fieldColor = variantColors[0]; } else if (Plugin.arrayVariant1.Contains(num2)) { fieldColor = variantColors[1]; } else if (Plugin.arrayVariant2.Contains(num2)) { fieldColor = variantColors[2]; } } else { ((Color)(ref fieldColor))..ctor(0f, 0f, 0f); } ConfigPanel val14 = new ConfigPanel((ConfigPanel)(object)division, UCIWepConf.name, UCIWepConf.name.Replace(" ", string.Empty) + "Panel"); val14.fieldColor = fieldColor; ConfigPanel val15 = new ConfigPanel(val14, "Charge Bar", UCIWepConf.name.Replace(" ", string.Empty) + "ChargeBarPanel"); ConfigHeader val16 = new ConfigHeader(val15, "This weapon must be equipped for proper functionality.", 24); val16.textSize = 16; BoolField val17 = new BoolField(val15, "Enabled", UCIWepConf.name.Replace(" ", string.Empty) + "Enabled", false); val17.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e) { UCIWepConf.enabled = e.value; }; UCIWepConf.enabled = val17.value; IntField val18 = new IntField(val15, "x Position (px)", UCIWepConf.name.Replace(" ", string.Empty) + "xPos", 0, 0, Screen.width); val18.onValueChange += (IntValueChangeEventDelegate)delegate(IntValueChangeEvent e) { UCIWepConf.xPos = e.value; }; UCIWepConf.xPos = val18.value; IntField val19 = new IntField(val15, "y Position (px)", UCIWepConf.name.Replace(" ", string.Empty) + "yPos", 0, 0, Screen.height); val19.onValueChange += (IntValueChangeEventDelegate)delegate(IntValueChangeEvent e) { UCIWepConf.yPos = e.value; }; UCIWepConf.yPos = val19.value; IntField val20 = new IntField(val15, "Width (px)", UCIWepConf.name.Replace(" ", string.Empty) + "Width", 0, 0, Screen.width); val20.onValueChange += (IntValueChangeEventDelegate)delegate(IntValueChangeEvent e) { UCIWepConf.width = e.value; }; UCIWepConf.width = val20.value; IntField val21 = new IntField(val15, "Height (px)", UCIWepConf.name.Replace(" ", string.Empty) + "Height", 0, 0, Screen.height); val21.onValueChange += (IntValueChangeEventDelegate)delegate(IntValueChangeEvent e) { UCIWepConf.height = e.value; }; UCIWepConf.height = val21.value; BoolField val22 = new BoolField(val15, "Flip Visual", UCIWepConf.name.Replace(" ", string.Empty) + "FlipEnabled", false); val22.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e) { UCIWepConf.flipped = e.value; }; UCIWepConf.flipped = val22.value; FloatField val23 = new FloatField(val15, "Charge Opacity (0.0 - 1.0)", UCIWepConf.name.Replace(" ", string.Empty) + "Opacity", 1f, 0f, 1f); UCIWepConf.opacity = val23.value; ColorField remainingColorField = null; ColorField chargingColorField = null; if (UCIWepConf.chargeColors) { remainingColorField = new ColorField(val15, "Remaining Cooldown Charge Color", UCIWepConf.name.Replace(" ", string.Empty) + "RemainingColor", new Color(1f, 0f, 0f)); remainingColorField.onValueChange += (ColorValueChangeEventDelegate)delegate(ColorValueChangeEvent e) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) UCIWepConf.remainingColor = new Color(e.value.r, e.value.g, e.value.b, UCIWepConf.opacity); }; UCIWepConf.remainingColor = new Color(remainingColorField.value.r, remainingColorField.value.g, remainingColorField.value.b, UCIWepConf.opacity); chargingColorField = new ColorField(val15, "Charging Cooldown Color", UCIWepConf.name.Replace(" ", string.Empty) + "ChargingColor", new Color(0f, 1f, 0f)); chargingColorField.onValueChange += (ColorValueChangeEventDelegate)delegate(ColorValueChangeEvent e) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) UCIWepConf.chargingColor = new Color(e.value.r, e.value.g, e.value.b, UCIWepConf.opacity); }; UCIWepConf.chargingColor = new Color(chargingColorField.value.r, chargingColorField.value.g, chargingColorField.value.b, UCIWepConf.opacity); } ColorField chargedColorField = new ColorField(val15, "Cooldown Charged Color", UCIWepConf.name.Replace(" ", string.Empty) + "ChargedColor", new Color(0f, 0.7f, 0f)); chargedColorField.onValueChange += (ColorValueChangeEventDelegate)delegate(ColorValueChangeEvent e) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) UCIWepConf.chargedColor = new Color(e.value.r, e.value.g, e.value.b, UCIWepConf.opacity); }; UCIWepConf.chargedColor = new Color(chargedColorField.value.r, chargedColorField.value.g, chargedColorField.value.b, UCIWepConf.opacity); ColorField usingChargeColorField = null; ColorField usingChargeChargedColorField = null; if (UCIWepConf.usingChargeColors) { usingChargeColorField = new ColorField(val15, "Using Charge Charging Color", UCIWepConf.name.Replace(" ", string.Empty) + "UsingChargeColor", new Color(1f, 1f, 0f)); usingChargeColorField.onValueChange += (ColorValueChangeEventDelegate)delegate(ColorValueChangeEvent e) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) UCIWepConf.usingChargeColor = new Color(e.value.r, e.value.g, e.value.b, UCIWepConf.opacity); }; UCIWepConf.usingChargeColor = new Color(usingChargeColorField.value.r, usingChargeColorField.value.g, usingChargeColorField.value.b, UCIWepConf.opacity); if (UCIWepConf.usingChargeChargedColorEnabled) { usingChargeChargedColorField = new ColorField(val15, "Using Charge Charged Color", UCIWepConf.name.Replace(" ", string.Empty) + "UsingChargeChargedColor", new Color(0f, 1f, 1f)); usingChargeChargedColorField.onValueChange += (ColorValueChangeEventDelegate)delegate(ColorValueChangeEvent e) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) UCIWepConf.usingChargeChargedColor = new Color(e.value.r, e.value.g, e.value.b, UCIWepConf.opacity); }; UCIWepConf.usingChargeChargedColor = new Color(usingChargeChargedColorField.value.r, usingChargeChargedColorField.value.g, usingChargeChargedColorField.value.b, UCIWepConf.opacity); } } val23.onValueChange += (FloatValueChangeEventDelegate)delegate(FloatValueChangeEvent e) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) UCIWepConf.opacity = e.value; UCIWepConf.remainingColor = new Color(remainingColorField.value.r, remainingColorField.value.g, remainingColorField.value.b, UCIWepConf.opacity); UCIWepConf.chargingColor = new Color(chargingColorField.value.r, chargingColorField.value.g, chargingColorField.value.b, UCIWepConf.opacity); UCIWepConf.chargedColor = new Color(chargedColorField.value.r, chargedColorField.value.g, chargedColorField.value.b, UCIWepConf.opacity); if (UCIWepConf.usingChargeColors) { UCIWepConf.usingChargeColor = new Color(usingChargeColorField.value.r, usingChargeColorField.value.g, usingChargeColorField.value.b, UCIWepConf.opacity); UCIWepConf.usingChargeChargedColor = new Color(usingChargeChargedColorField.value.r, usingChargeChargedColorField.value.g, usingChargeChargedColorField.value.b, UCIWepConf.opacity); } Plugin.normalSharpshooterBackgroundChargingColor = new Color(Plugin.normalSharpshooterBackgroundChargingColor.r, Plugin.normalSharpshooterBackgroundChargingColor.g, Plugin.normalSharpshooterBackgroundChargingColor.b, UCIWepConf.opacity); }; if (num2 == 2) { ColorField val24 = new ColorField(val15, "Backgrnd. Charging Color (normal var.)", UCIWepConf.name.Replace(" ", string.Empty) + "SharpshooterBackgroundChargingColor", new Color(0.5f, 0.5f, 0.5f, UCIWepConf.opacity)); val24.onValueChange += (ColorValueChangeEventDelegate)delegate(ColorValueChangeEvent e) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) Plugin.normalSharpshooterBackgroundChargingColor = new Color(e.value.r, e.value.g, e.value.b, UCIWepConf.opacity); }; Plugin.normalSharpshooterBackgroundChargingColor = new Color(val24.value.r, val24.value.g, val24.value.b, UCIWepConf.opacity); } EnumField val25 = new EnumField(val15, "Type of Charge Bar", UCIWepConf.name.Replace(" ", string.Empty) + "ChargeBarType", ChargeBarTypeEnum.WeaponImageSplit); val25.SetEnumDisplayName(ChargeBarTypeEnum.WeaponImageSplit, "Weapon Image - Split"); val25.SetEnumDisplayName(ChargeBarTypeEnum.WeaponImageGradient, "Weapon Image - Gradient"); ConfigDivision ChargeExtraSettingsDivision = new ConfigDivision(val15, "chargeDivision"); val25.onValueChange += delegate(EnumValueChangeEvent e) { UCIWepConf.chargeBarType = e.value; if (e.value == ChargeBarTypeEnum.Classic) { ((ConfigField)ChargeExtraSettingsDivision).interactable = true; } else if (e.value == ChargeBarTypeEnum.WeaponImageGradient) { ((ConfigField)ChargeExtraSettingsDivision).interactable = false; } else if (e.value == ChargeBarTypeEnum.WeaponImageSplit) { ((ConfigField)ChargeExtraSettingsDivision).interactable = false; } }; UCIWepConf.chargeBarType = val25.value; if (val25.value == ChargeBarTypeEnum.Classic) { ((ConfigField)ChargeExtraSettingsDivision).interactable = true; } else if (val25.value == ChargeBarTypeEnum.WeaponImageGradient) { ((ConfigField)ChargeExtraSettingsDivision).interactable = false; } else if (val25.value == ChargeBarTypeEnum.WeaponImageSplit) { ((ConfigField)ChargeExtraSettingsDivision).interactable = false; } IntField val26 = new IntField(val15, "Number of Divisions TOTAL", UCIWepConf.name.Replace(" ", string.Empty) + "NumberDivisions", 1, 1, 10); val26.onValueChange += (IntValueChangeEventDelegate)delegate(IntValueChangeEvent e) { UCIWepConf.numberDivisions = e.value; }; UCIWepConf.numberDivisions = val26.value; IntField val27 = new IntField(val15, "Division Width (px)", UCIWepConf.name.Replace(" ", string.Empty) + "DivisionWidth", 0, 0, 1000); val27.onValueChange += (IntValueChangeEventDelegate)delegate(IntValueChangeEvent e) { UCIWepConf.divisionWidth = e.value; }; UCIWepConf.divisionWidth = val27.value; BoolField val28 = new BoolField((ConfigPanel)(object)ChargeExtraSettingsDivision, "Icon Enabled", UCIWepConf.name.Replace(" ", string.Empty) + "IconEnabled", false); val28.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e) { UCIWepConf.iconEnabled = e.value; }; UCIWepConf.iconEnabled = val28.value; EnumField val29 = new EnumField((ConfigPanel)(object)ChargeExtraSettingsDivision, "Icon Side", UCIWepConf.name.Replace(" ", string.Empty) + "IconSide", SideEnum.Left); val29.onValueChange += delegate(EnumValueChangeEvent e) { UCIWepConf.iconSide = e.value; }; UCIWepConf.iconSide = val29.value; IntField val30 = new IntField((ConfigPanel)(object)ChargeExtraSettingsDivision, "Icon Distance (px)", UCIWepConf.name.Replace(" ", string.Empty) + "IconDistance", 0, -1000000, 1000000); val30.onValueChange += (IntValueChangeEventDelegate)delegate(IntValueChangeEvent e) { UCIWepConf.iconDistance = e.value; }; UCIWepConf.iconDistance = val30.value; ((Color)(ref val31))..ctor(0f, 0f, 0f); Color[] variantColors2 = Plugin.GetVariantColors(UCIWepConf.opacity, 1f); if (Plugin.arrayVariant0.Contains(num2)) { val31 = variantColors2[0]; } else if (Plugin.arrayVariant1.Contains(num2)) { val31 = variantColors2[1]; } else if (Plugin.arrayVariant2.Contains(num2)) { val31 = variantColors2[2]; } ColorField val32 = new ColorField((ConfigPanel)(object)ChargeExtraSettingsDivision, "Icon Color", UCIWepConf.name.Replace(" ", string.Empty) + "ChargeBarIconColor", val31); val32.onValueChange += (ColorValueChangeEventDelegate)delegate(ColorValueChangeEvent e) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) UCIWepConf.chargeBarIconColor = e.value; }; UCIWepConf.chargeBarIconColor = val32.value; IntField val33 = new IntField((ConfigPanel)(object)ChargeExtraSettingsDivision, "Border Thickness (px)", UCIWepConf.name.Replace(" ", string.Empty) + "BorderThickness", 0, 0, 1000000); val33.onValueChange += (IntValueChangeEventDelegate)delegate(IntValueChangeEvent e) { UCIWepConf.borderThickness = e.value; }; UCIWepConf.borderThickness = val33.value; FloatField val34 = new FloatField(val15, "Background Opacity (0.0 - 1.0)", UCIWepConf.name.Replace(" ", string.Empty) + "BackgroundOpacity", 1f, 0f, 1f); ColorField backgroundColorField = new ColorField(val15, "Background / Divisions Color", UCIWepConf.name.Replace(" ", string.Empty) + "BackgroundChargingColor", new Color(0.3f, 0.3f, 0.3f, UCIWepConf.backgroundOpacity)); val34.onValueChange += (FloatValueChangeEventDelegate)delegate(FloatValueChangeEvent e) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) UCIWepConf.backgroundOpacity = e.value; UCIWepConf.backgroundColor = new Color(backgroundColorField.value.r, backgroundColorField.value.g, backgroundColorField.value.b, UCIWepConf.backgroundOpacity); }; UCIWepConf.backgroundOpacity = val34.value; backgroundColorField.onValueChange += (ColorValueChangeEventDelegate)delegate(ColorValueChangeEvent e) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) UCIWepConf.backgroundColor = new Color(e.value.r, e.value.g, e.value.b, UCIWepConf.backgroundOpacity); }; UCIWepConf.backgroundColor = new Color(backgroundColorField.value.r, backgroundColorField.value.g, backgroundColorField.value.b, UCIWepConf.backgroundOpacity); ConfigPanel val35 = new ConfigPanel(val14, "Sound Alert", UCIWepConf.name.Replace(" ", string.Empty) + "SoundPanel"); ConfigHeader val36 = new ConfigHeader(val35, "This weapon must be equipped for proper functionality.", 24); val36.textSize = 16; BoolField val37 = new BoolField(val35, "Sound Enabled", UCIWepConf.name.Replace(" ", string.Empty) + "SoundEnabled", false); val37.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e) { UCIWepConf.soundEnabled = e.value; }; UCIWepConf.soundEnabled = val37.value; BoolField val38 = new BoolField(val35, "Still Play Sound When Held", UCIWepConf.name.Replace(" ", string.Empty) + "SoundEnabledWhileHeld", false); val38.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e) { UCIWepConf.soundEnabledWhileHeld = e.value; }; UCIWepConf.soundEnabledWhileHeld = val38.value; FloatField val39 = new FloatField(val35, "Volume Multiplier", UCIWepConf.name.Replace(" ", string.Empty) + "VolumeMult", 1f, 0f, 1f); val39.onValueChange += (FloatValueChangeEventDelegate)delegate(FloatValueChangeEvent e) { UCIWepConf.volumeMult = e.value; }; UCIWepConf.volumeMult = val39.value; IntField val40 = new IntField(val35, "Num. Sound Charge Divisions TOTAL", UCIWepConf.name.Replace(" ", string.Empty) + "SoundDivisions", 1, 1, 1000); val40.onValueChange += (IntValueChangeEventDelegate)delegate(IntValueChangeEvent e) { UCIWepConf.soundDivisions = e.value; }; UCIWepConf.soundDivisions = val40.value; EnumField val41 = new EnumField(val35, "Charge Division Finished Sound", UCIWepConf.name.Replace(" ", string.Empty) + "FractionChargeSound", SoundEnum.None); val41.onValueChange += delegate(EnumValueChangeEvent e) { UCIWepConf.filePathFractionCharge = convertSoundEnumToFile(e.value); }; UCIWepConf.filePathFractionCharge = convertSoundEnumToFile(val41.value); EnumField val42 = new EnumField(val35, "Charge Finished Sound", UCIWepConf.name.Replace(" ", string.Empty) + "ChargeSound", SoundEnum.None); val42.onValueChange += delegate(EnumValueChangeEvent e) { UCIWepConf.filePathCharge = convertSoundEnumToFile(e.value); }; UCIWepConf.filePathCharge = convertSoundEnumToFile(val42.value); if (UCIWepConf.usingChargeColors) { EnumField val43 = new EnumField(val35, "Using Charge Finished Sound", UCIWepConf.name.Replace(" ", string.Empty) + "UsingChargeSound", SoundEnum.None); val43.onValueChange += delegate(EnumValueChangeEvent e) { UCIWepConf.filePathUsingCharge = convertSoundEnumToFile(e.value); }; UCIWepConf.filePathUsingCharge = convertSoundEnumToFile(val43.value); } ConfigHeader val44 = new ConfigHeader(val35, "Keep backups of your sounds, they will be overwritten when the mod is updated.", 24); val44.textSize = 16; ButtonField val45 = new ButtonField(val35, "Open Sounds Folder", "button.openfolder"); val45.onClick += new OnClick(OpenSoundFolder); ConfigPanel val46 = new ConfigPanel(val14, "Flashing Icon", UCIWepConf.name.Replace(" ", string.Empty) + "FlashingIconPanel"); ConfigHeader val47 = new ConfigHeader(val46, "This weapon must be equipped for proper functionality.", 24); val47.textSize = 16; BoolField val48 = new BoolField(val46, "Enabled", UCIWepConf.name.Replace(" ", string.Empty) + "flashingIconEnabled", false); val48.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e) { UCIWepConf.iconFlashEnabled = e.value; }; UCIWepConf.iconFlashEnabled = val48.value; IntField val49 = new IntField(val46, "x Position (px)", UCIWepConf.name.Replace(" ", string.Empty) + "xPosFlash", 0, 0, Screen.width); val49.onValueChange += (IntValueChangeEventDelegate)delegate(IntValueChangeEvent e) { UCIWepConf.xPosFlash = e.value; }; UCIWepConf.xPosFlash = val49.value; IntField val50 = new IntField(val46, "y Position (px)", UCIWepConf.name.Replace(" ", string.Empty) + "yPosFlash", 0, 0, Screen.width); val50.onValueChange += (IntValueChangeEventDelegate)delegate(IntValueChangeEvent e) { UCIWepConf.yPosFlash = e.value; }; UCIWepConf.yPosFlash = val50.value; IntField val51 = new IntField(val46, "width (px)", UCIWepConf.name.Replace(" ", string.Empty) + "widthFlash", 0, 0, Screen.width); val51.onValueChange += (IntValueChangeEventDelegate)delegate(IntValueChangeEvent e) { UCIWepConf.widthFlash = e.value; }; UCIWepConf.widthFlash = val51.value; IntField val52 = new IntField(val46, "height (px)", UCIWepConf.name.Replace(" ", string.Empty) + "heightFlash", 0, 0, Screen.width); val52.onValueChange += (IntValueChangeEventDelegate)delegate(IntValueChangeEvent e) { UCIWepConf.heightFlash = e.value; }; UCIWepConf.heightFlash = val52.value; BoolField val53 = new BoolField(val46, "Flip Flash Icon", UCIWepConf.name.Replace(" ", string.Empty) + "FlipFlashIcon", false); val53.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e) { UCIWepConf.iconFlipped = e.value; }; UCIWepConf.iconFlipped = val53.value; EnumField val54 = new EnumField(val46, "Type of Flash", UCIWepConf.name.Replace(" ", string.Empty) + "typeFlash", FlashTypeEnum.LinearFade); val54.onValueChange += delegate(EnumValueChangeEvent e) { UCIWepConf.flashType = e.value; }; UCIWepConf.flashType = val54.value; val54.SetEnumDisplayName(FlashTypeEnum.LinearFade, "Linear Fade"); val54.SetEnumDisplayName(FlashTypeEnum.NoFade, "No Fade"); FloatField val55 = new FloatField(val46, "Length Flash (s)", UCIWepConf.name.Replace(" ", string.Empty) + "LengthFlash", 0f, 0f, 1000f); val55.onValueChange += (FloatValueChangeEventDelegate)delegate(FloatValueChangeEvent e) { UCIWepConf.lengthFlash = e.value; }; UCIWepConf.lengthFlash = val55.value; ColorField val56 = new ColorField(val46, "Flash Color", UCIWepConf.name.Replace(" ", string.Empty) + "ColorFlash", Color.white); val56.onValueChange += (ColorValueChangeEventDelegate)delegate(ColorValueChangeEvent e) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) UCIWepConf.colorFlash = e.value; }; UCIWepConf.colorFlash = val56.value; IntField val57 = new IntField(val46, "Number of divisions", UCIWepConf.name.Replace(" ", string.Empty) + "NumberFlashes", 1, 1, 1000); val57.onValueChange += (IntValueChangeEventDelegate)delegate(IntValueChangeEvent e) { UCIWepConf.numberFlashes = e.value; }; UCIWepConf.numberFlashes = val57.value; FloatField val58 = new FloatField(val46, "Length of Subdivision Flash", UCIWepConf.name.Replace(" ", string.Empty) + "LengthMiniFlash", 0f, 0f, 1000f); val58.onValueChange += (FloatValueChangeEventDelegate)delegate(FloatValueChangeEvent e) { UCIWepConf.lengthMiniFlash = e.value; }; UCIWepConf.lengthMiniFlash = val58.value; BoolField val59 = new BoolField(val14, "Moving HUD", UCIWepConf.name.Replace(" ", string.Empty) + "MovingHUD", false); val59.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent e) { UCIWepConf.movingHUD = e.value; }; UCIWepConf.movingHUD = val59.value; } } } public class CustomSoundPlayer : MonoBehaviour { private static CustomSoundPlayer _instance; public AudioSource source; private string soundPath; public static CustomSoundPlayer Instance { get { return _instance; } set { throw new NotImplementedException(); } } private void Start() { _instance = this; source = ((Component)this).gameObject.AddComponent(); } public void PlaySound(string file, int i) { if (!string.IsNullOrEmpty(file)) { if (!File.Exists(file)) { Debug.LogError((object)("Could not find audio file '" + file + "'")); return; } soundPath = file; ((Component)this).gameObject.SetActive(true); ((MonoBehaviour)this).StartCoroutine(PlaySoundRoutine(i)); } } private IEnumerator PlaySoundRoutine(int i) { new FileInfo(soundPath); AudioType audioType = (AudioType)20; UnityWebRequest request = UnityWebRequestMultimedia.GetAudioClip(new Uri(soundPath).AbsoluteUri, audioType); try { DownloadHandler downloadHandler = request.downloadHandler; DownloadHandlerAudioClip handler = (DownloadHandlerAudioClip)(object)((downloadHandler is DownloadHandlerAudioClip) ? downloadHandler : null); handler.streamAudio = false; request.SendWebRequest(); yield return request; source.Stop(); source.clip = handler.audioClip; source.volume = 1f * Plugin.UltraCooldownInfoWeapons[i].volumeMult * MonoSingleton.Instance.GetFloat("sfxVolume", 0f); source.Play(); } finally { ((IDisposable)request)?.Dispose(); } } } public static class MyPluginInfo { public const string PLUGIN_GUID = "UltraCooldownInfo"; public const string PLUGIN_NAME = "UltraCooldownInfo"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }