Decompiled source of Let Us Cook v1.0.3

LetUsMod.dll

Decompiled 7 months 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 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]
namespace LetUsMod
{
	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);
			}
		}
	}
}
namespace Mod
{
	public class BrocChed : GunBehaviour
	{
		private bool HasReloaded;

		public static void Add()
		{
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Cheddar Broccoli Berreta", "broc");
			Game.Items.Rename("outdated_gun_mods:cheddar_broccoli_berreta", "kp:cheddar_broccoli_berreta");
			((Component)val).gameObject.AddComponent<BrocChed>();
			GunExt.SetShortDescription((PickupObject)(object)val, "A classic combo");
			GunExt.SetLongDescription((PickupObject)(object)val, "a Cheedar and Broccoli gun, Pretty simple.");
			PickupObject byId = PickupObjectDatabase.GetById(56);
			GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false);
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "broc_idle_001", 1);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 1);
			val.DefaultModule.ammoCost = 1;
			val.DefaultModule.shootStyle = (ShootStyle)0;
			val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0;
			val.reloadTime = 1.1f;
			val.DefaultModule.cooldownTime = 0.1f;
			val.DefaultModule.numberOfShotsInClip = 6;
			val.SetBaseMaxAmmo(500);
			((PickupObject)val).quality = (ItemQuality)3;
			((BraveBehaviour)val).encounterTrackable.EncounterGuid = "This Is Different Than the last one";
			Projectile val2 = Object.Instantiate<Projectile>(val.DefaultModule.projectiles[0]);
			((Component)val2).gameObject.SetActive(false);
			FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject);
			Object.DontDestroyOnLoad((Object)(object)val2);
			val2.baseData.damage = 5f;
			val2.baseData.speed = 6.7f;
			((BraveBehaviour)val2).transform.parent = val.barrelOffset;
			val.DefaultModule.projectiles[0] = val2;
			GunTools.SetProjectileSpriteRight(val2, "broc_fire_001", 8, 8, true, (Anchor)4, (int?)6, (int?)6, true, false, (int?)null, (int?)null, (Projectile)null);
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
		}

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

		protected 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 bSOMETHING)
		{
			if (gun.IsReloading && HasReloaded)
			{
				HasReloaded = false;
				AkSoundEngine.PostEvent("Stop_WPN_All", ((Component)this).gameObject);
				((GunBehaviour)this).OnReloadPressed(player, gun, bSOMETHING);
				AkSoundEngine.PostEvent("Play_WPN_SAA_reload_01", ((Component)this).gameObject);
			}
		}
	}
	public class CupcakeCannon : GunBehaviour
	{
		private bool HasReloaded;

		public static void Add()
		{
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Cup Cake Cannon", "cup");
			Game.Items.Rename("outdated_gun_mods:cup_cake_cannon", "kp:cup_cake_cannon");
			((Component)val).gameObject.AddComponent<CupcakeCannon>();
			GunExt.SetShortDescription((PickupObject)(object)val, "CUP CAKE");
			GunExt.SetLongDescription((PickupObject)(object)val, "A gun left out on a slice of CUPCAKE, the pizza has rotted away but the meat looks like it's fresh.");
			PickupObject byId = PickupObjectDatabase.GetById(56);
			GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false);
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "cup_idle_001", 1);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 1);
			val.DefaultModule.ammoCost = 1;
			val.DefaultModule.shootStyle = (ShootStyle)0;
			val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0;
			val.reloadTime = 1.1f;
			val.DefaultModule.cooldownTime = 0.1f;
			val.DefaultModule.numberOfShotsInClip = 6;
			val.SetBaseMaxAmmo(250);
			((PickupObject)val).quality = (ItemQuality)1;
			((BraveBehaviour)val).encounterTrackable.EncounterGuid = "cupc";
			Projectile val2 = Object.Instantiate<Projectile>(val.DefaultModule.projectiles[0]);
			((Component)val2).gameObject.SetActive(false);
			FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject);
			Object.DontDestroyOnLoad((Object)(object)val2);
			val2.baseData.damage = 5f;
			val2.baseData.speed = 6.7f;
			((BraveBehaviour)val2).transform.parent = val.barrelOffset;
			val.DefaultModule.projectiles[0] = val2;
			GunTools.SetProjectileSpriteRight(val2, "cup_fire_001", 8, 8, true, (Anchor)4, (int?)6, (int?)6, true, false, (int?)null, (int?)null, (Projectile)null);
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
		}

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

		protected 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 bSOMETHING)
		{
			if (gun.IsReloading && HasReloaded)
			{
				HasReloaded = false;
				AkSoundEngine.PostEvent("Stop_WPN_All", ((Component)this).gameObject);
				((GunBehaviour)this).OnReloadPressed(player, gun, bSOMETHING);
				AkSoundEngine.PostEvent("Play_WPN_SAA_reload_01", ((Component)this).gameObject);
			}
		}
	}
	public class PeporoniSlicer : GunBehaviour
	{
		private bool HasReloaded;

		public static void Add()
		{
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Peporoni Slicer", "pep");
			Game.Items.Rename("outdated_gun_mods:peporoni_slicer", "kp:pepporoni_slicer");
			((Component)val).gameObject.AddComponent<PeporoniSlicer>();
			GunExt.SetShortDescription((PickupObject)(object)val, "Mamma Mai");
			GunExt.SetLongDescription((PickupObject)(object)val, "A gun left out on a slice of pizza, the pizza has rotted away but the meat looks like it's fresh.");
			PickupObject byId = PickupObjectDatabase.GetById(56);
			GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false);
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "pep_idle_001", 1);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 1);
			val.DefaultModule.ammoCost = 1;
			val.DefaultModule.shootStyle = (ShootStyle)0;
			val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0;
			val.reloadTime = 1.1f;
			val.DefaultModule.cooldownTime = 0.1f;
			val.DefaultModule.numberOfShotsInClip = 6;
			val.SetBaseMaxAmmo(250);
			((PickupObject)val).quality = (ItemQuality)1;
			((BraveBehaviour)val).encounterTrackable.EncounterGuid = "Pepo";
			Projectile val2 = Object.Instantiate<Projectile>(val.DefaultModule.projectiles[0]);
			((Component)val2).gameObject.SetActive(false);
			FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject);
			Object.DontDestroyOnLoad((Object)(object)val2);
			val2.baseData.damage = 5f;
			val2.baseData.speed = 6.7f;
			((BraveBehaviour)val2).transform.parent = val.barrelOffset;
			val.DefaultModule.projectiles[0] = val2;
			GunTools.SetProjectileSpriteRight(val2, "pep_fire_001", 8, 8, true, (Anchor)4, (int?)6, (int?)6, true, false, (int?)null, (int?)null, (Projectile)null);
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
		}

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

		protected 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 bSOMETHING)
		{
			if (gun.IsReloading && HasReloaded)
			{
				HasReloaded = false;
				AkSoundEngine.PostEvent("Stop_WPN_All", ((Component)this).gameObject);
				((GunBehaviour)this).OnReloadPressed(player, gun, bSOMETHING);
				AkSoundEngine.PostEvent("Play_WPN_SAA_reload_01", ((Component)this).gameObject);
			}
		}
	}
	internal class HealingBurger : PlayerItem
	{
		public static void Register()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			string text = "Healing Burger";
			string text2 = "LetUsMod/Resources/hamBurg";
			GameObject val = new GameObject(text);
			HealingBurger healingBurger = val.AddComponent<HealingBurger>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "yummy burger!";
			string text4 = "This burger will heal you,\n\nyou WILL HAVE A EXTRA HEART!";
			ItemBuilder.SetupItem((PickupObject)(object)healingBurger, text3, text4, "Item");
			ItemBuilder.SetCooldownType((PlayerItem)(object)healingBurger, (CooldownType)3, 0f);
			((PlayerItem)healingBurger).consumable = true;
		}

		public override void Pickup(PlayerController player)
		{
			((PlayerItem)this).Pickup(player);
		}

		public override void DoEffect(PlayerController user)
		{
			((BraveBehaviour)user).healthHaver.ApplyHealing(1f);
		}
	}
	public class BulkSpin : PassiveItem
	{
		public static void Register()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			string text = "Bulky Spinich";
			string text2 = "LetUsMod/Resources/bulkSpin";
			GameObject val = new GameObject(text);
			BulkSpin bulkSpin = val.AddComponent<BulkSpin>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "BULKY!";
			string text4 = "This Veggie will give you more than\n\nenough power to get you punching around the gungeon, \nslaying the jammed with POWER!";
			ItemBuilder.SetupItem((PickupObject)(object)bulkSpin, text3, text4, "Item");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)bulkSpin, (StatType)5, 1.5f, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)bulkSpin, (StatType)4, 1f, (ModifyMethod)0);
			((PickupObject)bulkSpin).quality = (ItemQuality)2;
		}

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

		public override void DisableEffect(PlayerController player)
		{
			Module.Log("Player dropped or got rid of " + ((PickupObject)this).DisplayName);
		}
	}
	public class SpeedCandy : PassiveItem
	{
		public static void Register()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			string text = "Speed Candy";
			string text2 = "LetUsMod/Resources/speed_candy_sprite";
			GameObject val = new GameObject(text);
			SpeedCandy speedCandy = val.AddComponent<SpeedCandy>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Sugar Rush!";
			string text4 = "This candy will give you more than\n\nenough energy to get you running around the gungeon, \nslaying the jammed with glee!";
			ItemBuilder.SetupItem((PickupObject)(object)speedCandy, text3, text4, "Item");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)speedCandy, (StatType)0, 3f, (ModifyMethod)0);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)speedCandy, (StatType)4, 1f, (ModifyMethod)0);
			((PickupObject)speedCandy).quality = (ItemQuality)2;
		}

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

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

		public const string NAME = "LetUsCookInTheDungeon";

		public const string VERSION = "1.0.0";

		public const string TEXT_COLOR = "#00FFFF";

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

		public void GMStart(GameManager g)
		{
			SpeedCandy.Register();
			SpicyPepper.Register();
			HealingBurger.Register();
			BulkSpin.Register();
			PeporoniSlicer.Add();
			BrocChed.Add();
			CupcakeCannon.Add();
			Log("LetUsCookInTheDungeon v1.0.0 started successfully.", "#00FFFF");
		}

		public static void Log(string text, string color = "#FFFFFF")
		{
			ETGModConsole.Log((object)("<color=" + color + ">" + text + "</color>"), false);
		}
	}
	internal class SpicyPepper : PlayerItem
	{
		public static void Register()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			string text = "Spicy Pepper";
			string text2 = "LetUsMod/Resources/spicy_pepper";
			GameObject val = new GameObject(text);
			SpicyPepper spicyPepper = val.AddComponent<SpicyPepper>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "OOW HOT HOT HOT!";
			string text4 = "This pepper may burn your tounge,\n\nbut you will permently deal more damage for your pain!";
			ItemBuilder.SetupItem((PickupObject)(object)spicyPepper, text3, text4, "Item");
			ItemBuilder.SetCooldownType((PlayerItem)(object)spicyPepper, (CooldownType)3, 0f);
			((PlayerItem)spicyPepper).consumable = true;
		}

		public override void Pickup(PlayerController player)
		{
			((PlayerItem)this).Pickup(player);
		}

		public override void DoEffect(PlayerController user)
		{
			((BraveBehaviour)user).healthHaver.ApplyHealing(-0.5f);
		}
	}
}