Decompiled source of Quantum v1.0.1

plugins/Quantum/Quantum.dll

Decompiled 13 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using HG;
using Microsoft.CodeAnalysis;
using On.RoR2;
using Quantum.Configuration;
using Quantum.Equipment;
using Quantum.Items;
using R2API;
using R2API.Utils;
using Rewired.ComponentControls.Effects;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.ContentManagement;
using RoR2.ExpansionManagement;
using RoR2.Orbs;
using RoR2BepInExPack.GameAssetPaths.Version_1_39_0;
using TMPro;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.ResourceManagement.AsyncOperations;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Quantum")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+8030880c1ec6444f3ed6c084584478b18d3b64c8")]
[assembly: AssemblyProduct("Quantum")]
[assembly: AssemblyTitle("Quantum")]
[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.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[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 Quantum
{
	public class Compat
	{
		private static bool? _riskOfOptions;

		public static bool RiskOfOptions
		{
			get
			{
				if (!_riskOfOptions.HasValue)
				{
					_riskOfOptions = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions");
				}
				return _riskOfOptions.Value;
			}
		}
	}
	public static class Helpers
	{
		public static GameObject PrepareItemDisplayModel(GameObject itemDisplayModel)
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			ItemDisplay val = itemDisplayModel.AddComponent<ItemDisplay>();
			List<RendererInfo> list = new List<RendererInfo>();
			Renderer[] componentsInChildren = itemDisplayModel.GetComponentsInChildren<Renderer>();
			foreach (Renderer val2 in componentsInChildren)
			{
				RendererInfo val3 = default(RendererInfo);
				val3.renderer = val2;
				val3.defaultMaterial = val2.material;
				RendererInfo item = val3;
				list.Add(item);
			}
			val.rendererInfos = list.ToArray();
			return itemDisplayModel;
		}
	}
	internal static class Log
	{
		private static ManualLogSource _logSource;

		internal static void Init(ManualLogSource logSource)
		{
			_logSource = logSource;
		}

		internal static void Debug(object data)
		{
			_logSource.LogDebug(data);
		}

		internal static void Error(object data)
		{
			_logSource.LogError(data);
		}

		internal static void Fatal(object data)
		{
			_logSource.LogFatal(data);
		}

		internal static void Info(object data)
		{
			_logSource.LogInfo(data);
		}

		internal static void Message(object data)
		{
			_logSource.LogMessage(data);
		}

		internal static void Warning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
	[BepInPlugin("com.Hex3.Quantum", "Quantum", "1.0.1")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	public class Main : BaseUnityPlugin
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_OnMainMenuControllerInitialized <>9__7_0;

			internal void <Awake>b__7_0(orig_OnMainMenuControllerInitialized orig, RoR2Application self)
			{
				EquipInit.FormatDescriptions();
				ItemInit.FormatDescriptions();
				orig.Invoke(self);
			}
		}

		public const string QUANTUM_GUID = "com.Hex3.Quantum";

		public const string QUANTUM_NAME = "Quantum";

		public const string QUANTUM_VER = "1.0.1";

		public static Main Instance;

		public static ExpansionDef Expansion;

		public static AssetBundle Assets;

		public static ConfigEntry<bool> Config_Enabled;

		public void Awake()
		{
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Expected O, but got Unknown
			//IL_008d: Expected O, but got Unknown
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Expected O, but got Unknown
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Expected O, but got Unknown
			Log.Init(((BaseUnityPlugin)this).Logger);
			Log.Info("Init Quantum 1.0.1");
			Instance = this;
			Log.Info("Creating assets...");
			using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Quantum.quantumvfx"))
			{
				Assets = AssetBundle.LoadFromStream(stream);
			}
			Log.Info("Creating config...");
			Config_Enabled = ((BaseUnityPlugin)Instance).Config.Bind<bool>(new ConfigDefinition("CONFIG - IMPORTANT", "Enable custom config"), false, new ConfigDescription("Set to 'true' to enable custom configuration for this mod. False by default to allow balance changes to take effect.", (AcceptableValueBase)null, Array.Empty<object>()));
			if (Compat.RiskOfOptions)
			{
				Log.Info("Detected RiskOfOptions");
				ModSettingsManager.SetModDescription("Adds new vanilla-style equipment.");
				ModSettingsManager.SetModIcon(Assets.LoadAsset<Sprite>("Assets/icons/expansion.png"));
				ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Config_Enabled, true));
			}
			Log.Info("Creating expansion...");
			Expansion = ScriptableObject.CreateInstance<ExpansionDef>();
			((Object)Expansion).name = "Quantum";
			Expansion.nameToken = "QT_EXPANSION_NAME";
			Expansion.descriptionToken = "QT_EXPANSION_DESC";
			Expansion.iconSprite = Assets.LoadAsset<Sprite>("Assets/icons/expansionQt.png");
			Expansion.disabledIconSprite = Assets.LoadAsset<Sprite>("Assets/icons/expansionQt-inactive.png");
			Expansion.requiredEntitlement = null;
			ContentAddition.AddExpansionDef(Expansion);
			Log.Info("Creating equipments...");
			EquipInit.Init();
			Log.Info("Creating items...");
			ItemInit.Init();
			object obj = <>c.<>9__7_0;
			if (obj == null)
			{
				hook_OnMainMenuControllerInitialized val = delegate(orig_OnMainMenuControllerInitialized orig, RoR2Application self)
				{
					EquipInit.FormatDescriptions();
					ItemInit.FormatDescriptions();
					orig.Invoke(self);
				};
				<>c.<>9__7_0 = val;
				obj = (object)val;
			}
			RoR2Application.OnMainMenuControllerInitialized += (hook_OnMainMenuControllerInitialized)obj;
			Log.Info("Done");
		}
	}
}
namespace Quantum.Items
{
	public static class ItemInit
	{
		public static DroneScrapCommon DroneScrapCommon;

		public static DroneScrapLegendary DroneScrapLegendary;

		public static DroneScrapUncommon DroneScrapUncommon;

		private static List<ItemBase> _itemList;

		public static List<ItemBase> ItemList
		{
			get
			{
				if (_itemList == null)
				{
					_itemList = new List<ItemBase>();
				}
				return _itemList;
			}
			set
			{
				_itemList = value;
			}
		}

		public static void Init()
		{
			foreach (ItemBase item in ItemList)
			{
				if (item.RegisterItem())
				{
					Log.Info("Added definition for item " + item.Name);
					item.RegisterHooks();
				}
			}
		}

		public static void FormatDescriptions()
		{
			foreach (ItemBase item in ItemList)
			{
				if (item.Enabled)
				{
					item.FormatDescriptionTokens();
				}
			}
		}

