Decompiled source of GunsOPlenty v0.3.0
plugins/GunsOPlenty.dll
Decompiled 3 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using GameConsole; using GunsOPlenty.Data; using GunsOPlenty.Stuff; using GunsOPlenty.Trials; using GunsOPlenty.Trials.UI; using GunsOPlenty.Utils; using GunsOPlenty.Weapons; using HarmonyLib; using PluginConfig.API; using PluginConfig.API.Decorators; using PluginConfig.API.Fields; using TMPro; using ULTRAKILL.Cheats; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("UK_ProofOfConcept")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("UK_ProofOfConcept")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("0d16883d-19af-4817-beb6-a11debe20732")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] public class BeeThing : MonoBehaviour { private Vector3 startPos; private Vector3 crazyPos; public float factor = 0.5f; public float bound = 36f; public float speed = 5f; public float deathTimer = 15f; public float startTime; public GameObject target; public EnemyIdentifier targetEid; public EnemyColliderDetector ecd; public GameObject sourceWeapon; private void Start() { //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) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) startPos = ((Component)this).transform.position; crazyPos = startPos; ecd = ((Component)this).gameObject.AddComponent<EnemyColliderDetector>(); if ((Object)(object)ecd == (Object)null) { Debug.Log((object)"Nabit"); } UpdateTargeter(); DamageUpdate(); startTime = Time.time; speed = 15f; } public void Die() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) if (speed > 150f) { Object.Instantiate<GameObject>(PrefabBox.boom, ((Component)this).transform.position, Quaternion.identity); } Object.Destroy((Object)(object)((Component)this).gameObject); } public void DamageUpdate() { //IL_00be: 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) if (ecd.hitList.Count() > 0) { for (int i = 0; i < ecd.hitList.Count(); i++) { if ((Object)(object)ecd.hitList[i] != (Object)null && !ecd.hitList[i].dead) { GameObject val = ecd.GetLimbs(ecd.hitList[i])[Random.Range(0, ecd.GetLimbs(ecd.hitList[i]).Count - 1)]; ecd.hitList[i].DeliverDamage(val, Vector3.zero, val.transform.position, 0.2f, false, 0f, sourceWeapon, false, false); } } } ((MonoBehaviour)this).Invoke("DamageUpdate", 0.2f); } public void UpdateTargeter() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_0071: Unknown result type (might be due to invalid IL or missing references) float num = 1E+10f; GameObject[] array = GameObject.FindGameObjectsWithTag("Enemy"); if (array.Length != 0) { for (int i = 0; i < array.Length; i++) { EnemyIdentifier component = array[i].GetComponent<EnemyIdentifier>(); if (!((Object)(object)component == (Object)null) && !component.dead && !component.blessed) { Vector3 val = array[i].transform.position - ((Component)this).transform.position; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < num) { num = sqrMagnitude; targetEid = component; } } } } if (num >= 1E+10f) { target = null; targetEid = null; } else { EnemyIdentifierIdentifier[] componentsInChildren = ((Component)targetEid).GetComponentsInChildren<EnemyIdentifierIdentifier>(); target = ((Component)componentsInChildren[Random.Range(0, componentsInChildren.Length)]).gameObject; } ((MonoBehaviour)this).Invoke("UpdateTargeter", 0.25f); } private void FixedUpdate() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: 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_0043: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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_0086: Unknown result type (might be due to invalid IL or missing references) crazyPos += GOPUtils.RandPos((bound + speed * 0.8f) * Time.deltaTime); if ((Object)(object)target != (Object)null) { Vector3 val = crazyPos; Vector3 val2 = target.transform.position - ((Component)this).transform.position; crazyPos = val + ((Vector3)(ref val2)).normalized * (speed * Time.deltaTime); } float num = Mathf.Pow(factor, Time.deltaTime * speed); ((Component)this).transform.position = Vector3.Lerp(crazyPos, ((Component)this).transform.position, num); if (Time.time - startTime > 1000f || speed > 200f) { Die(); } } private Vector3 RandomVec3(float min, float max) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) float num = Random.Range(min, max); float num2 = Random.Range(min, max); float num3 = Random.Range(min, max); return new Vector3(num, num2, num3); } } public class Generator : MonoBehaviour { public GameObject fred; public GameObject sourceWeapon; public List<GameObject> freds = new List<GameObject>(); private Vector3 startPos; private float lifeTimer = 0f; private float speed = 1f; public float rotVel = 15f; private float startTime; public float deathTime; private float spawnLoopTime; private bool firstDeath; private EnemyColliderDetector ecd; private void Start() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) deathTime = 30f; firstDeath = true; startPos = ((Component)this).transform.position; ((MonoBehaviour)this).Invoke("SpawnLoop", 1.5f); ecd = ((Component)this).gameObject.AddComponent<EnemyColliderDetector>(); if ((Object)(object)ecd == (Object)null) { Debug.Log((object)"Dang"); } startTime = Time.time; spawnLoopTime = Time.time; } public void SpawnLoop() { if (freds.Count < 10) { SpawnFred(); } for (int i = 0; i < freds.Count; i++) { if ((Object)(object)freds[i] == (Object)null) { freds.Remove(freds[i]); } } ((MonoBehaviour)this).Invoke("SpawnLoop", 2.5f - rotVel * 0.0008f); } public void Die() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) Object.Destroy((Object)(object)((Component)this).gameObject); if (rotVel > 2000f) { Object.Instantiate<GameObject>(PrefabBox.superBoom, ((Component)this).transform.position, Quaternion.identity); } for (int i = 0; i < freds.Count; i++) { freds[i].GetComponent<BeeThing>().Die(); } freds.Clear(); } private void FixedUpdate() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.Rotate(0f, rotVel * Time.deltaTime, 0f, (Space)1); ((Component)this).transform.position = Vector3.Lerp(startPos + Vector3.up, startPos + Vector3.down, 0.5f + Mathf.Sin(lifeTimer) / 2f); lifeTimer += Time.deltaTime; if (NoWeaponCooldown.NoCooldown) { startTime = Time.time; } if ((Time.time - startTime > deathTime || rotVel > 2880f) && firstDeath) { firstDeath = false; Die(); } } private void SpawnFred() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate<GameObject>(fred, ((Component)this).transform.position, Quaternion.identity); val.GetComponent<BeeThing>().sourceWeapon = sourceWeapon; val.GetComponent<BeeThing>().speed = 15f + rotVel * 0.1f; freds.Add(val); } } namespace GunsOPlenty { internal class PluginInfo { public const string Name = "Guns O' Plenty"; public const string GUID = "ironfarm.uk.shooty.shooty"; public const string TrialGUID = "ironfarm.uk.shooty.shooty.trials"; public const string Version = "0.3.0"; } [BepInPlugin("ironfarm.uk.shooty.shooty", "Guns O' Plenty", "0.3.0")] public class Plugin : BaseUnityPlugin { private Harmony harmony = new Harmony("ironfarm.uk.shooty.shooty"); private bool firstTime = true; private string scene = ""; public void Awake() { } public void Start() { scene = SceneHelper.CurrentScene; Debug.Log((object)("Current Scene: " + scene)); SceneManager.activeSceneChanged += Startup; SceneManager.activeSceneChanged += OnMainMenu; } public void Update() { if (SceneHelper.CurrentScene != scene) { scene = SceneHelper.CurrentScene; Debug.Log((object)("Current Scene: " + scene)); } } private void Startup(Scene before, Scene after) { if (SceneHelper.CurrentScene != "Bootstrap" && firstTime) { ConfigManager.Setup(); AssetHandler.LoadBundle(); harmony.PatchAll(typeof(UnlockManager)); if (AssetHandler.bundleLoaded) { AssetHandler.CreateCustomPrefabs(); PersistentCanvas.SetupCanvas(); WeaponHandler.SetupWeapons(); harmony.PatchAll(typeof(WeaponPatch)); harmony.PatchAll(typeof(StylePatch)); CommandManager.RegisterAll(); TrialManager.SetupTrials(); UnlockManager.Setup(); } firstTime = false; } } private void OnMainMenu(Scene before, Scene after) { if (SceneHelper.CurrentScene == "Main Menu") { TrialManager.SetupUI(); } } public static bool IsInLevel() { return SceneHelper.CurrentScene != "Main Menu" && SceneHelper.CurrentScene != "Bootstrap" && SceneHelper.CurrentScene != "Intro"; } } } namespace GunsOPlenty.Stuff { public abstract class GOPWeapon { public virtual GameObject Asset { get; protected set; } public virtual GameObject LoadedAsset { get; protected set; } public virtual int Slot { get; set; } public virtual string Name { get; protected set; } public virtual string ID { get; protected set; } public virtual bool IsSetup { get; protected set; } public virtual bool ShouldHave { get; set; } public virtual void Setup() { Name = "Generic Gop Weapon"; ID = "generic_gop_weapon"; } public void UnSetup() { Debug.Log((object)("UnSetting Up " + Name)); Asset = null; LoadedAsset = null; IsSetup = false; } public void SetSlot(int newSlot) { Slot = newSlot; } public void Create(Transform transform) { LoadedAsset = Object.Instantiate<GameObject>(Asset, transform); } public virtual void UpdateConfigSettings() { } } public class StylePatch { [HarmonyPatch(typeof(LeaderboardController), "SubmitCyberGrindScore")] [HarmonyPrefix] public static bool no(LeaderboardController __instance) { if (WeaponHandler.isCheating || TrialManager.InTrial()) { Debug.Log((object)"no"); return false; } return true; } [HarmonyPatch(typeof(LeaderboardController), "SubmitLevelScore")] [HarmonyPrefix] public static bool nope(LeaderboardController __instance) { if (WeaponHandler.isCheating || TrialManager.InTrial()) { Debug.Log((object)"nope"); return false; } return true; } [HarmonyPatch(typeof(LeaderboardController), "SubmitFishSize")] [HarmonyPrefix] public static bool notevenfish(LeaderboardController __instance) { if (WeaponHandler.isCheating || TrialManager.InTrial()) { Debug.Log((object)"not even fish"); return false; } return true; } [HarmonyPatch(typeof(StyleHUD), "Start")] [HarmonyPostfix] public static void AddStyleToDict(StyleHUD __instance) { } [HarmonyPatch(typeof(StyleCalculator), "HitCalculator")] [HarmonyPostfix] public static void SpecialProjectileStyles(StyleCalculator __instance, string hitter, string enemyType, string hitLimb, bool dead, EnemyIdentifier eid = null, GameObject sourceWeapon = null) { if (!(hitter == "coin shot")) { return; } __instance.enemiesShot = true; if (dead) { if (enemyType == "spider") { __instance.AddPoints(100, "ultrakill.bigkill", eid, sourceWeapon); } else { __instance.AddPoints(50, "ultrakill.kill", eid, sourceWeapon); } __instance.gc.AddKill(); } else { __instance.AddPoints(5, "", eid, sourceWeapon); } } } public static class WeaponHandler { public static List<GOPWeapon> weapons = new List<GOPWeapon>(); public static Dictionary<string, GOPWeapon> weaponDict = new Dictionary<string, GOPWeapon>(); public static GameObject thingy; private static GameObject initObj; public static bool isCheating = false; public static void AddWeapons() { } public static void SetupWeapons() { ChargeManager.Setup(); Debug.Log((object)"Setting up weapon"); weapons.Add(new FunnyGun()); weapons.Add(new GoldenGun()); weapons.Add(new Wowthrower()); foreach (GOPWeapon weapon in weapons) { if (!weapon.IsSetup) { weapon.Setup(); weaponDict.Add(weapon.ID, weapon); } } } public static void RemoveWeapons() { foreach (GOPWeapon weapon in weapons) { foreach (List<GameObject> slot in MonoSingleton<GunControl>.Instance.slots) { foreach (GameObject item in slot) { if ((Object)(object)item == (Object)(object)weapon.LoadedAsset) { slot.Remove(item); } } } } foreach (List<GameObject> slot2 in MonoSingleton<GunControl>.Instance.slots) { if (slot2.Count == 0) { MonoSingleton<GunControl>.Instance.slots.Remove(slot2); } } weapons.Clear(); } public static void AddWeaponToInventory(GOPWeapon weapon) { if (!UnlockManager.IsSetup() || !UnlockManager.weaponsUnlocked[weapon.ID].value || TrialManager.InTrial()) { return; } bool flag = false; foreach (List<GameObject> slot in MonoSingleton<GunControl>.Instance.slots) { for (int num = slot.Count; num >= 0; num--) { if (slot.Contains(weapon.LoadedAsset)) { flag = true; break; } } if (flag) { break; } } if (flag) { return; } weapon.Create(((Component)MonoSingleton<GunControl>.Instance).transform); MonoSingleton<GunControl>.Instance.shud.weaponFreshness.Add(weapon.LoadedAsset, 10f); weapon.LoadedAsset.SetActive(false); int count = MonoSingleton<GunControl>.Instance.slots.Count; if (weapon.Slot > count) { for (int i = 0; i < weapon.Slot - count; i++) { MonoSingleton<GunControl>.Instance.slots.Add(new List<GameObject>()); } } MonoSingleton<GunControl>.Instance.slots[weapon.Slot - 1].Add(weapon.LoadedAsset); MonoSingleton<GunControl>.Instance.UpdateWeaponList(true); } public static void RemoveWeaponFromInventory(GOPWeapon weapon) { bool flag = false; foreach (List<GameObject> slot in MonoSingleton<GunControl>.Instance.slots) { for (int num = slot.Count; num >= 0; num--) { if (slot.Contains(weapon.LoadedAsset)) { flag = true; break; } } if (flag) { break; } } if (flag) { MonoSingleton<GunControl>.Instance.slots[weapon.Slot - 1].Remove(weapon.LoadedAsset); while (MonoSingleton<GunControl>.Instance.slots[MonoSingleton<GunControl>.Instance.slots.Count - 1].Count <= 0) { MonoSingleton<GunControl>.Instance.slots.RemoveAt(MonoSingleton<GunControl>.Instance.slots.Count - 1); } MonoSingleton<GunControl>.Instance.shud.weaponFreshness.Remove(weapon.LoadedAsset); Object.Destroy((Object)(object)((Component)((Component)MonoSingleton<GunControl>.Instance).transform.Find(((Object)weapon.LoadedAsset).name)).gameObject); MonoSingleton<GunControl>.Instance.UpdateWeaponList(true); } } public static void AddWeaponsToInventoy() { isCheating = false; foreach (GOPWeapon weapon in weapons) { weapon.UpdateConfigSettings(); RemoveWeaponFromInventory(weapon); if (weapon.ShouldHave) { AddWeaponToInventory(weapon); } } } public static void AddStyle() { foreach (GOPWeapon weapon in weapons) { AddToStyleDict(weapon.LoadedAsset); } } public static void AddToStyleDict(GameObject obj) { if ((Object)(object)obj != (Object)null && !MonoSingleton<StyleHUD>.Instance.weaponFreshness.ContainsKey(obj)) { MonoSingleton<StyleHUD>.Instance.weaponFreshness.Add(obj, 10f); Debug.Log((object)(((Object)obj).name + " has been added to dictionary")); } else if (MonoSingleton<StyleHUD>.Instance.weaponFreshness.ContainsKey(obj)) { Debug.Log((object)(((Object)obj).name + " is already in dictionary")); } else { Debug.Log((object)(((Object)obj).name + " isn't real")); } } } public static class WeaponPatch { [HarmonyPatch(typeof(GunControl), "Start")] [HarmonyPostfix] public static void AddGuns(GunControl __instance) { WeaponHandler.AddWeaponsToInventoy(); } [HarmonyPatch(typeof(StyleHUD), "Update")] [HarmonyPostfix] public static void UpdateStyleWithGOP(StyleHUD __instance) { if (!MonoSingleton<StyleHUD>.Instance.idNameDict.ContainsKey("ultrakill.moneyshot")) { MonoSingleton<StyleHUD>.Instance.idNameDict.Add("ultrakill.moneyshot", "<color=#ffb700>MONEY SHOT</color>"); } if (!MonoSingleton<StyleHUD>.Instance.freshnessDecayMultiplierDict.ContainsKey("ultrakill.moneyshot")) { MonoSingleton<StyleHUD>.Instance.freshnessDecayMultiplierDict.Add("ultrakill.moneyshot", 0f); } } [HarmonyPatch(typeof(GunControl), "UpdateWeaponList")] [HarmonyPrefix] public static void PreUpdateWithGOP(GunControl __instance) { } [HarmonyPatch(typeof(GunControl), "UpdateWeaponList")] [HarmonyPostfix] public static void UpdateWithGOP(GunControl __instance) { } } } namespace GunsOPlenty.Weapons { public class FireArea : MonoBehaviour { private EnemyColliderDetector ecd; public GameObject sourceWeapon; public List<WispOrb> orblist = new List<WispOrb>(); public List<WispBuddy> buddylist = new List<WispBuddy>(); public void Start() { ecd = ((Component)this).gameObject.AddComponent<EnemyColliderDetector>(); if ((Object)(object)ecd == (Object)null) { Debug.Log((object)"Dang"); } SlowUpdate(); } public void SlowUpdate() { //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Invalid comparison between Unknown and I4 //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) if (!((Collider)((Component)this).GetComponent<CapsuleCollider>()).enabled) { ClearStuff(); } float num = MonoSingleton<StyleHUD>.Instance.currentMeter + (float)MonoSingleton<StyleHUD>.Instance.rankIndex * 1500f; for (int i = 0; i < ecd.hitList.Count; i++) { if ((Object)(object)ecd.hitList[i] != (Object)null && !ecd.hitList[i].dead) { Flammable componentInChildren = ((Component)ecd.hitList[i]).GetComponentInChildren<Flammable>(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.Burn(5f, true); } GameObject val = ecd.GetLimbs(ecd.hitList[i])[Random.Range(0, ecd.GetLimbs(ecd.hitList[i]).Count - 1)]; if ((int)ecd.hitList[i].enemyType == 6) { ecd.hitList[i].DeliverDamage(val, Vector3.zero, val.transform.position, 0.25f, false, 0f, sourceWeapon, false, false); } else { ecd.hitList[i].DeliverDamage(val, Vector3.zero, val.transform.position, 1f, false, 0f, sourceWeapon, false, false); } } } if (orblist.Count > 0) { for (int j = 0; j < orblist.Count; j++) { if (NoWeaponCooldown.NoCooldown) { orblist[j].heat += 80f; } else { orblist[j].heat += 50f + num * 0.0025f; } } } if (buddylist.Count > 0) { for (int k = 0; k < buddylist.Count; k++) { if (NoWeaponCooldown.NoCooldown) { buddylist[k].speed += 55f; } else { buddylist[k].speed += 25f + num * 0.0025f; } } } if (NoWeaponCooldown.NoCooldown) { ((MonoBehaviour)this).Invoke("SlowUpdate", 0.07f); } else { ((MonoBehaviour)this).Invoke("SlowUpdate", 0.25f - num * 1.5E-05f); } } private void OnTriggerEnter(Collider other) { Enter(other); } private void OnTriggerExit(Collider other) { Exit(other); } private void OnTriggerEnter(Collision other) { Exit(other.collider); } private void OnTriggerExit(Collision other) { Exit(other.collider); } private void Enter(Collider other) { WispOrb item = default(WispOrb); if (((Component)((Component)other).transform).TryGetComponent<WispOrb>(ref item)) { orblist.Add(item); } WispBuddy item2 = default(WispBuddy); if (((Component)((Component)other).transform).TryGetComponent<WispBuddy>(ref item2)) { buddylist.Add(item2); } } private void Exit(Collider other) { WispOrb item = default(WispOrb); if (((Component)((Component)other).transform).TryGetComponent<WispOrb>(ref item) && orblist.Contains(item)) { orblist.Remove(item); } WispBuddy item2 = default(WispBuddy); if (((Component)((Component)other).transform).TryGetComponent<WispBuddy>(ref item2) && buddylist.Contains(item2)) { buddylist.Remove(item2); } } public void ClearStuff() { if ((Object)(object)ecd != (Object)null) { ecd.ClearStuff(); } if (orblist != null) { orblist.Clear(); } if (buddylist != null) { buddylist.Clear(); } } private void OnDisable() { ClearStuff(); } } public class TestCubeSoul : MonoBehaviour { private WeaponIcon weaponIcon; private WeaponIdentifier wid; private WeaponPos wpos; private GameObject shootPoint; private bool isFireOn; private GameObject firePartObj; private GameObject bubblePartObj; private ParticleSystem firePart; private ParticleSystem bubblePart; private Light fireLight; private CameraFrustumTargeter targeter; private AudioSource gunTipAud; private GameObject thingyObj; private Generator thingy; private string[] fireNames = new string[4] { "FlameThrower", "EpicThrower", "BubbleThrower", "EpicBubbleThrower" }; private GameObject fireArea; private CapsuleCollider fireAreaCol; public bool isFireEpic; private CoinShot coinShotComp; private Color color = Color.red; private List<Color> randGrad = new List<Color>(); private void Start() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) targeter = MonoSingleton<CameraFrustumTargeter>.instance; wid = ((Component)this).gameObject.GetComponent<WeaponIdentifier>(); weaponIcon = ((Component)this).gameObject.AddComponent<WeaponIcon>(); wpos = ((Component)this).gameObject.AddComponent<WeaponPos>(); wpos.defaultPos = new Vector3(0.8836f, -0.9345f, 1.4161f); wpos.middlePos = new Vector3(0f, -0.9345f, 1.4161f); if ((Object)(object)weaponIcon.weaponDescriptor == (Object)null) { weaponIcon.weaponDescriptor = ScriptableObject.CreateInstance<WeaponDescriptor>(); weaponIcon.weaponDescriptor.variationColor = (WeaponVariant)2; weaponIcon.weaponDescriptor.icon = AssetHandler.LoadAsset<Sprite>("Trollface"); weaponIcon.weaponDescriptor.glowIcon = weaponIcon.weaponDescriptor.icon; } shootPoint = ((Component)this).gameObject.DescendantByName("ShootPoint"); shootPoint.layer = 0; fireArea = ((Component)this).gameObject.DescendantByName("FireArea"); fireArea.layer = 0; fireArea.AddComponent<FireArea>(); fireArea.GetComponent<FireArea>().sourceWeapon = ((Component)this).gameObject; fireAreaCol = fireArea.GetComponent<CapsuleCollider>(); ((Collider)fireAreaCol).enabled = false; ChangeFireAreaSize(15f); if (wid.delay > 0f) { string[] array = fireNames; foreach (string text in array) { GameObject val = shootPoint.DescendantByName(text + "(Clone)"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } } gunTipAud = shootPoint.GetComponent<AudioSource>(); if (isFireEpic) { firePartObj = Object.Instantiate<GameObject>(EffectBox.epicFire, shootPoint.transform); bubblePartObj = Object.Instantiate<GameObject>(EffectBox.epicBubble, shootPoint.transform); } else { firePartObj = Object.Instantiate<GameObject>(EffectBox.fire, shootPoint.transform); bubblePartObj = Object.Instantiate<GameObject>(EffectBox.bubble, shootPoint.transform); } firePart = firePartObj.GetComponent<ParticleSystem>(); bubblePart = bubblePartObj.GetComponent<ParticleSystem>(); firePartObj.TryGetComponent<Light>(ref fireLight); TurnFireOff(); thingy = null; } public void OnEnable() { TurnFireOff(); if ((Object)(object)thingy != (Object)null) { thingy.deathTime = 30f; } } public void OnDisable() { if ((Object)(object)thingy != (Object)null) { thingy.deathTime = 5f; } } public void Update() { float num = MonoSingleton<StyleHUD>.Instance.currentMeter + (float)MonoSingleton<StyleHUD>.Instance.rankIndex * 1500f; if (NoWeaponCooldown.NoCooldown) { gunTipAud.pitch = 1.7f; } else { gunTipAud.pitch = 0.5f + num * 0.0001f; } if (MonoSingleton<InputManager>.Instance.InputSource.Fire1.IsPressed && ((Component)MonoSingleton<GunControl>.Instance).GetComponent<GunControl>().activated && !GameStateManager.Instance.PlayerInputLocked) { ((MonoBehaviour)this).Invoke("TurnFireOn", wid.delay); } else { ((MonoBehaviour)this).Invoke("TurnFireOff", wid.delay); } if (MonoSingleton<InputManager>.Instance.InputSource.Fire2.WasPerformedThisFrame && ((Component)MonoSingleton<GunControl>.Instance).GetComponent<GunControl>().activated && !GameStateManager.Instance.PlayerInputLocked && wid.delay == 0f) { ((MonoBehaviour)this).Invoke("CreateThing", wid.delay); } } public void TurnFireOn() { if (MonoSingleton<UnderwaterController>.Instance.inWater) { if (!bubblePart.isEmitting) { bubblePart.Play(); firePart.Stop(); gunTipAud.clip = AssetHandler.LoadAsset<AudioClip>("BubbleThrowerBubble"); gunTipAud.time = Random.Range(0f, 2.5f); gunTipAud.Play(); } ChangeFireAreaSize(15f); } else { if (!firePart.isEmitting) { firePart.Play(); bubblePart.Stop(); gunTipAud.clip = AssetHandler.LoadAsset<AudioClip>("FlameThrowerFire"); gunTipAud.time = Random.Range(0f, 2.5f); gunTipAud.Play(); } ChangeFireAreaSize(25f); } isFireOn = true; if ((Object)(object)fireLight != (Object)null) { ((Behaviour)fireLight).enabled = true; } ((Collider)fireAreaCol).enabled = true; } public void TurnFireOff() { firePart.Stop(); bubblePart.Stop(); gunTipAud.Stop(); isFireOn = false; if ((Object)(object)fireLight != (Object)null) { ((Behaviour)fireLight).enabled = false; } ((Collider)fireAreaCol).enabled = false; fireArea.GetComponent<FireArea>().ClearStuff(); } public void CreateThing() { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)thingy == (Object)null) { thingyObj = Object.Instantiate<GameObject>(AssetHandler.generator, ((Component)this).transform.position, Quaternion.identity); thingyObj.TryGetComponent<Generator>(ref thingy); thingy.sourceWeapon = ((Component)this).gameObject; } else { Object.Instantiate<GameObject>(PrefabBox.harmlessBoom, ((Component)thingy).transform.position, Quaternion.identity); thingy.Die(); thingy = null; Object.Destroy((Object)(object)thingyObj); } } public void ChangeFireAreaSize(float height, float radius = 1f) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) fireAreaCol.height = height; fireAreaCol.center = new Vector3(0f, height / 2f, 0f); fireAreaCol.radius = radius; } } public class TestCube : GOPWeapon { public override GameObject Asset { get; protected set; } public override int Slot { get; set; } public override void Setup() { Debug.Log((object)"Setting up Test Cube"); ID = "test_cube"; if ((Object)(object)Asset == (Object)null) { Asset = AssetHandler.LoadAsset<GameObject>("TestCube Prefab"); } if ((Object)(object)Asset != (Object)null && !IsSetup) { Name = "Test Cube"; Asset.AddComponent<TestCubeSoul>(); MeshRenderer val = default(MeshRenderer); foreach (GameObject item in Asset.DescendantsList()) { if (item.TryGetComponent<MeshRenderer>(ref val)) { ((Renderer)val).material.shader = ShaderBox.vertexlit_emissive; } } IsSetup = true; } else { Debug.Log((object)"Test Cube Didn't load"); Name = "Test Cube is NULL"; Slot = -1; } } } public class FunnyGunSoul : MonoBehaviour { private float fireDelay = 1f; private float fireTime = 0f; private float fireMult = 1f; private float fireMultTime = 0f; private float fireMultDelay = 0.1f; private GameObject gunBarrel; private GameObject rocket = PrefabBox.rocket; private GameObject grenade = PrefabBox.grenade; private GameObject beam = PrefabBox.beam; private GameObject coin = PrefabBox.coin; private GameObject cannonball = PrefabBox.cannonball; private GameObject gutterbeam = PrefabBox.gutterbeam; private GameObject camObj; private Camera cam; private CameraController cc; private GunControl gc; private Animator anim; private CameraFrustumTargeter targeter; private AudioSource gunBarrelAud; private WeaponIcon weaponIcon; private WeaponPos wpos; private WeaponIdentifier wid; private void Start() { //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) cam = ((Component)MonoSingleton<CameraController>.Instance).GetComponent<Camera>(); gc = ((Component)MonoSingleton<GunControl>.Instance).GetComponent<GunControl>(); camObj = ((Component)cam).gameObject; cc = MonoSingleton<CameraController>.Instance; gunBarrel = ((Component)this).gameObject.DescendantByName("ShootPoint"); gunBarrelAud = gunBarrel.GetComponent<AudioSource>(); anim = ((Component)this).GetComponent<Animator>(); targeter = MonoSingleton<CameraFrustumTargeter>.instance; wid = ((Component)this).gameObject.GetComponent<WeaponIdentifier>(); weaponIcon = ((Component)this).gameObject.AddComponent<WeaponIcon>(); wpos = ((Component)this).gameObject.AddComponent<WeaponPos>(); wpos.defaultPos = new Vector3(0.731f, -0.3491f, 1.2509f); wpos.middlePos = new Vector3(0f, -0.3491f, 1.2509f); if ((Object)(object)weaponIcon.weaponDescriptor == (Object)null) { weaponIcon.weaponDescriptor = ScriptableObject.CreateInstance<WeaponDescriptor>(); weaponIcon.weaponDescriptor.variationColor = (WeaponVariant)0; weaponIcon.weaponDescriptor.icon = AssetHandler.LoadAsset<Sprite>("Trollface"); weaponIcon.weaponDescriptor.glowIcon = weaponIcon.weaponDescriptor.icon; } gunBarrelAud.clip = null; RetreiveCharges(); } private void OnEnable() { gunBarrelAud.Stop(); RetreiveCharges(); } private void RetreiveCharges() { fireDelay = ChargeManager.funGun.fireDelay; fireTime = ChargeManager.funGun.fireTime; fireMult = ChargeManager.funGun.fireMult; fireMultTime = ChargeManager.funGun.fireMultTime; fireMultDelay = ChargeManager.funGun.fireMultDelay; } private void StoreCharges() { ChargeManager.funGun.fireDelay = fireDelay; ChargeManager.funGun.fireTime = fireTime; ChargeManager.funGun.fireMult = fireMult; ChargeManager.funGun.fireMultTime = fireMultTime; ChargeManager.funGun.fireMultDelay = fireMultDelay; } private void Update() { if (NoWeaponCooldown.NoCooldown) { fireMult = 100f; } fireTime += Time.deltaTime * fireMult; fireMultTime += Time.deltaTime; if (MonoSingleton<InputManager>.Instance.InputSource.Fire1.IsPressed && gc.activated && !GameStateManager.Instance.PlayerInputLocked) { ((MonoBehaviour)this).Invoke("Shoot", wid.delay); } else if (MonoSingleton<InputManager>.Instance.InputSource.Fire2.IsPressed && gc.activated && !GameStateManager.Instance.PlayerInputLocked) { ((MonoBehaviour)this).Invoke("Ball", wid.delay); } else if (fireMultDelay < fireMultTime) { fireMult *= 0.9f; fireMultTime = 0f; } if (fireMult > 100f) { fireMult = 100f; } if (fireMult < 1f) { fireMult = 1f; } if (wid.delay == 0f) { StoreCharges(); } } public void Shoot() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) if (fireDelay < fireTime || NoWeaponCooldown.NoCooldown) { anim.SetTrigger("Shoot"); gunBarrelAud.clip = AssetHandler.LoadAsset<AudioClip>("FunShoot"); gunBarrelAud.pitch = 0.75f + fireMult * 0.02f; gunBarrelAud.Play(); GameObject val = Object.Instantiate<GameObject>(beam, gunBarrel.transform.position, ((Component)cc).transform.rotation * GOPUtils.RandRot(fireMult / 100f)); RevolverBeam component = val.GetComponent<RevolverBeam>(); val.GetComponent<RevolverBeam>().damage = 0.5f; if (Object.op_Implicit((Object)(object)targeter.CurrentTarget) && targeter.IsAutoAimed) { Transform transform = val.transform; Bounds bounds = targeter.CurrentTarget.bounds; transform.LookAt(((Bounds)(ref bounds)).center); Transform transform2 = val.transform; transform2.rotation *= GOPUtils.RandRot(fireMult / 100f); } fireTime = 0f; fireMult += 0.5f; } } public void Ball() { //IL_0087: 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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: 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) if (fireDelay * 2.75f < fireTime || NoWeaponCooldown.NoCooldown) { anim.SetTrigger("Shoot"); gunBarrelAud.clip = AssetHandler.LoadAsset<AudioClip>("FunBall"); gunBarrelAud.pitch = 0.5f + fireMult * 0.02f; gunBarrelAud.Play(); GameObject val = Object.Instantiate<GameObject>(cannonball, gunBarrel.transform.position + gunBarrel.transform.forward * 1f, ((Component)cc).transform.rotation); Rigidbody component = val.GetComponent<Rigidbody>(); if (Object.op_Implicit((Object)(object)targeter.CurrentTarget) && targeter.IsAutoAimed) { Transform transform = ((Component)component).transform; Bounds bounds = targeter.CurrentTarget.bounds; transform.LookAt(((Bounds)(ref bounds)).center); } component.AddForce(((Component)component).transform.forward * (2f * fireMult + 50f), (ForceMode)2); fireTime = 0f; fireMult -= 1.25f + fireMult * 0.05f; if (fireMultDelay < fireMultTime) { fireMult *= 0.9f; fireMultTime = 0f; } } } } public class FunnyGun : GOPWeapon { public override GameObject Asset { get; protected set; } public override int Slot { get; set; } public override string Name { get; protected set; } public override bool IsSetup { get; protected set; } public override bool ShouldHave { get; set; } public override void Setup() { Debug.Log((object)"Setting up Fun Gun"); ID = "funny_gun"; if ((Object)(object)Asset == (Object)null) { Asset = AssetHandler.LoadAsset<GameObject>("Fun Gun Prefab"); } if ((Object)(object)Asset != (Object)null && !IsSetup) { Name = "Funny Gun :D"; Slot = ConfigManager.FunGunSlot.value; Asset.AddComponent<FunnyGunSoul>(); MeshRenderer val = default(MeshRenderer); SkinnedMeshRenderer val2 = default(SkinnedMeshRenderer); foreach (GameObject item in Asset.DescendantsList()) { if (item.TryGetComponent<MeshRenderer>(ref val)) { ((Renderer)val).material.shader = ShaderBox.vertexlit_emissive; } else if (item.TryGetComponent<SkinnedMeshRenderer>(ref val2)) { ((Renderer)val2).material.shader = ShaderBox.vertexlit_emissive; } } IsSetup = true; } else { Debug.Log((object)"Fun Gun Didn't load"); Name = "Fun Gun is NULL"; Slot = -1; } } public override void UpdateConfigSettings() { ShouldHave = ConfigManager.FunGunEnable.value; Slot = ConfigManager.FunGunSlot.value; WeaponHandler.isCheating |= ConfigManager.FunGunEnable.value; } } public class GoldenGunSoul : MonoBehaviour { private int maxShots = 32; private float spread = 30f; private int shots = 16; private int damage = 0; private bool gunReady = true; private int pumps = 0; private bool shouldFire1; private bool shouldFire2; private GameObject gunTip; private GameObject rocket = PrefabBox.rocket; private GameObject grenade = PrefabBox.grenade; private GameObject beam = PrefabBox.beam; private GameObject coin = PrefabBox.coin; private GameObject camObj; private GameObject coinShot; private CoinShot coinShotComp; private Coin coinComp; private Camera cam; private CameraController cc; private GunControl gc; private Animator anim; private AudioSource gunTipAud; private AudioSource pumpAud; private AudioSource triggerAud; private CameraFrustumTargeter targeter; private WeaponIcon weaponIcon; private WeaponIdentifier wid; private WeaponPos wpos; private void Start() { //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) cam = ((Component)MonoSingleton<CameraController>.Instance).GetComponent<Camera>(); gc = ((Component)MonoSingleton<GunControl>.Instance).GetComponent<GunControl>(); camObj = ((Component)cam).gameObject; cc = MonoSingleton<CameraController>.Instance; coinShot = AssetHandler.coinShot; coinShotComp = coinShot.GetComponent<CoinShot>(); coinShotComp.sourceWeapon = ((Component)this).gameObject; coinShotComp.ignoreCoins = true; gunTip = ((Component)this).gameObject.DescendantByName("ShootPoint"); gunTipAud = gunTip.GetComponent<AudioSource>(); pumpAud = ((Component)this).gameObject.DescendantByName("Shotgun_Pump").GetComponent<AudioSource>(); triggerAud = ((Component)this).gameObject.DescendantByName("Shotgun_Trigger").GetComponent<AudioSource>(); targeter = MonoSingleton<CameraFrustumTargeter>.instance; anim = ((Component)this).gameObject.DescendantByName("golden_shotgun").GetComponent<Animator>(); wid = ((Component)this).gameObject.GetComponent<WeaponIdentifier>(); weaponIcon = ((Component)this).gameObject.AddComponent<WeaponIcon>(); wpos = ((Component)this).gameObject.AddComponent<WeaponPos>(); wpos.defaultPos = new Vector3(0.6129f, -1.5981f, 1.5654f); wpos.middlePos = new Vector3(-0.08f, -1.5981f, 1.5654f); if ((Object)(object)weaponIcon.weaponDescriptor == (Object)null) { weaponIcon.weaponDescriptor = ScriptableObject.CreateInstance<WeaponDescriptor>(); weaponIcon.weaponDescriptor.variationColor = (WeaponVariant)3; weaponIcon.weaponDescriptor.icon = AssetHandler.LoadAsset<Sprite>("Trollface"); weaponIcon.weaponDescriptor.glowIcon = weaponIcon.weaponDescriptor.icon; } pumps = ChargeManager.goldenGun.pumps; } private void Update() { if (NoWeaponCooldown.NoCooldown) { shouldFire1 = MonoSingleton<InputManager>.Instance.InputSource.Fire1.IsPressed; shouldFire2 = MonoSingleton<InputManager>.Instance.InputSource.Fire2.IsPressed; } else { shouldFire1 = MonoSingleton<InputManager>.Instance.InputSource.Fire1.WasPerformedThisFrame; shouldFire2 = MonoSingleton<InputManager>.Instance.InputSource.Fire2.WasPerformedThisFrame; } if (shouldFire1 && gc.activated && !GameStateManager.Instance.PlayerInputLocked) { ((MonoBehaviour)this).Invoke("Shoot", wid.delay); } if (shouldFire2 && gc.activated && !GameStateManager.Instance.PlayerInputLocked) { ((MonoBehaviour)this).Invoke("Pump", wid.delay); } } public void Shoot() { //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: 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_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) if (!gunReady) { return; } gunReady = false; triggerAud.clip = AssetHandler.LoadAsset<AudioClip>("Click"); triggerAud.Play(); if (pumps > 0) { anim.SetTrigger("Shoot"); gunTipAud.clip = AssetHandler.LoadAsset<AudioClip>("ShotgunBoom"); gunTipAud.pitch = Random.Range(1.4f, 1.6f); gunTipAud.Play(); switch (pumps) { case 1: shots = 15; spread = 20f; coinShotComp.power = 1f; break; case 2: shots = 10; spread = 10f; coinShotComp.power = 1.5f; break; case 3: shots = 5; spread = 5f; coinShotComp.power = 3f; break; case 4: shots = 1; spread = 0f; coinShotComp.power = 15f; break; default: shots = 1; spread = 0f; coinShotComp.power = 15 + pumps - 4; break; } for (int i = 0; i < shots; i++) { GameObject val = Object.Instantiate<GameObject>(coinShot, ((Component)cam).transform.position + ((Component)cam).transform.forward * 0.1f - ((Component)cam).transform.up * 0.1f, ((Component)cam).transform.rotation * GOPUtils.RandRot(spread)); if (Object.op_Implicit((Object)(object)targeter.CurrentTarget) && targeter.IsAutoAimed) { Transform transform = val.transform; Bounds bounds = targeter.CurrentTarget.bounds; transform.LookAt(((Bounds)(ref bounds)).center); Transform transform2 = val.transform; transform2.rotation *= GOPUtils.RandRot(spread); } } pumps = 0; coinShotComp.power = 1f; } else { anim.SetTrigger("EmptyShoot"); } } public void Pump() { if (gunReady) { gunReady = false; if (pumps >= 3) { anim.SetTrigger("BigReload"); } else { anim.SetTrigger("Reload"); } } } public void ReadyGun() { gunReady = true; } public void PumpGun() { if (pumps >= 3) { pumpAud.clip = AssetHandler.LoadAsset<AudioClip>("BigCha"); pumpAud.pitch = 1f; pumpAud.Play(); } else { pumpAud.clip = AssetHandler.LoadAsset<AudioClip>("Cha"); pumpAud.pitch = 1f - (float)pumps * 0.08f; pumpAud.Play(); } } public void UnpumpGun() { if (pumps >= 3) { pumpAud.clip = AssetHandler.LoadAsset<AudioClip>("BigChing"); pumpAud.pitch = 1f; pumpAud.Play(); } else { pumpAud.clip = AssetHandler.LoadAsset<AudioClip>("Ching"); pumpAud.pitch = 1f - (float)pumps * 0.08f; pumpAud.Play(); } pumps++; if (wid.delay == 0f) { ChargeManager.goldenGun.pumps = pumps; } } private void OnEnable() { pumps = ChargeManager.goldenGun.pumps; } private void OnDisable() { ChargeManager.goldenGun.pumps = 0; } } public class GoldenGun : GOPWeapon { public override GameObject Asset { get; protected set; } public override int Slot { get; set; } public override void Setup() { Debug.Log((object)"Setting up Golden Gun"); ID = "golden_shotgun"; if ((Object)(object)Asset == (Object)null) { Asset = AssetHandler.LoadAsset<GameObject>("Golden Gun Prefab"); } if ((Object)(object)Asset != (Object)null && !IsSetup) { Name = "Golden Shotgun"; Slot = ConfigManager.GoldenGunSlot.value; Asset.AddComponent<GoldenGunSoul>(); MeshRenderer val = default(MeshRenderer); foreach (GameObject item in Asset.DescendantsList()) { if (item.TryGetComponent<MeshRenderer>(ref val)) { ((Renderer)val).material.shader = ShaderBox.vertexlit_emissive; } } IsSetup = true; } else { Debug.Log((object)"Golden Shotgun Didn't load"); Name = "Golden Shotgun is NULL"; Slot = -1; } } public override void UpdateConfigSettings() { ShouldHave = ConfigManager.GoldenGunEnable.value; Slot = ConfigManager.GoldenGunSlot.value; WeaponHandler.isCheating |= ConfigManager.GoldenGunEnable.value; } } public class GoldenGunAnim : MonoBehaviour { private GoldenGunSoul soul; private void Start() { soul = ((Component)this).GetComponentInParent<GoldenGunSoul>(); } public void ReadyGun() { soul.ReadyGun(); } public void PumpGun() { soul.PumpGun(); } public void UnpumpGun() { soul.UnpumpGun(); } } public class CoinShot : MonoBehaviour { public Coin coin; public float power = 1f; private GameObject coinPref = PrefabBox.coin; public GameObject sourceWeapon; public bool ignoreCoins = true; private LayerMask lmask; private RaycastHit hit; private EnemyIdentifier eid; private void Start() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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_0060: Unknown result type (might be due to invalid IL or missing references) coin = coinPref.GetComponent<Coin>(); lmask = coin.lmask; lmask = LayerMask.op_Implicit(LayerMask.op_Implicit(lmask) | GOPUtils.NameToLayerBit("Limb")); lmask = LayerMask.op_Implicit(LayerMask.op_Implicit(lmask) | GOPUtils.NameToLayerBit("BigCorpse")); Shoot(); ((MonoBehaviour)this).Invoke("Death", 1f); } private void Death() { Object.Destroy((Object)(object)((Component)this).gameObject); } private void Update() { } private void Shoot() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_034e: 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_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: 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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: 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_030e: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026e: 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_0283: Unknown result type (might be due to invalid IL or missing references) bool flag = Physics.Raycast(((Component)this).transform.position, ((Component)this).transform.forward, ref hit, float.PositiveInfinity, LayerMask.op_Implicit(lmask)); LineRenderer component = coin.SpawnBeam().GetComponent<LineRenderer>(); component.SetPosition(0, ((Component)this).transform.position); int num = 0; if (flag && ignoreCoins) { Coin val = null; RaycastHit val2 = hit; do { if (((Component)((RaycastHit)(ref val2)).transform).gameObject.TryGetComponent<Coin>(ref val)) { flag = Physics.Raycast(((RaycastHit)(ref val2)).point + ((Component)this).transform.forward, ((Component)this).transform.forward, ref val2, float.PositiveInfinity, LayerMask.op_Implicit(lmask)); if (!flag) { break; } num++; continue; } hit = val2; break; } while (num <= 20); } if (flag) { Transform transform = ((RaycastHit)(ref hit)).transform; GameObject gameObject = ((Component)transform).gameObject; GameObject val3 = Object.Instantiate<GameObject>(coinPref, ((RaycastHit)(ref hit)).point - ((Component)this).transform.forward, Quaternion.identity); Coin component2 = val3.GetComponent<Coin>(); component2.power = power; if (gameObject.CompareTag("Enemy") || gameObject.CompareTag("Body") || gameObject.CompareTag("Limb") || gameObject.CompareTag("EndLimb") || gameObject.CompareTag("Head")) { EnemyIdentifierIdentifier componentInParent = ((Component)((RaycastHit)(ref hit)).transform).GetComponentInParent<EnemyIdentifierIdentifier>(); eid = componentInParent.eid; if (Object.op_Implicit((Object)(object)eid) && !eid.dead) { eid.hitter = "coin shot"; if (!eid.hitterWeapons.Contains("coin shot")) { eid.hitterWeapons.Add("coin shot"); } EnemyIdentifier obj = eid; Vector3 val4 = transform.position - ((Component)this).transform.position; obj.DeliverDamage(gameObject, ((Vector3)(ref val4)).normalized * 10000f, ((RaycastHit)(ref hit)).point, power, false, 1f, sourceWeapon, false, false); if (power >= 10f) { MonoSingleton<StyleHUD>.Instance.AddPoints((int)(10f * power), "ultrakill.moneyshot", sourceWeapon, eid, -1, "", ""); } } } component.SetPosition(1, ((RaycastHit)(ref hit)).point); Rigidbody component3 = val3.GetComponent<Rigidbody>(); component3.velocity = Vector3.zero; component3.AddForce(Vector3.up * 25f, (ForceMode)2); new GameObject().AddComponent<CoinCollector>().coin = val3; } else { component.SetPosition(1, ((Component)this).transform.position + ((Component)this).transform.forward * 1000f); } } } public class WispBuddy : MonoBehaviour { private Vector3 startPos; private Vector3 crazyPos; public float factor = 0.5f; public float bound = 36f; public float speed = 5f; public float deathTimer = 15f; public float startTime; public GameObject target; public EnemyIdentifier targetEid; public GameObject sourceWeapon; private ParticleSystem firePart; private ParticleSystem bubblePart; private ParticleSystem fireTailPart; private ParticleSystem bubbleTailPart; private Material fireSimpleMat; private Material bubbleSimpleMat; private Material fireEpicMat; private Material bubbleEpicMat; private WaterCheck waterCheck; private bool amIEpic = false; private void Start() { //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) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) startPos = ((Component)this).transform.position; crazyPos = startPos; UpdateTargeter(); DamageUpdate(); startTime = Time.time; speed = 15f; firePart = ((Component)this).gameObject.DescendantByName("Wisp Flame").GetComponent<ParticleSystem>(); firePart.Stop(); bubblePart = ((Component)this).gameObject.DescendantByName("Wisp Bubble").GetComponent<ParticleSystem>(); bubblePart.Stop(); fireTailPart = ((Component)this).gameObject.DescendantByName("Wisp Tail").GetComponent<ParticleSystem>(); fireTailPart.Stop(); bubbleTailPart = ((Component)this).gameObject.DescendantByName("Wisp Bubble Tail").GetComponent<ParticleSystem>(); bubbleTailPart.Stop(); fireSimpleMat = AssetHandler.LoadAsset<Material>("fireMat"); bubbleSimpleMat = AssetHandler.LoadAsset<Material>("bubbleMat"); fireEpicMat = AssetHandler.LoadAsset<Material>("coolfireMat"); bubbleEpicMat = AssetHandler.LoadAsset<Material>("coolbubbleMat"); ((Component)this).TryGetComponent<WaterCheck>(ref waterCheck); EpicnessVerification(); } public void Die() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) if (speed > 150f) { Object.Instantiate<GameObject>(PrefabBox.boom, ((Component)this).transform.position, Quaternion.identity); } Object.Destroy((Object)(object)((Component)this).gameObject); } public void DamageUpdate() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) RaycastHit[] array = Physics.SphereCastAll(((Component)this).transform.position, 1f, ((Component)this).transform.forward, 0f); EnemyIdentifierIdentifier val = null; for (int i = 0; i < array.Length; i++) { if (((Component)((RaycastHit)(ref array[i])).transform).TryGetComponent<EnemyIdentifierIdentifier>(ref val) && !((Object)(object)val.eid == (Object)null) && !val.eid.dead && !val.eid.blessed) { val.eid.DeliverDamage(((Component)val).gameObject, Vector3.zero, ((Component)this).transform.position, 0.15f, false, 0f, sourceWeapon, false, false); } } ((MonoBehaviour)this).Invoke("DamageUpdate", 0.2f); } public void UpdateTargeter() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_0071: Unknown result type (might be due to invalid IL or missing references) float num = 1E+10f; GameObject[] array = GameObject.FindGameObjectsWithTag("Enemy"); if (array.Length != 0) { for (int i = 0; i < array.Length; i++) { EnemyIdentifier component = array[i].GetComponent<EnemyIdentifier>(); if (!((Object)(object)component == (Object)null) && !component.dead && !component.blessed) { Vector3 val = array[i].transform.position - ((Component)this).transform.position; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < num) { num = sqrMagnitude; targetEid = component; } } } } if (num >= 1E+10f) { target = null; targetEid = null; } else { EnemyIdentifierIdentifier[] componentsInChildren = ((Component)targetEid).GetComponentsInChildren<EnemyIdentifierIdentifier>(); target = ((Component)componentsInChildren[Random.Range(0, componentsInChildren.Length)]).gameObject; } ((MonoBehaviour)this).Invoke("UpdateTargeter", 0.5f); } private void Update() { if (ConfigManager.WowthrowerEpicFire.value != amIEpic) { amIEpic = ConfigManager.WowthrowerEpicFire.value; EpicnessVerification(); } if (waterCheck.inWater) { if (!bubblePart.isEmitting) { bubblePart.Play(); bubbleTailPart.Play(); firePart.Stop(); fireTailPart.Stop(); } } else if (!firePart.isEmitting) { firePart.Play(); fireTailPart.Play(); bubblePart.Stop(); bubbleTailPart.Stop(); } } public void EpicnessVerification() { //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: 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_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: 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_00fe: Unknown result type (might be due to invalid IL or missing references) ParticleSystemRenderer component = ((Component)firePart).gameObject.GetComponent<ParticleSystemRenderer>(); ParticleSystemRenderer component2 = ((Component)fireTailPart).gameObject.GetComponent<ParticleSystemRenderer>(); ParticleSystemRenderer component3 = ((Component)bubblePart).gameObject.GetComponent<ParticleSystemRenderer>(); ParticleSystemRenderer component4 = ((Component)bubbleTailPart).gameObject.GetComponent<ParticleSystemRenderer>(); if (ConfigManager.WowthrowerEpicFire.value) { ((Renderer)component).material = fireEpicMat; MainModule main = firePart.main; ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(Color.white); ((Renderer)component3).material = bubbleEpicMat; MainModule main2 = bubblePart.main; ((MainModule)(ref main2)).startColor = MinMaxGradient.op_Implicit(Color.white); ((Renderer)component2).material = fireEpicMat; MainModule main3 = fireTailPart.main; ((MainModule)(ref main3)).startColor = MinMaxGradient.op_Implicit(Color.white); ((Renderer)component4).material = bubbleEpicMat; MainModule main4 = bubbleTailPart.main; ((MainModule)(ref main4)).startColor = MinMaxGradient.op_Implicit(Color.white); } else { ((Renderer)component).material = fireSimpleMat; MainModule main5 = firePart.main; ((MainModule)(ref main5)).startColor = MinMaxGradient.op_Implicit(GOPUtils.HexToColor("#FF7600")); ((Renderer)component3).material = bubbleSimpleMat; MainModule main6 = bubblePart.main; ((MainModule)(ref main6)).startColor = MinMaxGradient.op_Implicit(GOPUtils.HexToColor("#99E7F8")); ((Renderer)component2).material = fireSimpleMat; MainModule main7 = fireTailPart.main; ((MainModule)(ref main7)).startColor = MinMaxGradient.op_Implicit(GOPUtils.HexToColor("#FF7600")); ((Renderer)component4).material = bubbleSimpleMat; MainModule main8 = bubbleTailPart.main; ((MainModule)(ref main8)).startColor = MinMaxGradient.op_Implicit(GOPUtils.HexToColor("#99E7F8")); } } private void FixedUpdate() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: 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_0043: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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_0086: Unknown result type (might be due to invalid IL or missing references) crazyPos += GOPUtils.RandPos((bound + speed * 0.8f) * Time.deltaTime); if ((Object)(object)target != (Object)null) { Vector3 val = crazyPos; Vector3 val2 = target.transform.position - ((Component)this).transform.position; crazyPos = val + ((Vector3)(ref val2)).normalized * (speed * Time.deltaTime); } float num = Mathf.Pow(factor, Time.deltaTime * speed); ((Component)this).transform.position = Vector3.Lerp(crazyPos, ((Component)this).transform.position, num); if ((Time.time - startTime > 1000f && !NoWeaponCooldown.NoCooldown) || speed > 200f) { Die(); } } } public class WispOrb : MonoBehaviour { public GameObject sourceWeapon; public List<WispBuddy> buddies = new List<WispBuddy>(); private Vector3 startPos; private float lifeTimer = 0f; private float speed = 1f; public float heat = 15f; private float startTime; public float deathTime; private float spawnLoopTime; private bool firstDeath; private ParticleSystem wispPart; private Light wispLight; private ParticleSystem firePart; private EmissionModule firePartEmissions; private ParticleSystem bubblePart; private EmissionModule bubblePartEmissions; private Material wispSimpleMat; private Material fireSimpleMat; private Material bubbleSimpleMat; private Material fireEpicMat; private Material bubbleEpicMat; private AudioSource audSource; private bool amIEpic = false; private WaterCheck waterCheck; private void Start() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: 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) deathTime = 45f; firstDeath = true; startPos = ((Component)this).transform.position; ((MonoBehaviour)this).Invoke("SpawnLoop", 1.5f); DamageUpdate(); startTime = Time.time; spawnLoopTime = Time.time; wispPart = ((Component)this).gameObject.DescendantByName("Wisp Flame").GetComponent<ParticleSystem>(); wispPart.Stop(); ((Component)this).gameObject.DescendantByName("Wisp Flame").TryGetComponent<Light>(ref wispLight); firePart = ((Component)this).gameObject.DescendantByName("Wisp Aura").GetComponent<ParticleSystem>(); firePartEmissions = firePart.emission; firePart.Stop(); bubblePart = ((Component)this).gameObject.DescendantByName("Wisp Bubble Aura").GetComponent<ParticleSystem>(); bubblePartEmissions = bubblePart.emission; bubblePart.Stop(); wispSimpleMat = AssetHandler.LoadAsset<Material>("WispOrbMat"); fireSimpleMat = AssetHandler.LoadAsset<Material>("fireMat"); bubbleSimpleMat = AssetHandler.LoadAsset<Material>("bubbleMat"); fireEpicMat = AssetHandler.LoadAsset<Material>("coolfireMat"); bubbleEpicMat = AssetHandler.LoadAsset<Material>("coolbubbleMat"); ((Component)this).TryGetComponent<AudioSource>(ref audSource); audSource.volume = 0.5f; audSource.Stop(); waterCheck = ((Component)this).GetComponent<WaterCheck>(); EpicnessVerification(); } public void SpawnLoop() { if (buddies.Count < 10) { SpawnBuddy(); } for (int i = 0; i < buddies.Count; i++) { if ((Object)(object)buddies[i] == (Object)null) { buddies.RemoveAt(i); i--; } } ((MonoBehaviour)this).Invoke("SpawnLoop", 2.5f - heat * 0.0008f); } public void Die() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) Object.Destroy((Object)(object)((Component)this).gameObject); if (heat > 2000f) { Object.Instantiate<GameObject>(PrefabBox.superBoom, ((Component)this).transform.position, Quaternion.identity); } else if (heat > 1000f) { Object.Instantiate<GameObject>(PrefabBox.bigBoom, ((Component)this).transform.position, Quaternion.identity); } else { Object.Instantiate<GameObject>(PrefabBox.harmlessBoom, ((Component)this).transform.position, Quaternion.identity); } for (int i = 0; i < buddies.Count; i++) { buddies[i].Die(); } buddies.Clear(); } public void DamageUpdate() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) RaycastHit[] array = Physics.SphereCastAll(((Component)this).transform.position, 1f, ((Component)this).transform.forward, 0f); EnemyIdentifierIdentifier val = null; for (int i = 0; i < array.Length; i++) { if (((Component)((RaycastHit)(ref array[i])).transform).TryGetComponent<EnemyIdentifierIdentifier>(ref val) && !((Object)(object)val.eid == (Object)null) && !val.eid.dead && !val.eid.blessed) { val.eid.DeliverDamage(((Component)val).gameObject, Vector3.zero, ((Component)this).transform.position, 0.5f, false, 0f, sourceWeapon, false, false); } } ((MonoBehaviour)this).Invoke("DamageUpdate", 0.5f); } private void Update() { //IL_018c: 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_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) if (ConfigManager.WowthrowerEpicFire.value != amIEpic) { amIEpic = ConfigManager.WowthrowerEpicFire.value; EpicnessVerification(); } if (waterCheck.inWater) { if (!bubblePart.isEmitting) { bubblePart.Play(); firePart.Stop(); wispPart.Stop(); audSource.clip = AssetHandler.LoadAsset<AudioClip>("BubbleOrbNoises"); audSource.time = Random.Range(0f, 2.5f); audSource.loop = true; audSource.Play(); } ((EmissionModule)(ref bubblePartEmissions)).rateOverTime = MinMaxCurve.op_Implicit(10f * HeatFactor(15f)); return; } if (!firePart.isEmitting) { firePart.Play(); wispPart.Play(); bubblePart.Stop(); audSource.clip = AssetHandler.LoadAsset<AudioClip>("FlameOrbNoises"); audSource.loop = true; audSource.time = Random.Range(0f, 2.5f); audSource.Play(); } ((EmissionModule)(ref firePartEmissions)).rateOverTime = MinMaxCurve.op_Implicit(20f * HeatFactor(15f)); MainModule main = firePart.main; ((MainModule)(ref main)).startSpeed = MinMaxCurve.op_Implicit(4f * HeatFactor(1.75f)); ((MainModule)(ref main)).simulationSpeed = 0.75f * HeatFactor(3.5f); } public void EpicnessVerification() { //IL_00e4: 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_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: 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_00bf: Unknown result type (might be due to invalid IL or missing references) ParticleSystemRenderer component = ((Component)firePart).gameObject.GetComponent<ParticleSystemRenderer>(); ParticleSystemRenderer component2 = ((Component)bubblePart).gameObject.GetComponent<ParticleSystemRenderer>(); ParticleSystemRenderer component3 = ((Component)wispPart).gameObject.GetComponent<ParticleSystemRenderer>(); if (ConfigManager.WowthrowerEpicFire.value) { ((Renderer)component).material = fireEpicMat; MainModule main = firePart.main; ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(Color.white); ((Renderer)component2).material = bubbleEpicMat; MainModule main2 = bubblePart.main; ((MainModule)(ref main2)).startColor = MinMaxGradient.op_Implicit(Color.white); ((Renderer)component3).material = fireEpicMat; MainModule main3 = wispPart.main; ((MainModule)(ref main3)).startColor = MinMaxGradient.op_Implicit(Color.white); } else { ((Renderer)component).material = fireSimpleMat; MainModule main4 = firePart.main; ((MainModule)(ref main4)).startColor = MinMaxGradient.op_Implicit(GOPUtils.HexToColor("#FF7600")); ((Renderer)component2).material = bubbleSimpleMat; MainModule main5 = bubblePart.main; ((MainModule)(ref main5)).startColor = MinMaxGradient.op_Implicit(GOPUtils.HexToColor("#99E7F8")); ((Renderer)component3).material = wispSimpleMat; MainModule main6 = wispPart.main; ((MainModule)(ref main6)).startColor = MinMaxGradient.op_Implicit(GOPUtils.HexToColor("#FF7600")); } } public float HeatFactor(float factor) { return 1f + heat / 2880f * factor; } private void FixedUpdate() { //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) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: 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) ((Component)this).transform.position = Vector3.Lerp(startPos + Vector3.up, startPos + Vector3.down, 0.5f + Mathf.Sin(lifeTimer) / 2f); lifeTimer += Time.deltaTime; if (NoWeaponCooldown.NoCooldown) { startTime = Time.time; } if (((Time.time - startTime > deathTime && !NoWeaponCooldown.NoCooldown) || heat > 2880f) && firstDeath) { firstDeath = false; Die(); } } private void SpawnBuddy() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) WispBuddy component = Object.Instantiate<GameObject>(AssetHandler.customPrefabs["Wisp Baby"], ((Component)this).transform.position, Quaternion.identity).GetComponent<WispBuddy>(); ((Component)component).GetComponent<WispBuddy>().sourceWeapon = sourceWeapon; ((Component)component).GetComponent<WispBuddy>().speed = 15f + heat * 0.1f; buddies.Add(component); } } public class WowthrowerSoul : MonoBehaviour { private bool weFirin = false; private bool noFirin = false; private string[] fireNames = new string[4] { "FlameThrower", "EpicThrower", "BubbleThrower", "EpicBubbleThrower" }; private CameraFrustumTargeter targeter; private WeaponIcon weaponIcon; private WeaponIdentifier wid; private WeaponPos wpos; private Animator anim; private bool itbegins = false; private float stylefactor = 0f; private bool amIEpic = false; private GameObject shootPoint; private AudioSource gunTipAud; private GameObject fireAreaObj; private FireArea fireArea; private CapsuleCollider fireAreaCol; private ParticleSystem firePart; private EmissionModule firePartEmissions; private Light fireLight; private ParticleSystem bubblePart; private EmissionModule bubblePartEmissions; private ParticleSystemRenderer firePartRenderer; private ParticleSystemRenderer bubblePartRenderer; private Material fireSimpleMat; private Material bubbleSimpleMat; private Material fireEpicMat; private Material bubbleEpicMat; private List<WispOrb> tehwisporbz; private int wispOrbMax = 1; private void Start() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: 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_007f: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) itbegins = true; targeter = MonoSingleton<CameraFrustumTargeter>.instance; wid = ((Component)this).gameObject.GetComponent<WeaponIdentifier>(); weaponIcon = ((Component)this).gameObject.AddComponent<WeaponIcon>(); wpos = ((Component)this).gameObject.AddComponent<WeaponPos>(); wpos.defaultPos = new Vector3(0.9563f, -1.617f, -0.8131f); wpos.middlePos = new Vector3(0f, -1.9418f, -0.0985f); anim = ((Component)this).gameObject.DescendantByName("wowthrower").GetComponent<Animator>(); if ((Object)(object)weaponIcon.weaponDescriptor == (Object)null) { weaponIcon.weaponDescriptor = ScriptableObject.CreateInstance<WeaponDescriptor>(); weaponIcon.weaponDescriptor.variationColor = (WeaponVariant)2; weaponIcon.weaponDescriptor.icon = AssetHandler.LoadAsset<Sprite>("Trollface"); weaponIcon.weaponDescriptor.glowIcon = weaponIcon.weaponDescriptor.icon; } shootPoint = ((Component)this).gameObject.DescendantByName("ShootPoint"); shootPoint.layer = 0; gunTipAud = shootPoint.GetComponent<AudioSource>(); gunTipAud.volume = 1.2f; fireAreaObj = ((Component)this).gameObject.DescendantByName("FireArea"); fireAreaObj.layer = 0; fireArea = fireAreaObj.AddComponent<FireArea>(); fireArea.sourceWeapon = ((Component)this).gameObject; fireAreaCol = fireAreaObj.GetComponent<CapsuleCollider>(); ((Collider)fireAreaCol).enabled = false; firePart = ((Component)this).gameObject.DescendantByName("FlameThrower").GetComponent<ParticleSystem>(); firePartEmissions = firePart.emission; firePart.Stop(); ((Component)this).gameObject.DescendantByName("FlameThrower").TryGetComponent<ParticleSystemRenderer>(ref firePartRenderer); ((Component)this).gameObject.DescendantByName("FlameThrower").TryGetComponent<Light>(ref fireLight); bubblePart = ((Component)this).gameObject.DescendantByName("BubbleThrower").GetComponent<ParticleSystem>(); bubblePartEmissions = bubblePart.emission; bubblePart.Stop(); ((Component)this).gameObject.DescendantByName("BubbleThrower").TryGetComponent<ParticleSystemRenderer>(ref bubblePartRenderer); fireSimpleMat = AssetHandler.LoadAsset<Material>("fireMat"); bubbleSimpleMat = AssetHandler.LoadAsset<Material>("bubbleMat"); fireEpicMat = AssetHandler.LoadAsset<Material>("coolfireMat"); bubbleEpicMat = AssetHandler.LoadAsset<Material>("coolbubbleMat"); tehwisporbz = new List<WispOrb>(); TurnFireOff(); EpicnessVerification(); } public void Update() { if (ConfigManager.WowthrowerEpicFire.value != amIEpic) { amIEpic = ConfigManager.WowthrowerEpicFire.value; EpicnessVerification(); } stylefactor = MonoSingleton<StyleHUD>.Instance.currentMeter + (float)MonoSingleton<StyleHUD>.Instance.rankIndex * 1500f; if (NoWeaponCooldown.NoCooldown) { stylefactor = 12000f; } if (!noFirin) { if (MonoSingleton<InputManager>.Instance.InputSource.Fire1.IsPressed && ((Component)MonoSingleton<GunControl>.Instance).GetComponent<GunControl>().activated && !GameStateManager.Instance.PlayerInputLocked) { ((MonoBehaviour)this).Invoke("TurnFireOn", wid.delay); } else if (MonoSingleton<InputManager>.Instance.InputSource.Fire2.WasPerformedThisFrame && ((Component)MonoSingleton<GunControl>.Instance).GetComponent<GunControl>().activated && !GameStateManager.Instance.PlayerInputLocked) { ((MonoBehaviour)this).Invoke("BigShoot", wid.delay); } else if (weFirin) { ((MonoBehaviour)this).Invoke("TurnFireOff", wid.delay); } } } public void SlowUpdate() { } public void OnEnable() { if (itbegins) { TurnFireOff(); } noFirin = false; } public void EpicnessVerification() { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: 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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: 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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) if (ConfigManager.WowthrowerEpicFire.value) { ((Renderer)firePartRenderer).material = fireEpicMat; MainModule main = firePart.main; ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(Color.white); ((Renderer)bubblePartRenderer).material = bubbleEpicMat; MainModule main2 = bubblePart.main; ((MainModule)(ref main2)).startColor = MinMaxGradient.op_Implicit(Color.white); } else { ((Renderer)firePartRenderer).material = fireSimpleMat; MainModule main3 = firePart.main; ((MainModule)(ref main3)).startColor = MinMaxGradient.op_Implicit(GOPUtils.HexToColor("#FF7600")); ((Renderer)bubblePartRenderer).material = bubbleSimpleMat; MainModule main4 = bubblePart.main; ((MainModule)(ref main4)).startColor = MinMaxGradient.op_Implicit(GOPUtils.HexToColor("#99E7F8")); } } public void CreateWispOrb() { //IL_00f0: 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_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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < tehwisporbz.Count; i++) { if ((Object)(object)tehwisporbz[i] == (Object)null) { tehwisporbz.RemoveAt(i); i--; } } if (tehwisporbz.Count < wispOrbMax) { tehwisporbz.Add(Object.Instantiate<GameObject>(AssetHandler.customPrefabs["Wisp Orb"], shootPoint.transform.position + shootPoint.transform.forward, Quaternion.identity).GetComponent<WispOrb>()); return; } tehwisporbz[0].Die(); tehwisporbz.RemoveAt(0); tehwisporbz.Add(Object.Instantiate<GameObject>(AssetHandler.customPrefabs["Wisp Orb"], shootPoint.transform.position + shootPoint.transform.forward, Quaternion.identity).GetComponent<WispOrb>()); } public void BigShoot() { TurnFireOff(); anim.Rebind(); anim.Play("Idle"); anim.SetTrigger("BigFire"); } public void TurnFireOn() { //IL_01ae: 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) if (!weFirin) { anim.Rebind(); anim.Play("Idle"); anim.SetTrigger("Fire"); } weFirin = true; if (MonoSingleton<UnderwaterController>.Instance.inWater) { if (!bubblePart.isEmitting) { bubblePart.Play(); firePart.Stop(); gunTipAud.clip = AssetHandler.LoadAsset<AudioClip>("BubbleThrowerBubble"); gunTipAud.time = Random.Range(0f, 2.5f); gunTipAud.loop = true; gunTipAud.Play(); } ((EmissionModule)(ref bubblePartEmissions)).rateOverTime = MinMaxCurve.op_Implicit(5f * (1f + stylefactor / 12000f * 10f)); ChangeFireAreaSize(15f); } else { if (!firePart.isEmitting) { firePart.Play(); bubblePart.Stop(); gunTipAud.clip = AssetHandler.LoadAsset<AudioClip>("FlameThrowerFire"); gunTipAud.time = Random.Range(0f, 2.5f); gunTipAud.loop = true; gunTipAud.Play(); } ((EmissionModule)(ref firePartEmissions)).rateOverTime = MinMaxCurve.op_Implicit(10f * (1f + stylefactor / 12000f * 10f)); ChangeFireAreaSize(25f); } if ((Object)(object)fireLight != (Object)null) { ((Behaviour)fireLight).enabled = true; } ((Collider)fireAreaCol).enabled = true; } public void TurnFireOff() { if (weFirin) { anim.Rebind(); anim.Play("Fire"); anim.SetTrigger("NoFire"); } weFirin = false; firePart.Stop(); bubblePart.Stop(); gunTipAud.Stop(); if ((Object)(object)fireLight != (Object)null) { ((Behaviour)fireLight).enabled = false; } ((Collider)fireAreaCol).enabled = false; if ((Object)(object)fireArea != (Object)null) { fireArea.ClearStuff(); } } public void BigShootIsTalking() { gunTipAud.clip = AssetHandler.LoadAsset<AudioClip>("FireFlare"); gunTipAud.loop = false; gunTipAud.Play(); CreateWispOrb(); noFirin = true; } public void BigShootEnd() { noFirin = false; } public void ChangeFireAreaSize(float height, float radius = 1f) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)fireAreaCol != (Object)null) { fireAreaCol.height = height; fireAreaCol.center = new Vector3(0f, height / 2f, 0f); fireAreaCol.radius = radius; } } } public class Wowthrower : GOPWeapon { public override GameObject Asset { get; protected set; } public override int Slot { get; set; } public override void Setup() { Debug.Log((object)"Setting up Wowthrower"); ID = "wowthrower"; if ((Object)(object)Asset == (Object)null) { Asset = AssetHandler.LoadAsset<GameObject>("Wowthrower Prefab"); } if ((Object)(object)Asset != (Object)null && !IsSetup) { Name = "Wowthrower"; Slot = ConfigManager.WowthrowerSlot.value; Asset.AddComponent<WowthrowerSoul>(); MeshRenderer val = default(MeshRenderer); foreach (GameObject item in Asset.DescendantsList()) { if (item.TryGetComponent<MeshRenderer>(ref val)) { ((Renderer)val).material.shader = ShaderBox.vertexlit_emissive; } } IsSetup = true; } else { Debug.Log((object)"Wowthrower Didn't load"); Name = "Wowthrower is NULL"; Slot = -1; } } public override void UpdateConfigSettings() { ShouldHave = ConfigManager.WowthrowerEnable.value; Slot = ConfigManager.WowthrowerSlot.value; WeaponHandler.isCheating |= ConfigManager.WowthrowerEnable.value; } } public class WowthrowerAnim : MonoBehaviour { private WowthrowerSoul soul; private void Start() { soul = ((Component)this).GetComponentInParent<WowthrowerSoul>(); } public void BigShootIsTalking() { soul.BigShootIsTalking(); } public void BigShootEnd() { soul.BigShootEnd(); } } } namespace GunsOPlenty.Utils { public static class ChargeManager { public struct FunGun { public float fireTime; public float fireDelay; public float fireMult; public float fireMultTime; public float fireMultDelay; } public struct GoldenGun { public int pumps; } public static FunGun funGun; public static GoldenGun goldenGun; public static void Setup() { funGun.fireDelay = 1f; funGun.fireTime = 0f; funGun.fireMult = 1f; funGun.fireMultTime = 0f; funGun.fireMultDelay = 0.1f; goldenGun.pumps = 0; } } public static class CommandManager { public class GOPCommand : ICommand { public string Name => "GOP Command"; public string Description => "Runs commands for Guns O' Plenty"; public string Command => "gop"; public void Execute(Console console, string[] args) { switch (args[0]) { case "hi": Debug.Log((object)"hello"); break; case "level": SceneHelper.LoadScene("Level " + args[1], true); if (args.Length >= 3) { int result = 2; if (int.TryParse(args[2], out result)) { MonoSingleton<PrefsManager>.Instance.SetInt("difficulty", result); break; } Debug.Log((object)"Invalid difficulty"); MonoSingleton<PrefsManager>.Instance.SetInt("difficulty", 2); } break; case "idk": Debug.Log((object)"bruh"); break; case "trial": { TrialManager.trialDict.TryGetValue(args[1], out var value); if (value == null) { Debug.Log((object)("Could not find trial with ID: " + args[1])); } else if (args[2] == "start") { value.StartTrial(); } else if (args[2] == "disable") { value.Disable(); } break; } case "unlockallweapons": switch (args[1]) { case "NOOOOOOOOOW!!!!1!": case "plz": case "please": { bool flag = false; foreach (GOPWeapon weapon in WeaponHandler.weapons) { if (UnlockManager.weaponsUnlocked.ContainsKey(weapon.ID) && !UnlockManager.weaponsUnlocked[weapon.ID].value) { flag = true; MonoSingleton<PopupManager>.Instance.CreatePopup(weapon.Name + " Unlocked"); UnlockManager.WeaponUnlocked(weapon.ID); } } if (!flag) { Debug.Log((object)"All the weapons are already unlocked dummy :)"); } break; } case null: Debug.Log((object)"What's the magic word."); break; default: Debug.Log((object)"I don't believe that's the magic word."); break; } break; } } } public static void RegisterAll() { MonoSingleton<Console>.Instance.RegisterCommand((ICommand)(object)new GOPCommand()); } } public static class ConfigManager { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static BoolValueChangeEventDelegate <>9__9_0; public static BoolValueChangeEventDelegate <>9__9_1; public static BoolValueChangeEventDelegate <>9__9_2; internal void <Setup>b__9_0(BoolValueChangeEvent e) { ((ConfigField)FunGunSlot).hidden = !e.value; if (Plugin.IsInLevel()) { if (e.value) { WeaponHandler.AddWeaponToInventory(WeaponHandler.weaponDict["funny_gun"]); } else { WeaponHandler.RemoveWeaponFromInventory(WeaponHandler.weaponDict["funny_gun"]); } } } internal void <Setup>b__9_1(BoolValueChangeEvent e) { ((ConfigField)GoldenGunSlot).hidden = !e.value; if (Plugin.IsInLevel()) { if (e.value) { WeaponHandler.AddWeaponToInventory(WeaponHandler.weaponDict["golden_shotgun"]); } else { WeaponHandler.RemoveWeaponFromInventory(WeaponHandler.weaponDict["golden_shotgun"]); } } } internal void <Setup>b__9_2(BoolValueChangeEvent e) { ((ConfigField)WowthrowerSlot).hidden = !e.value; ((ConfigField)WowthrowerEpicFire).hidden = !e.value; if (Plugin.IsInLevel()) { if (e.value) { WeaponHandler.AddWeaponToInventory(WeaponHandler.weaponDict["wowthrower"]); } else { WeaponHandler.RemoveWeaponFromInventory(WeaponHandler.weaponDict["wowthrower"]); } } } } public static PluginConfigurator config; public static BoolField FunGunEnable; public static BoolField GoldenGunEnable; public static BoolField WowthrowerEnable; public static IntField FunGunSlot; public static IntField GoldenGunSlot; public static IntField WowthrowerSlot; public static BoolField StartupCheck; public static BoolField WowthrowerEpicFire; public static void Setup() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_005d: 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_0083: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Expected O, but got Unknown //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references)