Decompiled source of SivsContentPack v1.2.1

plugins/SivsContentPack.dll

Decompiled 4 days ago
using System;
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.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using EntityStates.Bison;
using EntityStates.ClayBruiser.Weapon;
using EntityStates.Duplicator;
using EntityStates.Interactables.GoldBeacon;
using EntityStates.LunarGolem;
using EntityStates.NullifierMonster;
using HG;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using On.EntityStates;
using On.EntityStates.Duplicator;
using On.RoR2;
using On.RoR2.CharacterSpeech;
using On.RoR2.Projectile;
using R2API;
using R2API.ContentManagement;
using R2API.ScriptableObjects;
using RoR2;
using RoR2.Achievements;
using RoR2.Achievements.Artifacts;
using RoR2.CharacterSpeech;
using RoR2.ExpansionManagement;
using RoR2.Navigation;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using SivsContentPack.Config;
using SivsContentPack.CustomEntityStates;
using SivsContentPack.CustomEntityStates.MiniConstructs;
using SivsContentPack.Items;
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("SivsContentPack")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+0116214d3742642c15e5c366288ec6140b07ac4a")]
[assembly: AssemblyProduct("SivsContentPack")]
[assembly: AssemblyTitle("SivsContentPack")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace SivsContentPack
{
	internal class Design : ArtifactFactory
	{
		public class DesignItemController : MonoBehaviour
		{
			public static DesignItemController instance;

			private void OnEnable()
			{
				if (!Object.op_Implicit((Object)(object)instance))
				{
					instance = this;
				}
				else
				{
					Object.Destroy((Object)(object)this);
				}
			}

			private void OnDisable()
			{
				if ((Object)(object)instance == (Object)(object)this)
				{
					instance = null;
				}
			}

			public int GetItemCount(ItemDef item)
			{
				if (itemLimitDictionary.ContainsKey(((Object)item).name))
				{
					return Math.Clamp(Run.instance.stageClearCount + 1, 0, itemLimitDictionary[((Object)item).name]);
				}
				return Run.instance.stageClearCount + 1;
			}
		}

		public static Dictionary<string, int> itemLimitDictionary = new Dictionary<string, int>
		{
			{ "BeetleGland", 2 },
			{ "RoboBallBuddy", 0 },
			{ "OrbitingConstructs", 0 },
			{ "GodMode", 2 },
			{ "VoidEye", 10 },
			{ "ThunderAura", 2 }
		};

		public static Dictionary<string, string> overrideItemDictionary = new Dictionary<string, string>
		{
			{ "BrotherBody", "GodMode" },
			{ "TitanGoldBody", "Knurl" },
			{ "MiniVoidRaidCrabBodyPhase1", "VoidEye" },
			{ "MiniVoidRaidCrabBodyPhase2", "VoidEye" }
		};

		protected override void LoadAssets(ref ArtifactDef artifactDef)
		{
			artifactDef = Assets.AssetBundles.Artifacts.LoadAsset<ArtifactDef>("adSpecializedItems");
			artifactCode = Assets.AssetBundles.Artifacts.LoadAsset<ArtifactCode>("acodeSpecializedItems");
		}

		protected override void HandleMaterials()
		{
			Material material = Assets.AssetBundles.Artifacts.LoadAsset<Material>("matDesignCore");
			Materials.SubmitMaterialFix(material, "Hopoo Games/Deferred/Standard");
		}

		protected override void Hooks()
		{
			//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
			CharacterMaster.OnBodyStart += new hook_OnBodyStart(CharacterMaster_OnBodyStart);
			Run.Awake += new hook_Awake(Run_Awake);
		}

		private void Run_Awake(orig_Awake orig, Run self)
		{
			orig.Invoke(self);
			DesignItemController designItemController = ((Component)self).gameObject.AddComponent<DesignItemController>();
		}

		private void CharacterMaster_OnBodyStart(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body)
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Invalid comparison between Unknown and I4
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, body);
			if (!RunArtifactManager.instance.IsArtifactEnabled(Content.Artifacts.EnemySpecializedItems) || !((Object)(object)DesignItemController.instance != (Object)null))
			{
				return;
			}
			TeamComponent teamComponent = body.teamComponent;
			if (!((Object)(object)teamComponent != (Object)null) || (int)teamComponent.teamIndex == 1)
			{
				return;
			}
			DeathRewards component = ((Component)body).GetComponent<DeathRewards>();
			if ((Object)(object)component != (Object)null)
			{
				PickupDropTable bossDropTable = component.bossDropTable;
				ExplicitPickupDropTable val = (ExplicitPickupDropTable)(object)((bossDropTable is ExplicitPickupDropTable) ? bossDropTable : null);
				if ((Object)(object)val != (Object)null)
				{
					PickupDefEntry[] pickupEntries = val.pickupEntries;
					foreach (PickupDefEntry val2 in pickupEntries)
					{
						Object pickupDef = val2.pickupDef;
						ItemDef val3 = (ItemDef)(object)((pickupDef is ItemDef) ? pickupDef : null);
						if (!((Object)(object)val3 != (Object)null))
						{
							continue;
						}
						bool flag = val3.ContainsTag((ItemTag)4);
						int itemCount = DesignItemController.instance.GetItemCount(val3);
						if (itemCount > 0 && !flag)
						{
							Debug.LogFormat("Design: Drop table found. Granting {0} {1} of item {2}.", new object[3]
							{
								((Component)body).gameObject,
								itemCount,
								((Object)val3).name
							});
							Inventory inventory = body.inventory;
							if ((Object)(object)inventory != (Object)null)
							{
								inventory.GiveItem(val3, itemCount);
							}
						}
					}
				}
			}
			string key = ((Object)((Component)body).gameObject).name.Replace("(Clone)", "");
			if (!overrideItemDictionary.ContainsKey(key))
			{
				return;
			}
			ItemDef itemDef = ItemCatalog.GetItemDef(ItemCatalog.itemNameToIndex[overrideItemDictionary[key]]);
			if (!((Object)(object)itemDef != (Object)null))
			{
				return;
			}
			bool flag2 = itemDef.ContainsTag((ItemTag)4);
			int itemCount2 = DesignItemController.instance.GetItemCount(itemDef);
			if (itemCount2 > 0 && !flag2)
			{
				Debug.LogFormat("Design: Body override found. Granting {0} {1} of item {2}.", new object[3]
				{
					((Component)body).gameObject,
					itemCount2,
					((Object)itemDef).name
				});
				Inventory inventory2 = body.inventory;
				if ((Object)(object)inventory2 != (Object)null)
				{
					inventory2.GiveItem(itemDef, itemCount2);
				}
			}
		}
	}
	public static class Assets
	{
		public static class AssetBundles
		{
			public static AssetBundle Main;

			public static AssetBundle Items;

			public static AssetBundle Elites;

			public static AssetBundle Artifacts;
		}

		public const string assetBundleFolder = "Assets";

		public static string AssetBundlePath(string bundleName)
		{
			return Path.Combine(Path.GetDirectoryName(SivsContentPack.PInfo.Location), "Assets", bundleName);
		}

		public static void Init()
		{
			AssetBundles.Main = AssetBundle.LoadFromFile(AssetBundlePath("sivscontentpack_main"));
			AssetBundles.Items = AssetBundle.LoadFromFile(AssetBundlePath("sivscontentpack_items"));
			AssetBundles.Elites = AssetBundle.LoadFromFile(AssetBundlePath("sivscontentpack_elites"));
			AssetBundles.Artifacts = AssetBundle.LoadFromFile(AssetBundlePath("sivscontentpack_artifacts"));
		}
	}
	public class AffixBlack : BuffFactory
	{
		private class AffixBlackController : ItemBehavior
		{
			private void FixedUpdate()
			{
				//IL_008f: Unknown result type (might be due to invalid IL or missing references)
				//IL_009f: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
				//IL_0109: Unknown result type (might be due to invalid IL or missing references)
				//IL_0114: Unknown result type (might be due to invalid IL or missing references)
				//IL_0120: Unknown result type (might be due to invalid IL or missing references)
				//IL_0125: Unknown result type (might be due to invalid IL or missing references)
				//IL_012a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0136: Unknown result type (might be due to invalid IL or missing references)
				//IL_013b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0142: Expected O, but got Unknown
				if (base.stack > 0 && NetworkServer.active && Object.op_Implicit((Object)(object)base.body))
				{
					if (!base.body.HasBuff(Buffs.Cloak) && base.body.outOfCombat && base.body.outOfDanger)
					{
						Util.PlaySound("Play_elite_haunt_ghost_convert", ((Component)base.body).gameObject);
						Object.Instantiate<GameObject>(cloakActiveEffect, base.body.transform.position, base.body.transform.rotation);
						base.body.AddBuff(Buffs.Cloak);
					}
					else if (base.body.HasBuff(Buffs.Cloak) && (!base.body.outOfCombat || !base.body.outOfDanger))
					{
						EffectData val = new EffectData
						{
							origin = base.body.transform.position,
							rotation = base.body.transform.rotation,
							start = base.body.transform.position
						};
						EffectManager.SpawnEffect(Content.Effects.ShadowCloakBreak.prefab, val, true);
						base.body.RemoveBuff(Buffs.Cloak);
					}
				}
			}

			private void OnDisable()
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0027: Unknown result type (might be due to invalid IL or missing references)
				//IL_0032: 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_0043: Unknown result type (might be due to invalid IL or missing references)
				//IL_0048: Unknown result type (might be due to invalid IL or missing references)
				//IL_0054: Unknown result type (might be due to invalid IL or missing references)
				//IL_0059: Unknown result type (might be due to invalid IL or missing references)
				//IL_005f: Expected O, but got Unknown
				if (base.body.HasBuff(Buffs.Cloak))
				{
					EffectData val = new EffectData
					{
						origin = base.body.transform.position,
						rotation = base.body.transform.rotation,
						start = base.body.transform.position
					};
					EffectManager.SpawnEffect(Content.Effects.ShadowCloakBreak.prefab, val, true);
					base.body.RemoveBuff(Buffs.Cloak);
				}
			}
		}

		public static GameObject cloakActiveEffect;

		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Elites.LoadAsset<BuffDef>("bdEliteShadow");
			cloakActiveEffect = Assets.AssetBundles.Elites.LoadAsset<GameObject>("ShadowCloakEffect");
		}

		protected override bool CheckIfEnabled()
		{
			return Configuration.Elites.Obscuring.enabled.Value;
		}

		protected override void HandleMaterials()
		{
			Material material = Assets.AssetBundles.Elites.LoadAsset<Material>("matShadowCloak");
			Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Opaque Cloud Remap");
			material = Assets.AssetBundles.Elites.LoadAsset<Material>("matShadowTracer");
			Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Opaque Cloud Remap");
			material = Assets.AssetBundles.Items.LoadAsset<Material>("matDistortion");
			Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Distortion");
		}

		protected override void Hooks()
		{
			//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
			GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy);
			CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(CharacterBody_OnInventoryChanged);
		}

		private void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self)
		{
			if ((Object)(object)self != (Object)null)
			{
				self.AddItemBehavior<AffixBlackController>(self.HasBuff(Content.Buffs.AffixShadow) ? 1 : 0);
			}
			orig.Invoke(self);
		}

		private void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim)
		{
			orig.Invoke(self, damageInfo, victim);
			GameObject attacker = damageInfo.attacker;
			if (!((Object)(object)attacker != (Object)null))
			{
				return;
			}
			CharacterBody component = attacker.GetComponent<CharacterBody>();
			if ((Object)(object)component != (Object)null && component.HasBuff(Content.Buffs.AffixShadow))
			{
				CharacterBody component2 = victim.GetComponent<CharacterBody>();
				if ((Object)(object)component2 != (Object)null)
				{
					component2.AddTimedBuff(Buffs.Blinded, Configuration.Elites.Obscuring.blindnessDuration * damageInfo.procCoefficient);
				}
			}
		}
	}
	public class AffixUnstable : BuffFactory
	{
		private class AffixUnstableController : ItemBehavior
		{
			private float fireballTimer;

			private int fireballsToLaunch;

			private float launchInterval;

			private void Start()
			{
				fireballTimer = Configuration.Elites.Unstable.fireballInterval;
			}

			private void FixedUpdate()
			{
				//IL_0055: Unknown result type (might be due to invalid IL or missing references)
				//IL_009f: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
				if (fireballTimer <= 0f)
				{
					if (fireballsToLaunch > 0)
					{
						if (launchInterval <= 0f)
						{
							if (fireballsToLaunch > 0)
							{
								FireProjectileInfo val = default(FireProjectileInfo);
								val.owner = ((Component)base.body).gameObject;
								val.crit = base.body.RollCrit();
								val.damage = base.body.damage * Configuration.Elites.Unstable.fireBallDamageCoefficient;
								val.position = base.body.corePosition;
								val.rotation = Util.QuaternionSafeLookRotation(Vector3.up + Random.insideUnitSphere * 0.5f);
								val.projectilePrefab = Content.Misc.EliteUnstableFireball;
								val.procChainMask = default(ProcChainMask);
								FireProjectileInfo val2 = val;
								ProjectileManager.instance.FireProjectile(val2);
								fireballsToLaunch--;
								launchInterval = Configuration.Elites.Unstable.fireballInterval * 0.05f;
								if (fireballsToLaunch <= 0)
								{
									fireballTimer = Configuration.Elites.Unstable.fireballInterval;
								}
							}
						}
						else
						{
							launchInterval -= Time.deltaTime;
						}
					}
					else
					{
						fireballsToLaunch = Configuration.Elites.Unstable.fireBallCount;
						launchInterval = Configuration.Elites.Unstable.fireballInterval * 0.05f;
					}
				}
				else
				{
					fireballTimer -= Time.deltaTime;
				}
			}
		}

		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Elites.LoadAsset<BuffDef>("bdEliteUnstable");
			Content.Misc.EliteUnstableFireball = Assets.AssetBundles.Elites.LoadAsset<GameObject>("EliteUnstableFireball");
			ContentAddition.AddProjectile(Content.Misc.EliteUnstableFireball);
		}

		protected override bool CheckIfEnabled()
		{
			return Configuration.Elites.Unstable.enabled.Value;
		}

		protected override void HandleMaterials()
		{
			Material material = Assets.AssetBundles.Elites.LoadAsset<Material>("matUnstableFireball");
			Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Cloud Remap");
			material = Assets.AssetBundles.Elites.LoadAsset<Material>("matUnstableLightshaft");
			Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Cloud Remap");
		}

		protected override void Hooks()
		{
			//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
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
			CharacterBody.OnClientBuffsChanged += new hook_OnClientBuffsChanged(CharacterBody_OnClientBuffsChanged);
		}

		private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
		{
			if (sender.HasBuff(Content.Buffs.AffixUnstable))
			{
				args.damageMultAdd += Configuration.Elites.Unstable.damageMult;
				args.baseCurseAdd += Configuration.Elites.Unstable.healthMult;
			}
		}

		private void CharacterBody_OnClientBuffsChanged(orig_OnClientBuffsChanged orig, CharacterBody self)
		{
			orig.Invoke(self);
			self.AddItemBehavior<AffixUnstableController>(self.HasBuff(Content.Buffs.AffixUnstable) ? 1 : 0);
		}
	}
	public class AffixTar : BuffFactory
	{
		public class TarLifeStealOrb : GenericDamageOrb
		{
			public override GameObject GetOrbEffect()
			{
				return Content.Effects.TarLifeStealOrb.prefab;
			}

			public override void OnArrival()
			{
				//IL_0043: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)((Orb)this).target != (Object)null)
				{
					HealthComponent healthComponent = ((Orb)this).target.healthComponent;
					if ((Object)(object)healthComponent != (Object)null && healthComponent.alive)
					{
						healthComponent.Heal(base.damageValue * Configuration.Elites.Tar.lifeStealCoefficient, base.procChainMask, true);
					}
				}
			}
		}

		public class EliteTarController : ItemBehavior
		{
			private GameObject bodyAttachmentInstance;

			private void OnEnable()
			{
				//IL_0058: Unknown result type (might be due to invalid IL or missing references)
				//IL_005d: Unknown result type (might be due to invalid IL or missing references)
				//IL_007c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0081: Unknown result type (might be due to invalid IL or missing references)
				if (!Object.op_Implicit((Object)(object)bodyAttachmentInstance))
				{
					bodyAttachmentInstance = Object.Instantiate<GameObject>(bodyAttachment, ((Component)this).gameObject.transform);
					NetworkedBodyAttachment component = bodyAttachmentInstance.GetComponent<NetworkedBodyAttachment>();
					EntityStateMachine.FindByCustomName(bodyAttachmentInstance, "Main").initialStateType = Content.SerializableEntityStates.EntityStateDictionary["TarBodyAttachmentState"];
					EntityStateMachine.FindByCustomName(bodyAttachmentInstance, "Main").mainStateType = Content.SerializableEntityStates.EntityStateDictionary["TarBodyAttachmentState"];
					if ((Object)(object)component != (Object)null)
					{
						component.AttachToGameObjectAndSpawn(((Component)this).gameObject, (string)null);
					}
				}
			}

			private void OnDisable()
			{
				if (Object.op_Implicit((Object)(object)bodyAttachmentInstance))
				{
					Object.Destroy((Object)(object)bodyAttachmentInstance);
				}
			}
		}

		public static Material tarOverlayMaterial;

		public static Material tarParticleReplacementMaterial;

		public static GameObject bodyAttachment;

		private static readonly Color tarEliteLightColor = Color32.op_Implicit(new Color32((byte)170, (byte)89, (byte)59, (byte)204));

		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Elites.LoadAsset<BuffDef>("bdEliteTar");
			bodyAttachment = Assets.AssetBundles.Elites.LoadAsset<GameObject>("TarDripBodyAttachment");
		}

		protected override bool CheckIfEnabled()
		{
			return Configuration.Elites.Tank.enabled.Value;
		}

		protected override void HandleMaterials()
		{
			tarOverlayMaterial = Assets.AssetBundles.Elites.LoadAsset<Material>("matEliteTarOverlay");
			Materials.SubmitMaterialFix(tarOverlayMaterial, "Hopoo Games/FX/Opaque Cloud Remap");
			Material material = Assets.AssetBundles.Elites.LoadAsset<Material>("matTarDroplet");
			Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Opaque Cloud Remap");
			tarParticleReplacementMaterial = Assets.AssetBundles.Elites.LoadAsset<Material>("matEliteTarParticleReplacement");
			Materials.SubmitMaterialFix(tarParticleReplacementMaterial, "Hopoo Games/FX/Opaque Cloud Remap");
		}

		protected override void Hooks()
		{
			//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
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy);
			CharacterModel.UpdateRendererMaterials += new hook_UpdateRendererMaterials(CharacterModel_UpdateRendererMaterials);
			CharacterBody.OnClientBuffsChanged += new hook_OnClientBuffsChanged(CharacterBody_OnClientBuffsChanged);
			CharacterModel.InstanceUpdate += new hook_InstanceUpdate(CharacterModel_InstanceUpdate);
		}

		private void CharacterModel_InstanceUpdate(orig_InstanceUpdate orig, CharacterModel self)
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			CharacterBody body = self.body;
			if (Object.op_Implicit((Object)(object)body) && body.HasBuff(Content.Buffs.AffixTar))
			{
				self.particleMaterialOverride = tarParticleReplacementMaterial;
				self.lightColorOverride = tarEliteLightColor;
			}
		}

		private void CharacterModel_UpdateRendererMaterials(orig_UpdateRendererMaterials orig, CharacterModel self, Renderer renderer, Material defaultMaterial, bool ignoreOverlays)
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Invalid comparison between Unknown and I4
			orig.Invoke(self, renderer, defaultMaterial, ignoreOverlays);
			CharacterBody body = self.body;
			if (Object.op_Implicit((Object)(object)body) && body.HasBuff(Content.Buffs.AffixTar) && (int)self.visibility == 3 && !ignoreOverlays)
			{
				Material[] sharedMaterials = renderer.sharedMaterials;
				ArrayUtils.ArrayAppend<Material>(ref sharedMaterials, ref tarOverlayMaterial);
				renderer.sharedMaterials = sharedMaterials;
			}
		}

		private void CharacterBody_OnClientBuffsChanged(orig_OnClientBuffsChanged orig, CharacterBody self)
		{
			orig.Invoke(self);
			self.AddItemBehavior<EliteTarController>(self.HasBuff(Content.Buffs.AffixTar) ? 1 : 0);
		}

		private void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim)
		{
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, damageInfo, victim);
			GameObject attacker = damageInfo.attacker;
			if (!((Object)(object)attacker != (Object)null))
			{
				return;
			}
			CharacterBody component = attacker.GetComponent<CharacterBody>();
			if ((Object)(object)component != (Object)null && component.HasBuff(Content.Buffs.AffixTar))
			{
				CharacterBody component2 = victim.GetComponent<CharacterBody>();
				if ((Object)(object)component2 != (Object)null)
				{
					component2.AddTimedBuff(Buffs.ClayGoo, Configuration.Elites.Tar.tarDuration);
				}
				if (!((ProcChainMask)(ref damageInfo.procChainMask)).HasProc(Content.ProcTypes.eliteTarLifesteal))
				{
					((ProcChainMask)(ref damageInfo.procChainMask)).AddProc(Content.ProcTypes.eliteTarLifesteal);
					OrbManager.instance.AddOrb((Orb)(object)new TarLifeStealOrb
					{
						attacker = attacker,
						damageValue = damageInfo.damage * damageInfo.procCoefficient,
						origin = damageInfo.position,
						procChainMask = damageInfo.procChainMask,
						target = component.mainHurtBox,
						procCoefficient = 0f,
						isCrit = false
					});
				}
			}
		}
	}
	public class ShadowCloak : BuffFactory
	{
		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Elites.LoadAsset<BuffDef>("bdShadowCloak");
		}

		protected override void HandleMaterials()
		{
			Material material = Assets.AssetBundles.Elites.LoadAsset<Material>("matShadowCloak");
			Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Cloud Remap");
			material = Assets.AssetBundles.Elites.LoadAsset<Material>("matShadowTracer");
			Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Cloud Remap");
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			CharacterBody.GetVisibilityLevel_TeamIndex += new hook_GetVisibilityLevel_TeamIndex(CharacterBody_GetVisibilityLevel_TeamIndex);
		}

		private VisibilityLevel CharacterBody_GetVisibilityLevel_TeamIndex(orig_GetVisibilityLevel_TeamIndex orig, CharacterBody self, TeamIndex observerTeam)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: 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_0031: Unknown result type (might be due to invalid IL or missing references)
			if (self.teamComponent.teamIndex != observerTeam && self.HasBuff(Content.Buffs.DarknessCamo))
			{
				return (VisibilityLevel)1;
			}
			return orig.Invoke(self, observerTeam);
		}
	}
	public class EliteTankArmorBonus : BuffFactory
	{
		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Elites.LoadAsset<BuffDef>("bdEliteTankArmorBonus");
		}

		protected override void HandleMaterials()
		{
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
		}

		private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
		{
			if (Object.op_Implicit((Object)(object)sender))
			{
				args.armorAdd += (float)sender.GetBuffCount(Content.Buffs.TankArmorBonus) * Configuration.Elites.Tank.armorBonus;
			}
		}
	}
	public class GeodeArmor : BuffFactory
	{
		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bgGeodeArmor");
		}

		protected override void Hooks()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Expected O, but got Unknown
			base.Hooks();
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
		}

		private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
		{
			if (!sender.HasBuff(Content.Buffs.GeodeArmor))
			{
				return;
			}
			Inventory inventory = sender.inventory;
			if ((Object)(object)inventory != (Object)null)
			{
				int itemCount = inventory.GetItemCount(Content.Items.Geode);
				if (itemCount > 0)
				{
					args.armorAdd += Util.GetStackingBehavior(Configuration.Items.Geode.armorBonus, Configuration.Items.Geode.armorStack, itemCount);
					args.baseRegenAdd += Util.GetStackingBehavior(Configuration.Items.Geode.regenMult, Configuration.Items.Geode.regenMultStack, itemCount);
				}
			}
		}
	}
	public class BeetlePlushRegen : BuffFactory
	{
		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("buffBeetlePlushRegenBonus");
		}

		protected override void Hooks()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Expected O, but got Unknown
			base.Hooks();
			CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats);
		}

		private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (self.HasBuff(Content.Buffs.BeetleRegen))
			{
				BeetlePlush.BeetlePlushBehaviourController component = ((Component)self).gameObject.GetComponent<BeetlePlush.BeetlePlushBehaviourController>();
				if ((Object)(object)component != (Object)null)
				{
					int alliesNearby = component.alliesNearby;
					self.regen += Configuration.Items.BeetlePlush.regenBonus * (float)self.GetBuffCount(Content.Buffs.BeetleRegen);
				}
			}
		}
	}
	public class DeathImmunityBuff : BuffFactory
	{
		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdDeathImmunity");
		}

		protected override void Hooks()
		{
			//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
			HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(HealthComponent_TakeDamageProcess);
			GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(GlobalEventManager_OnCharacterDeath);
		}

		private void GlobalEventManager_OnCharacterDeath(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport)
		{
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, damageReport);
			CharacterBody attackerBody = damageReport.attackerBody;
			if (!((Object)(object)attackerBody != (Object)null) || !attackerBody.HasBuff(Content.Buffs.DeathImmunity))
			{
				return;
			}
			foreach (TimedBuff timedBuff in attackerBody.timedBuffs)
			{
				if (timedBuff.buffIndex == Content.Buffs.DeathImmunity.buffIndex)
				{
					timedBuff.timer += Configuration.Items.DeathImmunity.buffExtension;
				}
			}
		}

		private void HealthComponent_TakeDamageProcess(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo)
		{
			CharacterBody body = self.body;
			if ((Object)(object)body != (Object)null && body.HasBuff(Content.Buffs.DeathImmunity))
			{
				damageInfo.damage = Mathf.Clamp(damageInfo.damage, 0f, self.combinedHealth - 1f);
			}
			orig.Invoke(self, damageInfo);
		}
	}
	public class BossKillFrenzy : BuffFactory
	{
		private Material overlayMat;

		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdFrenzyOnBossKill");
		}

		protected override void HandleMaterials()
		{
			overlayMat = Assets.AssetBundles.Items.LoadAsset<Material>("matFrenzyOnBossKillOverlay");
			Materials.SubmitMaterialFix(overlayMat, "Hopoo Games/FX/Cloud Remap");
		}

		protected override void Hooks()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Expected O, but got Unknown
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Expected O, but got Unknown
			base.Hooks();
			HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
			CharacterBody.OnBuffFirstStackGained += new hook_OnBuffFirstStackGained(CharacterBody_OnBuffFirstStackGained);
			CharacterBody.OnBuffFinalStackLost += new hook_OnBuffFinalStackLost(CharacterBody_OnBuffFinalStackLost);
			CharacterMaster.OnInventoryChanged += new hook_OnInventoryChanged(CharacterMaster_OnInventoryChanged);
		}

		private void CharacterMaster_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterMaster self)
		{
			orig.Invoke(self);
			CharacterBody body = self.GetBody();
			if ((Object)(object)body != (Object)null && body.HasBuff(Content.Buffs.BossKillFrenzy))
			{
				self.luck += Configuration.Items.FrenzyOnBossKill.luckBonus;
			}
		}

		private void CharacterBody_OnBuffFinalStackLost(orig_OnBuffFinalStackLost orig, CharacterBody self, BuffDef buffDef)
		{
			orig.Invoke(self, buffDef);
			if ((Object)(object)buffDef == (Object)(object)Content.Buffs.BossKillFrenzy)
			{
				CharacterMaster master = self.master;
				if ((Object)(object)master != (Object)null)
				{
					master.luck -= Configuration.Items.FrenzyOnBossKill.luckBonus;
				}
			}
		}

		private void CharacterBody_OnBuffFirstStackGained(orig_OnBuffFirstStackGained orig, CharacterBody self, BuffDef buffDef)
		{
			orig.Invoke(self, buffDef);
			if ((Object)(object)buffDef == (Object)(object)Content.Buffs.BossKillFrenzy)
			{
				CharacterMaster master = self.master;
				if ((Object)(object)master != (Object)null)
				{
					master.luck += Configuration.Items.FrenzyOnBossKill.luckBonus;
				}
			}
		}

		private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Expected O, but got Unknown
			CharacterBody body = self.body;
			if ((Object)(object)body != (Object)null && body.HasBuff(Content.Buffs.BossKillFrenzy))
			{
				EffectData val = new EffectData
				{
					origin = damageInfo.position,
					start = damageInfo.position,
					rotation = Util.QuaternionSafeLookRotation((damageInfo.force != Vector3.zero) ? damageInfo.force : Random.onUnitSphere)
				};
				EffectManager.SpawnEffect(AssetReferences.damageRejectedPrefab, val, true);
				damageInfo.rejected = true;
			}
			orig.Invoke(self, damageInfo);
		}
	}
	public class TimeSlowed : BuffFactory
	{
		private Material overlayMat;

		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdSlowTime");
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
		}

		private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
		{
			if (sender.HasBuff(Content.Buffs.SlowedTime))
			{
				args.moveSpeedReductionMultAdd += Configuration.Items.SlowTime.speedMult;
				args.attackSpeedReductionMultAdd += Configuration.Items.SlowTime.speedMult;
			}
		}
	}
	public class Grief : BuffFactory
	{
		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdGrief");
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
		}

		private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
		{
			if (sender.HasBuff(Content.Buffs.Grief))
			{
				args.damageMultAdd += Configuration.Items.GriefFlower.damageMult;
				args.armorAdd += Configuration.Items.GriefFlower.armorBoost;
				args.regenMultAdd += Configuration.Items.GriefFlower.regenMult;
				args.moveSpeedMultAdd += Configuration.Items.GriefFlower.moveSpeedMult;
				args.attackSpeedMultAdd += Configuration.Items.GriefFlower.attackSpeedMult;
			}
		}
	}
	public class MiniWispStock : BuffFactory
	{
		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdWispOnHit");
		}
	}
	public class BisonShieldActive : BuffFactory
	{
		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("BisonShieldReady");
		}
	}
	public class BisonShieldCooldown : BuffFactory
	{
		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("BisonShieldCooldown");
		}
	}
	public class MeleeAttackSpeedBuff : BuffFactory
	{
		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdMeleeAttackSpeed");
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
		}

		private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
		{
			if (sender.HasBuff(Content.Buffs.MeleeAttackSpeed))
			{
				Inventory inventory = sender.inventory;
				if ((Object)(object)inventory != (Object)null)
				{
					int itemCount = inventory.GetItemCount(Content.Items.MeleeAttackSpeed);
					float stackingBehavior = Util.GetStackingBehavior(Configuration.Items.MeleeAttackSpeed.attackSpeedMult, Configuration.Items.MeleeAttackSpeed.attackSpeedMultStack, itemCount);
					args.attackSpeedMultAdd += stackingBehavior;
				}
			}
		}
	}
	public class NullSeedActive : BuffFactory
	{
		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdNullSeedReady");
		}
	}
	public class NullSeedCooldown : BuffFactory
	{
		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdNullSeedCooldown");
		}

		protected override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			CharacterBody.OnBuffFinalStackLost += new hook_OnBuffFinalStackLost(CharacterBody_OnBuffFinalStackLost);
		}

		private void CharacterBody_OnBuffFinalStackLost(orig_OnBuffFinalStackLost orig, CharacterBody self, BuffDef buffDef)
		{
			orig.Invoke(self, buffDef);
			if ((Object)(object)buffDef == (Object)(object)Content.Buffs.NullSeedCooldown)
			{
				Inventory inventory = self.inventory;
				if ((Object)(object)inventory != (Object)null && inventory.GetItemCount(Content.Items.NullSeed) > 0)
				{
					self.AddBuff(Content.Buffs.NullSeedActive);
				}
			}
		}
	}
	public class StoredLunarCoin : BuffFactory
	{
		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("BisonShieldCooldown");
		}
	}
	public class ArmorZone : BuffFactory
	{
		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdArmorZone");
		}

		protected override void Hooks()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Expected O, but got Unknown
			base.Hooks();
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
		}

		private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
		{
			if (sender.HasBuff(Content.Buffs.ArmorZone))
			{
				float armorBonus = TeleporterArmorZone.HoldOutArmorZoneController.armorBonus;
				args.armorAdd += armorBonus;
			}
		}
	}
	public class TarbineBuff : BuffFactory
	{
		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Items.LoadAsset<BuffDef>("bdTarbineActive");
		}
	}
	public static class CommonHooks
	{
	}
	public static class Content
	{
		public struct AddressablePickupPair
		{
			[TypeRestrictedReference(new Type[]
			{
				typeof(ItemDef),
				typeof(EquipmentDef),
				typeof(MiscPickupDef)
			})]
			public Object pickupDef;

			public string objectAddress;
		}

		public struct PendingArtifactCode
		{
			public ArtifactDef artifactDef;

			public ArtifactCode codeAsset;
		}

		public struct PendingItemPair
		{
			public ItemDef item1;

			public ItemDef item2;

			public ItemRelationshipType relationshipType;
		}

		public static class Characters
		{
			public static GameObject DocBody;

			public static GameObject DocMaster;

			public static GameObject MarbleGolemBody;

			public static GameObject MarbleGolemMaster;

			public static GameObject SuperBeetleBody;

			public static GameObject SuperBeetleMaster;

			public static GameObject AnimaBody;

			public static GameObject AnimaMaster;

			public static void Init()
			{
			}
		}

		public static class Survivors
		{
			public static SurvivorDef Doc;

			public static SurvivorDef Reaper;

			public static SurvivorDef King;

			public static SurvivorDef Imp;

			public static SurvivorDef Devotee;

			public static SurvivorDef Anima;
		}

		public static class SpawnCards
		{
		}

		public static class ItemRelationships
		{
			public static class RelationshipProviders
			{
				public static ItemRelationshipProvider contagiousItems;
			}

			public static ItemRelationshipType contagiousItem;

			public static void Init()
			{
				//IL_0010: 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)
				RelationshipProviders.contagiousItems = ScriptableObject.CreateInstance<ItemRelationshipProvider>();
				contagiousItem = Addressables.LoadAssetAsync<ItemRelationshipType>((object)"RoR2/DLC1/Common/ContagiousItem.asset").WaitForCompletion();
				if ((Object)(object)contagiousItem != (Object)null)
				{
					RelationshipProviders.contagiousItems.relationshipType = contagiousItem;
				}
			}
		}

		public static class Items
		{
			public static ItemDef GlassShield;

			public static ItemDef GlassShieldBroken;

			public static ItemDef GoldStar;

			public static ItemDef FlatHealIncrease;

			public static ItemDef ProcBoost;

			public static ItemDef BoostExperience;

			public static ItemDef DebuffBoss;

			public static ItemDef PrizeTicket;

			public static ItemDef HealOnCooldown;

			public static ItemDef SprintFireMissiles;

			public static ItemDef MaterialTester;

			public static ItemDef HealOnLevelUp;

			public static ItemDef TeleporterArmorZone;

			public static ItemDef MoneyObjectOnSpawn;

			public static ItemDef RevengeDamageBonus;

			public static ItemDef ExtraPrinterRoll;

			public static ItemDef UpgradeChests;

			public static ItemDef ShieldArmor;

			public static ItemDef DropYellowItemOnKill;

			public static ItemDef DropYellowItemOnKillUsed;

			public static ItemDef ProjectileBoost;

			public static ItemDef BulletsIntoLasers;

			public static ItemDef GoldIdol;

			public static ItemDef BlockLowDamageHits;

			public static ItemDef FrenzyOnBossKill;

			public static ItemDef ShieldBreaker;

			public static ItemDef Placebo;

			public static ItemDef HealthBasedDamageBonus;

			public static EquipmentDef StunNearbyFoes;

			public static EquipmentDef ChargingLaser;

			public static EquipmentDef FireburstOnFreeze;

			public static EquipmentDef SlowTime;

			public static EquipmentDef LevelUp;

			public static EquipmentDef DeathImmunity;

			public static EquipmentDef AffixTank;

			public static EquipmentDef AffixShadow;

			public static EquipmentDef AffixTar;

			public static EquipmentDef AffixToxic;

			public static EquipmentDef AffixEmpowering;

			public static EquipmentDef AffixSuperboss;

			public static EquipmentDef AffixUnstable;

			public static ItemDef WakeOfVulturesVoid;

			public static ItemDef AspectShardBase;

			public static ItemDef AegisVoid;

			public static ItemDef WaxQuailVoid;

			public static ItemDef StickyBombVoid;

			public static ItemDef EnergyDrinkVoid;

			public static ItemDef VoidSeedSpawner;

			public static ItemDef PiggyBank;

			public static ItemDef Monocle;

			public static ItemDef Chimera;

			public static ItemDef Grudge;

			public static ItemDef ChimeraHealth;

			public static ItemDef ChimeraRegen;

			public static ItemDef ChimeraShields;

			public static ItemDef ChimeraDamage;

			public static ItemDef ChimeraCrit;

			public static ItemDef ChimeraArmor;

			public static ItemDef ChimeraCooldown;

			public static ItemDef ChimeraSpeed;

			public static ItemDef ChimeraLuck;

			public static ItemDef BeetlePlush;

			public static ItemDef Tentacle;

			public static ItemDef ImpEye;

			public static ItemDef WispOnKill;

			public static ItemDef ArmorWhenEnteringCombat;

			public static ItemDef BeetleFallBoots;

			public static ItemDef Geode;

			public static ItemDef Tarbine;

			public static ItemDef SmiteOnHit;

			public static ItemDef BighornBuckler;

			public static ItemDef IgniteOnHit;

			public static ItemDef ShieldWhenStationary;

			public static ItemDef DroneCoupon;

			public static ItemDef MushroomOnKill;

			public static ItemDef ProjectileKiller;

			public static ItemDef GriefFlower;

			public static ItemDef OrbitingConstructs;

			public static ItemDef DoubleProjectiles;

			public static ItemDef TarBallsOnHit;

			public static ItemDef ExplodeOnDeath;

			public static ItemDef LunarFlight;

			public static ItemDef LowHealthShield;

			public static ItemDef HoverWings;

			public static ItemDef MeleeAttackSpeed;

			public static ItemDef AcidSack;

			public static ItemDef VoidChains;

			public static ItemDef VoidBarnacleMinion;

			public static ItemDef NullSeed;

			public static ItemDef SafeZone;

			public static ItemDef FireEye;

			public static ItemDef GoldArmorBoost;

			public static ItemDef Godmode;

			public static ItemDef VoidEye;

			public static ItemDef ThunderAura;

			public static ItemDef ChampionAura;

			public static void Init()
			{
				new ChampionAura().Init(ref ChampionAura);
				new GlassShield().Init(ref GlassShield);
				new GlassShieldBroken().Init(ref GlassShieldBroken);
				new FlatHealIncrease().Init(ref FlatHealIncrease);
				new ProcBoost().Init(ref ProcBoost);
				new HealOnCooldown().Init(ref HealOnCooldown);
				new ProjectileBoost().Init(ref ProjectileBoost);
				new TeleporterArmorZone().Init(ref TeleporterArmorZone);
				new UpgradeChests().Init(ref UpgradeChests);
				new DropYellowItemOnKill().Init(ref DropYellowItemOnKill);
				new DropYellowItemOnKillConsumed().Init(ref DropYellowItemOnKillUsed);
				new GoldIdol().Init(ref GoldIdol);
				new BlockLowDamageHits().Init(ref BlockLowDamageHits);
				new FrenzyOnBossKill().Init(ref FrenzyOnBossKill);
				new HealthBasedDamageBonus().Init(ref HealthBasedDamageBonus);
				new Placebo().Init(ref Placebo);
				new Shieldbreaker().Init(ref ShieldBreaker);
				new VoidSeedSpawner().Init(ref VoidSeedSpawner);
				new Monocle().Init(ref Monocle);
				new ChimeraArmor().Init(ref ChimeraArmor);
				new ChimeraCooldown().Init(ref ChimeraCooldown);
				new ChimeraCrit().Init(ref ChimeraCrit);
				new ChimeraDamage().Init(ref ChimeraDamage);
				new ChimeraHealth().Init(ref ChimeraHealth);
				new ChimeraLuck().Init(ref ChimeraLuck);
				new ChimeraRegen().Init(ref ChimeraRegen);
				new ChimeraShields().Init(ref ChimeraShields);
				new ChimeraSpeed().Init(ref ChimeraSpeed);
				new Chimera().Init(ref Chimera);
				new Grudge().Init(ref Grudge);
				new DeathImmunity().Init(ref DeathImmunity);
				new SlowTime().Init(ref SlowTime);
				new BeetlePlush().Init(ref BeetlePlush);
				new Geode().Init(ref Geode);
				new MiniWispOnKill().Init(ref WispOnKill);
				new Tentacle().Init(ref Tentacle);
				new ImpEye().Init(ref ImpEye);
				new BisonShield().Init(ref BighornBuckler);
				new SmiteOnHit().Init(ref SmiteOnHit);
				new IgniteOnHit().Init(ref IgniteOnHit);
				new Tarbine().Init(ref Tarbine);
				new MushroomOnKill().Init(ref MushroomOnKill);
				new ProjectileKiller().Init(ref ProjectileKiller);
				new GriefFlower().Init(ref GriefFlower);
				new OrbitingConstructs().Init(ref OrbitingConstructs);
				new DoubleProjectiles().Init(ref DoubleProjectiles);
				new MeleeAttackSpeed().Init(ref MeleeAttackSpeed);
				new FireEye().Init(ref FireEye);
				new GoldArmorBoost().Init(ref GoldArmorBoost);
				new NullSeed().Init(ref NullSeed);
				new GodMode().Init(ref Godmode);
				new VoidEye().Init(ref VoidEye);
				new ThunderAura().Init(ref ThunderAura);
				new EquipEliteShadow().Init(ref AffixShadow);
				new EquipEliteUnstable().Init(ref AffixUnstable);
				new EquipEliteTar().Init(ref AffixTar);
			}
		}

		public static class ItemTiers
		{
			public static class ItemMasks
			{
				public static ItemMask GodTier;
			}

			public static ItemTierDef GodTier;

			public static void Init()
			{
			}
		}

		public static class SerializableEntityStates
		{
			private static Type[] statesToLoad = new Type[15]
			{
				typeof(BaseTarbineState),
				typeof(TarbineFire),
				typeof(TarbineIdle),
				typeof(BaseMiniConstructState),
				typeof(MC_BaseShellChangeState),
				typeof(MC_AIState),
				typeof(MC_Attack),
				typeof(MC_IdleOpen),
				typeof(MC_IdleClosed),
				typeof(MC_Closing),
				typeof(MC_Opening),
				typeof(FireEyeActive),
				typeof(VoidMine_Arming),
				typeof(VoidMine_Armed),
				typeof(TarBodyAttachmentState)
			};

			public static Dictionary<string, SerializableEntityStateType> EntityStateDictionary = new Dictionary<string, SerializableEntityStateType>();

			public static void Init()
			{
				//IL_006c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0071: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
				Debug.LogFormat("Siv's Content Pack: Checking for entity state types...", Array.Empty<object>());
				Debug.LogFormat("Siv's Content Pack: {0} Entity State(s) found. Beginning addition to content pack.", new object[1] { statesToLoad.Count() });
				Type[] array = statesToLoad;
				foreach (Type type in array)
				{
					Debug.LogFormat("- Loading entity state {0} ({1}).", new object[2] { type.Name, type.Namespace });
					bool flag = false;
					SerializableEntityStateType value = ContentAddition.AddEntityState(type, ref flag);
					if (flag)
					{
						Debug.LogFormat("- Added entity state type {0} to content pack.", new object[1] { type.Name });
						EntityStateDictionary.Add(type.Name, value);
					}
				}
			}
		}

		public static class Buffs
		{
			public static BuffDef AffixTank;

			public static BuffDef AffixTar;

			public static BuffDef AffixToxic;

			public static BuffDef AffixShadow;

			public static BuffDef AffixEmpowering;

			public static BuffDef AffixSuperboss;

			public static BuffDef AffixUnstable;

			public static BuffDef GeodeArmor;

			public static BuffDef MiniWispStock;

			public static BuffDef TankArmorBonus;

			public static BuffDef Blindness;

			public static BuffDef DarknessCamo;

			public static BuffDef Tarbine;

			public static BuffDef ArmorZone;

			public static BuffDef MeleeAttackSpeed;

			public static BuffDef Grief;

			public static BuffDef BeetleRegen;

			public static BuffDef BisonShieldActive;

			public static BuffDef BisonShieldCooldown;

			public static BuffDef SlowedTime;

			public static BuffDef BossKillFrenzy;

			public static BuffDef StoredLunarCoins;

			public static BuffDef NullSeedActive;

			public static BuffDef NullSeedCooldown;

			public static BuffDef DeathImmunity;

			public static void Init()
			{
				new BeetlePlushRegen().Init(ref BeetleRegen);
				new BossKillFrenzy().Init(ref BossKillFrenzy);
				new GeodeArmor().Init(ref GeodeArmor);
				new Grief().Init(ref Grief);
				new MiniWispStock().Init(ref MiniWispStock);
				new MeleeAttackSpeedBuff().Init(ref MeleeAttackSpeed);
				new BisonShieldActive().Init(ref BisonShieldActive);
				new BisonShieldCooldown().Init(ref BisonShieldCooldown);
				new NullSeedActive().Init(ref NullSeedActive);
				new NullSeedCooldown().Init(ref NullSeedCooldown);
				new TarbineBuff().Init(ref Tarbine);
				new DeathImmunityBuff().Init(ref DeathImmunity);
				new TimeSlowed().Init(ref SlowedTime);
				new ArmorZone().Init(ref ArmorZone);
				new EliteTankArmorBonus().Init(ref TankArmorBonus);
				new AffixBlack().Init(ref AffixShadow);
				new AffixUnstable().Init(ref AffixUnstable);
				new AffixTar().Init(ref AffixTar);
			}
		}

		public static class Elites
		{
			public static EliteDef EliteTank;

			public static EliteDef EliteToxic;

			public static EliteDef EliteTar;

			public static EliteDef EliteShadow;

			public static EliteDef EliteEmpowering;

			public static EliteDef EliteSuperboss;

			public static EliteDef EliteUnstable;

			public static void Init()
			{
				new Shadow().Init(ref EliteShadow);
				new Unstable().Init(ref EliteUnstable);
				new Tar().Init(ref EliteTar);
			}
		}

		public static class Artifacts
		{
			public static ArtifactDef FloorIsLava;

			public static ArtifactDef EnemySpecializedItems;

			public static ArtifactDef SuperBeetleCompanion;

			public static void Init()
			{
				Material material = Assets.AssetBundles.Artifacts.LoadAsset<Material>("matArtifact");
				Materials.SubmitMaterialFix(material, "Hopoo Games/Deferred/Standard");
				material = Assets.AssetBundles.Artifacts.LoadAsset<Material>("matCompoundCircle");
				Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Opaque Cloud Remap");
				material = Assets.AssetBundles.Artifacts.LoadAsset<Material>("matCompoundDiamond");
				Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Opaque Cloud Remap");
				material = Assets.AssetBundles.Artifacts.LoadAsset<Material>("matCompoundSquare");
				Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Opaque Cloud Remap");
				material = Assets.AssetBundles.Artifacts.LoadAsset<Material>("matCompoundTriangle");
				Materials.SubmitMaterialFix(material, "Hopoo Games/FX/Opaque Cloud Remap");
				new Design().Init(ref EnemySpecializedItems);
			}
		}

		public static class Effects
		{
			public static EffectDef BlockLowDamageHitsProc;

			public static EffectDef DoubleProjectilesProc;

			public static EffectDef CupcakeProc;

			public static EffectDef GoldStarProc;

			public static EffectDef GoldStarOrb;

			public static EffectDef GlassShieldBreakProc;

			public static EffectDef FrenzyOnBossKillProc;

			public static EffectDef MiniConstructHitSparks;

			public static EffectDef MiniConstructMuzzleFlash;

			public static EffectDef MiniConstructOrb;

			public static EffectDef MiniConstructCharge;

			public static EffectDef MiniWispMuzzleFlash;

			public static EffectDef MiniWispImpact;

			public static EffectDef EliteUnstableImpact;

			public static EffectDef VoidMineFX;

			public static EffectDef TarLifeStealOrb;

			public static EffectDef SmiteFX;

			public static EffectDef ThunderAuraLightning;

			public static EffectDef FireEyeOrb;

			public static EffectDef FireEyeProc;

			public static EffectDef GriefProc;

			public static EffectDef SingularityBlast;

			public static EffectDef ShadowCloakBreak;

			public static void Init()
			{
				new BlockLowDamageHitsProc().Init(ref BlockLowDamageHitsProc);
				new DoubleProjectilesProc().Init(ref DoubleProjectilesProc);
				new CupcakeProc().Init(ref CupcakeProc);
				new GoldStarProc().Init(ref GoldStarProc);
				new GriefProc().Init(ref GriefProc);
				new SmiteEffect().Init(ref SmiteFX);
				new GlassShieldBreakProc().Init(ref GlassShieldBreakProc);
				new FrenzyOnBossKillProc().Init(ref FrenzyOnBossKillProc);
				new EliteUnstableFX().Init(ref EliteUnstableImpact);
				new MiniConstructHitSparks().Init(ref MiniConstructHitSparks);
				new MiniConstructCharge().Init(ref MiniConstructCharge);
				new MiniConstructMuzzleFlash().Init(ref MiniConstructMuzzleFlash);
				new MiniConstructOrbTracer().Init(ref MiniConstructOrb);
				new VoidMineVFX().Init(ref VoidMineFX);
				new LightningStrikeEffect().Init(ref ThunderAuraLightning);
				new ShadowCloakBreak().Init(ref ShadowCloakBreak);
				new FireEyeOrb().Init(ref FireEyeOrb);
				new FireEyeProcEffect().Init(ref FireEyeProc);
				new WispOnHitMuzzleFlash().Init(ref MiniWispMuzzleFlash);
				new WispOnHitImpact().Init(ref MiniWispImpact);
				new SingularityBlast().Init(ref SingularityBlast);
				new TarLifeStealOrbFX().Init(ref TarLifeStealOrb);
			}
		}

		public static class Orbs
		{
		}

		public static class Interactables
		{
			public static InteractableSpawnCard BountyTerminal;

			public static InteractableSpawnCard ZigguratLightningRod;

			public static InteractableSpawnCard EnemyChest;
		}

		public static class Skills
		{
			public static class Huntress
			{
				public static SkillDef HeavyGlaive;

				public static SkillDef LuckyGlaive;
			}

			public static class Toolbot
			{
				public static SkillDef HaulingMode;
			}

			public static class FalseSon
			{
				public static SkillDef AltLunarSpikes;

				public static SkillDef ThunderStorm;
			}
		}

		public static class Unlockables
		{
			public static UnlockableDef UnlockSpecializedItems;

			public static UnlockableDef UnlockGodMode;

			public static UnlockableDef UnlockThunderAura;

			public static UnlockableDef UnlockVoidEye;

			public static void Init()
			{
				new ArtifactSpecializedItems().Init(ref UnlockSpecializedItems);
				new UnlockGodMode().Init(ref UnlockGodMode);
				new UnlockVoidEye().Init(ref UnlockVoidEye);
				new UnlockThunderAura().Init(ref UnlockThunderAura);
			}
		}

		public static class SceneDefs
		{
			public static SceneDef Ziggurat;

			public static SceneDef LemurianHome;

			public static SceneDef ConstructFactory;
		}

		public static class Misc
		{
			public static GameObject VoidMine;

			public static GameObject GodModeShockwave;

			public static GameObject ThunderAuraLightning;

			public static GameObject MushroomWard;

			public static GameObject MushroomSpawner;

			public static GameObject SlowTimeBubble;

			public static GameObject ProjectileKillerPrefab;

			public static GameObject VoidEyeSingularity;

			public static GameObject GrudgeFollower;

			public static GameObject MiniWispProjectile;

			public static GameObject EliteUnstableFireball;

			public static GameObject Smite;
		}

		public static class DeployableSlots
		{
			public static DeployableSlot GodModeLunarAlly;

			public static DeployableSlot Mushroom;

			public static DeployableSlot ProjectileKiller;

			public static DeployableSlot Singularity;

			public static DeployableSlot GrudgeProjectile;
		}

		public static class ProcTypes
		{
			public static ProcType procBonus;

			public static ProcType smite;

			public static ProcType revengeDamageBonus;

			public static ProcType placebo;

			public static ProcType miniWispOnHit;

			public static ProcType healthBasedDamageBonus;

			public static ProcType stickyBombVoid;

			public static ProcType monocle;

			public static ProcType tentacle;

			public static ProcType tarbine;

			public static ProcType igniteOnHit;

			public static ProcType voidChains;

			public static ProcType singularity;

			public static ProcType eliteTarLifesteal;
		}

		public static R2APISerializableContentPack contentPack;

		public static ExpansionDef expansionDef;

		private static int lastProcType = 25;

		private static int lastDeployableSlot = 23;

		private static ItemRelationshipProvider itemRelationshipProvider;

		private static int lastItemTier = 11;

		private static List<AddressablePickupPair> addressablePickupPairs = new List<AddressablePickupPair>();

		private static List<PendingArtifactCode> pendingArtifactCodes = new List<PendingArtifactCode>();

		private static List<PendingItemPair> pendingItemPairs = new List<PendingItemPair>();

		public static void Init()
		{
			contentPack = Assets.AssetBundles.Main.LoadAsset<R2APISerializableContentPack>("cpSivsContentPack");
			R2APIContentManager.AddPreExistingSerializableContentPack(contentPack, true);
			expansionDef = Assets.AssetBundles.Main.LoadAsset<ExpansionDef>("exSivsContentPack");
			ContentAddition.AddExpansionDef(expansionDef);
			Effects.Init();
			ItemTiers.Init();
			Elites.Init();
			Unlockables.Init();
			Buffs.Init();
			Artifacts.Init();
			SerializableEntityStates.Init();
			Characters.Init();
			ItemRelationships.Init();
			Items.Init();
		}

		public static ProcType CreateProcType()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			ProcType val = (ProcType)lastProcType;
			Debug.LogFormat("Created new ProcType at index {0}.", new object[1] { val });
			lastProcType++;
			return val;
		}

		public static DeployableSlot CreateDeployableSlot()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			DeployableSlot val = (DeployableSlot)lastDeployableSlot;
			Debug.LogFormat("Created new DeployableSlot at index {0}.", new object[1] { val });
			lastDeployableSlot++;
			return val;
		}

		public static ItemTier CreateItemTier()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			ItemTier val = (ItemTier)lastItemTier;
			Debug.LogFormat("Created new ItemTier at index {0}.", new object[1] { val });
			lastItemTier++;
			return val;
		}

		public static void SubmitAddressablePickupPair(AddressablePickupPair pair)
		{
			addressablePickupPairs.Add(pair);
		}

		public static void ValidateAddressablePickupPairs()
		{
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			Debug.LogFormat("Validating AddressablePickupPairs... ({0} pair(s) found)", new object[1] { addressablePickupPairs.Count });
			foreach (AddressablePickupPair addressablePickupPair in addressablePickupPairs)
			{
				GameObject val = Addressables.LoadAsset<GameObject>((object)addressablePickupPair.objectAddress).WaitForCompletion();
				if ((Object)(object)val != (Object)null)
				{
					DeathRewards component = val.GetComponent<DeathRewards>();
					if ((Object)(object)component != (Object)null && (Object)(object)component.bossDropTable == (Object)null)
					{
						ExplicitPickupDropTable val2 = ScriptableObject.CreateInstance<ExplicitPickupDropTable>();
						((PickupDropTable)val2).canDropBeReplaced = true;
						val2.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1];
						val2.pickupEntries[0] = new PickupDefEntry
						{
							pickupDef = addressablePickupPair.pickupDef,
							pickupWeight = 1f
						};
						component.bossDropTable = (PickupDropTable)(object)val2;
						Debug.LogFormat("- Validated pair {0}/{1}.", new object[2] { val, addressablePickupPair.pickupDef });
					}
				}
			}
		}

		public static void SubmitArtifactCode(PendingArtifactCode pendingArtifactCode)
		{
			pendingArtifactCodes.Add(pendingArtifactCode);
		}

		public static void ValidatePendingArtifactCodes()
		{
			foreach (PendingArtifactCode pendingArtifactCode in pendingArtifactCodes)
			{
				ArtifactCodeAPI.AddCode(pendingArtifactCode.artifactDef, pendingArtifactCode.codeAsset);
			}
		}

		public static void SubmitPendingItemPair(PendingItemPair pair)
		{
			pendingItemPairs.Add(pair);
		}

		public static void ValidatePendingItemPairs()
		{
			//IL_007a: 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)
			Debug.LogFormat("SivsContentPack: Validating pending item pairs.", Array.Empty<object>());
			foreach (PendingItemPair pendingItemPair in pendingItemPairs)
			{
				Debug.LogFormat("- Located pair with relationship {0} ({1}/{2}).", new object[3] { pendingItemPair.relationshipType, pendingItemPair.item1, pendingItemPair.item2 });
				if ((Object)(object)pendingItemPair.relationshipType == (Object)(object)ItemRelationshipTypes.ContagiousItem)
				{
					Pair[] relationships = ItemRelationships.RelationshipProviders.contagiousItems.relationships;
					relationships = CollectionExtensions.AddToArray<Pair>(relationships, new Pair
					{
						itemDef1 = pendingItemPair.item1,
						itemDef2 = pendingItemPair.item2
					});
					ItemRelationships.RelationshipProviders.contagiousItems.relationships = relationships;
					Debug.LogFormat("- Added item pair to item relationship provider.", Array.Empty<object>());
				}
			}
			ItemCatalog.SetItemRelationships((ItemRelationshipProvider[])(object)new ItemRelationshipProvider[1] { ItemRelationships.RelationshipProviders.contagiousItems });
		}
	}
	public class ItemFactory
	{
		protected GameObject displayPrefab;

		public void Init(ref ItemDef itemDef)
		{
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Expected O, but got Unknown
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Expected O, but got Unknown
			if ((Object)(object)itemDef != (Object)null)
			{
				Debug.LogWarningFormat("Content {0} has already been loaded.", new object[1] { ((Object)itemDef).name });
				return;
			}
			if (!CheckIfEnabled())
			{
				Debug.LogFormat("Content {0} has been disabled.", new object[1] { GetType().Name });
				return;
			}
			LoadAssets(ref itemDef);
			SetUpItemRelationships(ref itemDef);
			HandleMaterials();
			RegisterLanguageTokens();
			ItemDisplayRuleDict itemDisplayRules = new ItemDisplayRuleDict((ItemDisplayRule[])null);
			RegisterItemDisplayRules(ref itemDisplayRules);
			Hooks();
			CustomItem val = new CustomItem(itemDef, itemDisplayRules);
			ItemAPI.Add(val);
			SubmitItemAsAddressablePair(ref itemDef);
			Debug.LogFormat("Loaded item {0} and submitted to content pack.", new object[1] { ((Object)itemDef).name });
		}

		protected virtual bool CheckIfEnabled()
		{
			return true;
		}

		protected virtual void LoadAssets(ref ItemDef itemDef)
		{
		}

		protected virtual void HandleMaterials()
		{
		}

		protected virtual void SetUpExpansionRequirements(ref ItemDef itemDef)
		{
		}

		protected virtual void SetUpItemRelationships(ref ItemDef itemDef)
		{
		}

		protected virtual void RegisterLanguageTokens()
		{
			LanguageAPI.Add("ITEM_???_NAME", "");
			LanguageAPI.Add("ITEM_???_PICKUP", "");
			LanguageAPI.Add("ITEM_???_DESCRIPTION", "");
			LanguageAPI.Add("ITEM_???_LORE", "");
		}

		protected virtual void RegisterItemDisplayRules(ref ItemDisplayRuleDict itemDisplayRules)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: 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_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: 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_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_0209: Unknown result type (might be due to invalid IL or missing references)
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0224: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: Unknown result type (might be due to invalid IL or missing references)
			//IL_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_026f: Unknown result type (might be due to invalid IL or missing references)
			//IL_029e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02be: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02de: Unknown result type (might be due to invalid IL or missing references)
			//IL_02df: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0304: Unknown result type (might be due to invalid IL or missing references)
			//IL_0333: Unknown result type (might be due to invalid IL or missing references)
			//IL_0338: Unknown result type (might be due to invalid IL or missing references)
			//IL_034e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0353: Unknown result type (might be due to invalid IL or missing references)
			//IL_0369: Unknown result type (might be due to invalid IL or missing references)
			//IL_036e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0373: Unknown result type (might be due to invalid IL or missing references)
			//IL_0374: Unknown result type (might be due to invalid IL or missing references)
			//IL_0390: Unknown result type (might be due to invalid IL or missing references)
			//IL_0399: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0403: Unknown result type (might be due to invalid IL or missing references)
			//IL_0408: Unknown result type (might be due to invalid IL or missing references)
			//IL_0409: Unknown result type (might be due to invalid IL or missing references)
			//IL_0425: Unknown result type (might be due to invalid IL or missing references)
			//IL_042e: Unknown result type (might be due to invalid IL or missing references)
			//IL_045d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0462: Unknown result type (might be due to invalid IL or missing references)
			//IL_0478: Unknown result type (might be due to invalid IL or missing references)
			//IL_047d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0493: Unknown result type (might be due to invalid IL or missing references)
			//IL_0498: Unknown result type (might be due to invalid IL or missing references)
			//IL_049d: Unknown result type (might be due to invalid IL or missing references)
			//IL_049e: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_050d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0512: Unknown result type (might be due to invalid IL or missing references)
			//IL_0528: Unknown result type (might be due to invalid IL or missing references)
			//IL_052d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0532: Unknown result type (might be due to invalid IL or missing references)
			//IL_0533: Unknown result type (might be due to invalid IL or missing references)
			//IL_054f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0558: Unknown result type (might be due to invalid IL or missing references)
			//IL_0587: Unknown result type (might be due to invalid IL or missing references)
			//IL_058c: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_05bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_061c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0621: Unknown result type (might be due to invalid IL or missing references)
			//IL_0637: Unknown result type (might be due to invalid IL or missing references)
			//IL_063c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0652: Unknown result type (might be due to invalid IL or missing references)
			//IL_0657: Unknown result type (might be due to invalid IL or missing references)
			//IL_065c: Unknown result type (might be due to invalid IL or missing references)
			//IL_065d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0679: Unknown result type (might be due to invalid IL or missing references)
			//IL_0682: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_06cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_070e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0717: Unknown result type (might be due to invalid IL or missing references)
			//IL_0746: Unknown result type (might be due to invalid IL or missing references)
			//IL_074b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0761: Unknown result type (might be due to invalid IL or missing references)
			//IL_0766: Unknown result type (might be due to invalid IL or missing references)
			//IL_077c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0781: Unknown result type (might be due to invalid IL or missing references)
			//IL_0786: Unknown result type (might be due to invalid IL or missing references)
			//IL_0787: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_07db: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0811: Unknown result type (might be due to invalid IL or missing references)
			//IL_0816: Unknown result type (might be due to invalid IL or missing references)
			//IL_081b: Unknown result type (might be due to invalid IL or missing references)
			//IL_081c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0838: Unknown result type (might be due to invalid IL or missing references)
			//IL_0841: Unknown result type (might be due to invalid IL or missing references)
			//IL_0870: Unknown result type (might be due to invalid IL or missing references)
			//IL_0875: Unknown result type (might be due to invalid IL or missing references)
			//IL_088b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0890: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_08cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0905: Unknown result type (might be due to invalid IL or missing references)
			//IL_090a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0920: Unknown result type (might be due to invalid IL or missing references)
			//IL_0925: Unknown result type (might be due to invalid IL or missing references)
			//IL_093b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0940: Unknown result type (might be due to invalid IL or missing references)
			//IL_0945: Unknown result type (might be due to invalid IL or missing references)
			//IL_0946: Unknown result type (might be due to invalid IL or missing references)
			//IL_0962: Unknown result type (might be due to invalid IL or missing references)
			//IL_096b: Unknown result type (might be due to invalid IL or missing references)
			//IL_099a: Unknown result type (might be due to invalid IL or missing references)
			//IL_099f: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_09da: Unknown result type (might be due to invalid IL or missing references)
			//IL_09db: Unknown result type (might be due to invalid IL or missing references)
			//IL_09f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a00: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a2f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a34: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a65: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a6a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a6f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a70: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a8c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a95: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ac4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ac9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0adf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0afa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b04: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b05: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b21: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b2a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b59: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b5e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b74: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b79: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b8f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b94: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b99: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b9a: Unknown result type (might be due to invalid IL or missing references)
			itemDisplayRules.Add("CommandoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Base",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("HuntressBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Base",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("Bandit2Body", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Base",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("ToolbotBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Base",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("MageBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Base",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("TreebotBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Base",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("LoaderBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Base",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("MercBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Base",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("CaptainBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Base",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("CrocoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Base",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("EngiBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Base",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("RailgunnerBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Base",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("VoidSurvivorBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Base",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("SeekerBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Base",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("FalseSonBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Root",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("ChefBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Base",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("EngiTurretBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Root",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("EngiWalkerTurretBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Root",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("EquipmentDroneBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Base",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
			itemDisplayRules.Add("ScavBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = displayPrefab,
					childName = "Base",
					localAngles = new Vector3(0f, 0f, 0f),
					localPos = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(1f, 1f, 1f)
				}
			});
		}

		protected virtual void Hooks()
		{
		}

		protected virtual void SubmitItemAsAddressablePair(ref ItemDef itemDef)
		{
		}
	}
	public class EquipFactory
	{
		protected GameObject displayPrefab;

		public void Init(ref EquipmentDef equipDef)
		{
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Expected O, but got Unknown
			if ((Object)(object)equipDef != (Object)null)
			{
				Debug.LogWarningFormat("Content {0} has already been loaded.", new object[1] { ((Object)equipDef).name });
				return;
			}
			LoadAssets(ref equipDef);
			HandleMaterials();
			RegisterLanguageTokens();
			ItemDisplayRuleDict itemDisplayRules = new ItemDisplayRuleDict((ItemDisplayRule[])null);
			RegisterItemDisplayRules(ref itemDisplayRules);
			Hooks();
			CustomEquipment val = new CustomEquipment(equipDef, itemDisplayRules);
			ItemAPI.Add(val);
			SubmitEquipAsAddressablePair(ref equipDef);
			Debug.LogFormat("Loaded equipment {0} and submitted to content pack.", new object[1] { ((Object)equipDef).name });
		}

		protected virtual void LoadAssets(ref EquipmentDef equipDef)
		{
		}

		protected virtual bool CheckIfEnabled()
		{
			return true;
		}

		protected virtual void HandleMaterials()
		{
		}

		protected virtual void RegisterLanguageTokens()
		{
			LanguageAPI.Add("ITEM_???_NAME", "");
			LanguageAPI.Add("ITEM_???_PICKUP", "");
			LanguageAPI.Add("ITEM_???_DESCRIPTION", "");
			LanguageAPI.Add("ITEM_???_LORE", "");
		}

		protected virtual void RegisterItemDisplayRules(ref ItemDisplayRuleDict itemDisplayRules)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: 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_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: 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_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_0209: Unknown result type (might be due to invalid IL or missing references)
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0224: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: Unknown result type (might be due to invalid IL or missing references)
			//IL_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_026f: Unknown result type (might be due to invalid IL or missing references)
			//IL_029e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02be: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02de: Unknown result type (might be due to invalid IL or missing references)
			//IL_02df: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0304: Unknown result type (might be due to invalid IL or missing references)