		static ItemInit()
		{
			ItemTag[] array = new ItemTag[5];
			RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			DroneScrapCommon = new DroneScrapCommon("DroneScrapCommon", (ItemTag[])(object)array, (ItemTier)0);
			ItemTag[] array2 = new ItemTag[5];
			RuntimeHelpers.InitializeArray(array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			DroneScrapLegendary = new DroneScrapLegendary("DroneScrapLegendary", (ItemTag[])(object)array2, (ItemTier)2);
			ItemTag[] array3 = new ItemTag[5];
			RuntimeHelpers.InitializeArray(array3, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			DroneScrapUncommon = new DroneScrapUncommon("DroneScrapUncommon", (ItemTag[])(object)array3, (ItemTier)1);
		}
	}
	public class DroneScrapCommon : ItemBase
	{
		public override bool Enabled => DroneScrap.DroneScrap_Enabled.Value;

		public override GameObject itemPrefab => OverwritePrefabMaterials();

		public Material material0 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/goolake/matGoolakeStoneTrimLightSand.mat").WaitForCompletion();

		public Material material1 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Drones/matBackupDrone.mat").WaitForCompletion();

		public Material material2 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/GoldOnHit/matBoneCrown.mat").WaitForCompletion();

		public Material material3 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Titan/matTitan.mat").WaitForCompletion();

		public Material material4 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC3/Drone Tech/Dronetech_glow2.mat").WaitForCompletion();

		public Material material5 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Vagrant/matVagrantCannonGreen.mat").WaitForCompletion();

		public Material material6 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Vagrant/matVagrantCannonRed.mat").WaitForCompletion();

		public Material material7 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/Common/matVoidmetalTrim.mat").WaitForCompletion();

		public Material material8 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/LunarDagger/matLunarDagger.mat").WaitForCompletion();

		public override Sprite itemIcon => Main.Assets.LoadAsset<Sprite>("Assets/icons/droneScrapItemCommon.png");

		public DroneScrapCommon(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false)
			: base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden)
		{
		}//IL_0003: Unknown result type (might be due to invalid IL or missing references)


		public GameObject OverwritePrefabMaterials()
		{
			GameObject val = Main.Assets.LoadAsset<GameObject>("Assets/prefabs/droneScrapItem1.prefab");
			Material[] materialArray = (Material[])(object)new Material[9] { material0, material1, material2, material3, material4, material5, material6, material7, material8 };
			((Renderer)val.GetComponentInChildren<MeshRenderer>()).SetMaterialArray(materialArray);
			return val;
		}

		public override void FormatDescriptionTokens()
		{
			string descriptionToken = ItemDef.descriptionToken;
			string pickupToken = ItemDef.pickupToken;
			LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), DroneScrap.DroneScrap_CommonItemsNeeded.Value));
			LanguageAPI.AddOverlay(pickupToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(pickupToken), DroneScrap.DroneScrap_CommonItemsNeeded.Value));
		}

		public override void RegisterHooks()
		{
		}
	}
	public class DroneScrapLegendary : ItemBase
	{
		public override bool Enabled => DroneScrap.DroneScrap_Enabled.Value;

		public override GameObject itemPrefab => OverwritePrefabMaterials();

		public Material material0 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/goolake/matGoolakeStoneTrimLightSand.mat").WaitForCompletion();

		public Material material1 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Drones/matBackupDrone.mat").WaitForCompletion();

		public Material material2 => Addressables.LoadAssetAsync<Material>((object)"RoR2/GlobalContent/matArtifact.mat").WaitForCompletion();

		public Material material3 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Titan/matTitan.mat").WaitForCompletion();

		public Material material4 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/voidstage/matVoidAsteroid.mat").WaitForCompletion();

		public Material material5 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Vagrant/matVagrantCannonGreen.mat").WaitForCompletion();

		public Material material6 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Vagrant/matVagrantCannonRed.mat").WaitForCompletion();

		public Material material7 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/Common/matVoidmetalTrim.mat").WaitForCompletion();

		public Material material8 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/LunarDagger/matLunarDagger.mat").WaitForCompletion();

		public override Sprite itemIcon => Main.Assets.LoadAsset<Sprite>("Assets/icons/droneScrapItemLegendary.png");

		public DroneScrapLegendary(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false)
			: base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden)
		{
		}//IL_0003: Unknown result type (might be due to invalid IL or missing references)


		public GameObject OverwritePrefabMaterials()
		{
			GameObject val = Main.Assets.LoadAsset<GameObject>("Assets/prefabs/droneScrapItem3.prefab");
			Material[] materialArray = (Material[])(object)new Material[9] { material0, material1, material2, material3, material4, material5, material6, material7, material8 };
			((Renderer)val.GetComponentInChildren<MeshRenderer>()).SetMaterialArray(materialArray);
			return val;
		}

		public override void FormatDescriptionTokens()
		{
			string descriptionToken = ItemDef.descriptionToken;
			string pickupToken = ItemDef.pickupToken;
			LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), DroneScrap.DroneScrap_LegendaryItemsNeeded.Value));
			LanguageAPI.AddOverlay(pickupToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(pickupToken), DroneScrap.DroneScrap_CommonItemsNeeded.Value));
		}

		public override void RegisterHooks()
		{
		}
	}
	public class DroneScrapUncommon : ItemBase
	{
		public override bool Enabled => DroneScrap.DroneScrap_Enabled.Value;

		public override GameObject itemPrefab => OverwritePrefabMaterials();

		public Material material0 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/goolake/matGoolakeStoneTrimLightSand.mat").WaitForCompletion();

		public Material material1 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Drones/matBackupDrone.mat").WaitForCompletion();

		public Material material2 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Clover/matClover.mat").WaitForCompletion();

		public Material material3 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Titan/matTitan.mat").WaitForCompletion();

		public Material material4 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/MultiShopEquipmentTerminal/matMultishopEquipment.mat").WaitForCompletion();

		public Material material5 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Vagrant/matVagrantCannonGreen.mat").WaitForCompletion();

		public Material material6 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Vagrant/matVagrantCannonRed.mat").WaitForCompletion();

		public Material material7 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/Common/matVoidmetalTrim.mat").WaitForCompletion();

		public Material material8 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/LunarDagger/matLunarDagger.mat").WaitForCompletion();

		public override Sprite itemIcon => Main.Assets.LoadAsset<Sprite>("Assets/icons/droneScrapItemUncommon.png");

		public DroneScrapUncommon(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove = true, bool _isConsumed = false, bool _hidden = false)
			: base(_name, _tags, _tier, _canRemove, _isConsumed, _hidden)
		{
		}//IL_0003: Unknown result type (might be due to invalid IL or missing references)


		public GameObject OverwritePrefabMaterials()
		{
			GameObject val = Main.Assets.LoadAsset<GameObject>("Assets/prefabs/droneScrapItem2.prefab");
			Material[] materialArray = (Material[])(object)new Material[9] { material0, material1, material2, material3, material4, material5, material6, material7, material8 };
			((Renderer)val.GetComponentInChildren<MeshRenderer>()).SetMaterialArray(materialArray);
			return val;
		}

		public override void FormatDescriptionTokens()
		{
			string descriptionToken = ItemDef.descriptionToken;
			string pickupToken = ItemDef.pickupToken;
			LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), DroneScrap.DroneScrap_UncommonItemsNeeded.Value));
			LanguageAPI.AddOverlay(pickupToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(pickupToken), DroneScrap.DroneScrap_CommonItemsNeeded.Value));
		}

		public override void RegisterHooks()
		{
		}
	}
	public abstract class ItemBase
	{
		public ItemDef ItemDef;

		public string Name;

		public ItemTag[] Tags;

		public ItemTier Tier;

		public bool CanRemove;

		public bool IsConsumed;

		public bool Hidden;

		public ItemIndex ItemIndex => ItemCatalog.FindItemIndex(((Object)ItemDef).name);

		public abstract bool Enabled { get; }

		public abstract GameObject itemPrefab { get; }

		public abstract Sprite itemIcon { get; }

		public ItemBase(string _name, ItemTag[] _tags, ItemTier _tier, bool _canRemove, bool _isConsumed, bool _hidden)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			Name = _name;
			Tags = _tags;
			Tier = _tier;
			CanRemove = _canRemove;
			IsConsumed = _isConsumed;
			Hidden = _hidden;
			ItemInit.ItemList.Add(this);
		}

		public bool RegisterItem()
		{
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Expected O, but got Unknown
			if (!Enabled)
			{
				return Enabled;
			}
			ItemDef = ScriptableObject.CreateInstance<ItemDef>();
			((Object)ItemDef).name = Name;
			ItemDef.nameToken = "QT_ITEM_" + Name.ToUpper() + "_NAME";
			ItemDef.pickupToken = "QT_ITEM_" + Name.ToUpper() + "_PICKUP";
			ItemDef.descriptionToken = "QT_ITEM_" + Name.ToUpper() + "_DESC";
			ItemDef.loreToken = "QT_ITEM_" + Name.ToUpper() + "_LORE";
			ItemDef.tags = Tags;
			ItemDef.tier = Tier;
			ItemDef.deprecatedTier = Tier;
			ItemDef.canRemove = CanRemove;
			ItemDef.isConsumed = IsConsumed;
			ItemDef.hidden = Hidden;
			ItemDef.requiredExpansion = Main.Expansion;
			ItemDef.pickupModelPrefab = itemPrefab;
			ItemDef.pickupIconSprite = itemIcon;
			if (Object.op_Implicit((Object)(object)itemPrefab))
			{
				Transform child = itemPrefab.transform.GetChild(0);
				ModelPanelParameters val = itemPrefab.AddComponent<ModelPanelParameters>();
				val.minDistance = 1f;
				val.maxDistance = 2f;
				val.focusPointTransform = child;
				val.cameraPositionTransform = child;
			}
			ItemAPI.Add(new CustomItem(ItemDef, Array.Empty<ItemDisplayRule>()));
			return Enabled;
		}

		public int GetItemCountEffective(CharacterBody body)
		{
			int result = 0;
			if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory))
			{
				result = body.inventory.GetItemCountEffective(ItemDef);
			}
			return result;
		}

		public int GetItemCountPermanent(CharacterBody body)
		{
			int result = 0;
			if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory))
			{
				result = body.inventory.GetItemCountPermanent(ItemDef);
			}
			return result;
		}

		public abstract void FormatDescriptionTokens();

		public abstract void RegisterHooks();
	}
}
namespace Quantum.Equipment
{
	public static class EquipInit
	{
		public static DroneScrap DroneScrap = new DroneScrap("DroneScrap", canBeRandomlyTriggered: false, enigmaCompatible: false);

