Decompiled source of Nautilus v1.3.0

plugins/Nautilus/Nautilus.dll

Decompiled a week ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
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.Configuration;
using BepInEx.Logging;
using EntityStates.VoidJailer.Weapon;
using HG;
using IL.RoR2;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using Nautilus.Configuration;
using Nautilus.Interactables;
using Nautilus.Items;
using On.RoR2;
using R2API;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.ContentManagement;
using RoR2.ExpansionManagement;
using RoR2.Navigation;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.UI;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Nautilus")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+9c4bebcab331578124318ec1e98a43b1b65e7fd0")]
[assembly: AssemblyProduct("Nautilus")]
[assembly: AssemblyTitle("Nautilus")]
[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 Nautilus
{
	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.Nautilus", "Nautilus", "1.3.0")]
	[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.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	public class Main : BaseUnityPlugin
	{
		public class RecipeContentPackProvider : IContentPackProvider
		{
			[CompilerGenerated]
			private sealed class <FinalizeAsync>d__8 : IEnumerator<object>, IEnumerator, IDisposable
			{
				private int <>1__state;

				private object <>2__current;

				public FinalizeAsyncArgs args;

				public RecipeContentPackProvider <>4__this;

				object IEnumerator<object>.Current
				{
					[DebuggerHidden]
					get
					{
						return <>2__current;
					}
				}

				object IEnumerator.Current
				{
					[DebuggerHidden]
					get
					{
						return <>2__current;
					}
				}

				[DebuggerHidden]
				public <FinalizeAsync>d__8(int <>1__state)
				{
					this.<>1__state = <>1__state;
				}

				[DebuggerHidden]
				void IDisposable.Dispose()
				{
					<>1__state = -2;
				}

				private bool MoveNext()
				{
					if (<>1__state != 0)
					{
						return false;
					}
					<>1__state = -1;
					Log.Info("Craftable content provider called (Finalize)");
					args.ReportProgress(1f);
					return false;
				}

				bool IEnumerator.MoveNext()
				{
					//ILSpy generated this explicit interface implementation from .override directive in MoveNext
					return this.MoveNext();
				}

				[DebuggerHidden]
				void IEnumerator.Reset()
				{
					throw new NotSupportedException();
				}
			}

			[CompilerGenerated]
			private sealed class <GenerateContentPackAsync>d__7 : IEnumerator<object>, IEnumerator, IDisposable
			{
				private int <>1__state;

				private object <>2__current;

				public GetContentPackAsyncArgs args;

				public RecipeContentPackProvider <>4__this;

				object IEnumerator<object>.Current
				{
					[DebuggerHidden]
					get
					{
						return <>2__current;
					}
				}

				object IEnumerator.Current
				{
					[DebuggerHidden]
					get
					{
						return <>2__current;
					}
				}

				[DebuggerHidden]
				public <GenerateContentPackAsync>d__7(int <>1__state)
				{
					this.<>1__state = <>1__state;
				}

				[DebuggerHidden]
				void IDisposable.Dispose()
				{
					<>1__state = -2;
				}

				private bool MoveNext()
				{
					if (<>1__state != 0)
					{
						return false;
					}
					<>1__state = -1;
					Log.Info("Craftable content provider called (Generate)");
					ContentPack.Copy(<>4__this.contentPack, args.output);
					args.ReportProgress(1f);
					return false;
				}

				bool IEnumerator.MoveNext()
				{
					//ILSpy generated this explicit interface implementation from .override directive in MoveNext
					return this.MoveNext();
				}

				[DebuggerHidden]
				void IEnumerator.Reset()
				{
					throw new NotSupportedException();
				}
			}

			[CompilerGenerated]
			private sealed class <LoadStaticContentAsync>d__6 : IEnumerator<object>, IEnumerator, IDisposable
			{
				private int <>1__state;

				private object <>2__current;

				public LoadStaticContentAsyncArgs args;

				public RecipeContentPackProvider <>4__this;

				object IEnumerator<object>.Current
				{
					[DebuggerHidden]
					get
					{
						return <>2__current;
					}
				}

				object IEnumerator.Current
				{
					[DebuggerHidden]
					get
					{
						return <>2__current;
					}
				}

				[DebuggerHidden]
				public <LoadStaticContentAsync>d__6(int <>1__state)
				{
					this.<>1__state = <>1__state;
				}

				[DebuggerHidden]
				void IDisposable.Dispose()
				{
					<>1__state = -2;
				}

				private bool MoveNext()
				{
					if (<>1__state != 0)
					{
						return false;
					}
					<>1__state = -1;
					Log.Info("Craftable content provider called (Load)");
					<>4__this.contentPack.identifier = <>4__this.identifier;
					<>4__this.contentPack.craftableDefs.Add(Craftables.ToArray());
					args.ReportProgress(1f);
					return false;
				}

				bool IEnumerator.MoveNext()
				{
					//ILSpy generated this explicit interface implementation from .override directive in MoveNext
					return this.MoveNext();
				}

				[DebuggerHidden]
				void IEnumerator.Reset()
				{
					throw new NotSupportedException();
				}
			}

			internal ContentPack contentPack = new ContentPack();

			public static List<CraftableDef> Craftables = new List<CraftableDef>();

			public string identifier => "com.hex3.NautilusRecipes";

			public void Initialise()
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Expected O, but got Unknown
				ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(AddSelf);
			}

			private void AddSelf(AddContentPackProviderDelegate add)
			{
				add.Invoke((IContentPackProvider)(object)this);
			}

			[IteratorStateMachine(typeof(<LoadStaticContentAsync>d__6))]
			public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args)
			{
				//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
				return new <LoadStaticContentAsync>d__6(0)
				{
					<>4__this = this,
					args = args
				};
			}

			[IteratorStateMachine(typeof(<GenerateContentPackAsync>d__7))]
			public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args)
			{
				//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
				return new <GenerateContentPackAsync>d__7(0)
				{
					<>4__this = this,
					args = args
				};
			}

			[IteratorStateMachine(typeof(<FinalizeAsync>d__8))]
			public IEnumerator FinalizeAsync(FinalizeAsyncArgs args)
			{
				//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
				return new <FinalizeAsync>d__8(0)
				{
					<>4__this = this,
					args = args
				};
			}
		}

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

			public static hook_OnMainMenuControllerInitialized <>9__9_0;

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

		public const string NAUTILUS_GUID = "com.Hex3.Nautilus";

		public const string NAUTILUS_NAME = "Nautilus";

		public const string NAUTILUS_VER = "1.3.0";

		public static Main Instance;

		public static ExpansionDef Expansion;

		public static AssetBundle Assets;

		public static ItemRelationshipProvider ItemRelationshipProvider = ScriptableObject.CreateInstance<ItemRelationshipProvider>();

		public static List<Pair> ItemConversionList = new List<Pair>();

		public static ConfigEntry<bool> Config_Enabled;

		public void Awake()
		{
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Expected O, but got Unknown
			//IL_0097: Expected O, but got Unknown
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Expected O, but got Unknown
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_054b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0550: Unknown result type (might be due to invalid IL or missing references)
			//IL_0556: Expected O, but got Unknown
			Log.Init(((BaseUnityPlugin)this).Logger);
			Log.Info("Init Nautilus 1.3.0");
			Instance = this;
			Log.Info("Creating assets...");
			using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Nautilus.nautilusvfx"))
			{
				Assets = AssetBundle.LoadFromStream(stream);
			}
			InteractableInit.shrineOfTheDeep = InteractableInit.shrineOfTheDeep;
			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>()));
			ModSettingsManager.SetModDescription("Adds new void counterparts for vanilla items.");
			ModSettingsManager.SetModIcon(Assets.LoadAsset<Sprite>("Assets/icons/expansion.png"));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(Config_Enabled, true));
			ConfigItem.Init();
			Log.Info("Creating expansion...");
			Expansion = ScriptableObject.CreateInstance<ExpansionDef>();
			((Object)Expansion).name = "Nautilus";
			Expansion.nameToken = "NT_EXPANSION_NAME";
			Expansion.descriptionToken = "NT_EXPANSION_DESC";
			Expansion.iconSprite = Assets.LoadAsset<Sprite>("Assets/icons/expansion.png");
			Expansion.disabledIconSprite = Assets.LoadAsset<Sprite>("Assets/icons/expansion-inactive.png");
			Expansion.requiredEntitlement = null;
			ContentAddition.AddExpansionDef(Expansion);
			Log.Info("Creating items...");
			ItemInit.Init();
			Log.Info("Creating interactables...");
			InteractableInit.Init();
			Log.Info("Creating void conversions...");
			((Object)ItemRelationshipProvider).name = "NT_ITEMRELATIONSHIPPROVIDER";
			ItemRelationshipProvider.relationshipType = Addressables.LoadAssetAsync<ItemRelationshipType>((object)"RoR2/DLC1/Common/ContagiousItem.asset").WaitForCompletion();
			ItemRelationshipProvider.relationships = ItemConversionList.ToArray();
			ContentAddition.AddItemRelationshipProvider(ItemRelationshipProvider);
			Log.Info("Creating crafting recipes...");
			if (ItemInit.WeepingFungus_Recipe.Value)
			{
				ItemInit.MakeCorruptionRecipe(ItemInit.WeepingFungus_Ingredient1.Value, ItemInit.WeepingFungus_Ingredient2.Value, "MushroomVoid");
			}
			if (ItemInit.SaferSpaces_Recipe.Value)
			{
				ItemInit.MakeCorruptionRecipe(ItemInit.SaferSpaces_Ingredient1.Value, ItemInit.SaferSpaces_Ingredient2.Value, "BearVoid");
			}
			if (ItemInit.EncrustedKey_Recipe.Value)
			{
				ItemInit.MakeCorruptionRecipe(ItemInit.EncrustedKey_Ingredient1.Value, ItemInit.EncrustedKey_Ingredient2.Value, "TreasureCacheVoid");
			}
			if (ItemInit.Lenses_Recipe.Value)
			{
				ItemInit.MakeCorruptionRecipe(ItemInit.Lenses_Ingredient1.Value, ItemInit.Lenses_Ingredient2.Value, "CritGlassesVoid");
			}
			if (ItemInit.NeedleTick_Recipe.Value)
			{
				ItemInit.MakeCorruptionRecipe(ItemInit.NeedleTick_Ingredient1.Value, ItemInit.NeedleTick_Ingredient2.Value, "BleedOnHitVoid");
			}
			if (ItemInit.LysateCell_Recipe.Value)
			{
				ItemInit.MakeCorruptionRecipe(ItemInit.LysateCell_Ingredient1.Value, ItemInit.LysateCell_Ingredient2.Value, "EquipmentMagazineVoid");
			}
			if (ItemInit.Polylute_Recipe.Value)
			{
				ItemInit.MakeCorruptionRecipe(ItemInit.Polylute_Ingredient1.Value, ItemInit.Polylute_Ingredient2.Value, "ChainLightningVoid");
			}
			if (ItemInit.Tentabauble_Recipe.Value)
			{
				ItemInit.MakeCorruptionRecipe(ItemInit.Tentabauble_Ingredient1.Value, ItemInit.Tentabauble_Ingredient2.Value, "SlowOnHitVoid");
			}
			if (ItemInit.Voidsent_Recipe.Value)
			{
				ItemInit.MakeCorruptionRecipe(ItemInit.Voidsent_Ingredient1.Value, ItemInit.Voidsent_Ingredient2.Value, "ExplodeOnDeathVoid");
			}
			if (ItemInit.Band_Recipe.Value)
			{
				ItemInit.MakeCorruptionRecipe(ItemInit.Band_Ingredient1.Value, ItemInit.Band_Ingredient2.Value, "ElementalRingVoid");
			}
			if (ItemInit.Band_Recipe.Value)
			{
				ItemInit.MakeCorruptionRecipe(ItemInit.Band_Ingredient1Alt.Value, ItemInit.Band_Ingredient2.Value, "ElementalRingVoid");
			}
			if (ItemInit.PlasmaShrimp_Recipe.Value)
			{
				ItemInit.MakeCorruptionRecipe(ItemInit.PlasmaShrimp_Ingredient1.Value, ItemInit.PlasmaShrimp_Ingredient2.Value, "MissileVoid");
			}
			if (ItemInit.Benthic_Recipe.Value)
			{
				ItemInit.MakeCorruptionRecipe(ItemInit.Benthic_Ingredient1.Value, ItemInit.Benthic_Ingredient2.Value, "CloverVoid");
			}
			if (ItemInit.Larva_Recipe.Value)
			{
				ItemInit.MakeCorruptionRecipe(ItemInit.Larva_Ingredient1.Value, ItemInit.Larva_Ingredient2.Value, "ExtraLifeVoid");
			}
			if (ItemInit.Zoea_Recipe.Value)
			{
				ItemInit.MakeCorruptionRecipe(ItemInit.Zoea_Ingredient1.Value, ItemInit.Zoea_Ingredient2.Value, "VoidMegaCrabItem");
			}
			for (int i = 0; i < ItemInit.RecipeList.Count; i++)
			{
				CraftableDef val = ScriptableObject.CreateInstance<CraftableDef>();
				((Object)val).name = "NautilusRecipe" + i;
				RecipeContentPackProvider.Craftables.Add(val);
			}
			new RecipeContentPackProvider().Initialise();
			((ResourceAvailability)(ref PickupCatalog.availability)).CallWhenAvailable((Action)InitRecipes);
			Log.Info("Adding language hooks...");
			object obj = <>c.<>9__9_0;
			if (obj == null)
			{
				hook_OnMainMenuControllerInitialized val2 = delegate(orig_OnMainMenuControllerInitialized orig, RoR2Application self)
				{
					ItemInit.FormatDescriptions();
					orig.Invoke(self);
				};
				<>c.<>9__9_0 = val2;
				obj = (object)val2;
			}
			RoR2Application.OnMainMenuControllerInitialized += (hook_OnMainMenuControllerInitialized)obj;
			Log.Info("Done");
		}

		public void InitRecipes()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: 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_005e: Expected O, but got Unknown
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Expected O, but got Unknown
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			int num = 0;
			foreach (VoidRecipe recipe in ItemInit.RecipeList)
			{
				CraftableDef val = RecipeContentPackProvider.Craftables[num];
				Recipe val2 = new Recipe();
				val2.amountToDrop = 1;
				val2.ingredients = (RecipeIngredient[])(object)new RecipeIngredient[2]
				{
					new RecipeIngredient
					{
						pickup = (Object)(object)ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex(recipe.ingredient1))
					},
					new RecipeIngredient
					{
						pickup = (Object)(object)ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex(recipe.ingredient2))
					}
				};
				val.pickup = (Object)(object)ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex(recipe.result));
				val.recipes = (Recipe[])(object)new Recipe[1] { val2 };
				RecipeContentPackProvider.Craftables.Add(val);
				Log.Info("Added recipe for " + recipe.result + ": " + recipe.ingredient1 + " + " + recipe.ingredient2);
				num++;
			}
		}
	}
}
namespace Nautilus.Items
{
	public class CollapseInfectOrb : Orb
	{
		public override void Begin()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			EffectData val = new EffectData
			{
				origin = base.origin,
				genericFloat = ((Orb)this).duration,
				scale = 2f
			};
			val.SetHurtBoxReference(base.target);
			EffectManager.SpawnEffect(OrbStorageUtility.Get("Prefabs/Effects/OrbEffects/InfusionOrbEffect"), val, true);
		}

