Decompiled source of Receiver Expansion v1.0.1

plugins/Receiver_Expansion/Receiver_Expansion.dll

Decompiled 9 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using Alexandria.ItemAPI;
using BepInEx;
using Gungeon;
using Microsoft.CodeAnalysis;
using ReceiverItems;
using Receiver_Expansion;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Mod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Mod")]
[assembly: AssemblyCopyright("Copyright ©  2020")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("d6d7a494-722e-4763-959b-c2d6b6a42b01")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace ReceiverItems
{
	public class Cassette_Tape : PassiveItem
	{
		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			string text = "Cassette Tape";
			string text2 = "Receiver_Expansion/Resources/cassette_tape";
			GameObject val = new GameObject(text);
			Cassette_Tape cassette_Tape = val.AddComponent<Cassette_Tape>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Insight 1";
			string text4 = "These tapes are designed for the few who will listen.\n\nIf you are ready to receive the message, insert the tape and press play. If you hear nothing at first, that is normal. If you listen to a hundred tapes, a thousands tapes, a million tapes; you will eventually hear a voice.\nCan you hear it? The gradual and creeping decay and dysfunction. This is the time we have prepared for.\n\nIncreases gun stats partially. Increases Curse by 0.25.\n\nThis is added by the Receiver Expansion mod.";
			ItemBuilder.SetupItem((PickupObject)(object)cassette_Tape, text3, text4, "receiver");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape, (StatType)10, 0.975f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape, (StatType)1, 1.05f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape, (StatType)2, 0.95f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape, (StatType)14, 0.25f, (ModifyMethod)0);
			((PickupObject)cassette_Tape).quality = (ItemQuality)(-50);
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).DisplayName);
		}

		public override DebrisObject Drop(PlayerController player)
		{
			return ((PassiveItem)this).Drop(player);
		}

		public override void DisableEffect(PlayerController player)
		{
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).DisplayName);
		}
	}
	public class Cassette_Tape_3 : PassiveItem
	{
		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			string text = "Cassette Tape 3";
			string text2 = "Receiver_Expansion/Resources/cassette_tape_3";
			GameObject val = new GameObject(text);
			Cassette_Tape_3 cassette_Tape_ = val.AddComponent<Cassette_Tape_3>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Insight 3";
			string text4 = "Mind Kill.\n\nThough little is known about The Threat, we do however know about the assets it uses to fight Receivers. To each Receiver these 'Threat Assets' can differ from person to person. Ranging in a varying amount of different ways.\nYou will likely have to, if not already, coordinate your Mind-Tech and focus on survival foremost. Concentrate.\n\nIncreases gun stats partially. Increases Curse by 0.5.\n\nThis is added by the Receiver Expansion mod.";
			ItemBuilder.SetupItem((PickupObject)(object)cassette_Tape_, text3, text4, "receiver");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)25, 1.1f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)10, 0.95f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)1, 1.075f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)2, 0.9f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)14, 0.5f, (ModifyMethod)0);
			((PickupObject)cassette_Tape_).quality = (ItemQuality)(-50);
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).DisplayName);
		}

		public override DebrisObject Drop(PlayerController player)
		{
			return ((PassiveItem)this).Drop(player);
		}

		public override void DisableEffect(PlayerController player)
		{
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).DisplayName);
		}
	}
	public class Cassette_Tape_4 : PassiveItem
	{
		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			string text = "Cassette Tape 4";
			string text2 = "Receiver_Expansion/Resources/cassette_tape_4";
			GameObject val = new GameObject(text);
			Cassette_Tape_4 cassette_Tape_ = val.AddComponent<Cassette_Tape_4>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Insight 4";
			string text4 = "Threat Echo\n\n'I'm sorry, I won't be making it to meet up. I know that I said I would, but- I, just can't...'\n\n\n'You shouldn't put up with this. I'll, leave you alone for tonight.'\n\nIncreases Movement Speed and damage, adds 2 Curse.\n\nThis is added by the Receiver Expansion mod.";
			ItemBuilder.SetupItem((PickupObject)(object)cassette_Tape_, text3, text4, "receiver");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)0, 1f, (ModifyMethod)0);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)5, 1.5f, (ModifyMethod)0);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)14, 2f, (ModifyMethod)0);
			((PickupObject)cassette_Tape_).quality = (ItemQuality)(-50);
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).DisplayName);
		}

		public override DebrisObject Drop(PlayerController player)
		{
			return ((PassiveItem)this).Drop(player);
		}

		public override void DisableEffect(PlayerController player)
		{
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).DisplayName);
		}
	}
	public class Cassette_Tape_5 : PassiveItem
	{
		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			string text = "Cassette Tape 5";
			string text2 = "Receiver_Expansion/Resources/cassette_tape_5";
			GameObject val = new GameObject(text);
			Cassette_Tape_5 cassette_Tape_ = val.AddComponent<Cassette_Tape_5>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Insight 5";
			string text4 = "Recovery\n\nHaving a strong mind is not just a matter of capability, but also fortitude. The greatest threat to a Receiver are these invasive thoughts that wane at our mental fortitude. Letting these thoughts be will allow them to fester and in-time can lead to negative thought patterns.\nAnd at times such as those, seek help from someone close. Talk about it. This applies inversely as well, if someone you know is going through a hard time. Talk with them, and really listen to what they say.\n\nIncreases gun stats decently. Increases Curse by 0.5\n\nThis is added by the Receiver Expansion mod.";
			ItemBuilder.SetupItem((PickupObject)(object)cassette_Tape_, text3, text4, "receiver");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)1, 1.1f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)2, 0.8f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)25, 1.15f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)14, 0.5f, (ModifyMethod)0);
			((PickupObject)cassette_Tape_).quality = (ItemQuality)(-50);
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).DisplayName);
		}

		public override DebrisObject Drop(PlayerController player)
		{
			return ((PassiveItem)this).Drop(player);
		}

		public override void DisableEffect(PlayerController player)
		{
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).DisplayName);
		}
	}
	public class Cassette_Tape_6 : PassiveItem
	{
		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			string text = "Cassette Tape 6";
			string text2 = "Receiver_Expansion/Resources/cassette_tape_6";
			GameObject val = new GameObject(text);
			Cassette_Tape_6 cassette_Tape_ = val.AddComponent<Cassette_Tape_6>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Insight 6";
			string text4 = "Reality D\n\nDespite the great distance, you have heard our call and listened. You are on the edge of something greater. It is only now that we realize you are not at Reality C.\nRather, an even deeper level of Reality D. Keep moving with purpose, soon you will Awaken.\nIncreases gun stats and damage. Increases Curse by 0.5\n\nThis is added by the Receiver Expansion mod.";
			ItemBuilder.SetupItem((PickupObject)(object)cassette_Tape_, text3, text4, "receiver");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)1, 1.1f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)2, 0.8f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)5, 1.15f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)25, 1.15f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)14, 0.5f, (ModifyMethod)0);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)22, 1.075f, (ModifyMethod)1);
			((PickupObject)cassette_Tape_).quality = (ItemQuality)(-50);
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).DisplayName);
		}

		public override DebrisObject Drop(PlayerController player)
		{
			return ((PassiveItem)this).Drop(player);
		}

		public override void DisableEffect(PlayerController player)
		{
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).DisplayName);
		}
	}
	public class Cassette_Tape_7 : PassiveItem
	{
		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			string text = "Awake Cassette Tape";
			string text2 = "Receiver_Expansion/Resources/cassette_tape_7";
			GameObject val = new GameObject(text);
			Cassette_Tape_7 cassette_Tape_ = val.AddComponent<Cassette_Tape_7>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Awake";
			string text4 = "You are now a True Receiver.\n\nIncreases damage. Increases Curse by 0.5\n\nThis is added by the Receiver Expansion mod.";
			ItemBuilder.SetupItem((PickupObject)(object)cassette_Tape_, text3, text4, "receiver");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)5, 1.075f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)22, 1.075f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)14, 0.25f, (ModifyMethod)0);
			((PickupObject)cassette_Tape_).quality = (ItemQuality)(-50);
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).DisplayName);
		}

		public override DebrisObject Drop(PlayerController player)
		{
			return ((PassiveItem)this).Drop(player);
		}

		public override void DisableEffect(PlayerController player)
		{
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).DisplayName);
		}
	}
	public class Cassette_Tape_2 : PassiveItem
	{
		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			string text = "Cassette Tape 2";
			string text2 = "Receiver_Expansion/Resources/cassette_tape_2";
			GameObject val = new GameObject(text);
			Cassette_Tape_2 cassette_Tape_ = val.AddComponent<Cassette_Tape_2>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Insight 2";
			string text4 = "You have seen the signs.\n\nThe Threat has invaded this part of Reality, and will cease at nothing to destroy you and your mind. A worm has been implated in your brain, a deathly pattern of mind-numbing thoughts.\nYou have heard our call, we are doing what we can to aid you. More tapes have begun to be procured and will be ready for you shortly, keep pushing.\n\nIncreases gun stats partially. Increases Curse by 0.25.\n\nThis is added by the Receiver Expansion mod.";
			ItemBuilder.SetupItem((PickupObject)(object)cassette_Tape_, text3, text4, "receiver");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)10, 0.975f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)1, 1.05f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)2, 0.95f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)25, 1.05f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)cassette_Tape_, (StatType)14, 0.25f, (ModifyMethod)0);
			((PickupObject)cassette_Tape_).quality = (ItemQuality)(-50);
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).DisplayName);
		}

		public override DebrisObject Drop(PlayerController player)
		{
			return ((PassiveItem)this).Drop(player);
		}

		public override void DisableEffect(PlayerController player)
		{
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).DisplayName);
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("masterchief.etg.receiver_expansion", "Receiver Expansion", "0.0.1")]
	public class Plugin : BaseUnityPlugin
	{
		public const string GUID = "masterchief.etg.receiver_expansion";

		public const string NAME = "Receiver Expansion";

		public const string VERSION = "0.0.1";

		public const string TEXT_COLOR = "#00FFFF";

		public void Start()
		{
			ETGModMainBehaviour.WaitForGameManagerStart((Action<GameManager>)GMStart);
		}

		public void GMStart(GameManager game)
		{
			Cassette_Tape.Init();
			Cassette_Tape_2.Init();
			Cassette_Tape_3.Init();
			Cassette_Tape_4.Init();
			Cassette_Tape_5.Init();
			Cassette_Tape_6.Init();
			Cassette_Tape_7.Init();
			Mind_Tech.Init();
			HiPoint.Init();
			Zip_22.Init();
			Beretta_M9.Init();
			Sig_Sauer_P226.Init();
			Glock_17_Gen2.Init();
			Turret_Gun.Init();
			TapePlayer.Init();
			Log("Receiver Expansion v0.0.1 started successfully.", "#00FFFF");
		}

		public static void Log(string text, string color = "#FFFFFF")
		{
			ETGModConsole.Log((object)("<color=" + color + ">" + text + "</color>"), false);
		}
	}
}
namespace Receiver_Expansion
{
	public class Beretta_M9 : GunBehaviour
	{
		private bool HasReloaded;