		private static List<EquipBase> _equipList;

		public static Microwave Microwave = new Microwave("Microwave", canBeRandomlyTriggered: false, enigmaCompatible: false);

		public static Nullifier Nullifier = new Nullifier("Nullifier", canBeRandomlyTriggered: false, enigmaCompatible: false);

		public static List<EquipBase> EquipList
		{
			get
			{
				if (_equipList == null)
				{
					_equipList = new List<EquipBase>();
				}
				return _equipList;
			}
			set
			{
				_equipList = value;
			}
		}

		public static void Init()
		{
			foreach (EquipBase equip in EquipList)
			{
				if (equip.RegisterEquip())
				{
					Log.Info("Added definition for equipment " + equip.Name);
					equip.RegisterHooks();
				}
			}
		}

		public static void FormatDescriptions()
		{
			foreach (EquipBase equip in EquipList)
			{
				if (equip.Enabled)
				{
					equip.FormatDescriptionTokens();
				}
			}
		}
	}
	public class DroneScrap : EquipBase
	{
		public List<DroneDef> CommonDroneDefs = new List<DroneDef>
		{
			Addressables.LoadAssetAsync<DroneDef>((object)"RoR2/Base/Drones/Drone1.asset").WaitForCompletion(),
			Addressables.LoadAssetAsync<DroneDef>((object)"RoR2/Base/Drones/Drone2.asset").WaitForCompletion()
		};

		public List<DroneDef> CommonDroneDefsDLC3 = new List<DroneDef>
		{
			Addressables.LoadAssetAsync<DroneDef>((object)"RoR2/DLC3/Drones/JunkDrone.asset").WaitForCompletion(),
			Addressables.LoadAssetAsync<DroneDef>((object)"RoR2/DLC3/Drones/HaulerDrone.asset").WaitForCompletion()
		};

		public List<DroneDef> UncommonDroneDefs = new List<DroneDef>
		{
			Addressables.LoadAssetAsync<DroneDef>((object)"RoR2/Base/Drones/FlameDrone.asset").WaitForCompletion(),
			Addressables.LoadAssetAsync<DroneDef>((object)"RoR2/Base/Drones/MissileDrone.asset").WaitForCompletion(),
			Addressables.LoadAssetAsync<DroneDef>((object)"RoR2/Base/Drones/EmergencyDrone.asset").WaitForCompletion(),
			Addressables.LoadAssetAsync<DroneDef>((object)"RoR2/Base/Drones/EquipmentDrone.asset").WaitForCompletion()
		};

		public List<DroneDef> UncommonDroneDefsDLC3 = new List<DroneDef>
		{
			Addressables.LoadAssetAsync<DroneDef>((object)"RoR2/DLC3/Drones/CleanupDrone.asset").WaitForCompletion(),
			Addressables.LoadAssetAsync<DroneDef>((object)"RoR2/DLC3/Drones/RechargeDrone.asset").WaitForCompletion(),
			Addressables.LoadAssetAsync<DroneDef>((object)"RoR2/DLC3/Drones/JailerDrone.asset").WaitForCompletion()
		};

		public List<DroneDef> LegendaryDroneDefs = new List<DroneDef> { Addressables.LoadAssetAsync<DroneDef>((object)"RoR2/Base/Drones/MegaDrone.asset").WaitForCompletion() };

		public List<DroneDef> LegendaryDroneDefsDLC3 = new List<DroneDef>
		{
			Addressables.LoadAssetAsync<DroneDef>((object)"RoR2/DLC3/Drones/CopycatDrone.asset").WaitForCompletion(),
			Addressables.LoadAssetAsync<DroneDef>((object)"RoR2/DLC3/Drones/BombardmentDrone.asset").WaitForCompletion()
		};

		private GameObject _indicatorPrefab = null;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private GameObject <IndicatorPrefab>k__BackingField;

		public static ConfigItem<bool> DroneScrap_Enabled = new ConfigItem<bool>("Equipment: Build It Kit", "Equipment enabled", "Should this equipment appear in runs?", _defaultValue: true);

		public static ConfigItem<float> DroneScrap_Cooldown = new ConfigItem<float>("Equipment: Build It Kit", "Equipment cooldown", "Seconds until the equipment cooldown is finished.", 45f, 1f, 120f, 1f);

		public static ConfigItem<int> DroneScrap_CommonItemsNeeded = new ConfigItem<int>("Equipment: Build It Kit", "Common items per drone", "Required items for a common drone to be fabricated.", 2, 1f, 5f, 1f);

		public static ConfigItem<int> DroneScrap_UncommonItemsNeeded = new ConfigItem<int>("Equipment: Build It Kit", "Uncommon items per drone", "Required items for an uncommon drone to be fabricated.", 2, 1f, 5f, 1f);

		public static ConfigItem<int> DroneScrap_LegendaryItemsNeeded = new ConfigItem<int>("Equipment: Build It Kit", "Legendary items per drone", "Required items for a legendary drone to be fabricated.", 1, 1f, 5f, 1f);

		public override bool Enabled => DroneScrap_Enabled.Value;

		public override float Cooldown => DroneScrap_Cooldown.Value;

		public override GameObject equipPrefab => OverwritePrefabMaterials();

		public override Sprite equipIcon => Main.Assets.LoadAsset<Sprite>("Assets/icons/droneScrapEquip.png");

		public Material material0 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/goolake/matGoolakeStoneTrimLightSand.mat").WaitForCompletion();

		public Material material1 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Drones/matBackupDrone.mat").WaitForCompletion();

		public Material material2 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/GoldOnHit/matBoneCrown.mat").WaitForCompletion();

		public Material material3 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Titan/matTitan.mat").WaitForCompletion();

		public Material material4 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC3/Drone Tech/Dronetech_glow2.mat").WaitForCompletion();

		public Material material5 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Vagrant/matVagrantCannonGreen.mat").WaitForCompletion();

		public Material material6 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Vagrant/matVagrantCannonRed.mat").WaitForCompletion();

		public Material material7 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/Common/matVoidmetalTrim.mat").WaitForCompletion();

		public Material material8 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/LunarDagger/matLunarDagger.mat").WaitForCompletion();

		public Material material9 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/voidstage/matVoidTerrain.mat").WaitForCompletion();

		public Material material10 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/MultiShopEquipmentTerminal/matMultishopEquipment.mat").WaitForCompletion();

		public Material material11 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC3/Drones/bombardmentMat.mat").WaitForCompletion();

		public ExpansionDef alloyedExpansion => Addressables.LoadAssetAsync<ExpansionDef>((object)"RoR2/DLC3/DLC3.asset").WaitForCompletion();

		public GameObject IndicatorPrefab
		{
			get
			{
				if ((Object)(object)_indicatorPrefab == (Object)null)
				{
					_indicatorPrefab = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/RecyclerIndicator"), "droneScrapIndicatorPrefab", false);
				}
				return _indicatorPrefab;
			}
			[CompilerGenerated]
			set
			{
				<IndicatorPrefab>k__BackingField = value;
			}
		}

		public DroneScrap(string _name, bool canBeRandomlyTriggered = true, bool enigmaCompatible = true)
			: base(_name, canBeRandomlyTriggered, enigmaCompatible)
		{
		}//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: 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_0062: Unknown result type (might be due to invalid IL or missing references)
		//IL_0067: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: 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_009f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fa: 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_0127: Unknown result type (might be due to invalid IL or missing references)
		//IL_012c: Unknown result type (might be due to invalid IL or missing references)
		//IL_014b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0150: Unknown result type (might be due to invalid IL or missing references)
		//IL_016f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0174: Unknown result type (might be due to invalid IL or missing references)
		//IL_0188: Unknown result type (might be due to invalid IL or missing references)
		//IL_018d: Unknown result type (might be due to invalid IL or missing references)


		public GameObject OverwritePrefabMaterials()
		{
			GameObject val = Main.Assets.LoadAsset<GameObject>("Assets/prefabs/droneScrapEquip.prefab");
			Material[] materialArray = (Material[])(object)new Material[12]
			{
				material0, material1, material2, material3, material4, material5, material6, material7, material8, material9,
				material10, material11
			};
			((Renderer)val.GetComponentInChildren<MeshRenderer>()).SetMaterialArray(materialArray);
			return val;
		}