		public static void CreateInfectOrb(Vector3 origin, HurtBox target)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			CollapseInfectOrb collapseInfectOrb = new CollapseInfectOrb();
			((Orb)collapseInfectOrb).duration = 0.5f;
			((Orb)collapseInfectOrb).origin = origin;
			((Orb)collapseInfectOrb).target = target;
			OrbManager.instance.AddOrb((Orb)(object)collapseInfectOrb);
		}
	}
	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 ItemDef ConversionItemDef { 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_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Expected O, but got Unknown
			//IL_01e8: 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_020a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0211: Unknown result type (might be due to invalid IL or missing references)
			if (!Enabled)
			{
				return Enabled;
			}
			ItemDef = ScriptableObject.CreateInstance<ItemDef>();
			((Object)ItemDef).name = Name;
			ItemDef.nameToken = "NT_ITEM_" + Name.ToUpper() + "_NAME";
			ItemDef.pickupToken = "NT_ITEM_" + Name.ToUpper() + "_PICKUP";
			ItemDef.descriptionToken = "NT_ITEM_" + Name.ToUpper() + "_DESC";
			ItemDef.loreToken = "NT_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, AddItemDisplays()));
			if (Object.op_Implicit((Object)(object)ConversionItemDef))
			{
				Pair val2 = default(Pair);
				val2.itemDef1 = ConversionItemDef;
				val2.itemDef2 = ItemDef;
				Pair item = val2;
				Main.ItemConversionList.Add(item);
				Log.Info($"Added void conversion from {((Object)ConversionItemDef).name} to {((Object)ItemDef).name}");
			}
			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();

		public abstract void AddCorruptionRecipe();

		public abstract ItemDisplayRuleDict AddItemDisplays();
	}
	public static class ItemInit
	{
		public static ConfigItem<bool> WeepingFungus_Recipe = new ConfigItem<bool>("Vanilla: Weeping Fungus", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> WeepingFungus_Ingredient1 = new ConfigItem<string>("Vanilla: Weeping Fungus", "Recipe ingredient 1", "First ingredient for corruption recipe", "Mushroom");

		public static ConfigItem<string> WeepingFungus_Ingredient2 = new ConfigItem<string>("Vanilla: Weeping Fungus", "Recipe ingredient 2", "Second ingredient for corruption recipe", "Crabsinthe");

		public static ConfigItem<bool> SaferSpaces_Recipe = new ConfigItem<bool>("Vanilla: Safer Spaces", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> SaferSpaces_Ingredient1 = new ConfigItem<string>("Vanilla: Safer Spaces", "Recipe ingredient 1", "First ingredient for corruption recipe", "Bear");

		public static ConfigItem<string> SaferSpaces_Ingredient2 = new ConfigItem<string>("Vanilla: Safer Spaces", "Recipe ingredient 2", "Second ingredient for corruption recipe", "BleedOnHitVoid");

		public static ConfigItem<bool> EncrustedKey_Recipe = new ConfigItem<bool>("Vanilla: Encrusted Key", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> EncrustedKey_Ingredient1 = new ConfigItem<string>("Vanilla: Encrusted Key", "Recipe ingredient 1", "First ingredient for corruption recipe", "TreasureCache");

		public static ConfigItem<string> EncrustedKey_Ingredient2 = new ConfigItem<string>("Vanilla: Encrusted Key", "Recipe ingredient 2", "Second ingredient for corruption recipe", "VoidWatch");

		public static ConfigItem<bool> Lenses_Recipe = new ConfigItem<bool>("Vanilla: Lost Seers Lenses", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> Lenses_Ingredient1 = new ConfigItem<string>("Vanilla: Lost Seers Lenses", "Recipe ingredient 1", "First ingredient for corruption recipe", "CritGlasses");

		public static ConfigItem<string> Lenses_Ingredient2 = new ConfigItem<string>("Vanilla: Lost Seers Lenses", "Recipe ingredient 2", "Second ingredient for corruption recipe", "BleedOnHitVoid");

		public static ConfigItem<bool> NeedleTick_Recipe = new ConfigItem<bool>("Vanilla: Needletick", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> NeedleTick_Ingredient1 = new ConfigItem<string>("Vanilla: Needletick", "Recipe ingredient 1", "First ingredient for corruption recipe", "BleedOnHit");

		public static ConfigItem<string> NeedleTick_Ingredient2 = new ConfigItem<string>("Vanilla: Needletick", "Recipe ingredient 2", "Second ingredient for corruption recipe", "Crabsinthe");

		public static ConfigItem<bool> LysateCell_Recipe = new ConfigItem<bool>("Vanilla: Lysate Cell", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> LysateCell_Ingredient1 = new ConfigItem<string>("Vanilla: Lysate Cell", "Recipe ingredient 1", "First ingredient for corruption recipe", "EquipmentMagazine");

		public static ConfigItem<string> LysateCell_Ingredient2 = new ConfigItem<string>("Vanilla: Lysate Cell", "Recipe ingredient 2", "Second ingredient for corruption recipe", "MushroomVoid");

		public static ConfigItem<bool> Polylute_Recipe = new ConfigItem<bool>("Vanilla: Polylute", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> Polylute_Ingredient1 = new ConfigItem<string>("Vanilla: Polylute", "Recipe ingredient 1", "First ingredient for corruption recipe", "ChainLightning");

		public static ConfigItem<string> Polylute_Ingredient2 = new ConfigItem<string>("Vanilla: Polylute", "Recipe ingredient 2", "Second ingredient for corruption recipe", "CritGlassesVoid");

		public static ConfigItem<bool> Tentabauble_Recipe = new ConfigItem<bool>("Vanilla: Tentabauble", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> Tentabauble_Ingredient1 = new ConfigItem<string>("Vanilla: Tentabauble", "Recipe ingredient 1", "First ingredient for corruption recipe", "SlowOnHit");

		public static ConfigItem<string> Tentabauble_Ingredient2 = new ConfigItem<string>("Vanilla: Tentabauble", "Recipe ingredient 2", "Second ingredient for corruption recipe", "Crabsinthe");

		public static ConfigItem<bool> Voidsent_Recipe = new ConfigItem<bool>("Vanilla: Voidsent Flame", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> Voidsent_Ingredient1 = new ConfigItem<string>("Vanilla: Voidsent Flame", "Recipe ingredient 1", "First ingredient for corruption recipe", "ExplodeOnDeath");

		public static ConfigItem<string> Voidsent_Ingredient2 = new ConfigItem<string>("Vanilla: Voidsent Flame", "Recipe ingredient 2", "Second ingredient for corruption recipe", "VoidWatch");

		public static ConfigItem<bool> Band_Recipe = new ConfigItem<bool>("Vanilla: Singularity Band", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> Band_Ingredient1 = new ConfigItem<string>("Vanilla: Singularity Band", "Recipe ingredient 1", "First ingredient for corruption recipe", "FireRing");

		public static ConfigItem<string> Band_Ingredient1Alt = new ConfigItem<string>("Vanilla: Singularity Band", "Recipe ingredient 1 (alt)", "First ingredient for corruption recipe (alt)", "IceRing");

		public static ConfigItem<string> Band_Ingredient2 = new ConfigItem<string>("Vanilla: Singularity Band", "Recipe ingredient 2", "Second ingredient for corruption recipe", "BearVoid");

		public static ConfigItem<bool> PlasmaShrimp_Recipe = new ConfigItem<bool>("Vanilla: Plasma Shrimp", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> PlasmaShrimp_Ingredient1 = new ConfigItem<string>("Vanilla: Plasma Shrimp", "Recipe ingredient 1", "First ingredient for corruption recipe", "Missile");

		public static ConfigItem<string> PlasmaShrimp_Ingredient2 = new ConfigItem<string>("Vanilla: Plasma Shrimp", "Recipe ingredient 2", "Second ingredient for corruption recipe", "BearVoid");

		public static ConfigItem<bool> Benthic_Recipe = new ConfigItem<bool>("Vanilla: Benthic Bloom", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> Benthic_Ingredient1 = new ConfigItem<string>("Vanilla: Benthic Bloom", "Recipe ingredient 1", "First ingredient for corruption recipe", "Clover");

		public static ConfigItem<string> Benthic_Ingredient2 = new ConfigItem<string>("Vanilla: Benthic Bloom", "Recipe ingredient 2", "Second ingredient for corruption recipe", "ChainLightningVoid");

		public static ConfigItem<bool> Larva_Recipe = new ConfigItem<bool>("Vanilla: Pluripotent Larva", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> Larva_Ingredient1 = new ConfigItem<string>("Vanilla: Pluripotent Larva", "Recipe ingredient 1", "First ingredient for corruption recipe", "ExtraLife");

		public static ConfigItem<string> Larva_Ingredient2 = new ConfigItem<string>("Vanilla: Pluripotent Larva", "Recipe ingredient 2", "Second ingredient for corruption recipe", "EquipmentMagazineVoid");

		public static ConfigItem<bool> Zoea_Recipe = new ConfigItem<bool>("Vanilla: Newly Hatched Zoea", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> Zoea_Ingredient1 = new ConfigItem<string>("Vanilla: Newly Hatched Zoea", "Recipe ingredient 1", "First ingredient for corruption recipe", "BeetleGland");

		public static ConfigItem<string> Zoea_Ingredient2 = new ConfigItem<string>("Vanilla: Newly Hatched Zoea", "Recipe ingredient 2", "Second ingredient for corruption recipe", "SlowOnHitVoid");

		private static List<ItemBase> _itemList;

		private static List<VoidRecipe> _recipeList;

		public static ApathyCore ApathyCore;

		public static ApathyCoreHidden ApathyCoreHidden;

		public static DeepVoidSignal DeepVoidSignal;

		public static DrenchedPerforator DrenchedPerforator;

		public static EffigyOfRot EffigyOfRot;

		public static MobiusNode MobiusNode;

		public static ObserversEye ObserversEye;

		public static OsmiumShackles OsmiumShackles;

		public static RebelSoul RebelSoul;

		public static Rebirth Rebirth;

		public static SplitNucleus SplitNucleus;

		public static TenebralGland TenebralGland;

		public static Crabsinthe Crabsinthe;

		public static VoidWatch VoidWatch;

		public static Wellies Wellies;

		public static AlteredSoul AlteredSoul;

		public static MotherOfPearl MotherOfPearl;

		public static ShimmeringNautilus ShimmeringNautilus;

		public static SkullSprout SkullSprout;

		public static Xenobacteria Xenobacteria;

		public static HydraTooth HydraTooth;

		public static PaleStar PaleStar;

		public static PaleStarConsumed PaleStarConsumed;

		public static ViscousPot ViscousPot;

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

		public static List<VoidRecipe> RecipeList
		{
			get
			{
				if (_recipeList == null)
				{
					_recipeList = new List<VoidRecipe>();
				}
				return _recipeList;
			}
			set
			{
				_recipeList = value;
			}
		}

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

		public static int IsItemEnabledByString(string name)
		{
			foreach (ItemBase item in ItemList)
			{
				if (item.Name == name)
				{
					if (item.Enabled)
					{
						return 0;
					}
					return 1;
				}
			}
			return 2;
		}

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

		public static void MakeCorruptionRecipe(string ingredient1, string ingredient2, string result)
		{
			if (string.IsNullOrEmpty(ingredient1) || string.IsNullOrEmpty(ingredient2) || string.IsNullOrEmpty(result))
			{
				Log.Warning("Failed adding recipe for " + result + " due to missing item names!");
				return;
			}
			if (IsItemEnabledByString(ingredient1) == 1 || IsItemEnabledByString(ingredient2) == 1 || IsItemEnabledByString(result) == 1)
			{
				Log.Warning("Failed adding recipe for " + result + " due to one or more items being disabled!");
				return;
			}
			VoidRecipe voidRecipe = default(VoidRecipe);
			voidRecipe.ingredient1 = ingredient1;
			voidRecipe.ingredient2 = ingredient2;
			voidRecipe.result = result;
			VoidRecipe item = voidRecipe;
			RecipeList.Add(item);
		}

		static ItemInit()
		{
			ItemTag[] array = new ItemTag[6];
			RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			ApathyCore = new ApathyCore("ApathyCore", (ItemTag[])(object)array, (ItemTier)9);
			ItemTag[] array2 = new ItemTag[4];
			RuntimeHelpers.InitializeArray(array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			ApathyCoreHidden = new ApathyCoreHidden("ApathyCoreHidden", (ItemTag[])(object)array2, (ItemTier)5);
			ItemTag[] array3 = new ItemTag[5];
			RuntimeHelpers.InitializeArray(array3, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			DeepVoidSignal = new DeepVoidSignal("DeepVoidSignal", (ItemTag[])(object)array3, (ItemTier)9);
			ItemTag[] array4 = new ItemTag[4];
			RuntimeHelpers.InitializeArray(array4, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			DrenchedPerforator = new DrenchedPerforator("DrenchedPerforator", (ItemTag[])(object)array4, (ItemTier)9);
			ItemTag[] array5 = new ItemTag[5];
			RuntimeHelpers.InitializeArray(array5, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			EffigyOfRot = new EffigyOfRot("EffigyOfRot", (ItemTag[])(object)array5, (ItemTier)9);
			MobiusNode = new MobiusNode("MobiusNode", (ItemTag[])(object)new ItemTag[1] { (ItemTag)2 }, (ItemTier)9);
			ItemTag[] array6 = new ItemTag[5];
			RuntimeHelpers.InitializeArray(array6, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			ObserversEye = new ObserversEye("ObserversEye", (ItemTag[])(object)array6, (ItemTier)9);
			OsmiumShackles = new OsmiumShackles("OsmiumShackles", (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, (ItemTier)9);
			ItemTag[] array7 = new ItemTag[5];
			RuntimeHelpers.InitializeArray(array7, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			RebelSoul = new RebelSoul("RebelSoul", (ItemTag[])(object)array7, (ItemTier)9);
			ItemTag[] array8 = new ItemTag[6];
			RuntimeHelpers.InitializeArray(array8, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			Rebirth = new Rebirth("Rebirth", (ItemTag[])(object)array8, (ItemTier)9);
			SplitNucleus = new SplitNucleus("SplitNucleus", (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }, (ItemTier)9);
			TenebralGland = new TenebralGland("TenebralGland", (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, (ItemTier)9);
			Crabsinthe = new Crabsinthe("Crabsinthe", (ItemTag[])(object)new ItemTag[1] { (ItemTag)2 }, (ItemTier)6);
			VoidWatch = new VoidWatch("VoidWatch", (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, (ItemTier)6);
			Wellies = new Wellies("Wellies", (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }, (ItemTier)6);
			AlteredSoul = new AlteredSoul("AlteredSoul", (ItemTag[])(object)new ItemTag[2]
			{
				(ItemTag)3,
				(ItemTag)4
			}, (ItemTier)8);
			ItemTag[] array9 = new ItemTag[4];
			RuntimeHelpers.InitializeArray(array9, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			MotherOfPearl = new MotherOfPearl("MotherOfPearl", (ItemTag[])(object)array9, (ItemTier)8);
			ItemTag[] array10 = new ItemTag[5];
			RuntimeHelpers.InitializeArray(array10, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			ShimmeringNautilus = new ShimmeringNautilus("ShimmeringNautilus", (ItemTag[])(object)array10, (ItemTier)8);
			SkullSprout = new SkullSprout("Skullsprout", (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, (ItemTier)8);
			Xenobacteria = new Xenobacteria("Xenobacteria", (ItemTag[])(object)new ItemTag[2]
			{
				(ItemTag)1,
				(ItemTag)4
			}, (ItemTier)8);
			HydraTooth = new HydraTooth("HydraTooth", (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, (ItemTier)7);
			ItemTag[] array11 = new ItemTag[3];
			RuntimeHelpers.InitializeArray(array11, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			PaleStar = new PaleStar("PaleStar", (ItemTag[])(object)array11, (ItemTier)7);
			ItemTag[] array12 = new ItemTag[4];
			RuntimeHelpers.InitializeArray(array12, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			PaleStarConsumed = new PaleStarConsumed("PaleStarConsumed", (ItemTag[])(object)array12, (ItemTier)5);
			ViscousPot = new ViscousPot("ViscousPot", (ItemTag[])(object)new ItemTag[2]
			{
				(ItemTag)2,
				(ItemTag)1
			}, (ItemTier)7);
		}
	}
	public struct VoidRecipe
	{
		public string ingredient1;

		public string ingredient2;

		public string result;
	}
	public class PoisonInfectOrb : Orb
	{
		public override void Begin()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			EffectData val = new EffectData
			{
				origin = base.origin,
				genericFloat = ((Orb)this).duration
			};
			val.SetHurtBoxReference(base.target);
			EffectManager.SpawnEffect(OrbStorageUtility.Get("Prefabs/Effects/OrbEffects/CrocoDiseaseOrbEffect"), val, true);
		}

		public static void CreateInfectOrb(Vector3 origin, HurtBox target)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			PoisonInfectOrb poisonInfectOrb = new PoisonInfectOrb();
			((Orb)poisonInfectOrb).duration = 0.5f;
			((Orb)poisonInfectOrb).origin = origin;
			((Orb)poisonInfectOrb).target = target;
			OrbManager.instance.AddOrb((Orb)(object)poisonInfectOrb);
		}
	}
	public class ApathyCore : ItemBase
	{
		public BuffDef ApathyBuff;

		public BuffDef ApathyBuffTemp;

		private GameObject _explodePrefab;

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

		private Material _ExplodeOverlay;

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

		private GameObject _individualExplodePrefab;

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

		private ExplicitPickupDropTable _explicitPickupDropTable;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ExplicitPickupDropTable <explicitPickupDropTable>k__BackingField;

		public List<string> PermanentAllies = new List<string>
		{
			"drone1", "drone2", "junkdrone", "haulerdrone", "flamedrone", "missiledrone", "emergencydrone", "equipmentdrone", "cleanupdrone", "rechargedrone",
			"jailerdrone", "megadrone", "copycatdrone", "bombardmentdrone", "turret1", "dronecommander", "titangold", "infernodrone", "voltaicdrone"
		};

		public static ConfigItem<bool> ApathyCore_Enabled = new ConfigItem<bool>("Void boss: Apathy Core", "Item enabled", "Should this item appear in runs?", _defaultValue: true);

		public static ConfigItem<float> ApathyCore_ConsumptionInterval = new ConfigItem<float>("Void boss: Apathy Core", "Consumption interval", "How often, in seconds, do nearby allies get consumed by the Apathy Core?", 20f, 1f, 40f, 1f);

		public static ConfigItem<float> ApathyCore_ShieldGain = new ConfigItem<float>("Void boss: Apathy Core", "Shield gain", "On consumption, how much shields should be gained per stack?", 5f, 1f, 40f, 1f);

		public static ConfigItem<float> ApathyCore_ArmorGain = new ConfigItem<float>("Void boss: Apathy Core", "Armor gain", "On consumption, how much armor should be gained?", 2f, 1f, 10f, 1f);

		public static ConfigItem<float> ApathyCore_CriticalDamage = new ConfigItem<float>("Void boss: Apathy Core", "Critical strike damage gain", "On consumption, what fraction of critical strike damage should be gained?", 0.05f, 0.05f, 0.5f, 0.01f);

		public static ConfigItem<bool> ApathyCore_SkillChargeGainPrimary = new ConfigItem<bool>("Void boss: Apathy Core", "Skill charge gain (primary)", "On consumption, add a charge of your primary skill?", _defaultValue: true);

		public static ConfigItem<bool> ApathyCore_SkillChargeGainSecondary = new ConfigItem<bool>("Void boss: Apathy Core", "Skill charge gain (secondary)", "On consumption, add a charge of your secondary skill?", _defaultValue: true);

		public static ConfigItem<bool> ApathyCore_SkillChargeGainUtility = new ConfigItem<bool>("Void boss: Apathy Core", "Skill charge gain (utility)", "On consumption, add a charge of your utility skill?", _defaultValue: true);

		public static ConfigItem<bool> ApathyCore_SkillChargeGainSpecial = new ConfigItem<bool>("Void boss: Apathy Core", "Skill charge gain (special)", "On consumption, add a charge of your special skill?", _defaultValue: true);

		public static ConfigItem<float> ApathyCore_TemporaryBuffLength = new ConfigItem<float>("Void boss: Apathy Core", "Temporary buff length", "When consuming a temporary ally, how many seconds should the buff last per stack?", 60f, 10f, 120f, 10f);

		public static ConfigItem<string> ApathyCore_ExtraDrones = new ConfigItem<string>("Void boss: Apathy Core", "Additional allied minions to consider as permanent", "(Separate by commas!) Vanilla and Sandswept drones already count as permanent allies for this item. Add the CharacterBody name of any minion to make it considered permanent as well", "");

		public static ConfigItem<bool> ApathyCore_Recipe = new ConfigItem<bool>("Void boss: Apathy Core", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> ApathyCore_Ingredient1 = new ConfigItem<string>("Void boss: Apathy Core", "Recipe ingredient 1", "First ingredient for corruption recipe", "RoboBallBuddy");

		public static ConfigItem<string> ApathyCore_Ingredient2 = new ConfigItem<string>("Void boss: Apathy Core", "Recipe ingredient 2", "Second ingredient for corruption recipe", "ViscousPot");

		public override bool Enabled => ApathyCore_Enabled.Value;

		public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/RoboBallBuddy/RoboBallBuddy.asset").WaitForCompletion();

		public override GameObject itemPrefab => OverwritePrefabMaterials();

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

		public Material material0 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC3/ironalluvium/matIAHexMetalPlateDark.mat").WaitForCompletion();

		public Material material1 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/VoidSurvivor/matVoidSurvivorCorruptOverlay.mat").WaitForCompletion();

		public Material material2 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/VoidSurvivor/matVoidBlinkBodyOverlayCorrupted.mat").WaitForCompletion();

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

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

		public Material material5 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC3/ironalluvium/matIAHexMetalPlateDark.mat").WaitForCompletion();

		public GameObject explodePrefab
		{
			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)_explodePrefab == (Object)null)
				{
					_explodePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorMegaBlasterExplosionCorrupted.prefab").WaitForCompletion();
				}
				return _explodePrefab;
			}
			[CompilerGenerated]
			set
			{
				<explodePrefab>k__BackingField = value;
			}
		}

		public Material ExplodeOverlay
		{
			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)_ExplodeOverlay == (Object)null)
				{
					_ExplodeOverlay = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/VoidSurvivor/matVoidBlinkBodyOverlayCorrupted.mat").WaitForCompletion();
				}
				return _ExplodeOverlay;
			}
			[CompilerGenerated]
			set
			{
				<ExplodeOverlay>k__BackingField = value;
			}
		}

		public GameObject individualExplodePrefab
		{
			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)_individualExplodePrefab == (Object)null)
				{
					_individualExplodePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/BleedOnHitVoid/FractureImpactEffect.prefab").WaitForCompletion();
				}
				return _individualExplodePrefab;
			}
			[CompilerGenerated]
			set
			{
				<individualExplodePrefab>k__BackingField = value;
			}
		}

		public ExplicitPickupDropTable explicitPickupDropTable
		{
			get
			{
				//IL_002d: 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_004d: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)_explicitPickupDropTable == (Object)null)
				{
					_explicitPickupDropTable = ScriptableObject.CreateInstance<ExplicitPickupDropTable>();
					_explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1]
					{
						new PickupDefEntry
						{
							pickupDef = (Object)(object)ItemDef,
							pickupWeight = 1f
						}
					};
				}
				((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance);
				return _explicitPickupDropTable;
			}
			[CompilerGenerated]
			set
			{
				<explicitPickupDropTable>k__BackingField = value;
			}
		}

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


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

		public override void FormatDescriptionTokens()
		{
			string descriptionToken = ItemDef.descriptionToken;
			LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), ApathyCore_ShieldGain.Value, ApathyCore_ArmorGain.Value, ApathyCore_CriticalDamage.Value * 100f, ApathyCore_SkillChargeGainSecondary.Value, ApathyCore_TemporaryBuffLength.Value));
		}

		public override void RegisterHooks()
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			CreateApathyBuff();
			CreateApathyBuffTemp();
			CharacterBody.OnInventoryChanged += (hook_OnInventoryChanged)delegate(orig_OnInventoryChanged orig, CharacterBody self)
			{
				orig.Invoke(self);
				ApathyCoreBehavior apathyCoreBehavior = ((Component)self).GetComponent<ApathyCoreBehavior>();
				int itemCountEffective2 = GetItemCountEffective(self);
				if (GetItemCountEffective(self) > 0 && !Object.op_Implicit((Object)(object)apathyCoreBehavior))
				{
					apathyCoreBehavior = self.AddItemBehavior<ApathyCoreBehavior>(itemCountEffective2);
				}
				if (Object.op_Implicit((Object)(object)apathyCoreBehavior))
				{
					((ItemBehavior)apathyCoreBehavior).stack = itemCountEffective2;
				}
				if (GetItemCountEffective(self) <= 0 && Object.op_Implicit((Object)(object)apathyCoreBehavior))
				{
					Object.Destroy((Object)(object)((Component)self).GetComponent<ApathyCoreBehavior>());
				}
			};
			RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)delegate(CharacterBody orig, StatHookEventArgs self)
			{
				//IL_003a: Unknown result type (might be due to invalid IL or missing references)
				if (Object.op_Implicit((Object)(object)orig.inventory))
				{
					int itemCountEffective = orig.inventory.GetItemCountEffective(ItemInit.ApathyCoreHidden.ItemDef);
					if (itemCountEffective > 0)
					{
						orig.SetBuffCount(ApathyBuff.buffIndex, itemCountEffective);
					}
					int num = orig.GetBuffCount(ApathyBuff) + orig.GetBuffCount(ApathyBuffTemp);
					if (num > 0)
					{
						self.baseShieldAdd += (float)num * ApathyCore_ShieldGain.Value;
						self.armorAdd += (float)num * ApathyCore_ArmorGain.Value;
						self.critDamageMultAdd += (float)num * ApathyCore_CriticalDamage.Value;
					}
				}
			};
		}

		public override void AddCorruptionRecipe()
		{
			if (ApathyCore_Recipe.Value)
			{
				ItemInit.MakeCorruptionRecipe(ApathyCore_Ingredient1.Value, ApathyCore_Ingredient2.Value, ((Object)ItemDef).name);
			}
		}

		public override ItemDisplayRuleDict AddItemDisplays()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false));
			return new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>());
		}

		public void CreateApathyBuff()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			BuffDef val = ScriptableObject.CreateInstance<BuffDef>();
			val.buffColor = new Color(1f, 0.282f, 0.392f);
			val.canStack = true;
			val.isDebuff = false;
			val.ignoreGrowthNectar = false;
			((Object)val).name = "Apathy Core";
			val.isHidden = false;
			val.isCooldown = false;
			val.iconSprite = Main.Assets.LoadAsset<Sprite>("Assets/icons/apathyCoreBuffPerm.png");
			ContentAddition.AddBuffDef(val);
			ApathyBuff = val;
		}

		public void CreateApathyBuffTemp()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			BuffDef val = ScriptableObject.CreateInstance<BuffDef>();
			val.buffColor = new Color(1f, 0.282f, 0.392f);
			val.canStack = true;
			val.isDebuff = false;
			val.ignoreGrowthNectar = false;
			((Object)val).name = "Apathy Core (Temporary)";
			val.isHidden = false;
			val.isCooldown = false;
			val.iconSprite = Main.Assets.LoadAsset<Sprite>("Assets/icons/apathyCoreBuffTemp.png");
			ContentAddition.AddBuffDef(val);
			ApathyBuffTemp = val;
		}

		public List<string> GetAllAllyNames()
		{
			List<string> list = new List<string>();
			list.AddRange(PermanentAllies);
			if (!Utility.IsNullOrWhiteSpace(ApathyCore_ExtraDrones.Value))
			{
				List<string> list2 = ApathyCore_ExtraDrones.Value.Split(',').ToList();
				for (int i = 0; i < list2.Count; i++)
				{
					list2[i] = list2[i].Trim();
				}
				list.AddRange(list2);
			}
			return list;
		}
	}
	public class ApathyCoreBehavior : ItemBehavior
	{
		private float consumptionTimer = 0f;

		private float consumptionInterval = ApathyCore.ApathyCore_ConsumptionInterval.Value;

		private float effectTimer = 0f;

		private float effectInterval = 0.5f;

		private bool effectStarted = false;

		private void FixedUpdate()
		{
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Expected O, but got Unknown
			consumptionTimer += Time.fixedDeltaTime;
			if (consumptionTimer >= consumptionInterval)
			{
				TryConsumeAlly();
				consumptionTimer = 0f;
			}
			if (!effectStarted)
			{
				return;
			}
			effectTimer += Time.fixedDeltaTime;
			if (effectTimer >= effectInterval)
			{
				EffectData val = new EffectData
				{
					origin = base.body.corePosition
				};
				EffectManager.SpawnEffect(ItemInit.ApathyCore.individualExplodePrefab, val, true);
				ModelLocator component = ((Component)base.body).gameObject.GetComponent<ModelLocator>();
				if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.modelTransform) && Object.op_Implicit((Object)(object)((Component)component.modelTransform).GetComponentInParent<CharacterModel>()))
				{
					TemporaryOverlay val2 = ((Component)base.body).gameObject.AddComponent<TemporaryOverlay>();
					val2.duration = 1f;
					val2.animateShaderAlpha = true;
					val2.alphaCurve = AnimationCurve.Linear(0f, 1f, 1f, 0f);
					val2.destroyComponentOnEnd = true;
					val2.originalMaterial = ItemInit.ApathyCore.ExplodeOverlay;
					val2.AddToCharacerModel(((Component)component.modelTransform).GetComponentInParent<CharacterModel>());
				}
				effectTimer = 0f;
				effectStarted = false;
			}
		}

		private void TryConsumeAlly()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Expected O, but got Unknown
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			CharacterBody[] minionBodies = base.body.GetMinionBodies();
			Util.ShuffleArray<CharacterBody>(minionBodies);
			CharacterBody[] array = minionBodies;
			foreach (CharacterBody val in array)
			{
				if (!Object.op_Implicit((Object)(object)val.master))
				{
					continue;
				}
				EffectData val2 = new EffectData
				{
					origin = val.corePosition
				};
				EffectManager.SpawnEffect(ItemInit.ApathyCore.explodePrefab, val2, true);
				CollapseInfectOrb.CreateInfectOrb(val.corePosition, base.body.mainHurtBox);
				Util.PlaySound(ChargeFire.attackSoundEffect, ((Component)base.body).gameObject);
				effectStarted = true;
				bool flag = false;
				foreach (string allAllyName in ItemInit.ApathyCore.GetAllAllyNames())
				{
					if (((Object)val).name.ToLower().Contains(allAllyName))
					{
						flag = true;
					}
				}
				if (flag)
				{
					base.body.inventory.GiveItemPermanent(ItemInit.ApathyCoreHidden.ItemDef, 1);
				}
				else
				{
					base.body.AddTimedBuff(ItemInit.ApathyCore.ApathyBuffTemp, ApathyCore.ApathyCore_TemporaryBuffLength.Value * (float)base.stack);
				}
				base.body.RecalculateStats();
				if (Object.op_Implicit((Object)(object)base.body.skillLocator))
				{
					if (base.body.skillLocator.primary.maxStock >= 1 && ApathyCore.ApathyCore_SkillChargeGainPrimary.Value)
					{
						base.body.skillLocator.primary.AddOneStock();
					}
					if (base.body.skillLocator.secondary.maxStock >= 1 && ApathyCore.ApathyCore_SkillChargeGainSecondary.Value)
					{
						base.body.skillLocator.secondary.AddOneStock();
					}
					if (base.body.skillLocator.utility.maxStock >= 1 && ApathyCore.ApathyCore_SkillChargeGainUtility.Value)
					{
						base.body.skillLocator.utility.AddOneStock();
					}
					if (base.body.skillLocator.special.maxStock >= 1 && ApathyCore.ApathyCore_SkillChargeGainSpecial.Value)
					{
						base.body.skillLocator.special.AddOneStock();
					}
				}
				if (Object.op_Implicit((Object)(object)val.inventory))
				{
					val.inventory.GiveItemPermanent(Items.Ghost, 1);
				}
				val.master.TrueKill();
				break;
			}
		}
	}
	public class ApathyCoreHidden : ItemBase
	{
		public override bool Enabled => ApathyCore.ApathyCore_Enabled.Value;

		public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC2/Items/LowerPricedChests/LowerPricedChests.asset").WaitForCompletion();

		public ItemDef ConversionItemDefConsumed => Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC2/Items/LowerPricedChests/LowerPricedChestsConsumed.asset").WaitForCompletion();

		public override GameObject itemPrefab => null;

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

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


		public override void FormatDescriptionTokens()
		{
		}

		public override void RegisterHooks()
		{
		}

		public override void AddCorruptionRecipe()
		{
		}

		public override ItemDisplayRuleDict AddItemDisplays()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			return new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>());
		}
	}
	public class DeepVoidSignal : ItemBase
	{
		private ExplicitPickupDropTable _explicitPickupDropTable;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ExplicitPickupDropTable <explicitPickupDropTable>k__BackingField;

		public static ConfigItem<bool> DeepVoidSignal_Enabled = new ConfigItem<bool>("Void boss: Deep Void Signal", "Item enabled", "Should this item appear in runs?", _defaultValue: true);

		public static ConfigItem<int> DeepVoidSignal_InfestorSpawns = new ConfigItem<int>("Void boss: Deep Void Signal", "Void Infestor spawns", "When using an interactable, how many Void Infestors should spawn?", 2, 1f, 5f, 1f);

		public static ConfigItem<int> DeepVoidSignal_InfestorSpawnsStack = new ConfigItem<int>("Void boss: Deep Void Signal", "Void Infestor spawns (per stack)", "When using an interactable, how many Void Infestors should spawn per additional stack?", 2, 1f, 5f, 1f);

		public static ConfigItem<float> DeepVoidSignal_VoidPowerDuration = new ConfigItem<float>("Void boss: Deep Void Signal", "Voidtouched power on interact duration", "How long the Voidtouched buff should last after using an interactable, in seconds", 6f, 1f, 12f, 1f);

		public static ConfigItem<float> DeepVoidSignal_VoidPowerDurationStack = new ConfigItem<float>("Void boss: Deep Void Signal", "Voidtouched power on interact duration (per stack)", "How long the Voidtouched buff should last after using an interactable, in seconds per additional stack", 2f, 1f, 12f, 1f);

		public static ConfigItem<bool> DeepVoidSignal_Recipe = new ConfigItem<bool>("Void boss: Deep Void Signal", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> DeepVoidSignal_Ingredient1 = new ConfigItem<string>("Void boss: Deep Void Signal", "Recipe ingredient 1", "First ingredient for corruption recipe", "ShockDamageAura");

		public static ConfigItem<string> DeepVoidSignal_Ingredient2 = new ConfigItem<string>("Void boss: Deep Void Signal", "Recipe ingredient 2", "Second ingredient for corruption recipe", "PaleStar");

		public override bool Enabled => DeepVoidSignal_Enabled.Value;

		public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC3/Items/ShockDamageAura/ShockDamageAura.asset").WaitForCompletion();

		public override GameObject itemPrefab => OverwritePrefabMaterials();

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

		public Material material0 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/CritGlassesVoid/matCritGlassesVoid.mat").WaitForCompletion();

		public Material material1 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/gauntlets/matGTVoidTerrain.mat").WaitForCompletion();

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

		public Material material3 => Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/VoidMegaCrab/matVoidCrabAntiMatterParticleStreak.mat").WaitForCompletion();

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

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

		public BuffDef voidBuffDef => Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/DLC1/EliteVoid/bdEliteVoid.asset").WaitForCompletion();

		public GameObject deathBombProjectile => Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Nullifier/NullifierDeathBombProjectile.prefab").WaitForCompletion();

		public GameObject bigDeathBombProjectile => Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabDeathBombProjectile.prefab").WaitForCompletion();

		public ExplicitPickupDropTable explicitPickupDropTable
		{
			get
			{
				//IL_002d: 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_004d: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)_explicitPickupDropTable == (Object)null)
				{
					_explicitPickupDropTable = ScriptableObject.CreateInstance<ExplicitPickupDropTable>();
					_explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1]
					{
						new PickupDefEntry
						{
							pickupDef = (Object)(object)ItemDef,
							pickupWeight = 1f
						}
					};
				}
				((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance);
				return _explicitPickupDropTable;
			}
			[CompilerGenerated]
			set
			{
				<explicitPickupDropTable>k__BackingField = value;
			}
		}

		public DeepVoidSignal(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/deepVoidSignal.prefab");
			Material[] materialArray = (Material[])(object)new Material[6] { material0, material1, material2, material3, material4, material5 };
			((Renderer)val.GetComponentInChildren<MeshRenderer>()).SetMaterialArray(materialArray);
			return val;
		}

		public override void FormatDescriptionTokens()
		{
			string descriptionToken = ItemDef.descriptionToken;
			LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), DeepVoidSignal_InfestorSpawns.Value, DeepVoidSignal_InfestorSpawnsStack.Value, DeepVoidSignal_VoidPowerDuration.Value, DeepVoidSignal_VoidPowerDurationStack.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
			CharacterBody.OnInventoryChanged += (hook_OnInventoryChanged)delegate(orig_OnInventoryChanged orig, CharacterBody self)
			{
				orig.Invoke(self);
				DeepVoidSignalBehavior deepVoidSignalBehavior = ((Component)self).GetComponent<DeepVoidSignalBehavior>();
				int itemCountEffective2 = GetItemCountEffective(self);
				if (GetItemCountEffective(self) > 0 && !Object.op_Implicit((Object)(object)deepVoidSignalBehavior))
				{
					deepVoidSignalBehavior = self.AddItemBehavior<DeepVoidSignalBehavior>(itemCountEffective2);
				}
				if (Object.op_Implicit((Object)(object)deepVoidSignalBehavior))
				{
					((ItemBehavior)deepVoidSignalBehavior).stack = itemCountEffective2;
				}
				if (GetItemCountEffective(self) <= 0 && Object.op_Implicit((Object)(object)deepVoidSignalBehavior))
				{
					Object.Destroy((Object)(object)((Component)self).GetComponent<DeepVoidSignalBehavior>());
				}
			};
			GlobalEventManager.OnInteractionBegin += (hook_OnInteractionBegin)delegate(orig_OnInteractionBegin orig, GlobalEventManager self, Interactor interactor, IInteractable interactable, GameObject interactableObject)
			{
				//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bd: Expected O, but got Unknown
				//IL_00cf: 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_009d: Expected O, but got Unknown
				orig.Invoke(self, interactor, interactable, interactableObject);
				InteractionProcFilter interactionProcFilter;
				if (Object.op_Implicit((Object)(object)interactor) && interactable != null && Object.op_Implicit((Object)(object)interactableObject))
				{
					CharacterBody component = ((Component)interactor).GetComponent<CharacterBody>();
					interactionProcFilter = interactableObject.GetComponent<InteractionProcFilter>();
					if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory) && GetItemCountEffective(component) > 0 && InteractableIsPermittedForSpawn((MonoBehaviour)interactable))
					{
						int itemCountEffective = GetItemCountEffective(component);
						GameObject val3 = new GameObject("infestorSpawner");
						val3.transform.position = interactableObject.transform.position;
						DeepVoidSignalInfestorSpawner deepVoidSignalInfestorSpawner = val3.AddComponent<DeepVoidSignalInfestorSpawner>();
						deepVoidSignalInfestorSpawner.Initialize(DeepVoidSignal_InfestorSpawns.Value + DeepVoidSignal_InfestorSpawnsStack.Value * (itemCountEffective - 1));
						component.AddTimedBuff(voidBuffDef, DeepVoidSignal_VoidPowerDuration.Value + DeepVoidSignal_VoidPowerDurationStack.Value * (float)(itemCountEffective - 1));
					}
				}
				bool InteractableIsPermittedForSpawn(MonoBehaviour interactableAsMonoBehaviour)
				{
					if (!Object.op_Implicit((Object)(object)interactableAsMonoBehaviour))
					{
						return false;
					}
					if (Object.op_Implicit((Object)(object)interactionProcFilter))
					{
						return interactionProcFilter.shouldAllowOnInteractionBeginProc;
					}
					if (interactable is PurchaseInteraction)
					{
						return !interactableObject.GetComponent<PurchaseInteraction>().disableSpawnOnInteraction;
					}
					if (Object.op_Implicit((Object)(object)((Component)interactableAsMonoBehaviour).GetComponent<DelusionChestController>()))
					{
						if (((Behaviour)((Component)interactableAsMonoBehaviour).GetComponent<PickupPickerController>()).enabled)
						{
							return false;
						}
						return true;
					}
					if (Object.op_Implicit((Object)(object)((Component)interactableAsMonoBehaviour).GetComponent<GenericPickupController>()))
					{
						return false;
					}
					if (Object.op_Implicit((Object)(object)((Component)interactableAsMonoBehaviour).GetComponent<VehicleSeat>()))
					{
						return false;
					}
					if (Object.op_Implicit((Object)(object)((Component)interactableAsMonoBehaviour).GetComponent<NetworkUIPromptController>()))
					{
						return false;
					}
					if (Object.op_Implicit((Object)(object)((Component)interactableAsMonoBehaviour).GetComponent<PowerPedestal>()))
					{
						return ((Component)interactableAsMonoBehaviour).GetComponent<PowerPedestal>().CanTriggerFireworks;
					}
					if (Object.op_Implicit((Object)(object)((Component)interactableAsMonoBehaviour).GetComponent<AccessCodesNodeController>()))
					{
						return ((Component)interactableAsMonoBehaviour).GetComponent<AccessCodesNodeController>().CheckInteractionOrder();
					}
					return true;
				}
			};
			GlobalEventManager.OnCharacterDeath += (hook_OnCharacterDeath)delegate(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport)
			{
				//IL_0042: Unknown result type (might be due to invalid IL or missing references)
				//IL_0075: Unknown result type (might be due to invalid IL or missing references)
				//IL_007a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0081: Unknown result type (might be due to invalid IL or missing references)
				//IL_0086: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
				orig.Invoke(self, damageReport);
				if (Object.op_Implicit((Object)(object)damageReport.victimBody) && damageReport.victimBody.HasBuff(voidBuffDef) && (Object)(object)Object.FindAnyObjectByType<DeepVoidSignalBehavior>() != (Object)null)
				{
					FireProjectileInfo val = default(FireProjectileInfo);
					val.projectilePrefab = ((damageReport.victimIsChampion || damageReport.victimIsBoss) ? bigDeathBombProjectile : deathBombProjectile);
					val.position = damageReport.victimBody.corePosition;
					val.rotation = Quaternion.identity;
					val.owner = ((Component)damageReport.victimBody).gameObject;
					val.damage = damageReport.victimBody.damage;
					val.crit = damageReport.victimBody.RollCrit();
					FireProjectileInfo val2 = val;
					ProjectileManager.instance.FireProjectile(val2);
				}
			};
		}

		public override void AddCorruptionRecipe()
		{
			if (DeepVoidSignal_Recipe.Value)
			{
				ItemInit.MakeCorruptionRecipe(DeepVoidSignal_Ingredient1.Value, DeepVoidSignal_Ingredient2.Value, ((Object)ItemDef).name);
			}
		}

		public override ItemDisplayRuleDict AddItemDisplays()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false));
			return new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>());
		}
	}
	public class DeepVoidSignalBehavior : ItemBehavior
	{
	}
	public class DeepVoidSignalInfestorSpawner : MonoBehaviour
	{
		private float spawnInterval = 0.5f;

		private float spawnTimer = 0.5f;

		private bool initialized = false;

		private int spawnAmount = 0;

		public void Initialize(int _spawnAmount)
		{
			spawnAmount = _spawnAmount;
			initialized = true;
		}

		private void FixedUpdate()
		{
			if (!initialized)
			{
				return;
			}
			spawnTimer += Time.fixedDeltaTime;
			if (spawnTimer > spawnInterval)
			{
				SpawnInfestor();
				spawnAmount--;
				if (spawnAmount <= 0)
				{
					Object.Destroy((Object)(object)((Component)this).gameObject);
				}
			}
		}

		private void SpawnInfestor()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = default(Vector3);
			((Vector3)(ref val))..ctor(((Component)this).gameObject.transform.position.x, ((Component)this).gameObject.transform.position.y + 2f, ((Component)this).gameObject.transform.position.z);
			GameObject val2 = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/EliteVoid/VoidInfestorMaster.prefab").WaitForCompletion(), val, Quaternion.identity);
			CharacterMaster component = val2.GetComponent<CharacterMaster>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.teamIndex = (TeamIndex)4;
				NetworkServer.Spawn(val2);
				component.SpawnBodyHere();
			}
		}
	}
	public class DrenchedPerforator : ItemBase
	{
		private GameObject _explodePrefab;

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

		private GameObject _individualExplodePrefab;

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

		private ExplicitPickupDropTable _explicitPickupDropTable;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ExplicitPickupDropTable <explicitPickupDropTable>k__BackingField;

		public static ModdedProcType DrenchedPerforatorProcType = ProcTypeAPI.ReserveProcType();

		public static ConfigItem<bool> DrenchedPerforator_Enabled = new ConfigItem<bool>("Void boss: Drenched Perforator", "Item enabled", "Should this item appear in runs?", _defaultValue: true);

		public static ConfigItem<float> DrenchedPerforator_Threshold = new ConfigItem<float>("Void boss: Drenched Perforator", "Damage threshold", "Repeating fractional damage threshold for additional stacks of collapse to be added.", 6f, 1f, 12f, 0.5f);

		public static ConfigItem<int> DrenchedPerforator_Stacks = new ConfigItem<int>("Void boss: Drenched Perforator", "Collapse stacks", "Number of stacks of collapse to add on passing threshold.", 1, 1f, 5f, 1f);

		public static ConfigItem<int> DrenchedPerforator_StacksStack = new ConfigItem<int>("Void boss: Drenched Perforator", "Collapse stacks (per stack)", "Number of stacks of collapse to add on passing threshold, per additional stack.", 1, 1f, 5f, 1f);

		public static ConfigItem<float> DrenchedPerforator_ExplosionRadiusv2 = new ConfigItem<float>("Void boss: Drenched Perforator", "Explosion radius", "Meters radius for the base collapse explosion.", 12f, 1f, 24f, 1f);

		public static ConfigItem<float> DrenchedPerforator_ExplosionRadiusIncreasev2 = new ConfigItem<float>("Void boss: Drenched Perforator", "Explosion radius increase", "Meters radius the collapse explosion expands when additional collapse stacks are added.", 4f, 1f, 8f, 1f);

		public static ConfigItem<float> DrenchedPerforator_ExplosionDamage = new ConfigItem<float>("Void boss: Drenched Perforator", "Explosion damage", "Fractional damage (1 = 100%) dealt by explosion.", 4f, 1f, 12f, 0.1f);

		public static ConfigItem<float> DrenchedPerforator_ExplosionProcCoefficient = new ConfigItem<float>("Void boss: Drenched Perforator", "Explosion proc coefficient", "Proc coefficient of the on-collapse explosion.", 0.2f, 0f, 1f, 0.05f);

		public static ConfigItem<bool> DrenchedPerforator_Recipe = new ConfigItem<bool>("Void boss: Drenched Perforator", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> DrenchedPerforator_Ingredient1 = new ConfigItem<string>("Void boss: Drenched Perforator", "Recipe ingredient 1", "First ingredient for corruption recipe", "FireballsOnHit");

		public static ConfigItem<string> DrenchedPerforator_Ingredient1Alt = new ConfigItem<string>("Void boss: Drenched Perforator", "Recipe ingredient 1 (alt)", "First ingredient for corruption recipe (alt)", "LightningStrikeOnHit");

		public static ConfigItem<string> DrenchedPerforator_Ingredient2 = new ConfigItem<string>("Void boss: Drenched Perforator", "Recipe ingredient 2", "Second ingredient for corruption recipe", "HydraTooth");

		public override bool Enabled => DrenchedPerforator_Enabled.Value;

		public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/FireballsOnHit/FireballsOnHit.asset").WaitForCompletion();

		public override GameObject itemPrefab => OverwritePrefabMaterials();

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

		public ItemDef ConversionItemDefExtra => Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/LightningStrikeOnHit/LightningStrikeOnHit.asset").WaitForCompletion();

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

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

		public GameObject explodePrefab
		{
			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)_explodePrefab == (Object)null)
				{
					_explodePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabDeathBombExplosion.prefab").WaitForCompletion();
				}
				return _explodePrefab;
			}
			[CompilerGenerated]
			set
			{
				<explodePrefab>k__BackingField = value;
			}
		}

		public GameObject individualExplodePrefab
		{
			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)_individualExplodePrefab == (Object)null)
				{
					_individualExplodePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/BleedOnHitVoid/FractureImpactEffect.prefab").WaitForCompletion();
				}
				return _individualExplodePrefab;
			}
			[CompilerGenerated]
			set
			{
				<individualExplodePrefab>k__BackingField = value;
			}
		}

		public ExplicitPickupDropTable explicitPickupDropTable
		{
			get
			{
				//IL_002d: 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_004d: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)_explicitPickupDropTable == (Object)null)
				{
					_explicitPickupDropTable = ScriptableObject.CreateInstance<ExplicitPickupDropTable>();
					_explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1]
					{
						new PickupDefEntry
						{
							pickupDef = (Object)(object)ItemDef,
							pickupWeight = 1f
						}
					};
				}
				((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance);
				return _explicitPickupDropTable;
			}
			[CompilerGenerated]
			set
			{
				<explicitPickupDropTable>k__BackingField = value;
			}
		}

		public DrenchedPerforator(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/drenchedPerforator.prefab");
			Material[] materialArray = (Material[])(object)new Material[2] { material0, material1 };
			((Renderer)val.GetComponentInChildren<MeshRenderer>()).SetMaterialArray(materialArray);
			return val;
		}

		public override void FormatDescriptionTokens()
		{
			string descriptionToken = ItemDef.descriptionToken;
			LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), DrenchedPerforator_Threshold.Value * 100f, DrenchedPerforator_Stacks.Value, DrenchedPerforator_StacksStack.Value, DrenchedPerforator_ExplosionDamage.Value * 100f, DrenchedPerforator_ExplosionRadiusv2.Value, DrenchedPerforator_ExplosionRadiusIncreasev2.Value));
		}

		public override void RegisterHooks()
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: 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_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			Pair val = default(Pair);
			val.itemDef1 = ConversionItemDefExtra;
			val.itemDef2 = ItemDef;
			Pair item = val;
			Main.ItemConversionList.Add(item);
			Log.Info($"Added void conversion from {((Object)ConversionItemDefExtra).name} to {((Object)ItemDef).name}");
			GlobalEventManager.OnHitEnemy += (hook_OnHitEnemy)delegate(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victimObject)
			{
				//IL_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0021: Unknown result type (might be due to invalid IL or missing references)
				//IL_019a: Unknown result type (might be due to invalid IL or missing references)
				orig.Invoke(self, damageInfo, victimObject);
				CharacterBody val2 = default(CharacterBody);
				CharacterBody val3 = default(CharacterBody);
				if (!((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)19) && !ProcTypeAPI.HasModdedProc(damageInfo.procChainMask, DrenchedPerforatorProcType) && !damageInfo.rejected && damageInfo.procCoefficient > 0f && damageInfo.damage > 0f && Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent<CharacterBody>(ref val2) && Object.op_Implicit((Object)(object)val2.master) && victimObject.TryGetComponent<CharacterBody>(ref val3) && Object.op_Implicit((Object)(object)val3.healthComponent))
				{
					int itemCountEffective = GetItemCountEffective(val2);
					if (itemCountEffective > 0 && Object.op_Implicit((Object)(object)val2.teamComponent) && Object.op_Implicit((Object)(object)val3.teamComponent))
					{
						float num = (damageInfo.crit ? (damageInfo.damage * val2.critMultiplier) : damageInfo.damage);
						float num2 = num / val2.damage;
						if (num2 > 0f)
						{
							int num3 = Convert.ToInt32(Math.Floor(num2 / DrenchedPerforator_Threshold.Value));
							int num4 = (DrenchedPerforator_Stacks.Value + (itemCountEffective - 1) * DrenchedPerforator_StacksStack.Value) * num3;
							if (num4 > 0)
							{
								DotDef dotDef = DotController.GetDotDef((DotIndex)8);
								for (int i = 0; i < num4; i++)
								{
									DotController.InflictDot(victimObject, damageInfo.attacker, damageInfo.inflictedHurtbox, (DotIndex)8, dotDef.interval, 1f, (uint?)null);
								}
								CreateExplosion(val2, val3.corePosition, DrenchedPerforator_ExplosionRadiusv2.Value, DrenchedPerforator_ExplosionRadiusIncreasev2.Value * (float)(num4 - 1), damageInfo);
							}
						}
					}
				}
			};
		}

		public override void AddCorruptionRecipe()
		{
			if (DrenchedPerforator_Recipe.Value && ItemInit.HydraTooth.Enabled)
			{
				ItemInit.MakeCorruptionRecipe(DrenchedPerforator_Ingredient1.Value, DrenchedPerforator_Ingredient2.Value, ((Object)ItemDef).name);
				ItemInit.MakeCorruptionRecipe(DrenchedPerforator_Ingredient1Alt.Value, DrenchedPerforator_Ingredient2.Value, ((Object)ItemDef).name);
			}
		}

		public override ItemDisplayRuleDict AddItemDisplays()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			GameObject val = Helpers.PrepareItemDisplayModel(PrefabAPI.InstantiateClone(itemPrefab, ((Object)ItemDef).name + "Display", false));
			return new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>());
		}

		public void CreateExplosion(CharacterBody attackerBody, Vector3 position, float radius, float extraRadius, DamageInfo origDamageInfo)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: 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_0120: 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_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: 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_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: 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_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: 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_0195: Expected O, but got Unknown
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: 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_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e3: Expected O, but got Unknown
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Expected O, but got Unknown
			List<Collider> list = Physics.OverlapSphere(position, radius + extraRadius).ToList();
			Util.ShuffleList<Collider>(list);
			foreach (Collider item in list)
			{
				GameObject gameObject = ((Component)item).gameObject;
				if (Object.op_Implicit((Object)(object)gameObject.GetComponentInChildren<CharacterBody>()))
				{
					CharacterBody componentInChildren = gameObject.GetComponentInChildren<CharacterBody>();
					if (Object.op_Implicit((Object)(object)componentInChildren) && Object.op_Implicit((Object)(object)componentInChildren.teamComponent) && componentInChildren.teamComponent.teamIndex != attackerBody.teamComponent.teamIndex)
					{
						EffectData val = new EffectData
						{
							origin = componentInChildren.corePosition
						};
						EffectManager.SpawnEffect(individualExplodePrefab, val, true);
					}
				}
			}
			ProcTypeAPI.AddModdedProc(ref origDamageInfo.procChainMask, DrenchedPerforatorProcType);
			BlastAttack val2 = new BlastAttack
			{
				position = position,
				baseDamage = attackerBody.damage * DrenchedPerforator_ExplosionDamage.Value,
				baseForce = 0f,
				radius = radius + extraRadius,
				attacker = ((Component)attackerBody).gameObject,
				inflictor = null,
				teamIndex = attackerBody.teamComponent.teamIndex,
				crit = origDamageInfo.crit,
				procChainMask = origDamageInfo.procChainMask,
				procCoefficient = DrenchedPerforator_ExplosionProcCoefficient.Value,
				damageColorIndex = (DamageColorIndex)9,
				falloffModel = (FalloffModel)0,
				damageType = DamageTypeCombo.op_Implicit((DamageType)131072),
				attackerFiltering = (AttackerFiltering)2
			};
			val2.Fire();
			float num = 0f;
			num = ((!(extraRadius > 0f)) ? 0f : (extraRadius / radius));
			EffectData val3 = new EffectData
			{
				origin = position,
				scale = (1f + num) * 12f
			};
			EffectManager.SpawnEffect(explodePrefab, val3, true);
		}
	}
	public class EffigyOfRot : ItemBase
	{
		public class PoisonDoNotTransferBehavior : MonoBehaviour
		{
			private float timeLeft = EffigyOfRot_PoisonImmunityDuration.Value;

			private void FixedUpdate()
			{
				timeLeft -= Time.fixedDeltaTime;
				if (timeLeft <= 0f)
				{
					Object.Destroy((Object)(object)this);
				}
			}
		}

		private GameObject _poisonPrefab;

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

		private ExplicitPickupDropTable _explicitPickupDropTable;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		private ExplicitPickupDropTable <explicitPickupDropTable>k__BackingField;

		public static ConfigItem<bool> EffigyOfRot_Enabled = new ConfigItem<bool>("Void boss: Effigy Of Rot", "Item enabled", "Should this item appear in runs?", _defaultValue: true);

		public static ConfigItem<float> EffigyOfRot_PoisonDuration = new ConfigItem<float>("Void boss: Effigy Of Rot", "Poison duration", "Poison damage over time duration in seconds.", 10f, 1f, 20f, 1f);

		public static ConfigItem<float> EffigyOfRot_PoisonImmunityDuration = new ConfigItem<float>("Void boss: Effigy Of Rot", "Poison spread immunity duration", "Seconds of hidden immunity to poison applied after it spreads to an enemy. Prevents infinite poison loops.", 15f, 1f, 30f, 1f);

		public static ConfigItem<float> EffigyOfRot_HealthPerSecond = new ConfigItem<float>("Void boss: Effigy Of Rot", "Poison healing per second", "How much poison heals the inflictor per second.", 3f, 0.1f, 6f, 0.1f);

		public static ConfigItem<float> EffigyOfRot_HealthPerSecondStack = new ConfigItem<float>("Void boss: Effigy Of Rot", "Poison healing per second (per stack)", "How much poison heals the inflictor per second, per additional stack.", 3f, 0.1f, 6f, 0.1f);

		public static ConfigItem<float> EffigyOfRot_SpreadChance = new ConfigItem<float>("Void boss: Effigy Of Rot", "Poison spread chance per second", "Percent chance for poison to infect another enemy per second.", 10f, 0.1f, 10f, 0.1f);

		public static ConfigItem<float> EffigyOfRot_SpreadChanceStack = new ConfigItem<float>("Void boss: Effigy Of Rot", "Poison spread chance per second (per stack)", "Percent chance for poison to infect another enemy per second, per additional stack.", 5f, 0.1f, 5f, 0.1f);

		public static ConfigItem<float> EffigyOfRot_SpreadRadius = new ConfigItem<float>("Void boss: Effigy Of Rot", "Poison spread radius", "Poison can spread within this radius.", 20f, 1f, 40f, 1f);

		public static ConfigItem<float> EffigyOfRot_MeleeRange = new ConfigItem<float>("Void boss: Effigy Of Rot", "Melee range", "Meters range within which damage is considered to be melee. Measured from the center of your character to the damage point of contact.", 13f, 1f, 26f, 1f);

		public static ConfigItem<bool> EffigyOfRot_Recipe = new ConfigItem<bool>("Void boss: Effigy Of Rot", "Recipe enabled", "Should this item have a custom corruption recipe?", _defaultValue: true);

		public static ConfigItem<string> EffigyOfRot_Ingredient1 = new ConfigItem<string>("Void boss: Effigy Of Rot", "Recipe ingredient 1", "First ingredient for corruption recipe", "SiphonOnLowHealth");

		public static ConfigItem<string> EffigyOfRot_Ingredient2 = new ConfigItem<string>("Void boss: Effigy Of Rot", "Recipe ingredient 2", "Second ingredient for corruption recipe", "ViscousPot");

		public static ConfigItem<bool> EffigyOfRot_CorruptsAllMiredUrns = new ConfigItem<bool>("Void boss: Effigy Of Rot", "Corrupts all Mired Urns", "Corrupts all Mired Urns.", _defaultValue: false);

		public override bool Enabled => EffigyOfRot_Enabled.Value;

		public override ItemDef ConversionItemDef => Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/SiphonOnLowHealth/SiphonOnLowHealth.asset").WaitForCompletion();

		public override GameObject itemPrefab => OverwritePrefabMaterials();

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

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

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

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

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

		public GameObject PoisonPrefab
		{
			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)_poisonPrefab == (Object)null)
				{
					_poisonPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/MajorAndMinorConstruct/MajorConstructSpawnMinorConstructEffect.prefab").WaitForCompletion();
				}
				return _poisonPrefab;
			}
			[CompilerGenerated]
			set
			{
				<PoisonPrefab>k__BackingField = value;
			}
		}

		public ExplicitPickupDropTable explicitPickupDropTable
		{
			get
			{
				//IL_002d: 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_004d: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)_explicitPickupDropTable == (Object)null)
				{
					_explicitPickupDropTable = ScriptableObject.CreateInstance<ExplicitPickupDropTable>();
					_explicitPickupDropTable.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1]
					{
						new PickupDefEntry
						{
							pickupDef = (Object)(object)ItemDef,
							pickupWeight = 1f
						}
					};
				}
				((PickupDropTable)_explicitPickupDropTable).Regenerate(Run.instance);
				return _explicitPickupDropTable;
			}
			[CompilerGenerated]
			set
			{
				<explicitPickupDropTable>k__BackingField = value;
			}
		}

		public EffigyOfRot(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/effigyOfRot.prefab");
			Material[] materialArray = (Material[])(object)new Material[4] { material0, material1, material2, material3 };
			((Renderer)val.GetComponentInChildren<MeshRenderer>()).SetMaterialArray(materialArray);
			return val;
		}

		public override void FormatDescriptionTokens()
		{
			string nameToken = ItemDef.nameToken;
			string descriptionToken = ItemDef.descriptionToken;
			if (EffigyOfRot_CorruptsAllMiredUrns.Value)
			{
				LanguageAPI.AddOverlay(nameToken, "<style=cIsVoid>Corrupts all Mired Urns.</style>");
			}
			LanguageAPI.AddOverlay(descriptionToken, string.Format(Language.currentLanguage.GetLocalizedStringByToken(descriptionToken), EffigyOfRot_PoisonDuration.Value, EffigyOfRot_HealthPerSecond.Value, EffigyOfRot_HealthPerSecondStack.Value, EffigyOfRot_SpreadChance.Value, EffigyOfRot_SpreadChanceStack.Value, EffigyOfRot_SpreadRadius.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
			HealthComponent.TakeDamageProcess += (hook_TakeDamageProcess)delegate(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo)
			{
				//IL_010e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0114: Invalid comparison between Unknown and I4
				//IL_007b: 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_0117: Unknown result type (might be due to invalid IL or missing references)
				//IL_011d: Invalid comparison between Unknown and I4
				//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c9: Unknown result type (might be