Decompiled source of SivsContentPack v1.0.2

plugins/SivsContentPack.dll

Decompiled 2 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.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.LunarGolem;
using EntityStates.NullifierMonster;
using HG;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using On.EntityStates;
using On.EntityStates.Duplicator;
using On.RoR2;
using On.RoR2.Projectile;
using R2API;
using R2API.ContentManagement;
using R2API.ScriptableObjects;
using RoR2;
using RoR2.Achievements;
using RoR2.CharacterSpeech;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using SivsContentPack.Characters;
using SivsContentPack.Config;
using SivsContentPack.CustomEntityStates;
using SivsContentPack.CustomEntityStates.MiniConstructs;
using SivsContentPack.Items;
using UnityEngine;
using UnityEngine.AddressableAssets;
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
{
	public static class Assets
	{
		public static class AssetBundles
		{
			public static AssetBundle Main;

			public static AssetBundle Items;

			public static AssetBundle Elites;
		}

		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"));
		}
	}
	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 AffixLavender : BuffFactory
	{
		private class AffixLavenderController : ItemBehavior
		{
			public class AffixLavenderTarget
			{
				public GameObject target;

				public EliteDef chosenElite;

				public ulong equipSlot;

				public bool gaveBuffInstead;

				public CharacterBody targetBody => target.GetComponent<CharacterBody>();
			}
		}

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

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

		protected override void HandleMaterials()
		{
		}

		protected override void Hooks()
		{
		}
	}
	public class AffixNavy : BuffFactory
	{
		protected override void LoadAssets(ref BuffDef buffDef)
		{
			buffDef = Assets.AssetBundles.Elites.LoadAsset<BuffDef>("bdEliteTank");
		}

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

		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
			GlobalEventManager.OnHitAll += new hook_OnHitAll(GlobalEventManager_OnHitAll);
		}

		private void GlobalEventManager_OnHitAll(orig_OnHitAll orig, GlobalEventManager self, DamageInfo damageInfo, GameObject hitObject)
		{
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, damageInfo, hitObject);
			if (!((Object)(object)hitObject != (Object)null))
			{
				return;
			}
			CharacterBody component = hitObject.GetComponent<CharacterBody>();
			if (!((Object)(object)component != (Object)null) || !component.HasBuff(Content.Buffs.AffixTank))
			{
				return;
			}
			if (component.HasBuff(Content.Buffs.TankArmorBonus))
			{
				foreach (TimedBuff timedBuff in component.timedBuffs)
				{
					if (timedBuff.buffIndex == Content.Buffs.TankArmorBonus.buffIndex)
					{
						timedBuff.timer = Configuration.Elites.Tank.armorBonusDuration;
					}
				}
			}
			component.AddTimedBuff(Content.Buffs.TankArmorBonus, Configuration.Elites.Tank.armorBonusDuration);
		}
	}
	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 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 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 PendingItemPair
		{
			public ItemDef item1;

			public ItemDef item2;

			public ItemRelationshipType relationshipType;
		}

		public static class Characters
		{
			public static GameObject LilWispBody;

			public static GameObject LilWispMaster;

			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()
			{
				new MiniWisp().Init(ref LilWispBody);
			}
		}

		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 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 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 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 ChimeraHealth;

			public static ItemDef ChimeraRegen;

			public static ItemDef ChimeraShields;

			public static ItemDef ChimeraDamage;

			public static ItemDef ChimeraCrit;

			public static ItemDef ChimeraArmor;

			public static ItemDef ChimeraMoveSpeed;

			public static ItemDef ChimeraAttackSpeed;

			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 FireballOnLowHealth;

			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 CharmEnemies;

			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 GoldDamageBoost;

			public static ItemDef Godmode;

			public static ItemDef VoidEye;

			public static ItemDef ThunderAura;

			public static void Init()
			{
				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 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 BeetlePlush().Init(ref BeetlePlush);
				new Geode().Init(ref Geode);
				new Tentacle().Init(ref Tentacle);
				new ImpEye().Init(ref ImpEye);
				new BisonShield().Init(ref BighornBuckler);
				new IgniteOnHit().Init(ref IgniteOnHit);
				new Tarbine().Init(ref Tarbine);
				new OrbitingConstructs().Init(ref OrbitingConstructs);
				new DoubleProjectiles().Init(ref DoubleProjectiles);
				new NullSeed().Init(ref NullSeed);
				new GodMode().Init(ref Godmode);
				new EquipEliteShadow().Init(ref AffixShadow);
			}
		}

		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[13]
			{
				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(VoidMine_Arming),
				typeof(VoidMine_Armed)
			};

			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 AffixToxic;

			public static BuffDef AffixShadow;

			public static BuffDef AffixEmpowering;

			public static BuffDef AffixSuperboss;

			public static BuffDef AffixUnstable;

			public static BuffDef GeodeArmor;

			public static BuffDef TankArmorBonus;

			public static BuffDef Blindness;

			public static BuffDef DarknessCamo;

			public static BuffDef Tarbine;

			public static BuffDef ArmorZone;

			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 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 ArmorZone().Init(ref ArmorZone);
				new EliteTankArmorBonus().Init(ref TankArmorBonus);
				new AffixBlack().Init(ref AffixShadow);
			}
		}

		public static class Elites
		{
			public static EliteDef EliteTank;

			public static EliteDef EliteToxic;

			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);
			}
		}

		public static class Artifacts
		{
			public static ArtifactDef FloorIsLava;

			public static ArtifactDef EnemySpecializedItems;

			public static ArtifactDef SuperBeetleCompanion;
		}

		public static class Effects
		{
			public static EffectDef BlockLowDamageHitsProc;

			public static EffectDef DoubleProjectilesProc;

			public static EffectDef CupcakeProc;

			public static EffectDef GoldStarProc;

			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 VoidMineFX;

			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 GlassShieldBreakProc().Init(ref GlassShieldBreakProc);
				new FrenzyOnBossKillProc().Init(ref FrenzyOnBossKillProc);
				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 ShadowCloakBreak().Init(ref ShadowCloakBreak);
			}
		}

		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 UnlockGodMode;

			public static void Init()
			{
				new UnlockGodMode().Init(ref UnlockGodMode);
			}
		}

		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 class DeployableSlots
		{
			public static DeployableSlot GodModeLunarAlly;
		}

		public static class ProcTypes
		{
			public static ProcType procBonus;

			public static ProcType revengeDamageBonus;

			public static ProcType placebo;

			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 R2APISerializableContentPack contentPack;

		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<PendingItemPair> pendingItemPairs = new List<PendingItemPair>();

		public static void Init()
		{
			contentPack = Assets.AssetBundles.Main.LoadAsset<R2APISerializableContentPack>("cpSivsContentPack");
			R2APIContentManager.AddPreExistingSerializableContentPack(contentPack, true);
			Effects.Init();
			ItemTiers.Init();
			Elites.Init();
			Unlockables.Init();
			Buffs.Init();
			SerializableEntityStates.Init();
			Characters.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 SubmitPendingItemPair(PendingItemPair pair)
		{
			pendingItemPairs.Add(pair);
		}

		public static void ValidatePendingItemPairs()
		{
		}
	}
	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)
			//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)
			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("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 SubmitEquipAsAddressablePair(ref EquipmentDef equipDef)
		{
		}
	}
	public class EffectFactory
	{
		protected GameObject prefab;

		public void Init(ref EffectDef effectDef)
		{
			if (effectDef != null)
			{
				Debug.LogWarningFormat("Content {0} has already been loaded.", new object[1] { effectDef });
				return;
			}
			LoadAssets(ref effectDef);
			if ((Object)(object)effectDef.prefab != (Object)null)
			{
				effectDef.prefabVfxAttributes = effectDef.prefab.GetComponent<VFXAttributes>();
				effectDef.prefabEffectComponent = effectDef.prefab.GetComponent<EffectComponent>();
			}
			HandleMaterials();
			ContentAddition.AddEffect(prefab);
			Debug.LogFormat("Loaded effect {0} and submitted to content pack.", new object[1] { ((Object)prefab).name });
		}

		protected virtual void LoadAssets(ref EffectDef effectDef)
		{
		}

		protected virtual void HandleMaterials()
		{
		}
	}
	public class BuffFactory
	{
		public void Init(ref BuffDef buffDef)
		{
			LoadAssets(ref buffDef);
			HandleMaterials();
			Hooks();
			ContentAddition.AddBuffDef(buffDef);
			Debug.LogFormat("Loaded buff {0} and submitted to content pack.", new object[1] { ((Object)buffDef).name });
		}

		protected virtual void LoadAssets(ref BuffDef buffDef)
		{
		}

		protected virtual bool CheckIfEnabled()
		{
			return true;
		}

		protected virtual void HandleMaterials()
		{
		}

		protected virtual void Hooks()
		{
		}
	}
	public class EliteFactory
	{
		protected Texture2D colorRamp;

		public void Init(ref EliteDef eliteDef)
		{
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Expected O, but got Unknown
			if ((Object)(object)eliteDef != (Object)null)
			{
				Debug.LogWarningFormat("Content {0} has already been loaded.", new object[1] { ((Object)eliteDef).name });
				return;
			}
			if (!CheckIfEnabled())
			{
				Debug.LogFormat("Content {0} has been disabled.", new object[1] { GetType().Name });
				return;
			}
			LoadAssets(ref eliteDef);
			HandleMaterials();
			RegisterLanguageTokens();
			Hooks();
			CustomElite val = new CustomElite(eliteDef, GetEliteTiers(), colorRamp);
			EliteAPI.Add(val);
			Debug.LogFormat("Loaded elite type {0} and submitted to content pack.", new object[1] { ((Object)eliteDef).name });
		}

		protected virtual bool CheckIfEnabled()
		{
			return true;
		}

		protected virtual IEnumerable<EliteTierDef> GetEliteTiers()
		{
			return EliteAPI.VanillaEliteTiers;
		}

		protected virtual void LoadAssets(ref EliteDef eliteDef)
		{
		}

		protected virtual void HandleMaterials()
		{
		}

		protected virtual void RegisterLanguageTokens()
		{
		}

		protected virtual void Hooks()
		{
		}
	}
	public class CharacterFactory
	{
		protected GameObject masterPrefab;

		public void Init(ref GameObject body)
		{
			if ((Object)(object)body != (Object)null)
			{
				Debug.LogWarningFormat("Content {0}/{1} has already been loaded.", new object[1] { ((Object)body).name });
				return;
			}
			if (!CheckIfEnabled())
			{
				Debug.LogFormat("Content {0} has been disabled.", new object[1] { GetType().Name });
				return;
			}
			LoadAssets(ref body);
			LoadMaster();
			HandleMaterials();
			RegisterLanguageTokens();
			Hooks();
			CollectionExtensions.AddItem<GameObject>((IEnumerable<GameObject>)Content.contentPack.bodyPrefabs, body);
			if ((Object)(object)masterPrefab != (Object)null)
			{
				CollectionExtensions.AddItem<GameObject>((IEnumerable<GameObject>)Content.contentPack.masterPrefabs, masterPrefab);
				Debug.LogFormat("Loaded characterbody {0} and charactermaster {1} and submitted to content pack.", new object[2]
				{
					((Object)body).name,
					((Object)masterPrefab).name
				});
			}
			else
			{
				Debug.LogFormat("Loaded characterbody {0} and submitted to content pack.", new object[1] { ((Object)body).name });
			}
		}

		protected virtual bool CheckIfEnabled()
		{
			return true;
		}

		protected virtual void LoadMaster()
		{
		}

		protected virtual void LoadAssets(ref GameObject body)
		{
		}

		protected virtual void HandleMaterials()
		{
		}

		protected virtual void RegisterLanguageTokens()
		{
		}

		protected virtual void Hooks()
		{
		}
	}
	public class ItemTierFactory
	{
		protected GameObject systemPrefab;

		public void Init(ref ItemTierDef itemTierDef)
		{
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Expected O, but got Unknown
			if ((Object)(object)itemTierDef != (Object)null)
			{
				Debug.LogWarningFormat("Content {0} has already been loaded.", new object[1] { ((Object)itemTierDef).name });
				return;
			}
			if (!CheckIfEnabled())
			{
				Debug.LogFormat("Content {0} has been disabled.", new object[1] { GetType().Name });
				return;
			}
			LoadAssets(ref itemTierDef);
			HandleMaterials();
			Hooks();
			PickupDisplay.Start += new hook_Start(PickupDisplay_Start);
			ContentAddition.AddItemTierDef(itemTierDef);
			Debug.LogFormat("Loaded ItemTierDef {0} and submitted to content pack.", new object[1] { ((Object)itemTierDef).name });
		}

		protected virtual bool CheckIfEnabled()
		{
			return true;
		}

		protected virtual void LoadAssets(ref ItemTierDef itemTierDef)
		{
		}

		private void PickupDisplay_Start(orig_Start orig, PickupDisplay self)
		{
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			GameObject val = Object.Instantiate<GameObject>(systemPrefab, ((Component)self).gameObject.transform);
			val.transform.parent = ((Component)((Component)self).gameObject.transform.parent).transform;
			((Object)val).name = ((Object)val).name.Replace("(Clone)", "");
			val.transform.localPosition = Vector3.zero;
			val.SetActive(false);
		}

		protected virtual void HandleMaterials()
		{
		}

		protected virtual void Hooks()
		{
		}
	}
	public class UnlockableFactory
	{
		public void Init(ref UnlockableDef unlockableDef)
		{
			if ((Object)(object)unlockableDef != (Object)null)
			{
				Debug.LogWarningFormat("Content {0} has already been loaded.", new object[1] { unlockableDef });
				return;
			}
			if (!CheckIfEnabled())
			{
				Debug.LogFormat("Content {0} has been disabled.", new object[1] { GetType().Name });
				return;
			}
			LoadAssets(ref unlockableDef);
			Hooks();
			ContentAddition.AddUnlockableDef(unlockableDef);
			Debug.LogFormat("Loaded UnlockableDef {0} and submitted to content pack.", new object[1] { unlockableDef });
		}

		protected virtual bool CheckIfEnabled()
		{
			return true;
		}

		protected virtual void LoadAssets(ref UnlockableDef unlockableDef)
		{
		}

		protected virtual void Hooks()
		{
		}
	}
	public class ObjectFactory
	{
		protected SpawnCard spawnCard;

		public void Init(ref GameObject gameObject)
		{
			if ((Object)(object)gameObject != (Object)null)
			{
				Debug.LogWarningFormat("Content {0} has already been loaded.", new object[1] { gameObject });
				return;
			}
			if (!CheckIfEnabled())
			{
				Debug.LogFormat("Content {0} has been disabled.", new object[1] { GetType().Name });
				return;
			}
			LoadAssets(ref gameObject);
			Hooks();
			ContentAddition.AddNetworkedObject(gameObject);
			Debug.LogFormat("Loaded Object {0} and submitted to content pack.", new object[1] { gameObject });
		}

		protected virtual bool CheckIfEnabled()
		{
			return true;
		}

		protected virtual List<string> AddToSceneInfos()
		{
			return new List<string>();
		}

		protected virtual void LoadAssets(ref GameObject gameObject)
		{
		}

		protected virtual void Hooks()
		{
		}
	}
	public class BlockLowDamageHitsProc : EffectFactory
	{
		protected override void LoadAssets(ref EffectDef effectDef)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			effectDef = new EffectDef();
			prefab = Assets.AssetBundles.Items.LoadAsset<GameObject>("BlockLowDamageHitsProc");
			effectDef.pre