Decompiled source of Skill Cap Mod v1.0.19

ValheimSkillCapMod.dll

Decompiled 4 days ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
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 HarmonyLib;
using Jotunn.Configs;
using Jotunn.Entities;
using Jotunn.Managers;
using Jotunn.Utils;
using UnityEngine;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Rendering;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("ValheimSkillCapMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ValheimSkillCapMod")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("19F0E6BA-DE2B-4504-9801-0F9360E3D9EB")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace MyBepInExPlugin;

[BepInPlugin("com.example.GUID", "MyPlugin", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Main : BaseUnityPlugin
{
	[HarmonyPatch]
	private static class ChangeRaiseSkillMethod
	{
		public static Player vagonUser;

		public static bool hasDoubleJumped = false;

		public static float moveTimer;

		public static bool canBeInvisible;

		public static HashSet<string> autoPickables = new HashSet<string> { "Pickable_Dandelion(Clone)", "RaspberryBush(Clone)", "Pickable_Mushroom(Clone)", "BlueberryBush(Clone)" };

		private static GameObject _diablo;

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Skills), "RaiseSkill")]
		public static bool RaiseSkill(Skills __instance, SkillType skillType, float factor = 1f)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Invalid comparison between Unknown and I4
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			if ((int)skillType == 0)
			{
				return false;
			}
			float skillLevel = __instance.GetSkillLevel(skillType);
			float num = skillLevel;
			float num2 = num;
			if (num2 >= 10f && num2 < 20f)
			{
				if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_eikthyr"))
				{
					return false;
				}
			}
			else
			{
				float num3 = num2;
				if (num3 >= 20f && num3 < 30f)
				{
					if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_gdking"))
					{
						return false;
					}
				}
				else
				{
					float num4 = num2;
					if (num4 >= 30f && num4 < 40f)
					{
						if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_bonemass"))
						{
							return false;
						}
					}
					else
					{
						float num5 = num2;
						if (num5 >= 40f && num5 < 50f)
						{
							if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_dragon"))
							{
								return false;
							}
						}
						else
						{
							float num6 = num2;
							if (num6 >= 50f && num6 < 60f)
							{
								if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_goblinking"))
								{
									return false;
								}
							}
							else
							{
								float num7 = num2;
								if (num7 >= 60f && num7 < 75f)
								{
									if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_queen"))
									{
										return false;
									}
								}
								else
								{
									float num8 = num2;
									if (num8 >= 75f && num8 < 100f && !ZoneSystem.instance.GetGlobalKeys().Contains("defeated_fader"))
									{
										return false;
									}
								}
							}
						}
					}
				}
			}
			return true;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Skills), "OnDeath")]
		public static bool DoNotLowerSkills()
		{
			return false;
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(Vagon), "FixedUpdate")]
		public static void RaiseCarrierSpeed(Vagon __instance)
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Expected O, but got Unknown
			if (!(((Object)((Component)__instance).gameObject).name == "TurboCart(Clone)"))
			{
				return;
			}
			Type type = ((object)__instance).GetType();
			FieldInfo field = type.GetField("m_attachedObject", BindingFlags.Instance | BindingFlags.NonPublic);
			GameObject val = (GameObject)field.GetValue(__instance);
			if ((Object)(object)val != (Object)null)
			{
				if ((Object)(object)vagonUser != (Object)(object)val.GetComponent<Player>())
				{
					vagonUser = val.GetComponent<Player>();
					((Character)vagonUser).m_runSpeed = 21f;
					((Character)vagonUser).m_walkSpeed = 12f;
				}
			}
			else if ((Object)(object)vagonUser != (Object)null)
			{
				((Character)vagonUser).m_runSpeed = 7f;
				((Character)vagonUser).m_walkSpeed = 4f;
				vagonUser = null;
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(InventoryGui), "DoCrafting")]
		public static void AddBonusItem()
		{
			SEMan sEMan = ((Character)Player.m_localPlayer).GetSEMan();
			InventoryGui.instance.m_craftBonusChance = 0.25f;
			if (sEMan.GetStatusEffects().Count <= 0)
			{
				return;
			}
			foreach (StatusEffect statusEffect in sEMan.GetStatusEffects())
			{
				if (((Object)statusEffect).name == "SetEffect_ChefHat")
				{
					InventoryGui.instance.m_craftBonusChance = 0.5f;
				}
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(CookingStation), "OnInteract")]
		public static void AddBonusItemCooking()
		{
			SEMan sEMan = ((Character)Player.m_localPlayer).GetSEMan();
			InventoryGui.instance.m_craftBonusChance = 0.25f;
			if (sEMan.GetStatusEffects().Count <= 0)
			{
				return;
			}
			foreach (StatusEffect statusEffect in sEMan.GetStatusEffects())
			{
				if (((Object)statusEffect).name == "SetEffect_ChefHat")
				{
					InventoryGui.instance.m_craftBonusChance = 0.5f;
				}
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Humanoid), "Awake")]
		public static void ChangeEikthyrHP(Humanoid __instance)
		{
			if (((Object)__instance).name == "Eikthyr(Clone)")
			{
				((Character)__instance).m_health = 1000f;
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Character), "Jump")]
		public static void DoubleJump(Character __instance)
		{
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			if (!hasDoubleJumped && !__instance.IsOnGround() && __instance.IsPlayer() && (Object)(object)__instance == (Object)(object)Player.m_localPlayer && __instance.GetSkillFactor((SkillType)100) >= 0.5f && ((Component)__instance).GetComponent<Player>().GetStamina() > 10f)
			{
				hasDoubleJumped = true;
				__instance.ForceJump(new Vector3(0f, 10f, 0f), true);
				Type type = ((object)__instance).GetType();
				FieldInfo field = type.GetField("m_maxAirAltitude", BindingFlags.Instance | BindingFlags.NonPublic);
				field.SetValue(__instance, __instance.GetHeight());
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Character), "UpdateGroundContact")]
		public static void ResetDoubleJump(Character __instance)
		{
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			if (__instance.IsPlayer() && (Object)(object)__instance == (Object)(object)Player.m_localPlayer && __instance.GetSkillFactor((SkillType)100) >= 0.3f)
			{
				Type type = ((object)__instance).GetType();
				FieldInfo field = type.GetField("m_maxAirAltitude", BindingFlags.Instance | BindingFlags.NonPublic);
				float num = Mathf.Max(0f, (float)field.GetValue(__instance) - ((Component)__instance).transform.position.y);
				if (num < 8f)
				{
					SEMan sEMan = __instance.GetSEMan();
					sEMan.AddStatusEffect(newHaldorAssetBundle.LoadAsset<StatusEffect>("SetEffect_SlowFall"), false, 0, 0f);
				}
			}
			if (__instance.IsPlayer() && __instance.IsOnGround() && (Object)(object)__instance == (Object)(object)Player.m_localPlayer)
			{
				hasDoubleJumped = false;
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(Character), "UpdateGroundContact")]
		public static void RemoveSlowFall(Character __instance)
		{
			if (!__instance.IsPlayer() || !((Object)(object)__instance == (Object)(object)Player.m_localPlayer))
			{
				return;
			}
			SEMan sEMan = __instance.GetSEMan();
			List<StatusEffect> statusEffects = sEMan.GetStatusEffects();
			if (statusEffects.Count <= 0)
			{
				return;
			}
			bool flag = false;
			StatusEffect val = ScriptableObject.CreateInstance<StatusEffect>();
			foreach (StatusEffect item in statusEffects)
			{
				if (item.m_name == "SlowFall")
				{
					flag = true;
					val = item;
				}
			}
			if (flag)
			{
				sEMan.RemoveStatusEffect(val, false);
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(Character), "UpdateWalking")]
		public static void IncreaseSneakSpeed(Character __instance)
		{
			if (__instance.IsPlayer() && __instance.IsOnGround() && (Object)(object)__instance == (Object)(object)Player.m_localPlayer && !__instance.IsEncumbered() && __instance.GetSkillFactor((SkillType)101) >= 0.2f)
			{
				__instance.m_crouchSpeed = 4.5f;
			}
			else if (__instance.IsPlayer() && (Object)(object)__instance == (Object)(object)Player.m_localPlayer)
			{
				__instance.m_crouchSpeed = 2f;
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(Humanoid), "BlockAttack")]
		public static void ActivateMagicShield(Humanoid __instance)
		{
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			if (!((Character)__instance).IsPlayer() || !((Object)(object)__instance == (Object)(object)Player.m_localPlayer) || !((Character)__instance).HaveEitr(10f) || !((Character)__instance).IsBlocking())
			{
				return;
			}
			SEMan sEMan = ((Character)__instance).GetSEMan();
			List<Player> list = new List<Player>();
			foreach (StatusEffect statusEffect in sEMan.GetStatusEffects())
			{
				if (!(statusEffect.m_name == "Magic Shield"))
				{
					continue;
				}
				((Character)__instance).UseEitr(10f);
				Collider[] array = Physics.OverlapSphere(((Component)__instance).transform.position, 6f, -1, (QueryTriggerInteraction)1);
				if (array.Length == 0 || array == null)
				{
					continue;
				}
				Collider[] array2 = array;
				foreach (Collider val in array2)
				{
					if ((Object)(object)((Component)val).GetComponentInParent<Player>() != (Object)null)
					{
						list.Add(((Component)val).GetComponentInParent<Player>());
					}
				}
			}
			foreach (Player item in list)
			{
				SEMan sEMan2 = ((Character)item).GetSEMan();
				sEMan2.AddStatusEffect(ItemManager.Instance.GetItem("WoodCopy1").ItemDrop.m_itemData.m_shared.m_attackStatusEffect, false, 0, 0f);
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(Humanoid), "CustomFixedUpdate")]
		public static void Dive(Humanoid __instance)
		{
			if (!((Character)__instance).IsPlayer() || !((Object)(object)__instance == (Object)(object)Player.m_localPlayer))
			{
				return;
			}
			((Character)__instance).m_swimDepth = 2f;
			if (((Character)__instance).IsSwimming() && ((Character)__instance).IsBlocking() && ((Character)__instance).GetStaminaPercentage() > 0.01f && ((Character)__instance).GetSkillFactor((SkillType)103) >= 0.2f)
			{
				((Character)__instance).m_swimDepth = 10f;
				((Character)__instance).UseStamina(Mathf.Lerp(0.4f, 0.1f, ((Character)__instance).GetSkillFactor((SkillType)103)));
			}
			if (!((Character)__instance).IsSwimming())
			{
				return;
			}
			Inventory inventory = __instance.GetInventory();
			if (!inventory.ContainsItemByName("Empty Water Bucket"))
			{
				return;
			}
			List<ItemData> allItems = inventory.GetAllItems();
			List<ItemData> list = new List<ItemData>();
			foreach (ItemData item2 in allItems)
			{
				if (item2.m_shared.m_name == "Empty Water Bucket")
				{
					list.Add(item2);
				}
			}
			foreach (ItemData item3 in list)
			{
				CustomItem item = ItemManager.Instance.GetItem("WaterBucket");
				inventory.AddItem(item.ItemDrop.m_itemData.m_dropPrefab, item3.m_stack);
				inventory.RemoveItem("Empty Water Bucket", item3.m_stack, -1, true);
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(Player), "GetStealthFactor")]
		public static void SetInvisible(Player __instance)
		{
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			if (((Character)__instance).GetSkillFactor((SkillType)101) >= 0.5f && (Object)(object)__instance == (Object)(object)Player.m_localPlayer && ((Character)__instance).IsCrouching() && canBeInvisible)
			{
				Type type = ((object)__instance).GetType();
				FieldInfo field = type.GetField("m_stealthFactor", BindingFlags.Instance | BindingFlags.NonPublic);
				field.SetValue(__instance, 0f);
			}
			if (!((Object)(object)__instance == (Object)(object)Player.m_localPlayer))
			{
				goto IL_00a3;
			}
			if (!((Character)__instance).InDodge())
			{
				Vector3 velocity = ((Character)__instance).GetVelocity();
				if (!(((Vector3)(ref velocity)).magnitude > 0.01f))
				{
					goto IL_00a3;
				}
			}
			moveTimer = 180f;
			canBeInvisible = false;
			goto IL_00b5;
			IL_00b5:
			if (moveTimer <= 0f)
			{
				canBeInvisible = true;
			}
			return;
			IL_00a3:
			moveTimer -= 1f;
			goto IL_00b5;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Humanoid), "HideHandItems")]
		public static bool AttackWhileSwimming(Humanoid __instance)
		{
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Invalid comparison between Unknown and I4
			if (((Character)__instance).IsPlayer() && (Object)(object)__instance == (Object)(object)Player.m_localPlayer)
			{
				int num = 0;
				Type type = ((object)__instance).GetType();
				FieldInfo field = type.GetField("m_leftItem", BindingFlags.Instance | BindingFlags.NonPublic);
				if (field.GetValue(__instance) == null)
				{
					num++;
				}
				type = ((object)__instance).GetType();
				field = type.GetField("m_rightItem", BindingFlags.Instance | BindingFlags.NonPublic);
				if (field.GetValue(__instance) == null)
				{
					num++;
				}
				if (num == 2)
				{
					return false;
				}
				if (__instance.RightItem != null && (int)__instance.RightItem.m_shared.m_skillType == 2 && ((Character)__instance).GetSkillFactor((SkillType)103) >= 0.3f)
				{
					if (__instance.LeftItem != null)
					{
						__instance.UnequipItem(__instance.LeftItem, true);
					}
					return false;
				}
			}
			return true;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(TombStone), "Start")]
		public static void ChangeCorpseRunWeight(TombStone __instance)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Expected O, but got Unknown
			SE_Stats val = (SE_Stats)__instance.m_lootStatusEffect;
			val.m_addMaxCarryWeight = 700f;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Character), "OnDeath")]
		public static void IncreaseWorldExp(Character __instance)
		{
			if (__instance.IsBoss())
			{
				ConfigEntry<float> worldExpModifier = Main.worldExpModifier;
				worldExpModifier.Value += 0.2f;
				logger.LogInfo((object)Main.worldExpModifier.Value);
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(Game), "UpdateWorldRates")]
		public static void ForceSetWorldExpRate()
		{
			Game.m_skillGainRate = worldExpModifier.Value;
		}

		[HarmonyPatch(typeof(Trader), "Start")]
		[HarmonyPrefix]
		public static void SwapHaldor(Trader __instance)
		{
			if (((Object)((Component)__instance).gameObject).name == "Haldor(Clone)")
			{
				__instance.m_items = PrefabManager.Instance.GetPrefab("newhaldor").GetComponent<Trader>().m_items;
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(Player), "UpdateCover")]
		public static void HasWaxedCape(Player __instance)
		{
			if (!((Object)(object)__instance == (Object)(object)Player.m_localPlayer))
			{
				return;
			}
			SEMan sEMan = ((Character)__instance).GetSEMan();
			List<StatusEffect> statusEffects = sEMan.GetStatusEffects();
			if (statusEffects == null || statusEffects.Count <= 0)
			{
				return;
			}
			foreach (StatusEffect item in statusEffects)
			{
				if (item.m_name == "Waterproof" || item.m_name == "WaterproofSlowFall" || item.m_name == "WaterproofWindRun")
				{
					Type type = ((object)__instance).GetType();
					FieldInfo field = type.GetField("m_underRoof", BindingFlags.Instance | BindingFlags.NonPublic);
					field.SetValue(__instance, true);
				}
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(Player), "Update")]
		public static void AutoPickBerries(Player __instance)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)__instance == (Object)(object)Player.m_localPlayer))
			{
				return;
			}
			_ = ((Component)__instance).transform.position;
			if (((Character)__instance).GetSEMan() == null)
			{
				return;
			}
			SEMan sEMan = ((Character)__instance).GetSEMan();
			__instance.m_autoPickupRange = 2f;
			if (sEMan.GetStatusEffects().Count <= 0)
			{
				return;
			}
			foreach (StatusEffect statusEffect in sEMan.GetStatusEffects())
			{
				if (!(((Object)statusEffect).name == "SetEffect_GathererGloves"))
				{
					continue;
				}
				__instance.m_autoPickupRange = 4f;
				Collider[] array = Physics.OverlapSphere(((Component)__instance).transform.position, 4f, -1, (QueryTriggerInteraction)1);
				if (array.Length == 0 || array == null)
				{
					continue;
				}
				Collider[] array2 = array;
				foreach (Collider val in array2)
				{
					if ((Object)(object)((Component)val).GetComponentInParent<Pickable>() != (Object)null)
					{
						Pickable componentInParent = ((Component)val).GetComponentInParent<Pickable>();
						if (autoPickables.Contains(((Object)componentInParent).name))
						{
							componentInParent.Interact((Humanoid)(object)__instance, false, false);
						}
					}
				}
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Aoe), "OnHit")]
		public static bool RemoveDuplicateHEaling(Aoe __instance)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			if (__instance.m_name == "Healing AoE")
			{
				Collider[] array = Physics.OverlapSphere(((Component)__instance).transform.position, 4f, -1, (QueryTriggerInteraction)1);
				if (array.Length != 0 && array != null)
				{
					List<Player> list = new List<Player>();
					Collider[] array2 = array;
					foreach (Collider val in array2)
					{
						if ((Object)(object)((Component)val).GetComponentInParent<Player>() != (Object)null)
						{
							list.Add(((Component)val).GetComponentInParent<Player>());
						}
					}
					foreach (Player item in list)
					{
						SEMan sEMan = ((Character)item).GetSEMan();
						List<StatusEffect> statusEffects = sEMan.GetStatusEffects();
						foreach (StatusEffect item2 in statusEffects)
						{
							if (item2.m_name == "Healing")
							{
								return false;
							}
						}
					}
				}
			}
			return true;
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(Attack), "DoAreaAttack")]
		public static void ApplyAoEBuffs(Attack __instance)
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
			Type type = ((object)__instance).GetType();
			FieldInfo field = type.GetField("m_character", BindingFlags.Instance | BindingFlags.NonPublic);
			if (!(field.GetValue(__instance).GetType() == typeof(Player)))
			{
				return;
			}
			Player val = (Player)field.GetValue(__instance);
			if (!((Object)(object)val == (Object)(object)Player.m_localPlayer))
			{
				return;
			}
			if (__instance.GetWeapon().m_shared.m_name == "Odin's Tankard")
			{
				Collider[] array = Physics.OverlapSphere(((Component)val).transform.position, 6f, -1, (QueryTriggerInteraction)1);
				if (array.Length != 0 && array != null)
				{
					List<Player> list = new List<Player>();
					Collider[] array2 = array;
					foreach (Collider val2 in array2)
					{
						if ((Object)(object)((Component)val2).GetComponentInParent<Player>() != (Object)null)
						{
							list.Add(((Component)val2).GetComponentInParent<Player>());
						}
					}
					foreach (Player item in list)
					{
						SEMan sEMan = ((Character)item).GetSEMan();
						List<StatusEffect> statusEffects = sEMan.GetStatusEffects();
						List<StatusEffect> list2 = new List<StatusEffect>();
						foreach (StatusEffect item2 in statusEffects)
						{
							if (item2.m_name == "Attack Buff Visual" || item2.m_name == "Attack Buff")
							{
								list2.Add(item2);
							}
						}
						if (list2.Count > 0)
						{
							foreach (StatusEffect item3 in list2)
							{
								sEMan.RemoveStatusEffect(item3, false);
							}
						}
						sEMan.AddStatusEffect(ItemManager.Instance.GetItem("WoodCopy2").ItemDrop.m_itemData.m_shared.m_attackStatusEffect, false, 0, 0f);
						sEMan.AddStatusEffect((StatusEffect)(object)newHaldorAssetBundle.LoadAsset<SE_Stats>("StatusEffect_AttackBuff"), false, 0, 0f);
						if ((Object)(object)item != (Object)(object)Player.m_localPlayer)
						{
							((Character)val).RaiseSkill((SkillType)9, 1f);
						}
					}
				}
			}
			if (!(__instance.GetWeapon().m_shared.m_name == "French Horn"))
			{
				return;
			}
			Collider[] array3 = Physics.OverlapSphere(((Component)val).transform.position, 6f, -1, (QueryTriggerInteraction)1);
			if (array3.Length == 0 || array3 == null)
			{
				return;
			}
			List<Player> list3 = new List<Player>();
			Collider[] array4 = array3;
			foreach (Collider val3 in array4)
			{
				if ((Object)(object)((Component)val3).GetComponentInParent<Player>() != (Object)null)
				{
					list3.Add(((Component)val3).GetComponentInParent<Player>());
				}
			}
			foreach (Player item4 in list3)
			{
				SEMan sEMan2 = ((Character)item4).GetSEMan();
				sEMan2.AddStatusEffect((StatusEffect)(object)newHaldorAssetBundle.LoadAsset<SE_Stats>("StatusEffect_StaminaBoost"), false, 0, 0f);
				if ((Object)(object)item4 != (Object)(object)Player.m_localPlayer)
				{
					((Character)val).RaiseSkill((SkillType)9, 1f);
				}
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(Player), "Start")]
		public static void RemovePieceDuplicates()
		{
			PieceManager.Instance.RemovePiece("Smelter");
			PieceManager.Instance.RemovePiece("cartCopy");
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(Game), "Start")]
		public static void Remove5PlayersLimit(Game __instance)
		{
			__instance.m_difficultyScaleMaxPlayers = 99;
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(Pickable), "Awake")]
		public static void AddFarmingToDandelion(Pickable __instance)
		{
			//IL_004f: 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_00c2: Unknown result type (might be due to invalid IL or missing references)
			if (((Object)((Component)__instance).gameObject).name == "Pickable_Dandelion(Clone)" || ((Object)((Component)__instance).gameObject).name == "Pickable_SmokePuff(Clone)" || ((Object)((Component)__instance).gameObject).name == "Pickable_Thistle(Clone)")
			{
				__instance.m_pickRaiseSkill = (SkillType)106;
			}
			if (((Object)((Component)__instance).gameObject).name == "Pickable_MeatPile(Clone)")
			{
				DropData item = new DropData
				{
					m_item = ZNetScene.instance.GetPrefab("RottenMeat"),
					m_weight = 0.8f,
					m_stackMin = 1,
					m_stackMax = 1
				};
				DropTable extraDrops = ((Component)__instance).GetComponent<Pickable>().m_extraDrops;
				extraDrops.m_dropMax = 4;
				extraDrops.m_drops.Add(item);
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Humanoid), "UpdateEquipment")]
		public static void RefillTorch(Humanoid __instance)
		{
			if (!((Character)__instance).IsPlayer() || !((Object)(object)__instance == (Object)(object)Player.m_localPlayer))
			{
				return;
			}
			if (__instance.RightItem != null && __instance.RightItem.m_shared.m_useDurability && __instance.RightItem.m_shared.m_name == "Refillable Torch" && __instance.RightItem.m_durability <= 1f)
			{
				Inventory inventory = __instance.GetInventory();
				if (inventory.ContainsItemByName("$item_resin"))
				{
					inventory.RemoveItem("$item_resin", 1, -1, true);
					__instance.RightItem.m_durability = 20f;
				}
			}
			if (__instance.LeftItem != null && __instance.LeftItem.m_shared.m_useDurability && __instance.LeftItem.m_shared.m_name == "Refillable Torch" && __instance.LeftItem.m_durability <= 1f)
			{
				Inventory inventory2 = __instance.GetInventory();
				if (inventory2.ContainsItemByName("$item_resin"))
				{
					inventory2.RemoveItem("$item_resin", 1, -1, true);
					__instance.LeftItem.m_durability = 20f;
				}
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(ZNet), "SetPublicReferencePosition")]
		public static bool ForcePublic(ZNet __instance)
		{
			Type type = ((object)__instance).GetType();
			FieldInfo field = type.GetField("m_publicReferencePosition", BindingFlags.Instance | BindingFlags.NonPublic);
			field.SetValue(__instance, true);
			return false;
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(Attack), "ProjectileAttackTriggered")]
		public static void ShootSecondProjectile(Attack __instance)
		{
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Expected O, but got Unknown
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Invalid comparison between Unknown and I4
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Invalid comparison between Unknown and I4
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Expected O, but got Unknown
			Type type = ((object)__instance).GetType();
			FieldInfo field = type.GetField("m_ammoItem", BindingFlags.Instance | BindingFlags.NonPublic);
			if (field.GetValue(__instance) == null || !(field.GetValue(__instance).GetType() == typeof(ItemData)))
			{
				return;
			}
			ItemData val = (ItemData)field.GetValue(__instance);
			if ((int)__instance.m_attackType != 2 || (int)val.m_shared.m_skillType != 8)
			{
				return;
			}
			type = ((object)__instance).GetType();
			field = type.GetField("m_character", BindingFlags.Instance | BindingFlags.NonPublic);
			if (!(field.GetValue(__instance).GetType() == typeof(Player)))
			{
				return;
			}
			Player val2 = (Player)field.GetValue(__instance);
			if ((Object)(object)val2 == (Object)(object)Player.m_localPlayer)
			{
				Random random = new Random();
				if (((Character)val2).GetSkillFactor((SkillType)8) >= 0.5f && random.Next(2) < 1)
				{
					MethodInfo method = typeof(Attack).GetMethod("FireProjectileBurst", BindingFlags.Instance | BindingFlags.NonPublic);
					method.Invoke(__instance, Array.Empty<object>());
				}
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Projectile), "SpawnOnHit")]
		public static bool SpearRaycast(Projectile __instance)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Invalid comparison between Unknown and I4
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: 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_01d3: 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)
			if ((int)__instance.m_type == 64)
			{
				ItemDrop component = Object.Instantiate<GameObject>(__instance.m_spawnItem.m_dropPrefab, ((Component)__instance).transform.position + ((Component)__instance).transform.TransformDirection(__instance.m_spawnOffset), Quaternion.identity).GetComponent<ItemDrop>();
				component.m_itemData = __instance.m_spawnItem.Clone();
				if (component.m_itemData.m_quality > 1)
				{
					component.SetQuality(component.m_itemData.m_quality);
				}
				bool flag = true;
				component.m_itemData.m_stack = 1;
				if (component.m_onDrop != null)
				{
					component.m_onDrop(component);
				}
				Type type = ((object)__instance).GetType();
				FieldInfo field = type.GetField("m_owner", BindingFlags.Instance | BindingFlags.NonPublic);
				if (field.GetValue(__instance).GetType() == typeof(Player))
				{
					object? value = field.GetValue(__instance);
					Player val = (Player)((value is Player) ? value : null);
					if ((Object)(object)val == (Object)(object)Player.m_localPlayer && ((Character)val).GetSkillFactor((SkillType)5) >= 0.3f)
					{
						LineRenderer val2 = ((Component)component).gameObject.AddComponent<LineRenderer>();
						val2.positionCount = 2;
						Vector3 val3 = default(Vector3);
						((Vector3)(ref val3))..ctor(((Component)__instance).transform.position.x, ((Component)__instance).transform.position.y + 5f, ((Component)__instance).transform.position.z);
						Vector3 val4 = default(Vector3);
						((Vector3)(ref val4))..ctor(((Component)__instance).transform.position.x, ((Component)__instance).transform.position.y - 100f, ((Component)__instance).transform.position.z);
						Vector3[] positions = (Vector3[])(object)new Vector3[2] { val3, val4 };
						val2.SetPositions(positions);
						val2.SetPositions(positions);
						Material material = ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/smoke (1)")).GetComponent<Renderer>().material;
						((Renderer)val2).material.shader = material.shader;
						((Renderer)val2).material.color = new Color(1f, 1f, 1f, 0.25f);
						val2.widthMultiplier = 0.5f;
					}
				}
				return false;
			}
			return true;
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(ItemDrop), "Start")]
		public static void SpearRaycast(ItemDrop __instance)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Invalid comparison between Unknown and I4
			if ((int)__instance.m_itemData.m_shared.m_skillType != 5)
			{
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Player), "CheckRun")]
		public static void ActivateSecondWind(Player __instance)
		{
			if (!((Object)(object)__instance == (Object)(object)Player.m_localPlayer) || ((Character)__instance).HaveStamina(0f))
			{
				return;
			}
			SEMan sEMan = ((Character)__instance).GetSEMan();
			List<StatusEffect> statusEffects = sEMan.GetStatusEffects();
			if (statusEffects != null && statusEffects.Count > 0)
			{
				foreach (StatusEffect item in statusEffects)
				{
					if (item.m_name == newHaldorAssetBundle.LoadAsset<StatusEffect>("StatusEffect_SecondWind").m_name)
					{
						return;
					}
				}
			}
			sEMan.AddStatusEffect(newHaldorAssetBundle.LoadAsset<StatusEffect>("StatusEffect_SecondWind"), false, 0, 0f);
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Beehive), "RPC_Extract")]
		public static void GenerateWax(Beehive __instance)
		{
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: 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)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			CustomItem item = ItemManager.Instance.GetItem("wax");
			ItemDrop itemDrop = item.ItemDrop;
			Random random = new Random();
			MethodInfo method = typeof(Beehive).GetMethod("GetHoneyLevel", BindingFlags.Instance | BindingFlags.NonPublic);
			int num = (int)method.Invoke(__instance, Array.Empty<object>());
			if (num <= 0)
			{
				return;
			}
			for (int i = 0; i < num; i++)
			{
				if (random.Next(10) == 0)
				{
					__instance.m_spawnEffect.Create(__instance.m_spawnPoint.position, Quaternion.identity, (Transform)null, 1f, -1);
					Vector3 position = __instance.m_spawnPoint.position;
					ItemDrop component = ((Component)Object.Instantiate<ItemDrop>(itemDrop, position, Quaternion.identity)).GetComponent<ItemDrop>();
					if ((Object)(object)component != (Object)null)
					{
						component.SetStack(Game.instance.ScaleDrops(item.ItemDrop.m_itemData, 1));
					}
				}
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(Minimap), "Awake")]
		private static void OnAwake()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Expected O, but got Unknown
			_diablo = new GameObject();
			CustomBoiiiii customBoiiiii = _diablo.AddComponent<CustomBoiiiii>();
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Minimap), "OnDestroy")]
		private static void OnDestroy()
		{
			Object.Destroy((Object)(object)_diablo);
			RenderPipelineManager.beginCameraRendering -= OnRender;
		}

		private static void OnRender(ScriptableRenderContext context, Camera camera)
		{
		}
	}

	private class CustomBoiiiii : MonoBehaviour
	{
		private static GameObject _targetToRender;

		private static List<Renderer> _renderers = new List<Renderer>();

		private static Material _postProcessMaterial;

		private static Texture2D tex;

		private void Awake()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Expected O, but got Unknown
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Expected O, but got Unknown
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			Shader val = Shader.Find("Sprites/Default");
			_postProcessMaterial = new Material(val);
			_targetToRender = Minimap.instance.m_largeRoot;
			Camera.onPostRender = (CameraCallback)Delegate.Combine((Delegate?)(object)Camera.onPostRender, (Delegate?)new CameraCallback(OnPostRenderTamere));
			tex = new Texture2D(8, 8, (TextureFormat)4, false);
			for (int i = 0; i < 8; i++)
			{
				for (int j = 0; j < 8; j++)
				{
					tex.SetPixel(i, j, Color.red);
				}
			}
			tex.Apply();
		}

		private void OnDestroy()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Expected O, but got Unknown
			Camera.onPostRender = (CameraCallback)Delegate.Remove((Delegate?)(object)Camera.onPostRender, (Delegate?)new CameraCallback(OnPostRenderTamere));
		}

		private void OnPostRenderTamere(Camera camera)
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Expected O, but got Unknown
			//IL_002e: 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)
			RenderTexture temporary = RenderTexture.GetTemporary(1024, 1024, 0, (GraphicsFormat)8);
			List<Renderer> list = new List<Renderer>();
			_targetToRender.GetComponentsInChildren<Renderer>(true, list);
			CommandBuffer val = new CommandBuffer();
			val.SetRenderTarget(RenderTargetIdentifier.op_Implicit((Texture)(object)temporary));
			foreach (Renderer item in list)
			{
				val.DrawRenderer(item, (Material)null);
			}
			Graphics.ExecuteCommandBuffer(val);
			Graphics.Blit((Texture)(object)temporary, camera.activeTexture, _postProcessMaterial);
			Graphics.DrawTexture(new Rect(0f, 0f, 1600f, 900f), (Texture)(object)temporary);
			RenderTexture.ReleaseTemporary(temporary);
		}
	}

	private const string pluginGUID = "com.example.GUID";

	private const string pluginName = "MyPlugin";

	private const string pluginVersion = "1.0.0";

	private readonly Harmony HarmonyInstance = new Harmony("com.example.GUID");

	public static ManualLogSource logger = Logger.CreateLogSource("MyPlugin");

	public AssetBundle waxAsset;

	public GameObject waxPrefab;

	public AssetBundle capesBundle;

	public GameObject capeDeer;

	public GameObject capeTroll;

	public GameObject capeWolfWaterproof;

	public GameObject capeLoxWaterproof;

	public GameObject capeLinenWaterproof;

	public GameObject capeFeatherWaterproof;

	public GameObject capeAsksvinWaterproof;

	public GameObject capeAshWaterproof;

	public static AssetBundle newHaldorAssetBundle;

	public GameObject newHaldor;

	public AssetBundle foodsAssetBundle;

	public static ConfigEntry<float> worldExpModifier;

	public Shader standardSurface2;

	public Shader CustomParticleUnlit;

	public void Awake()
	{
		Assembly executingAssembly = Assembly.GetExecutingAssembly();
		HarmonyInstance.PatchAll(executingAssembly);
		LoadAssets();
		AddRecipes();
		PrefabManager.OnVanillaPrefabsAvailable += CreateWax;
		PrefabManager.OnVanillaPrefabsAvailable += CreateCapes;
		PrefabManager.OnVanillaPrefabsAvailable += AddClonedItems;
		PrefabManager.OnVanillaPrefabsAvailable += FixShaders;
		PrefabManager.OnVanillaPrefabsAvailable += CreateNewHaldor;
	}

	private void LoadAssets()
	{
		//IL_0193: Unknown result type (might be due to invalid IL or missing references)
		//IL_0198: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a1: Expected O, but got Unknown
		//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ab: Expected O, but got Unknown
		string location = Assembly.GetExecutingAssembly().Location;
		location = location.Substring(0, location.Length - 22);
		location = location.Replace('\\', '/');
		string text = location;
		string text2 = location;
		string text3 = location;
		string text4 = location;
		string text5 = location;
		waxAsset = AssetUtils.LoadAssetBundle(text += "wax");
		waxPrefab = waxAsset.LoadAsset<GameObject>("wax");
		capesBundle = AssetUtils.LoadAssetBundle(text2 += "capes");
		capeDeer = capesBundle.LoadAsset<GameObject>("capeDeer");
		capeTroll = capesBundle.LoadAsset<GameObject>("capeTroll");
		capeWolfWaterproof = capesBundle.LoadAsset<GameObject>("capeWolfWaterproof");
		capeLoxWaterproof = capesBundle.LoadAsset<GameObject>("capeLoxWaterproof");
		capeLinenWaterproof = capesBundle.LoadAsset<GameObject>("capeLinenWaterproof");
		capeFeatherWaterproof = capesBundle.LoadAsset<GameObject>("capeFeatherWaterproof");
		capeAsksvinWaterproof = capesBundle.LoadAsset<GameObject>("capeAsksvinWaterproof");
		capeAshWaterproof = capesBundle.LoadAsset<GameObject>("capeAshWaterproof");
		newHaldorAssetBundle = AssetUtils.LoadAssetBundle(text3 += "newhaldor");
		newHaldor = newHaldorAssetBundle.LoadAsset<GameObject>("newhaldor");
		foodsAssetBundle = AssetUtils.LoadAssetBundle(text4 += "foods");
		worldExpModifier = ((BaseUnityPlugin)this).Config.Bind<float>("Server config", "FloatValue1", 1f, new ConfigDescription("Server side float", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes
		{
			IsAdminOnly = true
		} }));
	}

	private void CreateCorrectShaders()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Expected O, but got Unknown
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Expected O, but got Unknown
		//IL_006b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0071: Expected O, but got Unknown
		PieceConfig val = new PieceConfig();
		val.Name = "Standard Surface 2";
		CustomPiece val2 = new CustomPiece("piece_cauldroncopy", "piece_cauldron", val);
		standardSurface2 = ((Renderer)((Component)val2.PiecePrefab.transform.Find("HaveFire/Waterplane")).GetComponent<MeshRenderer>()).material.shader;
		ItemConfig val3 = new ItemConfig();
		val3.Name = "foobar";
		CustomItem val4 = new CustomItem("MeadBaseHealthMediumcopy", "MeadBaseHealthMedium", val3);
		CustomParticleUnlit = ((Component)val4.ItemDrop.m_itemData.m_shared.m_consumeStatusEffect.m_startEffects.m_effectPrefabs[0].m_prefab.transform.Find("trails")).GetComponent<Renderer>().materials[0].shader;
	}

	private void AddClonedItems()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Expected O, but got Unknown
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Expected O, but got Unknown
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: Expected O, but got Unknown
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Expected O, but got Unknown
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Expected O, but got Unknown
		//IL_0086: Unknown result type (might be due to invalid IL or missing references)
		//IL_008d: Expected O, but got Unknown
		//IL_009a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a1: Expected O, but got Unknown
		//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Expected O, but got Unknown
		//IL_00db: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e2: Expected O, but got Unknown
		//IL_0108: Unknown result type (might be due to invalid IL or missing references)
		//IL_010f: Expected O, but got Unknown
		//IL_011c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0123: Expected O, but got Unknown
		//IL_014f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0156: Expected O, but got Unknown
		//IL_0182: Unknown result type (might be due to invalid IL or missing references)
		//IL_0189: Expected O, but got Unknown
		//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bc: Expected O, but got Unknown
		//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fb: Expected O, but got Unknown
		//IL_0221: Unknown result type (might be due to invalid IL or missing references)
		//IL_0228: Expected O, but got Unknown
		//IL_024e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0255: Expected O, but got Unknown
		//IL_027b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0282: Expected O, but got Unknown
		//IL_029c: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a3: Expected O, but got Unknown
		//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f1: Expected O, but got Unknown
		//IL_03db: Unknown result type (might be due to invalid IL or missing references)
		//IL_03e2: Expected O, but got Unknown
		//IL_0449: Unknown result type (might be due to invalid IL or missing references)
		//IL_0453: Expected O, but got Unknown
		//IL_0857: Unknown result type (might be due to invalid IL or missing references)
		//IL_085e: Expected O, but got Unknown
		//IL_08c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_08d2: Expected O, but got Unknown
		//IL_0bfa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c01: Expected O, but got Unknown
		//IL_0c7e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c85: Expected O, but got Unknown
		//IL_0cf9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d00: Expected O, but got Unknown
		//IL_0d4c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d53: Expected O, but got Unknown
		//IL_0d80: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d87: Expected O, but got Unknown
		//IL_0df5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0dfc: Expected O, but got Unknown
		//IL_0e70: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e77: Expected O, but got Unknown
		//IL_0ec3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0eca: Expected O, but got Unknown
		//IL_0ef7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0efe: Expected O, but got Unknown
		//IL_0f4a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f51: Expected O, but got Unknown
		//IL_0fa5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0fac: Expected O, but got Unknown
		//IL_1023: Unknown result type (might be due to invalid IL or missing references)
		//IL_102a: Expected O, but got Unknown
		//IL_1053: Unknown result type (might be due to invalid IL or missing references)
		//IL_10a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_1120: Unknown result type (might be due to invalid IL or missing references)
		//IL_1127: Expected O, but got Unknown
		//IL_119f: Unknown result type (might be due to invalid IL or missing references)
		//IL_11a6: Expected O, but got Unknown
		//IL_11cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_12fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_1304: Expected O, but got Unknown
		//IL_137c: Unknown result type (might be due to invalid IL or missing references)
		//IL_1383: Expected O, but got Unknown
		//IL_141d: Unknown result type (might be due to invalid IL or missing references)
		//IL_1424: Expected O, but got Unknown
		//IL_1489: Unknown result type (might be due to invalid IL or missing references)
		//IL_1490: Expected O, but got Unknown
		//IL_14e5: Unknown result type (might be due to invalid IL or missing references)
		//IL_1522: Unknown result type (might be due to invalid IL or missing references)
		//IL_15af: Unknown result type (might be due to invalid IL or missing references)
		//IL_15b6: Expected O, but got Unknown
		//IL_15dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_15e3: Expected O, but got Unknown
		//IL_1615: Unknown result type (might be due to invalid IL or missing references)
		//IL_161c: Expected O, but got Unknown
		//IL_16ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_16d1: Expected O, but got Unknown
		//IL_17d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_17db: Expected O, but got Unknown
		//IL_186b: Unknown result type (might be due to invalid IL or missing references)
		//IL_1872: Expected O, but got Unknown
		//IL_18d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_18d7: Expected O, but got Unknown
		//IL_1958: Unknown result type (might be due to invalid IL or missing references)
		//IL_195f: Expected O, but got Unknown
		//IL_19bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_19c4: Expected O, but got Unknown
		//IL_1a45: Unknown result type (might be due to invalid IL or missing references)
		//IL_1a4c: Expected O, but got Unknown
		//IL_1ac5: Unknown result type (might be due to invalid IL or missing references)
		//IL_1acc: Expected O, but got Unknown
		//IL_1b4c: Unknown result type (might be due to invalid IL or missing references)
		//IL_1b53: Expected O, but got Unknown
		//IL_1bcc: Unknown result type (might be due to invalid IL or missing references)
		//IL_1bd3: Expected O, but got Unknown
		//IL_1c53: Unknown result type (might be due to invalid IL or missing references)
		//IL_1c5a: Expected O, but got Unknown
		//IL_1cd3: Unknown result type (might be due to invalid IL or missing references)
		//IL_1cda: Expected O, but got Unknown
		//IL_1d42: Unknown result type (might be due to invalid IL or missing references)
		//IL_1d49: Expected O, but got Unknown
		//IL_1dd4: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ddb: Expected O, but got Unknown
		//IL_1e25: Unknown result type (might be due to invalid IL or missing references)
		//IL_1e2c: Expected O, but got Unknown
		//IL_1eb7: Unknown result type (might be due to invalid IL or missing references)
		//IL_1ebe: Expected O, but got Unknown
		//IL_1f20: Unknown result type (might be due to invalid IL or missing references)
		//IL_1f27: Expected O, but got Unknown
		//IL_1f34: Unknown result type (might be due to invalid IL or missing references)
		//IL_1f3b: Expected O, but got Unknown
		//IL_1fa3: Unknown result type (might be due to invalid IL or missing references)
		//IL_1faa: Expected O, but got Unknown
		//IL_2023: Unknown result type (might be due to invalid IL or missing references)
		//IL_202a: Expected O, but got Unknown
		//IL_20a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_20a9: Expected O, but got Unknown
		//IL_20bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_20e4: Unknown result type (might be due to invalid IL or missing references)
		//IL_20eb: Expected O, but got Unknown
		//IL_2154: Unknown result type (might be due to invalid IL or missing references)
		//IL_215b: Expected O, but got Unknown
		//IL_21b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_21c0: Expected O, but got Unknown
		//IL_2223: Unknown result type (might be due to invalid IL or missing references)
		//IL_222a: Expected O, but got Unknown
		//IL_2237: Unknown result type (might be due to invalid IL or missing references)
		//IL_223e: Expected O, but got Unknown
		//IL_2264: Unknown result type (might be due to invalid IL or missing references)
		//IL_226b: Expected O, but got Unknown
		//IL_2278: Unknown result type (might be due to invalid IL or missing references)
		//IL_227f: Expected O, but got Unknown
		//IL_22d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_22e0: Expected O, but got Unknown
		//IL_22ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_22f4: Expected O, but got Unknown
		//IL_2332: Unknown result type (might be due to invalid IL or missing references)
		//IL_2339: Expected O, but got Unknown
		//IL_23bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_23c4: Expected O, but got Unknown
		//IL_23db: Unknown result type (might be due to invalid IL or missing references)
		//IL_23e2: Expected O, but got Unknown
		//IL_23f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_2400: Expected O, but got Unknown
		//IL_2417: Unknown result type (might be due to invalid IL or missing references)
		//IL_241e: Expected O, but got Unknown
		//IL_2435: Unknown result type (might be due to invalid IL or missing references)
		//IL_243c: Expected O, but got Unknown
		//IL_2453: Unknown result type (might be due to invalid IL or missing references)
		//IL_245a: Expected O, but got Unknown
		//IL_2471: Unknown result type (might be due to invalid IL or missing references)
		//IL_2478: Expected O, but got Unknown
		//IL_248f: Unknown result type (might be due to invalid IL or missing references)
		//IL_2496: Expected O, but got Unknown
		//IL_24ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_24b4: Expected O, but got Unknown
		//IL_24cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_24d2: Expected O, but got Unknown
		//IL_24df: Unknown result type (might be due to invalid IL or missing references)
		//IL_24e6: Expected O, but got Unknown
		//IL_2531: Unknown result type (might be due to invalid IL or missing references)
		//IL_2538: Expected O, but got Unknown
		//IL_255d: Unknown result type (might be due to invalid IL or missing references)
		//IL_2564: Expected O, but got Unknown
		//IL_25d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_25d9: Expected O, but got Unknown
		//IL_2730: Unknown result type (might be due to invalid IL or missing references)
		//IL_2737: Expected O, but got Unknown
		//IL_27b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_27bc: Expected O, but got Unknown
		//IL_2830: Unknown result type (might be due to invalid IL or missing references)
		//IL_2837: Expected O, but got Unknown
		//IL_28c3: Unknown result type (might be due to invalid IL or missing references)
		//IL_28ca: Expected O, but got Unknown
		//IL_2995: Unknown result type (might be due to invalid IL or missing references)
		//IL_299c: Expected O, but got Unknown
		//IL_2a1b: Unknown result type (might be due to invalid IL or missing references)
		//IL_2a22: Expected O, but got Unknown
		//IL_2acd: Unknown result type (might be due to invalid IL or missing references)
		//IL_2ad4: Expected O, but got Unknown
		//IL_2b52: Unknown result type (might be due to invalid IL or missing references)
		//IL_2b59: Expected O, but got Unknown
		//IL_2c1f: Unknown result type (might be due to invalid IL or missing references)
		//IL_2c26: Expected O, but got Unknown
		//IL_2caf: Unknown result type (might be due to invalid IL or missing references)
		//IL_2cb6: Expected O, but got Unknown
		//IL_2e93: Unknown result type (might be due to invalid IL or missing references)
		//IL_2e9a: Expected O, but got Unknown
		//IL_2f04: Unknown result type (might be due to invalid IL or missing references)
		//IL_2f0b: Expected O, but got Unknown
		//IL_3067: Unknown result type (might be due to invalid IL or missing references)
		//IL_306e: Expected O, but got Unknown
		//IL_30d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_30df: Expected O, but got Unknown
		//IL_3249: Unknown result type (might be due to invalid IL or missing references)
		//IL_3250: Expected O, but got Unknown
		//IL_32ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_32c1: Expected O, but got Unknown
		//IL_3396: Unknown result type (might be due to invalid IL or missing references)
		//IL_339d: Expected O, but got Unknown
		//IL_33ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_33f5: Expected O, but got Unknown
		//IL_3419: Unknown result type (might be due to invalid IL or missing references)
		//IL_3420: Expected O, but got Unknown
		//IL_3467: Unknown result type (might be due to invalid IL or missing references)
		//IL_346e: Expected O, but got Unknown
		//IL_3484: Unknown result type (might be due to invalid IL or missing references)
		//IL_348b: Expected O, but got Unknown
		//IL_34be: Unknown result type (might be due to invalid IL or missing references)
		//IL_34c5: Expected O, but got Unknown
		//IL_353f: Unknown result type (might be due to invalid IL or missing references)
		//IL_3546: Expected O, but got Unknown
		//IL_35c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_35cc: Expected O, but got Unknown
		//IL_35f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_35f9: Expected O, but got Unknown
		//IL_3721: Unknown result type (might be due to invalid IL or missing references)
		//IL_3728: Expected O, but got Unknown
		//IL_376d: Unknown result type (might be due to invalid IL or missing references)
		//IL_3774: Expected O, but got Unknown
		//IL_378d: Unknown result type (might be due to invalid IL or missing references)
		//IL_3794: Expected O, but got Unknown
		//IL_37c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_37cb: Expected O, but got Unknown
		//IL_38b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_38c0: Expected O, but got Unknown
		//IL_3905: Unknown result type (might be due to invalid IL or missing references)
		//IL_390c: Expected O, but got Unknown
		//IL_3925: Unknown result type (might be due to invalid IL or missing references)
		//IL_392c: Expected O, but got Unknown
		//IL_3959: Unknown result type (might be due to invalid IL or missing references)
		//IL_3963: Expected O, but got Unknown
		//IL_3964: Unknown result type (might be due to invalid IL or missing references)
		//IL_396b: Expected O, but got Unknown
		//IL_3985: Unknown result type (might be due to invalid IL or missing references)
		//IL_398c: Expected O, but got Unknown
		//IL_3a23: Unknown result type (might be due to invalid IL or missing references)
		//IL_3a2a: Expected O, but got Unknown
		//IL_3a7f: Unknown result type (might be due to invalid IL or missing references)
		//IL_3a86: Expected O, but got Unknown
		CreateCorrectShaders();
		ItemConfig val = new ItemConfig();
		val.Name = "capeDeerHideCopy";
		CustomItem val2 = new CustomItem("CapeDeerHideCopy", "CapeDeerHide", val);
		ItemManager.Instance.AddItem(val2);
		ItemConfig val3 = new ItemConfig();
		val3.Name = "capeWolfCopy";
		CustomItem val4 = new CustomItem("CapeWolfCopy", "CapeWolf", val3);
		ItemManager.Instance.AddItem(val4);
		ItemConfig val5 = new ItemConfig();
		val5.Name = "TrollArmorCopy";
		CustomItem val6 = new CustomItem("TrollArmorCopy", "ArmorTrollLeatherChest", val5);
		ItemManager.Instance.AddItem(val6);
		PieceConfig val7 = new PieceConfig();
		val7.Name = "smelterCopy";
		val7.PieceTable = PieceTables.Hammer;
		CustomPiece val8 = new CustomPiece("Smelter", "smelter", val7);
		PieceManager.Instance.AddPiece(val8);
		PieceConfig val9 = new PieceConfig();
		val9.Name = "cartCopy";
		val9.PieceTable = PieceTables.Hammer;
		CustomPiece val10 = new CustomPiece("cartCopy", "Cart", val9);
		PieceManager.Instance.AddPiece(val10);
		PieceConfig val11 = new PieceConfig();
		val11.Name = "infiniteWoodTorch";
		val11.AddRequirement("Resin", 20, true);
		val11.AddRequirement("Wood", 2, true);
		PieceConfig val12 = new PieceConfig();
		val12.Name = "infiniteIronTorch";
		val12.AddRequirement("Resin", 20, true);
		val12.AddRequirement("Iron", 2, true);
		PieceConfig val13 = new PieceConfig();
		val13.Name = "infiniteGuckTorch";
		val13.AddRequirement("GreydwarfEye", 20, true);
		val13.AddRequirement("Iron", 2, true);
		PieceConfig val14 = new PieceConfig();
		val14.Name = "infiniteEyeTorch";
		val14.AddRequirement("Guck", 20, true);
		val14.AddRequirement("Iron", 2, true);
		CustomPiece val15 = new CustomPiece("InfiniteWoodTorch", "piece_groundtorch_wood", val11);
		val15.PieceTable = PieceTables.Hammer;
		PieceManager.Instance.AddPiece(val15);
		CustomPiece val16 = new CustomPiece("InfiniteIronTorch", "piece_groundtorch", val12);
		val16.PieceTable = PieceTables.Hammer;
		PieceManager.Instance.AddPiece(val16);
		CustomPiece val17 = new CustomPiece("InfiniteGuckTorch", "piece_groundtorch_green", val13);
		val17.PieceTable = PieceTables.Hammer;
		PieceManager.Instance.AddPiece(val17);
		CustomPiece val18 = new CustomPiece("InfiniteEyeTorch", "piece_groundtorch_blue", val14);
		val18.PieceTable = PieceTables.Hammer;
		PieceManager.Instance.AddPiece(val18);
		PieceConfig val19 = new PieceConfig();
		val19.Name = "infiniteSconce";
		val19.AddRequirement("Copper", 2, true);
		val19.AddRequirement("Wood", 2, true);
		val19.AddRequirement("Resin", 20, true);
		CustomPiece val20 = new CustomPiece("InfiniteSconce", "piece_walltorch", val19);
		val20.PieceTable = PieceTables.Hammer;
		PieceManager.Instance.AddPiece(val20);
		Shader shader = ((Renderer)((Component)PieceManager.Instance.GetPiece("Smelter").PiecePrefab.transform.Find("New/default")).GetComponent<MeshRenderer>()).material.shader;
		Shader shader2 = ((Component)PieceManager.Instance.GetPiece("Smelter").PiecePrefab.transform.Find("_enabled/smoke (1)")).GetComponent<Renderer>().material.shader;
		Shader shader3 = ((Component)PieceManager.Instance.GetPiece("Smelter").PiecePrefab.transform.Find("_enabled/flames (1)")).GetComponent<Renderer>().material.shader;
		Shader shader4 = ((Component)PieceManager.Instance.GetPiece("Smelter").PiecePrefab.transform.Find("_enabled/flare (1)")).GetComponent<Renderer>().material.shader;
		PieceConfig val21 = new PieceConfig();
		val21.Name = "Supercharged Smelter";
		val21.Description = "If heat is too slow to melt metals, try extreme cold!";
		val21.AddRequirement("Stone", 20, true);
		val21.AddRequirement("SurtlingCore", 5, true);
		val21.AddRequirement("TrophyCultist_Hildir", 1, true);
		val21.PieceTable = PieceTables.Hammer;
		PieceManager.Instance.AddPiece(new CustomPiece(newHaldorAssetBundle, "SuperchargedSmelter", false, val21));
		((Renderer)((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("New/default")).GetComponent<MeshRenderer>()).material.shader = shader;
		((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/smoke (1)")).GetComponent<Renderer>().material.shader = shader2;
		((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flames")).GetComponent<Renderer>().material.shader = shader3;
		((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flames (1)")).GetComponent<Renderer>().material.shader = shader3;
		((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flames (2)")).GetComponent<Renderer>().material.shader = shader3;
		((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/SmokeSpawner")).GetComponent<SmokeSpawner>().m_smokePrefab = ((Component)PieceManager.Instance.GetPiece("Smelter").PiecePrefab.transform.Find("_enabled/SmokeSpawner")).GetComponent<SmokeSpawner>().m_smokePrefab;
		((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flare (1)")).GetComponent<Renderer>().material.shader = shader4;
		((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flare (2)")).GetComponent<Renderer>().material.shader = shader4;
		((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flare (3)")).GetComponent<Renderer>().material.shader = shader4;
		((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flare")).GetComponent<Renderer>().material.shader = shader4;
		PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.GetComponent<Smelter>().m_produceEffects.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("Smelter").PiecePrefab.GetComponent<Smelter>().m_produceEffects.m_effectPrefabs[0];
		PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.GetComponent<Smelter>().m_fuelAddedEffects.m_effectPrefabs[1] = PieceManager.Instance.GetPiece("Smelter").PiecePrefab.GetComponent<Smelter>().m_fuelAddedEffects.m_effectPrefabs[1];
		PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.GetComponent<Smelter>().m_oreAddedEffects.m_effectPrefabs[1] = PieceManager.Instance.GetPiece("Smelter").PiecePrefab.GetComponent<Smelter>().m_oreAddedEffects.m_effectPrefabs[1];
		PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.GetComponent<Piece>().m_placeEffect.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("Smelter").PiecePrefab.GetComponent<Piece>().m_placeEffect.m_effectPrefabs[0];
		PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.GetComponent<WearNTear>().m_destroyedEffect.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("Smelter").PiecePrefab.GetComponent<WearNTear>().m_destroyedEffect.m_effectPrefabs[0];
		MeshRenderer[] componentsInChildren = ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("smelter_Destruction")).GetComponentsInChildren<MeshRenderer>();
		MeshRenderer[] array = componentsInChildren;
		foreach (MeshRenderer val22 in array)
		{
			((Renderer)val22).material.shader = shader;
		}
		PieceConfig val23 = new PieceConfig();
		val23.PieceTable = PieceTables.Hammer;
		val23.Name = "Turbo Cart";
		val23.AddRequirement("Wood", 20, true);
		val23.AddRequirement("BronzeNails", 10, true);
		val23.AddRequirement("TrophyGoblinBruteBrosShaman", 1, true);
		val23.AddRequirement("TrophyGoblinBruteBrosBrute", 1, true);
		PieceManager.Instance.AddPiece(new CustomPiece(newHaldorAssetBundle, "TurboCart", false, val23));
		((Renderer)((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("Vagon/new/default")).GetComponent<MeshRenderer>()).material.shader = shader;
		((Renderer)((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("Wheel1/default")).GetComponent<MeshRenderer>()).material.shader = shader;
		((Renderer)((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("Wheel2/default")).GetComponent<MeshRenderer>()).material.shader = shader;
		((Renderer)((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("Vagon/worn/default")).GetComponent<MeshRenderer>()).material.shader = shader;
		((Renderer)((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("Vagon/broken/default")).GetComponent<MeshRenderer>()).material.shader = shader;
		PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.GetComponent<WearNTear>().m_destroyedEffect.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("cartCopy").PiecePrefab.GetComponent<WearNTear>().m_destroyedEffect.m_effectPrefabs[0];
		PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.GetComponent<WearNTear>().m_hitEffect.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("cartCopy").PiecePrefab.GetComponent<WearNTear>().m_hitEffect.m_effectPrefabs[0];
		PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.GetComponent<WearNTear>().m_switchEffect.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("cartCopy").PiecePrefab.GetComponent<WearNTear>().m_switchEffect.m_effectPrefabs[0];
		PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.GetComponent<ImpactEffect>().m_hitEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("cartCopy").PiecePrefab.GetComponent<ImpactEffect>().m_hitEffect.m_effectPrefabs;
		MeshRenderer[] componentsInChildren2 = ((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("cart_Destruction")).GetComponentsInChildren<MeshRenderer>();
		MeshRenderer[] array2 = componentsInChildren2;
		foreach (MeshRenderer val24 in array2)
		{
			((Renderer)val24).material.shader = shader;
		}
		PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.GetComponent<Piece>().m_placeEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("cartCopy").PiecePrefab.GetComponent<Piece>().m_placeEffect.m_effectPrefabs;
		componentsInChildren2 = ((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("load")).GetComponentsInChildren<MeshRenderer>();
		MeshRenderer[] array3 = componentsInChildren2;
		foreach (MeshRenderer val25 in array3)
		{
			((Renderer)val25).material.shader = shader;
		}
		ItemConfig val26 = new ItemConfig();
		val26.Name = "Bone Crossbow";
		val26.Description = "Withered bones waster.";
		val26.CraftingStation = CraftingStations.Forge;
		val26.AddRequirement("RoundLog", 15, 5);
		val26.AddRequirement("Iron", 5, 2);
		val26.AddRequirement("Root", 1, 1);
		val26.AddRequirement("BoneFragments", 5, 5);
		val26.RepairStation = CraftingStations.Forge;
		CustomItem val27 = new CustomItem("BoneCrossbow", "CrossbowArbalest", val26);
		val27.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 150f;
		val27.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 5f;
		val27.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset<Sprite>("BoneCrossbow");
		ItemManager.Instance.AddItem(val27);
		ItemConfig val28 = new ItemConfig();
		val28.Name = "Withered Bone Bolt";
		val28.Description = "More frail than it's standard bone counterpart, but much less expensive.";
		val28.CraftingStation = CraftingStations.Forge;
		val28.AddRequirement("WitheredBone", 4, 0);
		val28.Amount = 20;
		CustomItem val29 = new CustomItem("WitheredBoneBolt", "BoltBone", val28);
		val29.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 16f;
		ItemManager.Instance.AddItem(val29);
		ItemConfig val30 = new ItemConfig();
		val30.Name = "Wooden Crossbow";
		val30.Description = "What material could possibly be light and solid enough to make bolts at this point? It would have to come from a very powerful being.";
		val30.CraftingStation = CraftingStations.Workbench;
		val30.AddRequirement("Wood", 15, 5);
		val30.AddRequirement("LeatherScraps", 5, 2);
		val30.AddRequirement("Resin", 6, 3);
		val30.RepairStation = CraftingStations.Workbench;
		CustomItem val31 = new CustomItem("WoodenCrossbow", "CrossbowArbalest", val30);
		val31.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 55f;
		val31.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 5f;
		val31.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset<Sprite>("WoodenCrossbow");
		ItemManager.Instance.AddItem(val31);
		ItemConfig val32 = new ItemConfig();
		val32.Name = "Antler Bolt";
		val32.Description = "It is really worth the time to summon and destroy Eikthyr over and over again?";
		val32.CraftingStation = CraftingStations.Workbench;
		val32.AddRequirement("HardAntler", 3, 0);
		val32.Amount = 20;
		CustomItem val33 = new CustomItem("AntlerBolt", "BoltBone", val32);
		val33.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 42f;
		ItemManager.Instance.AddItem(val33);
		ItemConfig val34 = new ItemConfig();
		val34.Name = "Majestic Carapace Bolt";
		val34.Description = "Sturdiest. Bolt. Ever.";
		val34.CraftingStation = CraftingStations.BlackForge;
		val34.AddRequirement("QueenDrop", 1, 0);
		val34.Amount = 20;
		CustomItem val35 = new CustomItem("CarapaceBolt", "BoltCarapace", val34);
		val35.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 112f;
		val35.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset<Sprite>("carapacebolt");
		ItemManager.Instance.AddItem(val35);
		ItemConfig val36 = new ItemConfig();
		val36.Name = "Apprentice Hood";
		val36.Description = "Makes you look like a real mage";
		val36.CraftingStation = CraftingStations.Workbench;
		val36.Icon = newHaldorAssetBundle.LoadAsset<Sprite>("ApprenticeHoodIcon");
		val36.AddRequirement("DeerHide", 4, 2);
		val36.AddRequirement("TrollHide", 5, 3);
		val36.AddRequirement("TrophyGreydwarfBrute", 1, 0);
		CustomItem val37 = new CustomItem("ApprenticeHood", "HelmetTrollLeather", val36);
		Material material = ((Renderer)((Component)val37.ItemDrop).GetComponentInChildren<MeshRenderer>()).material;
		material.color = new Color(0.3550981f, 0f, 0.5450981f, 1f);
		GameObject gameObject = ((Component)((Component)val37.ItemDrop).gameObject.transform.Find("attach_skin/hood")).gameObject;
		material = ((Renderer)gameObject.GetComponentInChildren<SkinnedMeshRenderer>()).material;
		material.color = new Color(0.3550981f, 0f, 0.5450981f, 1f);
		val37.ItemDrop.m_itemData.m_shared.m_setStatusEffect = null;
		val37.ItemDrop.m_itemData.m_shared.m_setName = "";
		val37.ItemDrop.m_itemData.m_shared.m_setSize = 0;
		val37.ItemDrop.m_itemData.m_shared.m_eitrRegenModifier = 0.1f;
		ItemManager.Instance.AddItem(val37);
		ItemConfig val38 = new ItemConfig();
		val38.Name = "Apprentice Robe";
		val38.Description = "Fancy.";
		val38.CraftingStation = CraftingStations.Workbench;
		val38.Icon = newHaldorAssetBundle.LoadAsset<Sprite>("ApprenticeRobeIcon");
		val38.AddRequirement("DeerHide", 8, 4);
		val38.AddRequirement("TrollHide", 10, 5);
		val38.AddRequirement("TrophyGreydwarfShaman", 2, 1);
		CustomItem val39 = new CustomItem("ApprenticeRobe", "ArmorTrollLeatherChest", val38);
		material = ((Renderer)((Component)val39.ItemDrop).GetComponentInChildren<MeshRenderer>()).material;
		material.color = new Color(0.3550981f, 0f, 0.5450981f, 1f);
		gameObject = ((Component)((Component)val39.ItemDrop).gameObject.transform.Find("attach_skin/shorts")).gameObject;
		SkinnedMeshRenderer component = gameObject.GetComponent<SkinnedMeshRenderer>();
		List<Material> list = new List<Material>();
		list.Add(newHaldorAssetBundle.LoadAsset<Material>("TrollLeatherChest"));
		list[0].shader = ItemManager.Instance.GetItem("TrollArmorCopy").ItemDrop.m_itemData.m_shared.m_armorMaterial.shader;
		((Renderer)component).SetMaterials(list);
		material = newHaldorAssetBundle.LoadAsset<Material>("TrollLeatherChest");
		val39.ItemDrop.m_itemData.m_shared.m_armorMaterial = material;
		val39.ItemDrop.m_itemData.m_shared.m_setStatusEffect = null;
		val39.ItemDrop.m_itemData.m_shared.m_setName = "";
		val39.ItemDrop.m_itemData.m_shared.m_setSize = 0;
		val39.ItemDrop.m_itemData.m_shared.m_eitrRegenModifier = 0.2f;
		ItemManager.Instance.AddItem(val39);
		ItemConfig val40 = new ItemConfig();
		val40.Name = "Apprentice Leggings";
		val40.Description = "Not made of spandex.";
		val40.CraftingStation = CraftingStations.Workbench;
		val40.Icon = newHaldorAssetBundle.LoadAsset<Sprite>("ApprenticeLegsIcon");
		val40.AddRequirement("DeerHide", 8, 4);
		val40.AddRequirement("TrollHide", 10, 5);
		val40.AddRequirement("TrophyGreydwarf", 2, 1);
		CustomItem val41 = new CustomItem("ApprenticeLegs", "ArmorTrollLeatherLegs", val40);
		material = newHaldorAssetBundle.LoadAsset<Material>("TrollLeatherPants");
		val41.ItemDrop.m_itemData.m_shared.m_armorMaterial = material;
		val41.ItemDrop.m_itemData.m_shared.m_setStatusEffect = null;
		val41.ItemDrop.m_itemData.m_shared.m_setName = "";
		val41.ItemDrop.m_itemData.m_shared.m_setSize = 0;
		val41.ItemDrop.m_itemData.m_shared.m_eitrRegenModifier = 0.2f;
		ItemManager.Instance.AddItem(val41);
		ItemConfig val42 = new ItemConfig();
		val42.Name = "Chef Hat";
		val42.Description = "Bork! Bork! Bork! \n ~Sweedish Chef - The Muppets";
		val42.CraftingStation = CraftingStations.Workbench;
		val42.AddRequirement("DeerHide", 100, 0);
		val42.AddRequirement("LeatherScraps", 200, 0);
		val42.AddRequirement("TrophySkeletonHildir", 1, 0);
		CustomItem val43 = new CustomItem("ChefHat", "HelmetTrollLeather", val42);
		val43.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset<SE_Stats>("SetEffect_ChefHat");
		val43.ItemDrop.m_itemData.m_shared.m_subtitle = "Doubles your chance to cook a bonus item!";
		material = ((Renderer)((Component)val43.ItemDrop).GetComponentInChildren<MeshRenderer>()).material;
		material.color = Color.white;
		gameObject = ((Component)((Component)val43.ItemDrop).gameObject.transform.Find("attach_skin/hood")).gameObject;
		material = ((Renderer)gameObject.GetComponentInChildren<SkinnedMeshRenderer>()).material;
		material.color = Color.white;
		val43.ItemDrop.m_itemData.m_shared.m_setStatusEffect = null;
		val43.ItemDrop.m_itemData.m_shared.m_setName = "";
		val43.ItemDrop.m_itemData.m_shared.m_setSize = 0;
		val43.ItemDrop.m_itemData.m_shared.m_icons[0] = ((StatusEffect)newHaldorAssetBundle.LoadAsset<SE_Stats>("SetEffect_ChefHat")).m_icon;
		ItemManager.Instance.AddItem(val43);
		ItemConfig val44 = new ItemConfig();
		val44.Name = "Mining Hat";
		val44.Description = "I am a dwarf and I'm digging a hole! Diggy diggy hole! Diggy diggy hole!";
		CustomItem val45 = new CustomItem("MiningHat", "HelmetDverger", val44);
		val45.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset<SE_Stats>("SetEffect_MiningHat");
		ItemManager.Instance.AddItem(val45);
		ItemConfig val46 = new ItemConfig();
		val46.AddRequirement("DeerHide", 8, 0);
		val46.AddRequirement("LeatherScraps", 10, 0);
		val46.AddRequirement("TrophyWraith", 1, 0);
		val46.AddRequirement("Raspberry", 5, 0);
		val46.AddRequirement("Mushroom", 5, 0);
		val46.AddRequirement("Dandelion", 5, 0);
		val46.AddRequirement("Blueberries", 5, 0);
		val46.AddRequirement("Thistle", 5, 0);
		val46.AddRequirement("BjornPaw", 1, 0);
		val46.Name = "Gloves";
		val46.Description = "With this wraith trophy's essence you can infuse these gloves with reaping abilities! Simply walk nearby gatherables to reap them.";
		CustomItem val47 = new CustomItem("GatheringGloves", "TrinketBlackDamageHealth", val46);
		val47.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset<SE_Stats>("SetEffect_GathererGloves");
		val47.ItemDrop.m_itemData.m_shared.m_subtitle = "";
		val47.ItemDrop.m_itemData.m_shared.m_icons[0] = val47.ItemDrop.m_itemData.m_shared.m_equipStatusEffect.m_icon;
		val47.ItemDrop.m_itemData.m_shared.m_description = "Gathering has never been easier!";
		val47.ItemDrop.m_itemData.m_shared.m_blockAdrenaline = 0f;
		val47.ItemDrop.m_itemData.m_shared.m_fullAdrenalineSE = null;
		val47.ItemDrop.m_itemData.m_shared.m_maxAdrenaline = 0f;
		val47.ItemDrop.m_itemData.m_shared.m_perfectBlockAdrenaline = 0f;
		ItemManager.Instance.AddItem(val47);
		ItemConfig val48 = new ItemConfig();
		val48.CraftingStation = CraftingStations.Cauldron;
		val48.Name = "Meatloaf";
		val48.Description = "Meatloaf.... it sustains you. It's like........ oatmeal.";
		val48.Icon = foodsAssetBundle.LoadAsset<Sprite>("meatloaficonreal");
		val48.AddRequirement("BjornMeat", 3, 0);
		val48.AddRequirement("RawMeat", 1, 0);
		val48.AddRequirement("DeerMeat", 1, 0);
		val48.AddRequirement("Carrot", 1, 0);
		val48.Amount = 3;
		CustomItem val49 = new CustomItem("Meatloaf", "BloodPudding", val48);
		val49.ItemDrop.m_itemData.m_shared.m_food = 50f;
		val49.ItemDrop.m_itemData.m_shared.m_foodStamina = 45f;
		val49.ItemDrop.m_itemData.m_shared.m_foodRegen = 3f;
		ItemManager.Instance.AddItem(val49);
		ItemConfig val50 = new ItemConfig();
		val50.CraftingStation = CraftingStations.Cauldron;
		val50.Name = "Dandelion Salad";
		val50.Description = "Dandelion salad. Yummy yummy.";
		val50.Icon = foodsAssetBundle.LoadAsset<Sprite>("dandelionsalad");
		val50.AddRequirement("Dandelion", 3, 0);
		val50.AddRequirement("BeechSeeds", 2, 0);
		val50.AddRequirement("Mushroom", 1, 0);
		val50.Amount = 2;
		CustomItem val51 = new CustomItem("DandelionSalad", "Salad", val50);
		val51.ItemDrop.m_itemData.m_shared.m_food = 13f;
		val51.ItemDrop.m_itemData.m_shared.m_foodStamina = 40f;
		val51.ItemDrop.m_itemData.m_shared.m_foodRegen = 2f;
		ItemManager.Instance.AddItem(val51);
		ItemConfig val52 = new ItemConfig();
		val52.CraftingStation = CraftingStations.Cauldron;
		val52.Name = "EitrJam";
		val52.Description = "Surely there are magical energies to be drawn from these ingredients... Because taste sure isn't.";
		val52.Icon = foodsAssetBundle.LoadAsset<Sprite>("eitrjam");
		val52.AddRequirement("Pukeberries", 6, 0);
		val52.AddRequirement("MushroomYellow", 2, 0);
		val52.AddRequirement("AncientSeed", 1, 0);
		val52.Amount = 2;
		CustomItem val53 = new CustomItem("EitrJam", "QueensJam", val52);
		val53.ItemDrop.m_itemData.m_shared.m_food = 20f;
		val53.ItemDrop.m_itemData.m_shared.m_foodStamina = 20f;
		val53.ItemDrop.m_itemData.m_shared.m_foodRegen = 2f;
		val53.ItemDrop.m_itemData.m_shared.m_foodEitr = 31f;
		ItemManager.Instance.AddItem(val53);
		ItemConfig val54 = new ItemConfig();
		val54.Name = "Goulash";
		val54.Description = "Actually it's like gibelotte. Nobody knows what it is, but as least it's got turninp in it.";
		val54.CraftingStation = CraftingStations.Cauldron;
		val54.Icon = newHaldorAssetBundle.LoadAsset<Sprite>("GoulashIcon");
		val54.AddRequirement("Turnip", 3, 0);
		val54.AddRequirement("Guck", 2, 0);
		val54.AddRequirement("Ooze", 2, 0);
		val54.Amount = 2;
		CustomItem val55 = new CustomItem("Goulash", "TurnipStew", val54);
		val55.ItemDrop.m_itemData.m_shared.m_food = 10f;
		val55.ItemDrop.m_itemData.m_shared.m_foodStamina = 35f;
		val55.ItemDrop.m_itemData.m_shared.m_foodRegen = 2f;
		val55.ItemDrop.m_itemData.m_shared.m_foodEitr = 40f;
		ItemManager.Instance.AddItem(val55);
		ItemConfig val56 = new ItemConfig();
		val56.Name = "Magic Sausage";
		val56.Description = "It's long and hard... and blue?";
		val56.CraftingStation = CraftingStations.Cauldron;
		val56.Icon = newHaldorAssetBundle.LoadAsset<Sprite>("MagicSausageIcon");
		val56.AddRequirement("Entrails", 4, 0);
		val56.AddRequirement("WolfMeat", 1, 0);
		val56.AddRequirement("Crystal", 1, 0);
		val56.Amount = 2;
		CustomItem val57 = new CustomItem("MagicSausage", "Sausages", val56);
		val57.ItemDrop.m_itemData.m_shared.m_food = 45f;
		val57.ItemDrop.m_itemData.m_shared.m_foodStamina = 15f;
		val57.ItemDrop.m_itemData.m_shared.m_foodRegen = 3f;
		val57.ItemDrop.m_itemData.m_shared.m_foodEitr = 50f;
		ItemManager.Instance.AddItem(val57);
		ItemConfig val58 = new ItemConfig();
		val58.Name = "Empty Water Bucket";
		val58.Description = "Go swim to fill it up.";
		val58.CraftingStation = CraftingStations.Workbench;
		val58.Icon = newHaldorAssetBundle.LoadAsset<Sprite>("BucketIcon");
		val58.AddRequirement("Wood", 5, 0);
		val58.AddRequirement("BarrelRings", 2, 0);
		CustomItem val59 = new CustomItem("EmptyWaterBucket", "Wood", val58);
		((Component)((Component)val59.ItemDrop).gameObject.transform.Find("log (1)")).GetComponent<MeshFilter>().mesh = newHaldorAssetBundle.LoadAsset<GameObject>("EmptyBucket").GetComponent<MeshFilter>().mesh;
		((Renderer)((Component)((Component)val59.ItemDrop).gameObject.transform.Find("log (1)")).GetComponent<MeshRenderer>()).material = ((Renderer)newHaldorAssetBundle.LoadAsset<GameObject>("EmptyBucket").GetComponent<MeshRenderer>()).material;
		ItemManager.Instance.AddItem(val59);
		ItemConfig val60 = new ItemConfig();
		val60.Name = "Water Bucket";
		val60.Description = "Did you steal it from Lolrus?";
		val60.CraftingStation = CraftingStations.None;
		val58.Icon = newHaldorAssetBundle.LoadAsset<Sprite>("FilledBucketIcon");
		CustomItem val61 = new CustomItem("WaterBucket", "EmptyWaterBucket", val60);
		((Component)((Component)val61.ItemDrop).gameObject.transform.Find("log (1)")).GetComponent<MeshFilter>().mesh = newHaldorAssetBundle.LoadAsset<GameObject>("Bucket").GetComponent<MeshFilter>().mesh;
		((Renderer)((Component)((Component)val61.ItemDrop).gameObject.transform.Find("log (1)")).GetComponent<MeshRenderer>()).material = ((Renderer)newHaldorAssetBundle.LoadAsset<GameObject>("Bucket").GetComponent<MeshRenderer>()).material;
		ItemManager.Instance.AddItem(val61);
		ItemConfig val62 = new ItemConfig();
		val62.Name = "Salt";
		val62.Description = "NaCl. Actually did you know when you evaporate sea water you end up with other things too like magnesium? Too bad it's not in the game.";
		val62.CraftingStation = CraftingStations.Cauldron;
		val62.Icon = newHaldorAssetBundle.LoadAsset<Sprite>("SaltIcon");
		val62.AddRequirement("WaterBucket", 1, 0);
		val62.Amount = 5;
		CustomItem val63 = new CustomItem("Salt", "SpiceMountains", val62);
		ItemManager.Instance.AddItem(val63);
		ItemConfig val64 = new ItemConfig();
		val64.Name = "Turnip Fries";
		val64.Description = "Next best thing to potato fries, and sweet potato fries, and...";
		val64.CraftingStation = CraftingStations.Cauldron;
		val64.Icon = newHaldorAssetBundle.LoadAsset<Sprite>("TurnipFriesIcon");
		val64.AddRequirement("Turnip", 3, 0);
		val64.AddRequirement("Salt", 1, 0);
		CustomItem val65 = new CustomItem("TurnipFries", "BoarJerky", val64);
		val65.ItemDrop.m_itemData.m_shared.m_food = 15f;
		val65.ItemDrop.m_itemData.m_shared.m_foodStamina = 45f;
		val65.ItemDrop.m_itemData.m_shared.m_foodRegen = 3f;
		val65.ItemDrop.m_itemData.m_shared.m_foodEitr = 50f;
		ItemManager.Instance.AddItem(val65);
		ItemConfig val66 = new ItemConfig();
		val66.Name = "Broth";
		val66.Description = "Can't tell if it's made from beef bones, chicken bones, vegetables...";
		val66.CraftingStation = CraftingStations.Cauldron;
		val66.AddRequirement("Wishbone", 1, 0);
		val66.AddRequirement("Carrot", 1, 0);
		val66.AddRequirement("Turnip", 1, 0);
		val66.Icon = foodsAssetBundle.LoadAsset<Sprite>("brothicon");
		CustomItem val67 = new CustomItem("Broth", "MeadBugRepellent", val66);
		val67.ItemDrop.m_itemData.m_shared.m_itemType = (ItemType)1;
		val67.ItemDrop.m_itemData.m_shared.m_consumeStatusEffect = null;
		ItemManager.Instance.AddItem(val67);
		ItemConfig val68 = new ItemConfig();
		val68.Name = "Fish Stew";
		val68.Description = "Only missing noodles, and then it's a ramen.";
		val68.CraftingStation = CraftingStations.Cauldron;
		val68.AddRequirement("FishCooked", 1, 0);
		val68.AddRequirement("Broth", 1, 0);
		val68.Icon = foodsAssetBundle.LoadAsset<Sprite>("fishstew");
		CustomItem val69 = new CustomItem("FishStew", "SerpentStew", val68);
		val69.ItemDrop.m_itemData.m_shared.m_food = 85f;
		val69.ItemDrop.m_itemData.m_shared.m_foodStamina = 75f;
		val69.ItemDrop.m_itemData.m_shared.m_foodRegen = 4f;
		ItemManager.Instance.AddItem(val69);
		ItemConfig val70 = new ItemConfig();
		val70.Name = "Organic Iron";
		val70.Description = "The magical energies from the Swamp Key allows its mineral iron to be easily convertible into organic iron.";
		val70.CraftingStation = CraftingStations.Cauldron;
		val70.AddRequirement("CryptKey", 1, 0);
		val70.Amount = 5;
		val70.Icon = foodsAssetBundle.LoadAsset<Sprite>("organiciron");
		CustomItem val71 = new CustomItem("OrganicIron", "PowderedDragonEgg", val70);
		ItemManager.Instance.AddItem(val71);
		ItemConfig val72 = new ItemConfig();
		val72.Name = "PotionPrefab";
		val72.Description = "SHOULD NOT BE SEEN!!!";
		CustomItem val73 = new CustomItem("PotionPrefab", "MeadHealthMajor", val72);
		ItemManager.Instance.AddItem(val73);
		ItemConfig val74 = new ItemConfig();
		val74.Name = "Salty Mead";
		val74.Description = "Made from the finest tears that could rivalize with those from League of Legends.";
		val74.CraftingStation = CraftingStations.MeadKetill;
		val74.AddRequirement("DragonTear", 1, 0);
		val74.Icon = foodsAssetBundle.LoadAsset<Sprite>("SaltyMeadBase");
		CustomItem val75 = new CustomItem("SaltyMead", "MeadBaseFrostResist", val74);
		ItemManager.Instance.AddItem(val75);
		ItemConfig val76 = new ItemConfig();
		val76.Name = "Salty Potion";
		val76.Description = "Drink the tears of your enemies.";
		val76.Icon = foodsAssetBundle.LoadAsset<Sprite>("SaltyPotion");
		CustomItem val77 = new CustomItem("SaltyPotion", "MeadHealthMajor", val76);
		val77.ItemDrop.m_itemData.m_shared.m_consumeStatusEffect = (StatusEffect)(object)foodsAssetBundle.LoadAsset<SE_Stats>("SaltyPotionEffect");
		EffectList startEffects = ItemManager.Instance.GetItem("PotionPrefab").ItemDrop.m_itemData.m_shared.m_consumeStatusEffect.m_startEffects;
		val77.ItemDrop.m_itemData.m_shared.m_consumeStatusEffect.m_startEffects = startEffects;
		ItemManager.Instance.AddItem(val77);
		CustomItem val78 = new CustomItem("newMossyBait", "FishingBaitForest");
		ItemManager.Instance.AddItem(val78);
		CustomItem val79 = new CustomItem("newStickyBait", "FishingBaitSwamp");
		ItemManager.Instance.AddItem(val79);
		CustomItem val80 = new CustomItem("newStingyBait", "FishingBaitPlains");
		ItemManager.Instance.AddItem(val80);
		CustomItem val81 = new CustomItem("newHeavyBait", "FishingBaitOcean");
		ItemManager.Instance.AddItem(val81);
		CustomItem val82 = new CustomItem("newMistyBait", "FishingBaitMistlands");
		ItemManager.Instance.AddItem(val82);
		CustomItem val83 = new CustomItem("newHotBait", "FishingBaitAshlands");
		ItemManager.Instance.AddItem(val83);
		CustomItem val84 = new CustomItem("newFrostyBait", "FishingBaitDeepNorth");
		ItemManager.Instance.AddItem(val84);
		CustomItem val85 = new CustomItem("newColdBait", "FishingBaitCave");
		ItemManager.Instance.AddItem(val85);
		CustomItem val86 = new CustomItem("newFishingRod", "FishingRod");
		ItemManager.Instance.AddItem(val86);
		CustomItem val87 = new CustomItem("newHoops", "BarrelRings");
		ItemManager.Instance.AddItem(val87);
		ItemConfig val88 = new ItemConfig();
		val88.Name = "Worm food";
		val88.Description = "Word is a certain peddler is looking for some.";
		val88.CraftingStation = CraftingStations.FoodPreparationTable;
		val88.Icon = foodsAssetBundle.LoadAsset<Sprite>("WormFood");
		CustomItem val89 = new CustomItem("WormFood", "BarleyFlour", val88);
		val89.ItemDrop.m_itemData.m_shared.m_value = 100;
		ItemManager.Instance.AddItem(val89);
		ItemConfig val90 = new ItemConfig();
		val90.Name = "Phantasmal Sword";
		val90.Description = "Spooky scary. Goes right through physical things.";
		val90.CraftingStation = CraftingStations.Forge;
		val90.AddRequirement("RoundLog", 10, 5);
		val90.AddRequirement("Ectoplasm", 2, 1);
		val90.AddRequirement("Tin", 6, 3);
		val90.RepairStation = CraftingStations.Forge;
		CustomItem val91 = new CustomItem("PhantasmalSword", "THSwordSlayer", val90);
		val91.ItemDrop.m_itemData.m_shared.m_damages.m_slash = 0f;
		val91.ItemDrop.m_itemData.m_shared.m_damages.m_spirit = 100f;
		val91.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_spirit = 20f;
		val91.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_slash = 0f;
		val91.ItemDrop.m_itemData.m_shared.m_attackForce = 25f;
		val91.ItemDrop.m_itemData.m_shared.m_blockPower = 32f;
		val91.ItemDrop.m_itemData.m_shared.m_attack.m_attackStamina = 18f;
		val91.ItemDrop.m_itemData.m_shared.m_deflectionForce = 25f;
		val91.ItemDrop.m_itemData.m_shared.m_deflectionForcePerLevel = 5f;
		val91.ItemDrop.m_itemData.m_shared.m_toolTier = 1;
		val91.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset<Sprite>("PhantasmalSword");
		ItemManager.Instance.AddItem(val91);
		ItemConfig val92 = new ItemConfig();
		val92.Name = "Fire Knife";
		val92.Description = "Enough resin to burn for a lifetime.";
		val92.CraftingStation = CraftingStations.Workbench;
		val92.AddRequirement("Wood", 2, 0);
		val92.AddRequirement("Flint", 4, 2);
		val92.AddRequirement("LeatherScraps", 2, 0);
		val92.AddRequirement("Resin", 50, 10);
		val92.RepairStation = CraftingStations.Workbench;
		CustomItem val93 = new CustomItem("FireKnife", "KnifeFlint", val92);
		val93.ItemDrop.m_itemData.m_shared.m_damages.m_fire = 10f;
		val93.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_fire = 1f;
		val93.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset<Sprite>("FireKnife");
		ItemManager.Instance.AddItem(val93);
		ItemConfig val94 = new ItemConfig();
		val94.Name = "Fire Wand";
		val94.Description = "Pew! Pew! Made from only the finest of finewoods among the selection.";
		val94.CraftingStation = CraftingStations.Forge;
		val94.AddRequirement("FineWood", 18, 5);
		val94.AddRequirement("Copper", 4, 2);
		val94.AddRequirement("Bronze", 2, 1);
		val94.AddRequirement("Acorn", 2, 0);
		val94.AddRequirement("SurtlingCore", 1, 1);
		val94.RepairStation = CraftingStations.Forge;
		CustomItem val95 = new CustomItem("FireWand", "StaffFireball", val94);
		val95.ItemDrop.m_itemData.m_shared.m_toolTier = 1;
		val95.ItemDrop.m_itemData.m_shared.m_damages.m_blunt = 12f;
		val95.ItemDrop.m_itemData.m_shared.m_damages.m_fire = 24f;
		val95.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_fire = 4f;
		val95.ItemDrop.m_itemData.m_shared.m_attack.m_attackEitr = 10f;
		val95.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset<Sprite>("FireWand");
		ItemManager.Instance.AddItem(val95);
		ItemConfig val96 = new ItemConfig();
		val96.Name = "Frost Wand";
		val96.Description = "BRRRRRRR! Made from only the finest of corewoods among the selection.";
		val96.CraftingStation = CraftingStations.Forge;
		val96.AddRequirement("RoundLog", 28, 10);
		val96.AddRequirement("Silver", 4, 2);
		val96.AddRequirement("Bronze", 2, 1);
		val96.AddRequirement("FreezeGland", 20, 2);
		val96.RepairStation = CraftingStations.Forge;
		CustomItem val97 = new CustomItem("FrostWand", "StaffIceShards", val96);
		val97.ItemDrop.m_itemData.m_shared.m_toolTier = 1;
		val97.ItemDrop.m_itemData.m_shared.m_damages.m_frost = 25f;
		val97.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_frost = 1f;
		val97.ItemDrop.m_itemData.m_shared.m_attack.m_attackEitr = 4f;
		val97.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset<Sprite>("FrostWand");
		ItemManager.Instance.AddItem(val97);
		ItemConfig val98 = new ItemConfig();
		val98.Name = "Lightning Wand";
		val98.Description = "Zap! Cooper coils and manual action induce an electrical current causing this staff to shoot lightning bolts... but sure let's call it \"magic\".";
		val98.CraftingStation = CraftingStations.Forge;
		val98.AddRequirement("Iron", 3, 3);
		val98.AddRequirement("Copper", 40, 5);
		val98.AddRequirement("Ruby", 10, 1);
		val98.AddRequirement("Feathers", 6, 0);
		val98.RepairStation = CraftingStations.Forge;
		CustomItem val99 = new CustomItem("LightningWand", "StaffLightning", val98);
		val99.ItemDrop.m_itemData.m_shared.m_toolTier = 1;
		val99.ItemDrop.m_itemData.m_shared.m_damages.m_lightning = 10f;
		val99.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_lightning = 1f;
		val99.ItemDrop.m_itemData.m_shared.m_attack.m_reloadEitrDrain = 12f;
		val99.ItemDrop.m_itemData.m_shared.m_attackForce = 20f;
		val99.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset<Sprite>("LightningWand");
		ItemManager.Instance.AddItem(val99);
		ItemConfig val100 = new ItemConfig();
		val100.Name = "Blood Wand";
		val100.CraftingStation = CraftingStations.Forge;
		val100.Icon = newHaldorAssetBundle.LoadAsset<Sprite>("BloodWandIcon");
		val100.AddRequirement("BlackMetal", 10, 2);
		val100.AddRequirement("GoblinTotem", 2, 1);
		val100.AddRequirement("Bloodbag", 10, 2);
		val100.AddRequirement("CuredSquirrelHamstring", 5, 1);
		val100.RepairStation = CraftingStations.Forge;
		CustomItem val101 = new CustomItem(newHaldorAssetBundle, "BloodWand", false, val100);
		ItemManager.Instance.AddItem(val101);
		Projectile component2 = ItemManager.Instance.GetItem("BloodWand").ItemDrop.m_itemData.m_shared.m_attack.m_attackProjectile.GetComponent<Projectile>();
		GameObject prefab = component2.m_hitEffects.m_effectPrefabs[0].m_prefab;
		prefab.GetComponent<Renderer>().material.shader = shader4;
		((Component)prefab.transform.Find("vfx_RockHit (1)")).GetComponent<Renderer>().material.shader = shader;
		((Component)prefab.transform.Find("vfx_ice_hit")).GetComponent<Renderer>().material.shader = shader2;
		((Component)prefab.transform.Find("smoke")).GetComponent<Renderer>().material.shader = shader2;
		((Component)((Component)component2).transform.Find("flames (1)")).GetComponent<Renderer>().material.shader = shader;
		((Component)((Component)component2).transform.Find("sparcs_world")).GetComponent<Renderer>().material.shader = shader;
		GameObject prefab2 = ItemManager.Instance.GetItem("BloodWand").ItemDrop.m_itemData.m_shared.m_attack.m_burstEffect.m_effectPrefabs[0].m_prefab;
		prefab2.GetComponent<Renderer>().material.shader = shader;
		((Component)prefab2.transform.Find("smoke")).GetComponent<Renderer>().material.shader = shader2;
		GameObject itemPrefab = ItemManager.Instance.GetItem("BloodWand").ItemPrefab;
		((Component)itemPrefab.transform.Find("attach/default (1)/effects/flare")).GetComponent<Renderer>().material.shader = shader4;
		((Component)itemPrefab.transform.Find("attach/default (1)/effects/embers (1)")).GetComponent<Renderer>().material.shader = shader2;
		ItemConfig val102 = new ItemConfig();
		val102.Name = "ResinBomb";
		val102.CraftingStation = CraftingStations.Workbench;
		val102.Icon = newHaldorAssetBundle.LoadAsset<Sprite>("BombResinIcon");
		val102.AddRequirement("Resin", 12, 0);
		val102.AddRequirement("LeatherScraps", 5, 0);
		val102.RepairStation = CraftingStations.Workbench;
		CustomItem val103 = new CustomItem(newHaldorAssetBundle, "BombResin", false, val102);
		ItemManager.Instance.AddItem(val103);
		ItemDrop itemDrop = ItemManager.Instance.GetItem("BombResin").ItemDrop;
		GameObject attackProjectile = itemDrop.m_itemData.m_shared.m_attack.m_attackProjectile;
		GameObject spawnOnHit = attackProjectile.GetComponent<Projectile>().m_spawnOnHit;
		((Component)spawnOnHit.transform.Find("particles/wetsplsh")).GetComponent<Renderer>().material.shader = shader2;
		((Component)spawnOnHit.transform.Find("particles/ooz (1)")).GetComponent<Renderer>().material.shader = shader2;
		((Component)spawnOnHit.transform.Find("particles/flakes")).GetComponent<Renderer>().material.shader = shader2;
		((Component)spawnOnHit.transform.Find("particles/low_flames")).GetComponent<Renderer>().material.shader = shader3;
		((Component)spawnOnHit.transform.Find("particles/flame ring")).GetComponent<Renderer>().material.shader = shader2;
		((Component)spawnOnHit.transform.Find("particles/flames (2)")).GetComponent<Renderer>().material.shader = shader2;
		((Component)spawnOnHit.transform.Find("particles/splash_overtime")).GetComponent<Renderer>().material.shader = shader2;
		CustomItem item = ItemManager.Instance.GetItem("capeDeerHideCopy");
		logger.LogInfo((object)item);
		ItemConfig val104 = new ItemConfig();
		val104.Name = "FrostBomb";
		val104.CraftingStation = CraftingStations.Workbench;
		val104.Icon = newHaldorAssetBundle.LoadAsset<Sprite>("BombFrostIcon");
		val104.AddRequirement("FreezeGland", 12, 0);
		val104.AddRequirement("LeatherScraps", 5, 0);
		val104.RepairStation = CraftingStations.Workbench;
		CustomItem val105 = new CustomItem(newHaldorAssetBundle, "BombFrost", false, val104);
		ItemManager.Instance.AddItem(val105);
		PrefabManager.Instance.AddPrefab(val105.ItemPrefab);
		itemDrop = ItemManager.Instance.GetItem("BombFrost").ItemDrop;
		attackProjectile = itemDrop.m_itemData.m_shared.m_attack.m_attackProjectile;
		PrefabManager.Instance.AddPrefab(attackProjectile);
		spawnOnHit = attackProjectile.GetComponent<Projectile>().m_spawnOnHit;
		PrefabManager.Instance.AddPrefab(spawnOnHit);
		((Component)spawnOnHit.transform.Find("particles/wetsplsh")).GetComponent<Renderer>().material.shader = shader2;
		((Component)spawnOnHit.transform.Find("particles/ooz (1)")).GetComponent<Renderer>().material.shader = shader2;
		((Component)spawnOnHit.transform.Find("particles/flakes")).GetComponent<Renderer>().material.shader = shader2;
		((Component)spawnOnHit.transform.Find("particles/low_flames")).GetComponent<Renderer>().material.shader = shader3;
		((Component)spawnOnHit.transform.Find("particles/flame ring")).GetComponent<Renderer>().material.shader = shader2;
		((Component)spawnOnHit.transform.Find("particles/flames (2)")).GetComponent<Renderer>().material.shader = shader2;
		((Component)spawnOnHit.transform.Find("particles/splash_overtime")).GetComponent<Renderer>().material.shader = shader2;
		ItemConfig val106 = new ItemConfig();
		val106.Name = "HealingBomb";
		val106.CraftingStation = CraftingStations.Workbench;
		val106.Icon = newHaldorAssetBundle.LoadAsset<Sprite>("BombHealingIcon");
		val106.AddRequirement("MushroomYellow", 12, 0);
		val106.AddRequirement("LeatherScraps", 5, 0);
		val106.RepairStation = CraftingStations.Workbench;
		CustomItem val107 = new CustomItem(newHaldorAssetBundle, "BombHealing", false, val106);
		ItemManager.Instance.AddItem(val107);
		itemDrop = ItemManager.Instance.GetItem("BombHealing").ItemDrop;
		attackProjectile = itemDrop.m_itemData.m_shared.m_attack.m_attackProjectile;
		spawnOnHit = attackProjectile.GetComponent<Projectile>().m_spawnOnHit;
		((Component)spawnOnHit.transform.Find("particles/wetsplsh")).GetComponent<Renderer>().material.shader = shader2;
		((Component)spawnOnHit.transform.Find("particles/ooz (1)")).GetComponent<Renderer>().material.shader = shader2;
		((Component)spawnOnHit.transform.Find("particles/interior_dust")).GetComponent<Renderer>().material.shader = shader2;
		((Component)spawnOnHit.transform.Find("particles/splash_overtime")).GetComponent<Renderer>().material.shader = shader2;
		ItemConfig val108 = new ItemConfig();
		val108.Name = "Refillable Torch";
		val108.Description = "Automatically consumes resin to refill itself when it is about to break.";
		val108.CraftingStation = CraftingStations.Workbench;
		val108.AddRequirement("Iron", 1, 0);
		val108.AddRequirement("wax", 1, 0);
		CustomItem val109 = new CustomItem("RefillableTorch", "Torch", val108);
		val109.ItemDrop.m_itemData.m_shared.m_destroyBroken = false;
		ItemManager.Instance.AddItem(val109);
		ItemConfig val110 = new ItemConfig();
		val110.Name = "MegaWisplight";
		val110.AddRequirement("Wisp", 100, 0);
		val110.AddRequirement("Silver", 1, 0);
		val110.AddRequirement("TrophyTick", 1, 0);
		CustomItem val111 = new CustomItem("MegaWisplight", "Demister", val110);
		SE_Demister val112 = (SE_Demister)val111.ItemDrop.m_itemData.m_shared.m_equipStatusEffect;
		((Component)val112.m_ballPrefab.transform.Find("effects/Particle System Force Field")).GetComponent<ParticleSystemForceField>().endRange = 20f;
		ItemManager.Instance.AddItem(val111);
		ItemConfig val113 = new ItemConfig();