		public override void FormatDescriptionTokens()
		{
			string descriptionToken = EquipmentDef.descriptionToken;
			LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), DroneScrap_CommonItemsNeeded.Value, DroneScrap_UncommonItemsNeeded.Value, DroneScrap_LegendaryItemsNeeded.Value));
		}

		public override void RegisterHooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			EquipmentSlot.UpdateTargets += (hook_UpdateTargets)delegate(orig_UpdateTargets orig, EquipmentSlot self, EquipmentIndex equipmentIndex, bool userShouldAnticipateTarget)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_0174: Unknown result type (might be due to invalid IL or missing references)
				//IL_0026: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_0078: Unknown result type (might be due to invalid IL or missing references)
				//IL_007d: 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_0081: 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_00a2: Invalid comparison between Unknown and I4
				//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00dc: Invalid comparison between Unknown and I4
				//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
				//IL_0107: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e6: Invalid comparison between Unknown and I4
				//IL_0110: 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)
				if (equipmentIndex == base.EquipmentIndex && (float)self.stock > 0f)
				{
					self.currentTarget = new UserTargetInfo(self.FindPickupController(self.GetAimRay(), 10f, 30f, true, false));
					GenericPickupController pickupController2 = self.currentTarget.pickupController;
					bool flag2 = false;
					if (Object.op_Implicit((Object)(object)pickupController2) && Object.op_Implicit((Object)(object)self.currentTarget.transformToIndicateAt))
					{
						UniquePickup pickup3 = pickupController2.pickup;
						PickupDef pickupDef2 = PickupCatalog.GetPickupDef(pickup3.pickupIndex);
						if (!((UniquePickup)(ref pickup3)).isTempItem && pickupDef2 != null && (int)pickupDef2.itemIndex != -1)
						{
							ItemDef itemDef2 = ItemCatalog.GetItemDef(pickupDef2.itemIndex);
							if (Object.op_Implicit((Object)(object)itemDef2) && ((int)itemDef2.tier == 0 || (int)itemDef2.tier == 1 || (int)itemDef2.tier == 2) && itemDef2.itemIndex != ItemInit.DroneScrapCommon.ItemIndex && itemDef2.itemIndex != ItemInit.DroneScrapUncommon.ItemIndex && itemDef2.itemIndex != ItemInit.DroneScrapLegendary.ItemIndex)
							{
								flag2 = true;
								self.targetIndicator.visualizerPrefab = IndicatorPrefab;
							}
						}
					}
					self.targetIndicator.active = flag2;
					self.targetIndicator.targetTransform = (flag2 ? self.currentTarget.transformToIndicateAt : null);
				}
				else
				{
					orig.Invoke(self, equipmentIndex, userShouldAnticipateTarget);
				}
			};
			EquipmentSlot.PerformEquipmentAction += (hook_PerformEquipmentAction)delegate(orig_PerformEquipmentAction orig, EquipmentSlot self, EquipmentDef equipmentDef)
			{
				//IL_0048: Unknown result type (might be due to invalid IL or missing references)
				//IL_0074: Unknown result type (might be due to invalid IL or missing references)
				//IL_0079: Unknown result type (might be due to invalid IL or missing references)
				//IL_007b: Unknown result type (might be due to invalid IL or missing references)
				//IL_007d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0098: Unknown result type (might be due to invalid IL or missing references)
				//IL_009e: Invalid comparison between Unknown and I4
				//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e6: 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_00d2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d8: Invalid comparison between Unknown and I4
				//IL_0139: Unknown result type (might be due to invalid IL or missing references)
				//IL_013d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0142: 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_0146: Unknown result type (might be due to invalid IL or missing references)
				//IL_0148: Unknown result type (might be due to invalid IL or missing references)
				//IL_015b: Expected I4, but got Unknown
				//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
				//IL_0103: Unknown result type (might be due to invalid IL or missing references)
				//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e2: Invalid comparison between Unknown and I4
				//IL_0162: Unknown result type (might be due to invalid IL or missing references)
				//IL_0167: Unknown result type (might be due to invalid IL or missing references)
				//IL_0170: Unknown result type (might be due to invalid IL or missing references)
				//IL_0175: Unknown result type (might be due to invalid IL or missing references)
				//IL_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_010c: 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_018d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0192: Unknown result type (might be due to invalid IL or missing references)
				//IL_0196: Unknown result type (might be due to invalid IL or missing references)
				//IL_0198: Unknown result type (might be due to invalid IL or missing references)
				//IL_019d: Unknown result type (might be due to invalid IL or missing references)
				//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
				//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
				//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
				//IL_01ca: Expected O, but got Unknown
				if (!NetworkServer.active)
				{
					Debug.LogWarning((object)"[Server] function 'System.Boolean RoR2.EquipmentSlot::PerformEquipmentAction(RoR2.EquipmentDef)' called on client");
					return false;
				}
				if (self.equipmentDisabled)
				{
					return false;
				}
				if ((Object)(object)equipmentDef == (Object)(object)EquipmentDef)
				{
					self.UpdateTargets(base.EquipmentIndex, false);
					GenericPickupController pickupController = self.currentTarget.pickupController;
					if (Object.op_Implicit((Object)(object)pickupController))
					{
						UniquePickup pickup = pickupController.pickup;
						PickupDef pickupDef = PickupCatalog.GetPickupDef(pickup.pickupIndex);
						if (!((UniquePickup)(ref pickup)).isTempItem && pickupDef != null && (int)pickupDef.itemIndex != -1)
						{
							ItemDef itemDef = ItemCatalog.GetItemDef(pickupDef.itemIndex);
							if (Object.op_Implicit((Object)(object)itemDef) && ((int)itemDef.tier == 0 || (int)itemDef.tier == 1 || (int)itemDef.tier == 2) && itemDef.itemIndex != ItemInit.DroneScrapCommon.ItemIndex && itemDef.itemIndex != ItemInit.DroneScrapUncommon.ItemIndex && itemDef.itemIndex != ItemInit.DroneScrapLegendary.ItemIndex)
							{
								self.subcooldownTimer = 0.2f;
								ItemIndex val4 = (ItemIndex)(-1);
								ItemTier tier = itemDef.tier;
								ItemTier val5 = tier;
								switch ((int)val5)
								{
								case 0:
									val4 = ItemInit.DroneScrapCommon.ItemIndex;
									break;
								case 1:
									val4 = ItemInit.DroneScrapUncommon.ItemIndex;
									break;
								case 2:
									val4 = ItemInit.DroneScrapLegendary.ItemIndex;
									break;
								}
								UniquePickup pickup2 = pickupController.pickup;
								pickupController.pickup = ((UniquePickup)(ref pickup2)).WithPickupIndex(PickupCatalog.FindPickupIndex(val4));
								pickupController.ForcePickupDisplayUpdate();
								EffectData val6 = new EffectData
								{
									origin = ((Component)pickupController).transform.position
								};
								EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/OmniEffect/OmniRecycleEffect"), val6, true);
								return true;
							}
						}
					}
					return false;
				}
				return orig.Invoke(self, equipmentDef);
			};
			Inventory.GiveItemPermanent_ItemIndex_int += (hook_GiveItemPermanent_ItemIndex_int)delegate(orig_GiveItemPermanent_ItemIndex_int orig, Inventory self, ItemIndex itemIndex, int count)
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Unknown result type (might be due to invalid IL or missing references)
				//IL_006f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0080: 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_0038: Unknown result type (might be due to invalid IL or missing references)
				//IL_003e: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e5: 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_0045: 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_01b9: Unknown result type (might be due to invalid IL or missing references)
				//IL_01be: Unknown result type (might be due to invalid IL or missing references)
				//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
				//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
				//IL_01d8: 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_01f3: Unknown result type (might be due to invalid IL or missing references)
				//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
				//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
				//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
				//IL_0203: Unknown result type (might be due to invalid IL or missing references)
				//IL_0208: Unknown result type (might be due to invalid IL or missing references)
				//IL_0214: Unknown result type (might be due to invalid IL or missing references)
				//IL_021b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0227: Unknown result type (might be due to invalid IL or missing references)
				//IL_02c4: Unknown result type (might be due to invalid IL or missing references)
				//IL_02c9: Unknown result type (might be due to invalid IL or missing references)
				//IL_02cb: Unknown result type (might be due to invalid IL or missing references)
				//IL_02d8: Expected O, but got Unknown
				//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
				//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
				orig.Invoke(self, itemIndex, count);
				if (Object.op_Implicit((Object)(object)((Component)self).GetComponent<CharacterMaster>()) && Object.op_Implicit((Object)(object)((Component)self).GetComponent<CharacterMaster>().GetBody()) && (itemIndex == ItemInit.DroneScrapCommon.ItemIndex || itemIndex == ItemInit.DroneScrapUncommon.ItemIndex || itemIndex == ItemInit.DroneScrapLegendary.ItemIndex))
				{
					CharacterMaster component = ((Component)self).GetComponent<CharacterMaster>();
					CharacterBody body = component.GetBody();
					int itemCountPermanent = self.GetItemCountPermanent(itemIndex);
					bool flag = false;
					List<DroneDef> list = new List<DroneDef>();
					if (itemIndex == ItemInit.DroneScrapCommon.ItemDef.itemIndex)
					{
						flag = itemCountPermanent >= DroneScrap_CommonItemsNeeded.Value;
						list.AddRange(CommonDroneDefs);
						if (Run.instance.IsExpansionEnabled(alloyedExpansion))
						{
							list.AddRange(CommonDroneDefsDLC3);
						}
					}
					else if (itemIndex == ItemInit.DroneScrapUncommon.ItemDef.itemIndex)
					{
						flag = itemCountPermanent >= DroneScrap_UncommonItemsNeeded.Value;
						list.AddRange(UncommonDroneDefs);
						if (Run.instance.IsExpansionEnabled(alloyedExpansion))
						{
							list.AddRange(UncommonDroneDefsDLC3);
						}
					}
					else
					{
						flag = itemCountPermanent >= DroneScrap_LegendaryItemsNeeded.Value;
						list.AddRange(LegendaryDroneDefs);
						if (Run.instance.IsExpansionEnabled(alloyedExpansion))
						{
							list.AddRange(LegendaryDroneDefsDLC3);
						}
					}
					if (flag)
					{
						Util.ShuffleList<DroneDef>(list);
						DroneDef val = list.First();
						Log.Info(((Object)val).name);
						CharacterMaster val2 = new MasterSummon
						{
							masterPrefab = val.masterPrefab,
							position = new Vector3(body.corePosition.x, body.corePosition.y + 2f, body.corePosition.z),
							rotation = Quaternion.identity,
							summonerBodyObject = ((Component)body).gameObject,
							ignoreTeamMemberLimit = true,
							useAmbientLevel = true,
							enablePrintController = true
						}.Perform();
						if ((Object)(object)val == (Object)(object)DroneDefs.EquipmentDrone)
						{
							List<EquipmentDef> list2 = EquipmentCatalog.equipmentDefs.ToList();
							list2.RemoveAll((EquipmentDef def) => !def.canBeRandomlyTriggered);
							list2.RemoveAll((EquipmentDef def) => (int)def.equipmentIndex == -1);
							Util.ShuffleList<EquipmentDef>(list2);
							val2.inventory.SetEquipmentIndex(list2.First().equipmentIndex);
						}
						EffectData val3 = new EffectData
						{
							origin = body.corePosition
						};
						EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/OmniEffect/OmniRecycleEffect"), val3, true);
						self.RemoveItemPermanent(itemIndex, itemCountPermanent);
					}
				}
			};
		}

		public override ItemDisplayRuleDict CreateItemDisplayRules()
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Expected O, but got Unknown
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: 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_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: 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_0124: 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_013f: 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_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0227: Unknown result type (might be due to invalid IL or missing references)
			//IL_022c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0242: Unknown result type (might be due to invalid IL or missing references)
			//IL_0247: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Unknown result type (might be due to invalid IL or missing references)
			//IL_0267: Unknown result type (might be due to invalid IL or missing references)
			//IL_0268: Unknown result type (might be due to invalid IL or missing references)
			//IL_0283: Unknown result type (might be due to invalid IL or missing references)
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0312: Unknown result type (might be due to invalid IL or missing references)
			//IL_031b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0345: Unknown result type (might be due to invalid IL or missing references)
			//IL_034a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0360: 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_037b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0380: Unknown result type (might be due to invalid IL or missing references)
			//IL_0385: Unknown result type (might be due to invalid IL or missing references)
			//IL_0386: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_040a: Unknown result type (might be due to invalid IL or missing references)
			//IL_040f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0414: Unknown result type (might be due to invalid IL or missing references)
			//IL_0415: Unknown result type (might be due to invalid IL or missing references)
			//IL_0430: Unknown result type (might be due to invalid IL or missing references)
			//IL_0439: Unknown result type (might be due to invalid IL or missing references)
			//IL_0463: Unknown result type (might be due to invalid IL or missing references)
			//IL_0468: Unknown result type (might be due to invalid IL or missing references)
			//IL_047e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0483: Unknown result type (might be due to invalid IL or missing references)
			//IL_0499: Unknown result type (might be due to invalid IL or missing references)
			//IL_049e: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_050d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0512: Unknown result type (might be due to invalid IL or missing references)
			//IL_0528: Unknown result type (might be due to invalid IL or missing references)
			//IL_052d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0532: Unknown result type (might be due to invalid IL or missing references)
			//IL_0533: Unknown result type (might be due to invalid IL or missing references)
			//IL_054e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0557: Unknown result type (might be due to invalid IL or missing references)
			//IL_0581: Unknown result type (might be due to invalid IL or missing references)
			//IL_0586: Unknown result type (might be due to invalid IL or missing references)
			//IL_059c: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_05bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0610: Unknown result type (might be due to invalid IL or missing references)
			//IL_0615: Unknown result type (might be due to invalid IL or missing references)
			//IL_062b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0630: Unknown result type (might be due to invalid IL or missing references)
			//IL_0646: Unknown result type (might be due to invalid IL or missing references)
			//IL_064b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0650: Unknown result type (might be due to invalid IL or missing references)
			//IL_0651: Unknown result type (might be due to invalid IL or missing references)
			//IL_066c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0675: Unknown result type (might be due to invalid IL or missing references)
			//IL_069f: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_06bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06da: Unknown result type (might be due to invalid IL or missing references)
			//IL_06df: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0704: Unknown result type (might be due to invalid IL or missing references)
			//IL_072e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0733: Unknown result type (might be due to invalid IL or missing references)
			//IL_0749: Unknown result type (might be due to invalid IL or missing references)
			//IL_074e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0764: Unknown result type (might be due to invalid IL or missing references)
			//IL_0769: Unknown result type (might be due to invalid IL or missing references)
			//IL_076e: Unknown result type (might be due to invalid IL or missing references)
			//IL_076f: Unknown result type (might be due to invalid IL or missing references)
			//IL_078a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0793: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_07d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0819: Unknown result type (might be due to invalid IL or missing references)
			//IL_0822: Unknown result type (might be due to invalid IL or missing references)
			//IL_084c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0851: Unknown result type (might be due to invalid IL or missing references)
			//IL_0867: Unknown result type (might be due to invalid IL or missing references)
			//IL_086c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0882: Unknown result type (might be due to invalid IL or missing references)
			//IL_0887: Unknown result type (might be due to invalid IL or missing references)
			//IL_088c: Unknown result type (might be due to invalid IL or missing references)
			//IL_088d: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_08db: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_08fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0911: Unknown result type (might be due to invalid IL or missing references)
			//IL_0916: Unknown result type (might be due to invalid IL or missing references)
			//IL_091b: Unknown result type (might be due to invalid IL or missing references)
			//IL_091c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0937: Unknown result type (might be due to invalid IL or missing references)
			//IL_0940: Unknown result type (might be due to invalid IL or missing references)
			//IL_096a: Unknown result type (might be due to invalid IL or missing references)
			//IL_096f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0985: Unknown result type (might be due to invalid IL or missing references)
			//IL_098a: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_09aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_09c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_09cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_09f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_09fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a14: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a19: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a2f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a34: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a39: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a3a: Unknown result type (might be due to invalid IL or missing references)
			GameObject followerPrefab = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(ItemInit.DroneScrapCommon.itemPrefab, ((Object)EquipmentDef).name + "Display", false));
			ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>());
			val.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "Pelvis",
					localPos = new Vector3(0f, -4E-05f, 0.2538f),
					localAngles = new Vector3(0f, 0f, 180f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "Pelvis",
					localPos = new Vector3(0f, -0.0325f, 0.13983f),
					localAngles = new Vector3(306.028f, 0f, 180f),
					localScale = new Vector3(1f, 1f, 0.8f)
				}
			});
			val.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "Hat",
					localPos = new Vector3(-6E-05f, 0.06092f, -0.02317f),
					localAngles = new Vector3(339.2563f, 355.5712f, 1.6066f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "Chest",
					localPos = new Vector3(1E-05f, 0.47329f, -2.53093f),
					localAngles = new Vector3(0f, 180f, 0f),
					localScale = new Vector3(7.55081f, 7.55081f, 7.55081f)
				}
			});
			val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "Pelvis",
					localPos = new Vector3(0f, -2E-05f, 0.3979f),
					localAngles = new Vector3(0f, 270f, 180f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "Chest",
					localPos = new Vector3(0f, 8E-05f, -0.36404f),
					localAngles = new Vector3(0f, 270f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "Pelvis",
					localPos = new Vector3(0f, 0.07132f, 0.25553f),
					localAngles = new Vector3(0f, 270f, 180f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "Base",
					localPos = new Vector3(0f, -0.64104f, 0.06493f),
					localAngles = new Vector3(0f, 270f, 90.00002f),
					localScale = new Vector3(2.03188f, 2.03188f, 2.03188f)
				}
			});
			val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "Chest",
					localPos = new Vector3(0f, -1E-05f, -0.49876f),
					localAngles = new Vector3(0f, 270f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "Chest",
					localPos = new Vector3(0f, 1.92186f, 4.57324f),
					localAngles = new Vector3(68.10463f, 0f, 0f),
					localScale = new Vector3(7.38603f, 7.38603f, 7.38603f)
				}
			});
			val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "Pelvis",
					localPos = new Vector3(0f, 2E-05f, -0.2643f),
					localAngles = new Vector3(348.8108f, 180f, 180f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "FootR",
					localPos = new Vector3(1E-05f, 0.13002f, -0.07988f),
					localAngles = new Vector3(324.9968f, 180f, 180f),
					localScale = new Vector3(1f, 1f, 2.05424f)
				}
			});
			val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "Chest",
					localPos = new Vector3(1E-05f, 0.11035f, -0.35021f),
					localAngles = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			val.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "Pack",
					localPos = new Vector3(0.16809f, 0.06523f, -0.19531f),
					localAngles = new Vector3(315.5359f, 270f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			val.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "Pelvis",
					localPos = new Vector3(0f, 0.15214f, 0f),
					localAngles = new Vector3(0f, 180f, 0f),
					localScale = new Vector3(2.43958f, 1.63636f, 1.63636f)
				}
			});
			val.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "Chest",
					localPos = new Vector3(-1E-05f, -0.36478f, -0.19438f),
					localAngles = new Vector3(0f, 0f, 90f),
					localScale = new Vector3(1.19805f, 1.19805f, 1.19805f)
				}
			});
			val.Add("mdlDroneTech", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "Head",
					localPos = new Vector3(-0.28859f, 0f, 0f),
					localAngles = new Vector3(0f, 0f, 90f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			val.Add("mdlDrifter", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = followerPrefab,
					childName = "BagFrontPocket",
					localPos = new Vector3(0f, 0.45212f, 0f),
					localAngles = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1.24082f, 1.24082f, 1.24082f)
				}
			});
			return val;
		}
	}
	public abstract class EquipBase
	{
		public EquipmentDef EquipmentDef;

		public string Name;

		public bool CanBeRandomlyTriggered;

		public bool EnigmaCompatible;

		public EquipmentIndex EquipmentIndex => EquipmentCatalog.FindEquipmentIndex(((Object)EquipmentDef).name);

		public abstract bool Enabled { get; }

		public abstract float Cooldown { get; }

		public abstract GameObject equipPrefab { get; }

		public abstract Sprite equipIcon { get; }

		public EquipBase(string _name, bool _canBeRandomlyTriggered, bool _enigmaCompatible)
		{
			Name = _name;
			CanBeRandomlyTriggered = _canBeRandomlyTriggered;
			EnigmaCompatible = _enigmaCompatible;
			EquipInit.EquipList.Add(this);
		}

		public bool RegisterEquip()
		{
			//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Expected O, but got Unknown
			if (!Enabled)
			{
				return Enabled;
			}
			EquipmentDef = ScriptableObject.CreateInstance<EquipmentDef>();
			((Object)EquipmentDef).name = Name;
			EquipmentDef.nameToken = "QT_EQUIP_" + Name.ToUpper() + "_NAME";
			EquipmentDef.pickupToken = "QT_EQUIP_" + Name.ToUpper() + "_PICKUP";
			EquipmentDef.descriptionToken = "QT_EQUIP_" + Name.ToUpper() + "_DESC";
			EquipmentDef.loreToken = "QT_EQUIP_" + Name.ToUpper() + "_LORE";
			EquipmentDef.requiredExpansion = Main.Expansion;
			EquipmentDef.pickupModelPrefab = equipPrefab;
			EquipmentDef.pickupIconSprite = equipIcon;
			EquipmentDef.appearsInSinglePlayer = true;
			EquipmentDef.appearsInMultiPlayer = true;
			EquipmentDef.canDrop = true;
			EquipmentDef.cooldown = Cooldown;
			EquipmentDef.isBoss = false;
			EquipmentDef.isConsumed = false;
			EquipmentDef.isLunar = false;
			EquipmentDef.canBeRandomlyTriggered = CanBeRandomlyTriggered;
			EquipmentDef.enigmaCompatible = EnigmaCompatible;
			if (Object.op_Implicit((Object)(object)equipPrefab))
			{
				Transform child = equipPrefab.transform.GetChild(0);
				ModelPanelParameters val = equipPrefab.AddComponent<ModelPanelParameters>();
				val.minDistance = 0.5f;
				val.maxDistance = 1f;
				val.focusPointTransform = child;
				val.cameraPositionTransform = child;
			}
			ItemAPI.Add(new CustomEquipment(EquipmentDef, CreateItemDisplayRules()));
			return Enabled;
		}

		public abstract void FormatDescriptionTokens();

		public abstract void RegisterHooks();

		public abstract ItemDisplayRuleDict CreateItemDisplayRules();
	}
	public class Microwave : EquipBase
	{
		public class MicrowaveLightningOrb : LightningOrb
		{
			public override void OnArrival()
			{
				//IL_0033: Unknown result type (might be due to invalid IL or missing references)
				//IL_0039: Expected O, but got Unknown
				//IL_005e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0063: Unknown result type (might be due to invalid IL or missing references)
				//IL_0076: Unknown result type (might be due to invalid IL or missing references)
				//IL_007b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0098: Unknown result type (might be due to invalid IL or missing references)
				//IL_009d: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b0: 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_00d2: Unknown result type (might be due to invalid IL or missing references)
				if (!Object.op_Implicit((Object)(object)((Orb)this).target))
				{
					return;
				}
				HealthComponent healthComponent = ((Orb)this).target.healthComponent;
				if (Object.op_Implicit((Object)(object)healthComponent))
				{
					DamageInfo val = new DamageInfo();
					val.damage = base.damageValue;
					val.attacker = base.attacker;
					val.inflictor = base.inflictor;
					val.force = Vector3.zero;
					val.crit = base.isCrit;
					val.procChainMask = base.procChainMask;
					val.procCoefficient = base.procCoefficient;
					val.position = ((Component)((Orb)this).target).transform.position;
					val.damageColorIndex = base.damageColorIndex;
					val.damageType = base.damageType;
					if (base.isElectric)
					{
						val.damageType.damageTypeExtended = (DamageTypeExtended)8192;
					}
					val.inflictedHurtbox = ((Orb)this).target;
					healthComponent.TakeDamage(val);
					GlobalEventManager.instance.OnHitEnemy(val, ((Component)healthComponent).gameObject);
					GlobalEventManager.instance.OnHitAll(val, ((Component)healthComponent).gameObject);
					CharacterBody val2 = default(CharacterBody);
					if (base.attacker.TryGetComponent<CharacterBody>(ref val2) && Object.op_Implicit((Object)(object)val2.healthComponent))
					{
						val2.healthComponent.RechargeShield(Microwave_ShieldRegen.Value);
					}
					SetStateOnHurt val3 = default(SetStateOnHurt);
					((Component)((Orb)this).target.healthComponent).gameObject.TryGetComponent<SetStateOnHurt>(ref val3);
					if (Object.op_Implicit((Object)(object)val3))
					{
						val3.SetStun(1f);
					}
				}
			}
		}

		public class MicrowaveAkBankHolder : MonoBehaviour
		{
			public AkBank akBank;

			public void Awake()
			{
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0022: Unknown result type (might be due to invalid IL or missing references)
				akBank = ((Component)this).gameObject.AddComponent<AkBank>();
				AsyncOperationHandle<GameObject> val = AssetAsyncReferenceManager<GameObject>.LoadAsset(new AssetReferenceT<GameObject>(RoR2_DLC2_Chef.ChefBody_prefab), (AsyncReferenceHandleUnloadType)2);
				val.Completed += delegate(AsyncOperationHandle<GameObject> x)
				{
					AkBank component = x.Result.GetComponent<AkBank>();
					if (Object.op_Implicit((Object)(object)component))
					{
						akBank.data.WwiseObjectReference = component.data.WwiseObjectReference;
					}
				};
			}
		}

		public class MicrowaveBehavior : MonoBehaviour
		{
			private AkBank bank;

			private CharacterBody characterBody;

			private ModelLocator modelLocator;

			public float interval = Microwave_Interval.Value;

			public int shocksLeft = Microwave_ShockCount.Value;

			public int shockOrbCount = Microwave_OrbCount.Value;

			public float shockDamage = Microwave_ShockDamage.Value;

			public float shockRadius = Microwave_Radius.Value;

			public float procCoefficient = Microwave_ProcCoefficient.Value;

			public bool speedBoosting = true;

			private float intervalTimer = Microwave_Interval.Value - 0.8f;

			private float subShockTimer = Microwave_Interval.Value - 0.8f;

			public void Awake()
			{
				characterBody = ((Component)this).gameObject.GetComponent<CharacterBody>();
				modelLocator = ((Component)this).gameObject.GetComponent<ModelLocator>();
				if (!Object.op_Implicit((Object)(object)characterBody) || !Object.op_Implicit((Object)(object)modelLocator))
				{
					Object.Destroy((Object)(object)this);
				}
				characterBody.RecalculateStats();
				TemporaryOverlay val = ((Component)this).gameObject.AddComponent<TemporaryOverlay>();
				val.duration = interval * (float)shocksLeft;
				val.animateShaderAlpha = true;
				val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0.2f);
				val.destroyComponentOnEnd = true;
				val.originalMaterial = EquipInit.Microwave.ZapOverlay;
				val.AddToCharacerModel(((Component)modelLocator.modelTransform).GetComponentInParent<CharacterModel>());
			}

			public void Start()
			{
				Util.PlaySound("Play_chef_skill4_boost_activate", ((Component)this).gameObject);
			}

			public void FixedUpdate()
			{
				//IL_0084: Unknown result type (might be due to invalid IL or missing references)
				//IL_0231: Unknown result type (might be due to invalid IL or missing references)
				//IL_0236: Unknown result type (might be due to invalid IL or missing references)
				//IL_023d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0248: Unknown result type (might be due to invalid IL or missing references)
				//IL_0255: Expected O, but got Unknown
				//IL_0268: Unknown result type (might be due to invalid IL or missing references)
				//IL_026d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0274: Unknown result type (might be due to invalid IL or missing references)
				//IL_027f: Unknown result type (might be due to invalid IL or missing references)
				//IL_028c: Expected O, but got Unknown
				//IL_0104: Unknown result type (might be due to invalid IL or missing references)
				//IL_0114: Unknown result type (might be due to invalid IL or missing references)
				//IL_0135: Unknown result type (might be due to invalid IL or missing references)
				//IL_018f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0194: Unknown result type (might be due to invalid IL or missing references)
				//IL_01db: Unknown result type (might be due to invalid IL or missing references)
				//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
				intervalTimer += Time.fixedDeltaTime;
				subShockTimer += Time.fixedDeltaTime;
				if (subShockTimer >= interval / 2f)
				{
					Util.PlaySound("Play_item_use_BFG_zaps", ((Component)this).gameObject);
					subShockTimer = 0f;
				}
				if (!(intervalTimer >= interval))
				{
					return;
				}
				int num = shockOrbCount;
				List<Collider> list = Physics.OverlapSphere(characterBody.corePosition, shockRadius).ToList();
				Util.ShuffleList<Collider>(list);
				foreach (Collider item in list)
				{
					GameObject gameObject = ((Component)item).gameObject;
					if (!Object.op_Implicit((Object)(object)gameObject.GetComponentInChildren<CharacterBody>()))
					{
						continue;
					}
					CharacterBody componentInChildren = gameObject.GetComponentInChildren<CharacterBody>();
					if (Object.op_Implicit((Object)(object)componentInChildren.healthComponent) && Object.op_Implicit((Object)(object)componentInChildren.teamComponent) && componentInChildren.teamComponent.teamIndex != characterBody.teamComponent.teamIndex)
					{
						MicrowaveLightningOrb microwaveLightningOrb = new MicrowaveLightningOrb();
						((LightningOrb)microwaveLightningOrb).lightningType = (LightningType)1;
						((Orb)microwaveLightningOrb).duration = 0.5f;
						((LightningOrb)microwaveLightningOrb).damageValue = characterBody.damage * shockDamage;
						((LightningOrb)microwaveLightningOrb).attacker = ((Component)this).gameObject;
						((LightningOrb)microwaveLightningOrb).inflictor = ((Component)this).gameObject;
						((LightningOrb)microwaveLightningOrb).bouncesRemaining = 0;
						((LightningOrb)microwaveLightningOrb).teamIndex = characterBody.teamComponent.teamIndex;
						((LightningOrb)microwaveLightningOrb).isCrit = characterBody.RollCrit();
						((LightningOrb)microwaveLightningOrb).range = shockRadius;
						((LightningOrb)microwaveLightningOrb).procCoefficient = procCoefficient;
						((Orb)microwaveLightningOrb).target = componentInChildren.mainHurtBox;
						((Orb)microwaveLightningOrb).origin = characterBody.corePosition;
						OrbManager.instance.AddOrb((Orb)(object)microwaveLightningOrb);
						num--;
						if (num <= 0)
						{
							break;
						}
					}
				}
				intervalTimer = 0f;
				EffectData val = new EffectData
				{
					origin = characterBody.corePosition,
					scale = 2f
				};
				EffectManager.SpawnEffect(EquipInit.Microwave.ZapEffect, val, true);
				EffectData val2 = new EffectData
				{
					origin = characterBody.corePosition,
					scale = 0.1f
				};
				EffectManager.SpawnEffect(EquipInit.Microwave.ZapEffect2, val2, true);
				shocksLeft--;
				if (shocksLeft <= 0)
				{
					speedBoosting = false;
					characterBody.RecalculateStats();
					Object.Destroy((Object)(object)bank);
					Object.Destroy((Object)(object)this);
				}
			}
		}

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

			public static StatHookEventHandler <>9__60_0;

			internal void <RegisterHooks>b__60_0(CharacterBody orig, StatHookEventArgs self)
			{
				if (Object.op_Implicit((Object)(object)((Component)orig).gameObject.GetComponent<MicrowaveBehavior>()) && ((Component)orig).gameObject.GetComponent<MicrowaveBehavior>().speedBoosting)
				{
					self.moveSpeedMultAdd += Microwave_SpeedBoost.Value;
				}
			}
		}

		private Material _zapOverlay;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private Material <ZapOverlay>k__BackingField;

		private GameObject _zapEffect;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private GameObject <ZapEffect>k__BackingField;

		private GameObject _zapEffect2;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private GameObject <ZapEffect2>k__BackingField;

		public static ConfigItem<bool> Microwave_Enabled = new ConfigItem<bool>("Equipment: Quantum Microwave", "Equipment enabled", "Should this equipment appear in runs?", _defaultValue: true);

		public static ConfigItem<float> Microwave_Cooldown = new ConfigItem<float>("Equipment: Quantum Microwave", "Equipment cooldown", "Seconds until the equipment cooldown is finished.", 45f, 1f, 120f, 1f);

		public static ConfigItem<int> Microwave_ShockCount = new ConfigItem<int>("Equipment: Quantum Microwave", "Number of shocks", "Number of times a shock will occur within the duration.", 5, 1f, 10f, 1f);

		public static ConfigItem<int> Microwave_OrbCount = new ConfigItem<int>("Equipment: Quantum Microwave", "Lightning strikes per shock", "Number of lightning projectiles fired per shock.", 3, 1f, 10f, 1f);

		public static ConfigItem<float> Microwave_ShockDamage = new ConfigItem<float>("Equipment: Quantum Microwave", "Shock damage", "Fractional damage of each lightning projectile.", 2f, 1f, 10f, 0.1f);

		public static ConfigItem<float> Microwave_Radius = new ConfigItem<float>("Equipment: Quantum Microwave", "Shock radius", "Meters radius for enemies to be shocked. 35m = Tesla Coil range.", 35f, 5f, 60f, 1f);

		public static ConfigItem<float> Microwave_ShieldRegen = new ConfigItem<float>("Equipment: Quantum Microwave", "Shield regen", "Flat shield regenerated per shock.", 30f, 0f, 90f, 1f);

		public static ConfigItem<float> Microwave_SpeedBoost = new ConfigItem<float>("Equipment: Quantum Microwave", "Speed boost", "Fractional speed boost throughout duration.", 0.5f, 0f, 1f, 0.1f);

		public static ConfigItem<float> Microwave_Interval = new ConfigItem<float>("Equipment: Quantum Microwave", "Shock interval", "Seconds interval between shocks. Multiply by number of shocks for the full duration.", 1f, 0.1f, 2f, 0.1f);

		public static ConfigItem<float> Microwave_ProcCoefficient = new ConfigItem<float>("Equipment: Quantum Microwave", "Shock proc coefficient", "Proc coefficient per lightning zap.", 0.2f, 0f, 1f, 0.1f);

		public override bool Enabled => Microwave_Enabled.Value;

		public override float Cooldown => Microwave_Cooldown.Value;

		public override GameObject equipPrefab => OverwritePrefabMaterials();

		public override Sprite equipIcon => Main.Assets.LoadAsset<Sprite>("Assets/icons/microwave.png");

		public Material material0 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Common/TrimSheets/matTrimSheetMetal.mat").WaitForCompletion();

		public Material material1 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/GoldOnHit/matBoneCrown.mat").WaitForCompletion();

		public Material material2 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC3/Items/SharedSuffering/matSharedSufferingEmission.mat").WaitForCompletion();

		public Material material3 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC3/Items/SharedSuffering/matSharedSufferingEmission.mat").WaitForCompletion();

		public Material material4 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Titan/matTitanPebble.mat").WaitForCompletion();

		public Material material5 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Titan/matTitanPebble.mat").WaitForCompletion();

		public Material material6 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/voidstage/matVoidMetalTrimGrassy.mat").WaitForCompletion();

		public Material material7 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Common/matDebugRed.mat").WaitForCompletion();

		public Material material8 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Titan/matTitanPebble.mat").WaitForCompletion();

		public Material material9 => Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/LunarGolem/matLunarGolemMuzzleBlast.mat").WaitForCompletion();

		public Material material10 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC2/FalseSonBoss/matPrimeDevastatorLightningTether1.mat").WaitForCompletion();

		public Material material11 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC2/FalseSonBoss/matPrimeDevastatorLightningTether1.mat").WaitForCompletion();

		public Material ZapOverlay
		{
			get
			{
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)_zapOverlay == (Object)null)
				{
					_zapOverlay = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC2/FalseSonBoss/matPrimeDevastatorLightningTether1.mat").WaitForCompletion();
				}
				return _zapOverlay;
			}
			[CompilerGenerated]
			set
			{
				<ZapOverlay>k__BackingField = value;
			}
		}

		public GameObject ZapEffect
		{
			get
			{
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)_zapEffect == (Object)null)
				{
					_zapEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Captain/CaptainTazerSupplyDropNova.prefab").WaitForCompletion();
				}
				return _zapEffect;
			}
			[CompilerGenerated]
			set
			{
				<ZapEffect>k__BackingField = value;
			}
		}

		public GameObject ZapEffect2
		{
			get
			{
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)_zapEffect2 == (Object)null)
				{
					_zapEffect2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Jellyfish/JellyfishNova.prefab").WaitForCompletion(), "quantumZapEffect2");
					Object.Destroy((Object)(object)((Component)_zapEffect2.transform.GetChild(4)).gameObject);
				}
				return _zapEffect2;
			}
			[CompilerGenerated]
			set
			{
				<ZapEffect2>k__BackingField = value;
			}
		}

		public Microwave(string _name, bool canBeRandomlyTriggered = true, bool enigmaCompatible = true)
			: base(_name, canBeRandomlyTriggered, enigmaCompatible)
		{
		}

		public GameObject OverwritePrefabMaterials()
		{
			GameObject val = Main.Assets.LoadAsset<GameObject>("Assets/prefabs/microwave.prefab");
			Material[] materialArray = (Material[])(object)new Material[12]
			{
				material0, material1, material2, material3, material4, material5, material6, material7, material8, material9,
				material10, material11
			};
			((Renderer)val.GetComponentInChildren<MeshRenderer>()).SetMaterialArray(materialArray);
			return val;
		}

		public override void FormatDescriptionTokens()
		{
			string descriptionToken = EquipmentDef.descriptionToken;
			LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), Microwave_ShockCount.Value, Microwave_OrbCount.Value, Microwave_ShockDamage.Value * 100f, Microwave_Radius.Value, Microwave_ShieldRegen.Value, Microwave_SpeedBoost.Value * 100f));
		}

		public override void RegisterHooks()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Expected O, but got Unknown
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Expected O, but got Unknown
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			object obj = <>c.<>9__60_0;
			if (obj == null)
			{
				StatHookEventHandler val = delegate(CharacterBody orig, StatHookEventArgs self)
				{
					if (Object.op_Implicit((Object)(object)((Component)orig).gameObject.GetComponent<MicrowaveBehavior>()) && ((Component)orig).gameObject.GetComponent<MicrowaveBehavior>().speedBoosting)
					{
						self.moveSpeedMultAdd += Microwave_SpeedBoost.Value;
					}
				};
				<>c.<>9__60_0 = val;
				obj = (object)val;
			}
			RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj;
			EquipmentSlot.PerformEquipmentAction += (hook_PerformEquipmentAction)delegate(orig_PerformEquipmentAction orig, EquipmentSlot self, EquipmentDef equipmentDef)
			{
				if (!NetworkServer.active)
				{
					Debug.LogWarning((object)"[Server] function 'System.Boolean RoR2.EquipmentSlot::PerformEquipmentAction(RoR2.EquipmentDef)' called on client");
					return false;
				}
				if (self.equipmentDisabled)
				{
					return false;
				}
				if ((Object)(object)equipmentDef == (Object)(object)EquipmentDef && Object.op_Implicit((Object)(object)self.characterBody))
				{
					((Component)self.characterBody).gameObject.AddComponent<MicrowaveBehavior>();
					self.subcooldownTimer = 1f;
					return true;
				}
				return orig.Invoke(self, equipmentDef);
			};
			Inventory.SetEquipmentInternal_EquipmentState_uint_uint += (hook_SetEquipmentInternal_EquipmentState_uint_uint)delegate(orig_SetEquipmentInternal_EquipmentState_uint_uint orig, Inventory self, EquipmentState equipmentState, uint slot, uint set)
			{
				//IL_005e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0025: Unknown result type (might be due to invalid IL or missing references)
				//IL_0026: Unknown result type (might be due to invalid IL or missing references)
				//IL_002c: Unknown result type (might be due to invalid IL or missing references)
				CharacterMaster val2 = default(CharacterMaster);
				if (((Component)self).TryGetComponent<CharacterMaster>(ref val2) && Object.op_Implicit((Object)(object)val2.GetBody()))
				{
					CharacterBody body = val2.GetBody();
					if (equipmentState.equipmentIndex == base.EquipmentIndex && !Object.op_Implicit((Object)(object)((Component)body).gameObject.GetComponent<MicrowaveAkBankHolder>()))
					{
						((Component)body).gameObject.AddComponent<MicrowaveAkBankHolder>();
					}
				}
				return orig.Invoke(self, equipmentState, slot, set);
			};
		}

		public override ItemDisplayRuleDict CreateItemDisplayRules()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_0259: Unknown result type (might be due to invalid IL or missing references)
			//IL_025e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: 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_02b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_030e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0317: Unknown result type (might be due to invalid IL or missing references)
			//IL_0341: Unknown result type (might be due to invalid IL or missing references)
			//IL_0346: Unknown result type (might be due to invalid IL or missing references)
			//IL_035c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0361: Unknown result type (might be due to invalid IL or missing references)
			//IL_0377: Unknown result type (might be due to invalid IL or missing references)
			//IL_037c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0381: Unknown result type (might be due to invalid IL or missing references)
			//IL_0382: Unknown result type (might be due to invalid IL or missing references)
			//IL_039d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0406: Unknown result type (might be due to invalid IL or missing references)
			//IL_040b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0410: Unknown result type (might be due to invalid IL or missing references)
			//IL_0411: Unknown result type (might be due to invalid IL or missing references)
			//IL_042c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0435: Unknown result type (might be due to invalid IL or missing references)
			//IL_045f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0464: Unknown result type (might be due to invalid IL or missing references)
			//IL_047a: Unknown result type (might be due to invalid IL or missing references)
			//IL_047f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0495: Unknown result type (might be due to invalid IL or missing references)
			//IL_049a: Unknown result type (might be due to invalid IL or missing references)
			//IL_049f: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0509: Unknown result type (might be due to invalid IL or missing references)
			//IL_050e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0524: Unknown result type (might be due to invalid IL or missing references)
			//IL_0529: Unknown result type (might be due to invalid IL or missing references)
			//IL_052e: Unknown result type (might be due to invalid IL or missing references)
			//IL_052f: Unknown result type (might be due to invalid IL or missing references)
			//IL_054a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0553: Unknown result type (might be due to invalid IL or missing references)
			//IL_057d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0582: Unknown result type (might be due to invalid IL or missing references)
			//IL_0598: Unknown result type (might be due to invalid IL or missing references)
			//IL_059d: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b3: Unknown result