		public static void Init()
		{
			//IL_00a9: 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_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Beretta M9", "beretta_m9");
			Game.Items.Rename("outdated_gun_mods:beretta_m9", "receiver:beretta_m9");
			((Component)val).gameObject.AddComponent<Beretta_M9>();
			GunExt.SetShortDescription((PickupObject)(object)val, "Getting Beretta All the Time");
			GunExt.SetLongDescription((PickupObject)(object)val, "15+1: The Beretta M9 is a very reliable firearm to own. And very influencial 'Wonder Nine', for the Film Industry it has become the typical stand-in default pistol for how iconic it is. Which only greater increased its influence.\nWell rounded, Italian Curves.\n\nThis is added by the Receiver Expansion mod.");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "beretta_m9_idle_001", 8);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 30);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 4);
			GunExt.SetAnimationFPS(val, val.emptyAnimation, 4);
			GunExt.AddProjectileModuleFrom(val, "ak-47", true, false);
			val.DefaultModule.ammoCost = 1;
			val.DefaultModule.shootStyle = (ShootStyle)0;
			val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)1;
			val.reloadTime = 1.2f;
			val.DefaultModule.angleVariance = 7f;
			val.DefaultModule.cooldownTime = 0.25f;
			val.DefaultModule.numberOfShotsInClip = 16;
			val.SetBaseMaxAmmo(450);
			ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects;
			PickupObject byId = PickupObjectDatabase.GetById(56);
			muzzleFlashEffects = ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects;
			((Component)val.barrelOffset).transform.localPosition = new Vector3(1.3f, 0.5625f, 0f);
			val.m_isThrown = false;
			((PickupObject)val).quality = (ItemQuality)3;
			((BraveBehaviour)val).encounterTrackable.EncounterGuid = "beretta_m9_idle_001";
			Projectile val2 = Object.Instantiate<Projectile>(val.DefaultModule.projectiles[0]);
			((Component)val2).gameObject.SetActive(false);
			FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject);
			Object.DontDestroyOnLoad((Object)(object)val2);
			val.DefaultModule.projectiles[0] = val2;
			val2.baseData.damage = 7f;
			val2.baseData.speed = 40f;
			((BraveBehaviour)val2).transform.parent = val.barrelOffset;
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
		}

		public override void OnPostFired(PlayerController player, Gun gun)
		{
			gun.PreventNormalFireAudio = true;
			AkSoundEngine.PostEvent("Play_WPN_m1911_shot_01", ((Component)this).gameObject);
		}

		public override void Update()
		{
			if (Object.op_Implicit((Object)(object)base.gun.CurrentOwner))
			{
				if (!base.gun.PreventNormalFireAudio)
				{
					base.gun.PreventNormalFireAudio = true;
				}
				if (!base.gun.IsReloading && !HasReloaded)
				{
					HasReloaded = true;
				}
			}
		}

		public override void OnReloadPressed(PlayerController player, Gun gun, bool j)
		{
			if (gun.IsReloading && HasReloaded)
			{
				HasReloaded = false;
				AkSoundEngine.PostEvent("Play_OBJ_item_throw_01", ((Component)this).gameObject);
				((GunBehaviour)this).OnReloadPressed(player, gun, j);
				AkSoundEngine.PostEvent("Play_WPN_m1911_reload_01", ((Component)this).gameObject);
			}
		}
	}
	public class Glock_17_Gen2 : GunBehaviour
	{
		private bool HasReloaded;

		public static void Init()
		{
			//IL_00a9: 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_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Glock 17 Gen2", "glock_17_gen2");
			Game.Items.Rename("outdated_gun_mods:glock_17_gen2", "receiver:glock_17_gen2");
			((Component)val).gameObject.AddComponent<Glock_17_Gen2>();
			GunExt.SetShortDescription((PickupObject)(object)val, "Glock O'Clock");
			GunExt.SetLongDescription((PickupObject)(object)val, "17+1: This Glock 17 is illegally modified to have a 'fun switch' on the back end of the slide, allowing it to continuously fire. An experienced operator can mitigate the recoil of a full-atuo pistol, thankfully there aren't any in the Gungeon.\nPerhaps it's this illegal with how much fun it is to dispense 18 rounds extremely fast.\n\nThis is added by the Receiver Expansion mod.");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "glock_17_gen2_idle_001", 8);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 30);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 4);
			GunExt.SetAnimationFPS(val, val.emptyAnimation, 4);
			GunExt.AddProjectileModuleFrom(val, "ak-47", true, false);
			val.DefaultModule.ammoCost = 1;
			val.DefaultModule.shootStyle = (ShootStyle)1;
			val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)1;
			val.reloadTime = 1.8f;
			val.DefaultModule.angleVariance = 10f;
			val.DefaultModule.cooldownTime = 0.07f;
			val.DefaultModule.numberOfShotsInClip = 18;
			val.SetBaseMaxAmmo(600);
			ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects;
			PickupObject byId = PickupObjectDatabase.GetById(56);
			muzzleFlashEffects = ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects;
			((Component)val.barrelOffset).transform.localPosition = new Vector3(0.75f, 0.5625f, 0f);
			val.m_isThrown = false;
			((PickupObject)val).quality = (ItemQuality)4;
			((BraveBehaviour)val).encounterTrackable.EncounterGuid = "glock_17_gen2_idle_001";
			Projectile val2 = Object.Instantiate<Projectile>(val.DefaultModule.projectiles[0]);
			((Component)val2).gameObject.SetActive(false);
			FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject);
			Object.DontDestroyOnLoad((Object)(object)val2);
			val.DefaultModule.projectiles[0] = val2;
			val2.baseData.damage = 6f;
			val2.baseData.speed = 40f;
			((BraveBehaviour)val2).transform.parent = val.barrelOffset;
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
		}

		public override void OnPostFired(PlayerController player, Gun gun)
		{
			gun.PreventNormalFireAudio = true;
			AkSoundEngine.PostEvent("Play_WPN_uzi_shot_01", ((Component)this).gameObject);
		}

		public override void Update()
		{
			if (Object.op_Implicit((Object)(object)base.gun.CurrentOwner))
			{
				if (!base.gun.PreventNormalFireAudio)
				{
					base.gun.PreventNormalFireAudio = true;
				}
				if (!base.gun.IsReloading && !HasReloaded)
				{
					HasReloaded = true;
				}
			}
		}

		public override void OnReloadPressed(PlayerController player, Gun gun, bool j)
		{
			if (gun.IsReloading && HasReloaded)
			{
				HasReloaded = false;
				AkSoundEngine.PostEvent("Play_OBJ_item_throw_01", ((Component)this).gameObject);
				((GunBehaviour)this).OnReloadPressed(player, gun, j);
				AkSoundEngine.PostEvent("Play_WPN_m1911_reload_01", ((Component)this).gameObject);
			}
		}
	}
	public class HiPoint : GunBehaviour
	{
		private bool HasReloaded;

		public static void Init()
		{
			//IL_00a9: 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_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Hi-Point", "hipoint");
			Game.Items.Rename("outdated_gun_mods:hipoint", "receiver:hipoint");
			((Component)val).gameObject.AddComponent<HiPoint>();
			GunExt.SetShortDescription((PickupObject)(object)val, "YEET!");
			GunExt.SetLongDescription((PickupObject)(object)val, "8+1: The Hi-Point C9 'Yeet Cannon' is a gun so bad, you're better off throwing it at your enemies than shooting the gun due to its unweildy polymer frame.\n\nQuite literally a meme weapon, the Hi-Point C9 gets its 'Yeet Cannon' nickname from an online poll the Hi-Point company set up. An affordable firearm for those with a tight budget, it'll be enough to do the job.\n\nThis is added by the Receiver Expansion mod.");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "hipoint_idle_001", 8);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 30);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 5);
			GunExt.SetAnimationFPS(val, val.emptyAnimation, 4);
			GunExt.AddProjectileModuleFrom(val, "ak-47", true, false);
			val.DefaultModule.ammoCost = 1;
			val.DefaultModule.shootStyle = (ShootStyle)0;
			val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)1;
			val.reloadTime = 1.35f;
			val.DefaultModule.angleVariance = 8f;
			val.DefaultModule.cooldownTime = 0.3f;
			val.DefaultModule.numberOfShotsInClip = 9;
			val.SetBaseMaxAmmo(250);
			ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects;
			PickupObject byId = PickupObjectDatabase.GetById(56);
			muzzleFlashEffects = ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects;
			((Component)val.barrelOffset).transform.localPosition = new Vector3(0.75f, 0.5625f, 0f);
			((PickupObject)val).quality = (ItemQuality)2;
			((BraveBehaviour)val).encounterTrackable.EncounterGuid = "hipoint_idle_001";
			Projectile val2 = Object.Instantiate<Projectile>(val.DefaultModule.projectiles[0]);
			((Component)val2).gameObject.SetActive(false);
			FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject);
			Object.DontDestroyOnLoad((Object)(object)val2);
			val.DefaultModule.projectiles[0] = val2;
			val2.baseData.damage = 6.5f;
			val2.baseData.speed = 40f;
			((BraveBehaviour)val2).transform.parent = val.barrelOffset;
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
		}

		public override void OnPostFired(PlayerController player, Gun gun)
		{
			gun.PreventNormalFireAudio = true;
			AkSoundEngine.PostEvent("Play_WPN_m1911_shot_01", ((Component)this).gameObject);
		}

		public override void Update()
		{
			if (Object.op_Implicit((Object)(object)base.gun.CurrentOwner))
			{
				if (!base.gun.PreventNormalFireAudio)
				{
					base.gun.PreventNormalFireAudio = true;
				}
				if (!base.gun.IsReloading && !HasReloaded)
				{
					HasReloaded = true;
				}
			}
		}

		public override void OnReloadPressed(PlayerController player, Gun gun, bool j)
		{
			if (gun.IsReloading && HasReloaded)
			{
				HasReloaded = false;
				AkSoundEngine.PostEvent("Play_OBJ_item_throw_01", ((Component)this).gameObject);
				((GunBehaviour)this).OnReloadPressed(player, gun, j);
				AkSoundEngine.PostEvent("Play_WPN_m1911_reload_01", ((Component)this).gameObject);
			}
		}
	}
	public class Sig_Sauer_P226 : GunBehaviour
	{
		private bool HasReloaded;

		public static void Init()
		{
			//IL_00a9: 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_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Sig Sauer P226", "sig_sauer_p226");
			Game.Items.Rename("outdated_gun_mods:sig_sauer_p226", "receiver:sig_sauer_p226");
			((Component)val).gameObject.AddComponent<Sig_Sauer_P226>();
			GunExt.SetShortDescription((PickupObject)(object)val, "Not So Sauer Taste");
			GunExt.SetLongDescription((PickupObject)(object)val, "15+1: The Sig Sauer P226, much like the Beretta M9, is another iconic weapon. Mostly for the fact this weapon was designed for the Navy Seals. Military precision and sleek design, it is a good weapon to use and operate in anyone's hands whether they are experienced or not.\nAnother well rounded firearm. Just be sure if you get a Sig, don't get a P320.\n\nThis is added by the Receiver Expansion mod.");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "sig_sauer_p226_idle_001", 8);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 30);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 4);
			GunExt.SetAnimationFPS(val, val.emptyAnimation, 4);
			GunExt.AddProjectileModuleFrom(val, "ak-47", true, false);
			val.DefaultModule.ammoCost = 1;
			val.DefaultModule.shootStyle = (ShootStyle)0;
			val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)1;
			val.reloadTime = 1.7f;
			val.DefaultModule.angleVariance = 5f;
			val.DefaultModule.cooldownTime = 0.4f;
			val.DefaultModule.numberOfShotsInClip = 16;
			val.SetBaseMaxAmmo(450);
			ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects;
			PickupObject byId = PickupObjectDatabase.GetById(56);
			muzzleFlashEffects = ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects;
			((Component)val.barrelOffset).transform.localPosition = new Vector3(0.75f, 0.5625f, 0f);
			val.m_isThrown = false;
			((PickupObject)val).quality = (ItemQuality)3;
			((BraveBehaviour)val).encounterTrackable.EncounterGuid = "sig_sauer_p226_idle_001";
			Projectile val2 = Object.Instantiate<Projectile>(val.DefaultModule.projectiles[0]);
			((Component)val2).gameObject.SetActive(false);
			FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject);
			Object.DontDestroyOnLoad((Object)(object)val2);
			val.DefaultModule.projectiles[0] = val2;
			val2.baseData.damage = 10f;
			val2.baseData.speed = 40f;
			((BraveBehaviour)val2).transform.parent = val.barrelOffset;
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
		}

		public override void OnPostFired(PlayerController player, Gun gun)
		{
			gun.PreventNormalFireAudio = true;
			AkSoundEngine.PostEvent("Play_WPN_m1911_shot_01", ((Component)this).gameObject);
		}

		public override void Update()
		{
			if (Object.op_Implicit((Object)(object)base.gun.CurrentOwner))
			{
				if (!base.gun.PreventNormalFireAudio)
				{
					base.gun.PreventNormalFireAudio = true;
				}
				if (!base.gun.IsReloading && !HasReloaded)
				{
					HasReloaded = true;
				}
			}
		}

		public override void OnReloadPressed(PlayerController player, Gun gun, bool j)
		{
			if (gun.IsReloading && HasReloaded)
			{
				HasReloaded = false;
				AkSoundEngine.PostEvent("Play_OBJ_item_throw_01", ((Component)this).gameObject);
				((GunBehaviour)this).OnReloadPressed(player, gun, j);
				AkSoundEngine.PostEvent("Play_WPN_m1911_reload_01", ((Component)this).gameObject);
			}
		}
	}
	public class Turret_Gun : GunBehaviour
	{
		private bool HasReloaded;

		public static void Init()
		{
			//IL_00a9: 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_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Turret Gun", "turret_gun");
			Game.Items.Rename("outdated_gun_mods:turret_gun", "receiver:turret_gun");
			((Component)val).gameObject.AddComponent<Turret_Gun>();
			GunExt.SetShortDescription((PickupObject)(object)val, "Beep!");
			GunExt.SetLongDescription((PickupObject)(object)val, "This is a detached-mounted gun of an Automated Sentry Turret, dreamt up by the Threat. This repurposed Killdrone Turret packs a deadly punch, housing up to 3 belts of ammo at a time for faster and effecient reloading. However, the high fire-rate without its mounted base leads to unweildy accuracy.\nThe battery has been moved to an internal part of the weapon, meaning this Killdrone is still active and uses its sensor to detect and lock onto anything near it. Don't think about it too much...\n\nThis is added by the Receiver Expansion mod.");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "turret_gun_idle_001", 8);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 24);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 6);
			GunExt.SetAnimationFPS(val, val.emptyAnimation, 4);
			GunExt.AddProjectileModuleFrom(val, "ak-47", true, false);
			val.DefaultModule.ammoCost = 1;
			val.DefaultModule.shootStyle = (ShootStyle)1;
			val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)1;
			val.reloadTime = 2.25f;
			val.DefaultModule.angleVariance = 12f;
			val.DefaultModule.cooldownTime = 0.06f;
			val.DefaultModule.numberOfShotsInClip = 36;
			val.SetBaseMaxAmmo(600);
			ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects;
			PickupObject byId = PickupObjectDatabase.GetById(56);
			muzzleFlashEffects = ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects;
			((Component)val.barrelOffset).transform.localPosition = new Vector3(1.75f, 0.22f, 0f);
			val.m_isThrown = false;
			((PickupObject)val).quality = (ItemQuality)5;
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)val, (StatType)14, 2f, (ModifyMethod)0);
			((BraveBehaviour)val).encounterTrackable.EncounterGuid = "turret_gun_idle_001";
			Projectile val2 = Object.Instantiate<Projectile>(val.DefaultModule.projectiles[0]);
			((Component)val2).gameObject.SetActive(false);
			FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject);
			Object.DontDestroyOnLoad((Object)(object)val2);
			val.DefaultModule.projectiles[0] = val2;
			val.AppliedHomingDetectRadius = 15f;
			val.AppliedHomingAngularVelocity = 270f;
			val.AppliesHoming = true;
			val2.baseData.damage = 5f;
			val2.baseData.speed = 50f;
			((BraveBehaviour)val2).transform.parent = val.barrelOffset;
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
		}

		public override void OnPostFired(PlayerController player, Gun gun)
		{
			gun.PreventNormalFireAudio = true;
			AkSoundEngine.PostEvent("Play_WPN_m1911_shot_01", ((Component)this).gameObject);
		}

		public override void Update()
		{
			if (Object.op_Implicit((Object)(object)base.gun.CurrentOwner))
			{
				if (!base.gun.PreventNormalFireAudio)
				{
					base.gun.PreventNormalFireAudio = true;
				}
				if (!base.gun.IsReloading && !HasReloaded)
				{
					HasReloaded = true;
				}
			}
		}

		public override void OnReloadPressed(PlayerController player, Gun gun, bool j)
		{
			if (gun.IsReloading && HasReloaded)
			{
				HasReloaded = false;
				AkSoundEngine.PostEvent("Play_OBJ_item_throw_01", ((Component)this).gameObject);
				((GunBehaviour)this).OnReloadPressed(player, gun, j);
				AkSoundEngine.PostEvent("Play_WPN_m1911_reload_01", ((Component)this).gameObject);
			}
		}
	}
	public class Zip_22 : GunBehaviour
	{
		private bool HasReloaded;

		public static void Init()
		{
			//IL_00a9: 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_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Zip 22", "zip_22");
			Game.Items.Rename("outdated_gun_mods:zip_22", "receiver:zip_22");
			((Component)val).gameObject.AddComponent<Zip_22>();
			GunExt.SetShortDescription((PickupObject)(object)val, "Point Blank Missed.");
			GunExt.SetLongDescription((PickupObject)(object)val, "Infinite Ammo.  The Zip 22 is an abomination of a pistol. It started as a good idea to make a very affordable and cheap firearm, much like the Hi-Point C9, however actual execution leads to the Zip 22 failing constantly.\nPoor hammer-cocking operation positioned at the front of the barrel mixed with the lightweight striking block, leads it to misfire and fail to feed consistently. It has potential to do the job, but you REALLY shouldn't use it.\n\nThis is added by the Receiver Expansion mod.");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "zip_22_idle_001", 8);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 30);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 3);
			GunExt.SetAnimationFPS(val, val.emptyAnimation, 4);
			GunExt.AddProjectileModuleFrom(val, "ak-47", true, false);
			val.DefaultModule.ammoCost = 1;
			val.DefaultModule.shootStyle = (ShootStyle)0;
			val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)1;
			val.reloadTime = 1.8f;
			val.DefaultModule.angleVariance = 10f;
			val.DefaultModule.cooldownTime = 0.31f;
			val.DefaultModule.numberOfShotsInClip = 10;
			val.SetBaseMaxAmmo(1000);
			ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects;
			PickupObject byId = PickupObjectDatabase.GetById(56);
			muzzleFlashEffects = ((Gun)((byId is Gun) ? byId : null)).muzzleFlashEffects;
			((Component)val.barrelOffset).transform.localPosition = new Vector3(0.75f, 0.5625f, 0f);
			((PickupObject)val).quality = (ItemQuality)1;
			((BraveBehaviour)val).encounterTrackable.EncounterGuid = "zip_22_idle_001";
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)val, (StatType)14, 1f, (ModifyMethod)0);
			((PickupObject)val).CanBeDropped = false;
			Projectile val2 = Object.Instantiate<Projectile>(val.DefaultModule.projectiles[0]);
			((Component)val2).gameObject.SetActive(false);
			FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject);
			Object.DontDestroyOnLoad((Object)(object)val2);
			val.DefaultModule.projectiles[0] = val2;
			val2.baseData.damage = 5f;
			val2.baseData.speed = 40f;
			((BraveBehaviour)val2).transform.parent = val.barrelOffset;
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
		}

		public override void OnPostFired(PlayerController player, Gun gun)
		{
			gun.PreventNormalFireAudio = true;
			AkSoundEngine.PostEvent("Play_WPN_m1911_shot_01", ((Component)this).gameObject);
		}

		public override void Update()
		{
			if (Object.op_Implicit((Object)(object)base.gun.CurrentOwner))
			{
				if (!base.gun.PreventNormalFireAudio)
				{
					base.gun.PreventNormalFireAudio = true;
				}
				if (!base.gun.IsReloading && !HasReloaded)
				{
					HasReloaded = true;
				}
			}
		}

		public override void OnReloadPressed(PlayerController player, Gun gun, bool j)
		{
			if (gun.IsReloading && HasReloaded)
			{
				HasReloaded = false;
				AkSoundEngine.PostEvent("Play_OBJ_item_throw_01", ((Component)this).gameObject);
				((GunBehaviour)this).OnReloadPressed(player, gun, j);
				AkSoundEngine.PostEvent("Play_WPN_m1911_reload_01", ((Component)this).gameObject);
			}
		}
	}
	public static class Tools
	{
		public static tk2dSpriteDefinition CopyDefinitionFrom(this tk2dSpriteDefinition other)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: 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_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: 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_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: 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)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: 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_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: 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_010e: Expected O, but got Unknown
			//IL_010e: 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_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Expected O, but got Unknown
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0225: Unknown result type (might be due to invalid IL or missing references)
			//IL_0226: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_022e: 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_026b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0270: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Unknown result type (might be due to invalid IL or missing references)
			//IL_0294: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02da: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0320: Unknown result type (might be due to invalid IL or missing references)
			//IL_0321: Unknown result type (might be due to invalid IL or missing references)
			//IL_0326: Unknown result type (might be due to invalid IL or missing references)
			//IL_0329: Unknown result type (might be due to invalid IL or missing references)
			//IL_0365: Unknown result type (might be due to invalid IL or missing references)
			//IL_0366: Unknown result type (might be due to invalid IL or missing references)
			//IL_036c: Expected O, but got Unknown
			//IL_0384: Unknown result type (might be due to invalid IL or missing references)
			//IL_0389: Unknown result type (might be due to invalid IL or missing references)
			//IL_038f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0397: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_040d: Unknown result type (might be due to invalid IL or missing references)
			//IL_041b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0427: Unknown result type (might be due to invalid IL or missing references)
			tk2dSpriteDefinition val = new tk2dSpriteDefinition
			{
				boundsDataCenter = new Vector3
				{
					x = other.boundsDataCenter.x,
					y = other.boundsDataCenter.y,
					z = other.boundsDataCenter.z
				},
				boundsDataExtents = new Vector3
				{
					x = other.boundsDataExtents.x,
					y = other.boundsDataExtents.y,
					z = other.boundsDataExtents.z
				},
				colliderConvex = other.colliderConvex,
				colliderSmoothSphereCollisions = other.colliderSmoothSphereCollisions,
				colliderType = other.colliderType,
				colliderVertices = other.colliderVertices,
				collisionLayer = other.collisionLayer,
				complexGeometry = other.complexGeometry,
				extractRegion = other.extractRegion,
				flipped = other.flipped,
				indices = other.indices,
				material = new Material(other.material),
				materialId = other.materialId,
				materialInst = new Material(other.materialInst),
				metadata = other.metadata,
				name = other.name,
				normals = other.normals,
				physicsEngine = other.physicsEngine,
				position0 = new Vector3
				{
					x = other.position0.x,
					y = other.position0.y,
					z = other.position0.z
				},
				position1 = new Vector3
				{
					x = other.position1.x,
					y = other.position1.y,
					z = other.position1.z
				},
				position2 = new Vector3
				{
					x = other.position2.x,
					y = other.position2.y,
					z = other.position2.z
				},
				position3 = new Vector3
				{
					x = other.position3.x,
					y = other.position3.y,
					z = other.position3.z
				},
				regionH = other.regionH,
				regionW = other.regionW,
				regionX = other.regionX,
				regionY = other.regionY,
				tangents = other.tangents,
				texelSize = new Vector2
				{
					x = other.texelSize.x,
					y = other.texelSize.y
				},
				untrimmedBoundsDataCenter = new Vector3
				{
					x = other.untrimmedBoundsDataCenter.x,
					y = other.untrimmedBoundsDataCenter.y,
					z = other.untrimmedBoundsDataCenter.z
				},
				untrimmedBoundsDataExtents = new Vector3
				{
					x = other.untrimmedBoundsDataExtents.x,
					y = other.untrimmedBoundsDataExtents.y,
					z = other.untrimmedBoundsDataExtents.z
				}
			};
			List<Vector2> list = new List<Vector2>();
			Vector2[] uvs = other.uvs;
			foreach (Vector2 val2 in uvs)
			{
				list.Add(new Vector2
				{
					x = val2.x,
					y = val2.y
				});
			}
			val.uvs = list.ToArray();
			List<Vector3> list2 = new List<Vector3>();
			Vector3[] colliderVertices = other.colliderVertices;
			foreach (Vector3 val3 in colliderVertices)
			{
				list2.Add(new Vector3
				{
					x = val3.x,
					y = val3.y,
					z = val3.z
				});
			}
			val.colliderVertices = list2.ToArray();
			return val;
		}

		public static void SetProjectileSpriteRight(this Projectile proj, string name, int pixelWidth, int pixelHeight, int? overrideColliderPixelWidth = null, int? overrideColliderPixelHeight = null)
		{
			//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_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: 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)
			try
			{
				if (!overrideColliderPixelWidth.HasValue)
				{
					overrideColliderPixelWidth = pixelWidth;
				}
				if (!overrideColliderPixelHeight.HasValue)
				{
					overrideColliderPixelHeight = pixelHeight;
				}
				float num = (float)pixelWidth / 16f;
				float num2 = (float)pixelHeight / 16f;
				float x = (float)overrideColliderPixelWidth.Value / 16f;
				float y = (float)overrideColliderPixelHeight.Value / 16f;
				ETGMod.GetAnySprite((BraveBehaviour)(object)proj).spriteId = Databases.Items.ProjectileCollection.inst.GetSpriteIdByName(name);
				tk2dSpriteDefinition[] spriteDefinitions = Databases.Items.ProjectileCollection.inst.spriteDefinitions;
				PickupObject byId = PickupObjectDatabase.GetById(12);
				tk2dSpriteDefinition val = spriteDefinitions[ETGMod.GetAnySprite((BraveBehaviour)(object)((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0]).spriteId].CopyDefinitionFrom();
				val.boundsDataCenter = new Vector3(num / 2f, num2 / 2f, 0f);
				val.boundsDataExtents = new Vector3(num, num2, 0f);
				val.untrimmedBoundsDataCenter = new Vector3(num / 2f, num2 / 2f, 0f);
				val.untrimmedBoundsDataExtents = new Vector3(num, num2, 0f);
				val.position0 = new Vector3(0f, 0f, 0f);
				val.position1 = new Vector3(0f + num, 0f, 0f);
				val.position2 = new Vector3(0f, 0f + num2, 0f);
				val.position3 = new Vector3(0f + num, 0f + num2, 0f);
				val.colliderVertices[1].x = x;
				val.colliderVertices[1].y = y;
				val.name = name;
				Databases.Items.ProjectileCollection.inst.spriteDefinitions[ETGMod.GetAnySprite((BraveBehaviour)(object)proj).spriteId] = val;
				proj.baseData.force = 0f;
			}
			catch (Exception ex)
			{
				ETGModConsole.Log((object)"Ooops! Seems like something got very, Very, VERY wrong. Here's the exception:", false);
				ETGModConsole.Log((object)ex.ToString(), false);
			}
		}
	}
	internal class Mind_Tech : PlayerItem
	{
		public int tapeCount = 0;

		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			string text = "Mind Tech";
			string text2 = "Receiver_Expansion/Resources/floppy_disk";
			GameObject val = new GameObject(text);
			Mind_Tech mind_Tech = val.AddComponent<Mind_Tech>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Reality A";
			string text4 = "The Threat has weakened you in this reality, one of the deepest layers we've ever heard from..\n\nThough you are so far from us, your ability to hear our call even at this great distance shows your true strength as a Receiver. The Mind-Kill has weakend your ability to fight from our standard training exercises.\nBut we trust that the little we can provide is, enough. Find the Tapes, they are your only way to strengthen your Mind-Tech.\n\nRecharges roughly every 8 rooms. On use: Hurts player health, generates a blank effect, and summons a Cassette Tape per use in sequence. The more tapes, the less likely you are to get them.\nAfter all tapes have been collected: 20% spawn partial ammo container. 5% chance to summon more tapes.\n\nThis is added by the Receiver Expansion mod.";
			ItemBuilder.SetupItem((PickupObject)(object)mind_Tech, text3, text4, "receiver");
			ItemBuilder.SetCooldownType((PlayerItem)(object)mind_Tech, (CooldownType)2, 4f);
			((PlayerItem)mind_Tech).consumable = false;
			((PickupObject)mind_Tech).CanBeDropped = false;
			((PickupObject)mind_Tech).quality = (ItemQuality)5;
		}

		public override void Pickup(PlayerController player)
		{
			((PlayerItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).DisplayName);
		}

		public override void DoEffect(PlayerController user)
		{
			//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_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: 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_025b: 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_030a: Unknown result type (might be due to invalid IL or missing references)
			//IL_030f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0314: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0458: Unknown result type (might be due to invalid IL or missing references)
			//IL_045d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0462: Unknown result type (might be due to invalid IL or missing references)
			//IL_0510: Unknown result type (might be due to invalid IL or missing references)
			//IL_0515: Unknown result type (might be due to invalid IL or missing references)
			//IL_051a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0551: Unknown result type (might be due to invalid IL or missing references)
			//IL_0556: Unknown result type (might be due to invalid IL or missing references)
			//IL_055b: Unknown result type (might be due to invalid IL or missing references)
			if (!((PlayerItem)this).CanBeUsed(user))
			{
				return;
			}
			float num = Random.Range(1f, 50f);
			if (tapeCount <= 0)
			{
				((BraveBehaviour)user).healthHaver.ApplyHealing(-0.5f);
				user.ForceBlank(25f, 0.5f, false, true, (Vector2?)null, true, -1f);
				PickupObject byName = PickupObjectDatabase.GetByName("Cassette Tape");
				LootEngine.SpawnItem(((Component)byName).gameObject, Vector2.op_Implicit(((GameActor)user).CenterPosition), Vector2.down, 0f, true, false, false);
				((PlayerItem)this).ForceApplyCooldown(user);
				tapeCount++;
			}
			else if (tapeCount == 1)
			{
				((BraveBehaviour)user).healthHaver.ApplyHealing(-0.5f);
				user.ForceBlank(25f, 0.5f, false, true, (Vector2?)null, true, -1f);
				PickupObject byName2 = PickupObjectDatabase.GetByName("Cassette Tape 2");
				LootEngine.SpawnItem(((Component)byName2).gameObject, Vector2.op_Implicit(((GameActor)user).CenterPosition), Vector2.down, 0f, true, false, false);
				((PlayerItem)this).ForceApplyCooldown(user);
				tapeCount++;
			}
			else if (tapeCount == 2)
			{
				((BraveBehaviour)user).healthHaver.ApplyHealing(-0.5f);
				user.ForceBlank(25f, 0.5f, false, true, (Vector2?)null, true, -1f);
				((PlayerItem)this).ForceApplyCooldown(user);
				if (num <= 45f)
				{
					PickupObject byName3 = PickupObjectDatabase.GetByName("Cassette Tape 3");
					LootEngine.SpawnItem(((Component)byName3).gameObject, Vector2.op_Implicit(((GameActor)user).CenterPosition), Vector2.down, 0f, true, false, false);
					tapeCount++;
				}
			}
			else if (tapeCount == 3)
			{
				((BraveBehaviour)user).healthHaver.ApplyHealing(-0.5f);
				user.ForceBlank(25f, 0.5f, false, true, (Vector2?)null, true, -1f);
				if (num <= 40f)
				{
					PickupObject byName4 = PickupObjectDatabase.GetByName("Cassette Tape 4");
					LootEngine.SpawnItem(((Component)byName4).gameObject, Vector2.op_Implicit(((GameActor)user).CenterPosition), Vector2.down, 0f, true, false, false);
					tapeCount++;
				}
				((PlayerItem)this).ForceApplyCooldown(user);
			}
			else if (tapeCount == 4)
			{
				((BraveBehaviour)user).healthHaver.ApplyHealing(-0.5f);
				user.ForceBlank(25f, 0.5f, false, true, (Vector2?)null, true, -1f);
				((PlayerItem)this).ForceApplyCooldown(user);
				if (num <= 35f)
				{
					PickupObject byName5 = PickupObjectDatabase.GetByName("Cassette Tape 5");
					LootEngine.SpawnItem(((Component)byName5).gameObject, Vector2.op_Implicit(((GameActor)user).CenterPosition), Vector2.down, 0f, true, false, false);
					tapeCount++;
				}
			}
			else if (tapeCount == 5)
			{
				((BraveBehaviour)user).healthHaver.ApplyHealing(-0.5f);
				user.ForceBlank(25f, 0.5f, false, true, (Vector2?)null, true, -1f);
				((PlayerItem)this).ForceApplyCooldown(user);
				if (num <= 27f)
				{
					PickupObject byName6 = PickupObjectDatabase.GetByName("Cassette Tape 6");
					LootEngine.SpawnItem(((Component)byName6).gameObject, Vector2.op_Implicit(((GameActor)user).CenterPosition), Vector2.down, 0f, true, false, false);
					tapeCount++;
				}
			}
			else if (tapeCount == 6)
			{
				((BraveBehaviour)user).healthHaver.ApplyHealing(-0.5f);
				user.ForceBlank(25f, 0.5f, false, true, (Vector2?)null, true, -1f);
				((PlayerItem)this).ForceApplyCooldown(user);
				if (num <= 20f)
				{
					PickupObject byName7 = PickupObjectDatabase.GetByName("Awake Cassette Tape");
					LootEngine.SpawnItem(((Component)byName7).gameObject, Vector2.op_Implicit(((GameActor)user).CenterPosition), Vector2.down, 0f, true, false, false);
					tapeCount++;
				}
			}
			else if (tapeCount >= 7)
			{
				((BraveBehaviour)user).healthHaver.ApplyHealing(-0.5f);
				user.ForceBlank(25f, 0.5f, false, true, (Vector2?)null, true, -1f);
				((PlayerItem)this).ForceApplyCooldown(user);
				tapeCount++;
				if (num <= 3f)
				{
					PickupObject byName8 = PickupObjectDatabase.GetByName("Awake Cassette Tape");
					LootEngine.SpawnItem(((Component)byName8).gameObject, Vector2.op_Implicit(((GameActor)user).CenterPosition), Vector2.down, 0f, true, false, false);
				}
				if (num <= 10f)
				{
					PickupObject byId = PickupObjectDatabase.GetById(120);
					LootEngine.SpawnItem(((Component)byId).gameObject, Vector2.op_Implicit(((GameActor)user).CenterPosition), Vector2.down, 0f, true, false, false);
				}
			}
		}

		public override bool CanBeUsed(PlayerController user)
		{
			return ((BraveBehaviour)user).healthHaver.GetCurrentHealth() > 1f;
		}
	}
	internal class TapePlayer : PassiveItem
	{
		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			string text = "Tape Player";
			string text2 = "Receiver_Expansion/Resources/tape_player";
			GameObject val = new GameObject(text);
			TapePlayer tapePlayer = val.AddComponent<TapePlayer>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Mind-Tech";
			string text4 = "A steady Cassette Player at your side, reliable as always. Firearms are always deadly, a new Receiver might not be accustom to operating one though.\n\nInsert a tape and press play. Our teachings will aid you in your battle, in the ever growing battle against The Threat.\nAdds 1 Heart Container. Increases Coolness and Damage, reduces accuracy and rate of fire.\n\nThis is added by the Receiver Expansion mod.";
			ItemBuilder.SetupItem((PickupObject)(object)tapePlayer, text3, text4, "receiver");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)tapePlayer, (StatType)3, 1f, (ModifyMethod)0);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)tapePlayer, (StatType)4, 1f, (ModifyMethod)0);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)tapePlayer, (StatType)5, 1.15f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)tapePlayer, (StatType)2, 1.25f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)tapePlayer, (StatType)1, 0.6f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)tapePlayer, (StatType)22, 1.25f, (ModifyMethod)1);
			((PickupObject)tapePlayer).quality = (ItemQuality)(-50);
			((PickupObject)tapePlayer).CanBeDropped = false;
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).DisplayName);
		}

		public override DebrisObject Drop(PlayerController player)
		{
			return ((PassiveItem)this).Drop(player);
		}

		public override void DisableEffect(PlayerController player)
		{
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).DisplayName);
		}
	}
}