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; [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 bool grantInvuln = false; public static int invulnTimer = 0; public static bool timerGoesDown = false; public static float moveTimer; public static bool canBeInvisible; public static HashSet autoPickables = new HashSet { "Pickable_Dandelion(Clone)", "RaspberryBush(Clone)", "Pickable_Mushroom(Clone)", "BlueberryBush(Clone)", "Pickable_Thistle(Clone)", "Pickable_Mushroom_yellow(Clone)", "CloudberryBush(Clone)", "Pickable_Fiddlehead(Clone)", "Pickable_SmokePuff(Clone)" }; public const string RPCNAME_RPC_ApplyEffectsToOtherPlayers = "Lelouis"; [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()) { vagonUser = val.GetComponent(); ((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().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(Player), "UpdateTeleport")] public static void InvulnAfterTP(Player __instance) { if (!((Object)(object)__instance == (Object)(object)Player.m_localPlayer)) { return; } if (((Character)__instance).IsTeleporting()) { grantInvuln = true; invulnTimer = 300; } else if (grantInvuln && !((Character)__instance).IsTeleporting()) { grantInvuln = false; timerGoesDown = true; __instance.SetGodMode(true); logger.LogInfo((object)"god mode = true"); } if (timerGoesDown) { invulnTimer--; if (invulnTimer == 0) { timerGoesDown = false; __instance.SetGodMode(false); logger.LogInfo((object)"god mode = false"); } } } [HarmonyPrefix] [HarmonyPatch(typeof(Character), "ApplyDamage")] public static bool TrueGodMode(Character __instance) { if (__instance.InGodMode()) { return false; } return true; } [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("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 statusEffects = sEMan.GetStatusEffects(); if (statusEffects.Count <= 0) { return; } bool flag = false; StatusEffect val = ScriptableObject.CreateInstance(); 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_00ed: 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 list = new List(); float num = 4f; foreach (StatusEffect statusEffect in sEMan.GetStatusEffects()) { if (statusEffect.m_name == "Extended Buffing Range") { num = 8f; } } foreach (StatusEffect statusEffect2 in sEMan.GetStatusEffects()) { if (!(statusEffect2.m_name == "Magic Shield")) { continue; } ((Character)__instance).UseEitr(10f); Collider[] array = Physics.OverlapSphere(((Component)__instance).transform.position, num, -1, (QueryTriggerInteraction)1); if (array.Length == 0 || array == null) { continue; } Collider[] array2 = array; foreach (Collider val in array2) { if ((Object)(object)((Component)val).GetComponentInParent() != (Object)null) { list.Add(((Component)val).GetComponentInParent()); } } } 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); sEMan2.AddStatusEffect((StatusEffect)(object)newHaldorAssetBundle.LoadAsset("StatusEffect_MagicShieldActivatedEffect"), 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 Bucket")) { return; } List allItems = inventory.GetAllItems(); List list = new List(); foreach (ItemData item2 in allItems) { if (item2.m_shared.m_name == "Empty 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 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 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().m_items; } } [HarmonyPostfix] [HarmonyPatch(typeof(Tameable), "Interact")] public static void GiveMilk(Tameable __instance) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)__instance.m_saddleItem != (Object)null) || !(__instance.m_saddleItem.m_itemData.m_shared.m_name == "$item_saddlelox")) { return; } Collider[] array = Physics.OverlapSphere(((Component)__instance).transform.position, 4f, -1, (QueryTriggerInteraction)1); if (array.Length == 0 || array == null) { return; } List list = new List(); Collider[] array2 = array; foreach (Collider val in array2) { if ((Object)(object)((Component)val).GetComponentInParent() != (Object)null) { list.Add(((Component)val).GetComponentInParent()); } } foreach (Player item2 in list) { Inventory inventory = ((Humanoid)item2).GetInventory(); if (!inventory.ContainsItemByName("Empty Bucket")) { continue; } List allItems = inventory.GetAllItems(); List list2 = new List(); foreach (ItemData item3 in allItems) { if (item3.m_shared.m_name == "Empty Bucket") { list2.Add(item3); } } foreach (ItemData item4 in list2) { CustomItem item = ItemManager.Instance.GetItem("MilkBucket"); inventory.AddItem(item.ItemDrop.m_itemData.m_dropPrefab, item4.m_stack); inventory.RemoveItem("Empty Bucket", item4.m_stack, -1, true); } } } [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 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() != (Object)null) { Pickable componentInParent = ((Component)val).GetComponentInParent(); 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 list = new List(); Collider[] array2 = array; foreach (Collider val in array2) { if ((Object)(object)((Component)val).GetComponentInParent() != (Object)null) { list.Add(((Component)val).GetComponentInParent()); } } foreach (Player item in list) { SEMan sEMan = ((Character)item).GetSEMan(); List 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_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_034b: 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; } SEMan sEMan = ((Character)val).GetSEMan(); float num = 4f; foreach (StatusEffect statusEffect in sEMan.GetStatusEffects()) { if (statusEffect.m_name == "Extended Buffing Range") { num = 8f; } } if (__instance.GetWeapon().m_shared.m_name == "Odin's Tankard") { Collider[] array = Physics.OverlapSphere(((Component)val).transform.position, num, -1, (QueryTriggerInteraction)1); if (array.Length != 0 && array != null) { List list = new List(); Collider[] array2 = array; foreach (Collider val2 in array2) { if ((Object)(object)((Component)val2).GetComponentInParent() != (Object)null) { list.Add(((Component)val2).GetComponentInParent()); } } foreach (Player item in list) { SEMan sEMan2 = ((Character)item).GetSEMan(); List statusEffects = sEMan2.GetStatusEffects(); List list2 = new List(); 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) { ZRoutedRpc.instance.InvokeRoutedRPC(item.GetPlayerID(), "RPC_RemoveEffectsFromOtherPlayers", new object[2] { item, item3 }); } } ZRoutedRpc.instance.InvokeRoutedRPC(item.GetPlayerID(), "RPC_ApplyEffectsToOtherPlayers", new object[2] { item, ItemManager.Instance.GetItem("WoodCopy2").ItemDrop.m_itemData.m_shared.m_attackStatusEffect }); ZRoutedRpc.instance.InvokeRoutedRPC(item.GetPlayerID(), "RPC_ApplyEffectsToOtherPlayers", new object[2] { item, newHaldorAssetBundle.LoadAsset("StatusEffect_AttackBuff") }); 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, num, -1, (QueryTriggerInteraction)1); if (array3.Length == 0 || array3 == null) { return; } List list3 = new List(); Collider[] array4 = array3; foreach (Collider val3 in array4) { if ((Object)(object)((Component)val3).GetComponentInParent() != (Object)null) { list3.Add(((Component)val3).GetComponentInParent()); } } foreach (Player item4 in list3) { ZRoutedRpc.instance.InvokeRoutedRPC(item4.GetPlayerID(), "RPC_ApplyEffectsToOtherPlayers", new object[2] { item4, newHaldorAssetBundle.LoadAsset("StatusEffect_StaminaBoost") }); if ((Object)(object)item4 != (Object)(object)Player.m_localPlayer) { ((Character)val).RaiseSkill((SkillType)9, 1f); } } } [HarmonyPostfix] [HarmonyPatch(typeof(Player), "Start")] public static void RemovePieceDuplicates() { if (PieceManager.Instance.GetPiece("Smelter") != null) { PieceManager.Instance.RemovePiece("Smelter"); } if (PieceManager.Instance.GetPiece("cartCopy") != null) { PieceManager.Instance.RemovePiece("cartCopy"); } if (PieceManager.Instance.GetPiece("roofCopy") != null) { PieceManager.Instance.RemovePiece("roofCopy"); } } [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().m_extraDrops; extraDrops.m_dropMax = 4; extraDrops.m_drops.Add(item); } } [HarmonyPostfix] [HarmonyPatch(typeof(Player), "Dodge")] public static void RefillTorch(Player __instance) { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown if (!((Character)__instance).IsPlayer() || !((Object)(object)__instance == (Object)(object)Player.m_localPlayer)) { return; } SEMan sEMan = ((Character)__instance).GetSEMan(); List statusEffects = sEMan.GetStatusEffects(); SE_Stats val = null; if (statusEffects.Count > 0) { foreach (StatusEffect item in statusEffects) { if (item.m_name == "Auto Replant Trees") { val = (SE_Stats)item; } } } if ((Object)(object)val != (Object)null) { sEMan.RemoveStatusEffect((StatusEffect)(object)val, false); } } [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 <= 10f) { Inventory inventory2 = __instance.GetInventory(); if (inventory2.ContainsItemByName("$item_resin")) { inventory2.RemoveItem("$item_resin", 1, -1, true); __instance.LeftItem.m_durability = 20f; } } } [HarmonyPostfix] [HarmonyPatch(typeof(Humanoid), "UpdateEquipment")] public static void ChangeReloadSpeed(Humanoid __instance) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Invalid comparison between Unknown and I4 if (!((Character)__instance).IsPlayer() || !((Object)(object)__instance == (Object)(object)Player.m_localPlayer)) { return; } SEMan sEMan = ((Character)__instance).GetSEMan(); List statusEffects = sEMan.GetStatusEffects(); foreach (StatusEffect item in statusEffects) { if (item.m_name == "Improved Realoding Speed" && __instance.LeftItem != null && (int)__instance.LeftItem.m_shared.m_skillType == 14) { __instance.LeftItem.m_shared.m_attack.m_reloadTime = 1.75f; return; } } if (__instance.LeftItem != null && (int)__instance.LeftItem.m_shared.m_skillType == 14) { __instance.LeftItem.m_shared.m_attack.m_reloadTime = 3.5f; } } [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(10) < 1) { MethodInfo method = typeof(Attack).GetMethod("FireProjectileBurst", BindingFlags.Instance | BindingFlags.NonPublic); method.Invoke(__instance, Array.Empty()); } } } [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(__instance.m_spawnItem.m_dropPrefab, ((Component)__instance).transform.position + ((Component)__instance).transform.TransformDirection(__instance.m_spawnOffset), Quaternion.identity).GetComponent(); 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(); 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().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; } [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 statusEffects = sEMan.GetStatusEffects(); if (statusEffects != null && statusEffects.Count > 0) { foreach (StatusEffect item in statusEffects) { if (item.m_name == newHaldorAssetBundle.LoadAsset("StatusEffect_SecondWind").m_name) { return; } } } sEMan.AddStatusEffect(newHaldorAssetBundle.LoadAsset("StatusEffect_SecondWind"), false, 0, 0f); } [HarmonyPostfix] [HarmonyPatch(typeof(DropOnDestroyed), "OnDestroyed")] public static void ReplantTree(DropOnDestroyed __instance) { //IL_0007: 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_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) Collider[] array = Physics.OverlapSphere(((Component)__instance).transform.position, 2f, -1, (QueryTriggerInteraction)1); List list = new List(); Collider[] array2 = array; foreach (Collider val in array2) { if ((Object)(object)((Component)val).GetComponentInParent() != (Object)null) { list.Add(((Component)val).GetComponentInParent()); } } bool flag = false; Player val2 = null; Inventory val3 = null; bool flag2 = false; foreach (Player item in list) { foreach (StatusEffect statusEffect in ((Character)item).GetSEMan().GetStatusEffects()) { if (statusEffect.m_name == "Auto Replant Trees") { flag2 = true; } } if (((Character)item).GetSkillFactor((SkillType)13) >= 0.3f && flag2) { flag = true; val2 = item; val3 = ((Humanoid)item).GetInventory(); break; } } if (!flag) { return; } switch (((Object)__instance).name) { case "Beech_Stub(Clone)": if (val3.ContainsItemByName("$item_beechseeds")) { val3.RemoveItem("$item_beechseeds", 1, -1, true); Object.Instantiate(PrefabManager.Instance.GetPrefab("Beech_Sapling"), ((Component)__instance).transform.position, Quaternion.identity); ((Character)val2).RaiseSkill((SkillType)106, 1f); } break; case "BirchStub(Clone)": if (val3.ContainsItemByName("$item_birchseeds")) { val3.RemoveItem("$item_birchseeds", 1, -1, true); Object.Instantiate(PrefabManager.Instance.GetPrefab("Birch_Sapling"), ((Component)__instance).transform.position, Quaternion.identity); ((Character)val2).RaiseSkill((SkillType)106, 1f); } break; case "OakStub(Clone)": if (val3.ContainsItemByName("$item_oakseeds")) { val3.RemoveItem("$item_oakseeds", 1, -1, true); Object.Instantiate(PrefabManager.Instance.GetPrefab("Oak_Sapling"), ((Component)__instance).transform.position, Quaternion.identity); ((Character)val2).RaiseSkill((SkillType)106, 1f); } break; case "FirTree_Stub(Clone)": if (val3.ContainsItemByName("$item_fircone")) { val3.RemoveItem("$item_fircone", 1, -1, true); Object.Instantiate(PrefabManager.Instance.GetPrefab("FirTree_Sapling"), ((Component)__instance).transform.position, Quaternion.identity); ((Character)val2).RaiseSkill((SkillType)106, 1f); } break; case "Pinetree_01_Stub(Clone)": if (val3.ContainsItemByName("$item_pinecone")) { val3.RemoveItem("$item_pinecone", 1, -1, true); Object.Instantiate(PrefabManager.Instance.GetPrefab("PineTree_Sapling"), ((Component)__instance).transform.position, Quaternion.identity); ((Character)val2).RaiseSkill((SkillType)106, 1f); } break; } } [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()); 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, position, Quaternion.identity)).GetComponent(); if ((Object)(object)component != (Object)null) { component.SetStack(Game.instance.ScaleDrops(item.ItemDrop.m_itemData, 1)); } } } } private static void RPC_ApplyEffectsToOtherPlayers(long sender, Player target, StatusEffect effect) { SEMan sEMan = ((Character)target).GetSEMan(); sEMan.AddStatusEffect(effect, false, 0, 0f); } private static void RPC_RemoveEffectsFromOtherPlayers(long sender, Player target, StatusEffect effect) { SEMan sEMan = ((Character)target).GetSEMan(); sEMan.AddStatusEffect(effect, false, 0, 0f); } [HarmonyPostfix] [HarmonyPatch(typeof(Player), "Load")] public static void PatchRPCsPlayers(Player __instance) { try { ZRoutedRpc.instance.Register("Lelouis", (Action)RPC_ApplyEffectsToOtherPlayers); } catch { logger.LogInfo((object)"The RPC has already been registered!\nThis can happen if you are hosting without a dedicated server"); } } [HarmonyPostfix] [HarmonyPatch(typeof(ZoneSystem), "Load")] public static void PatchRPCsServer() { if (ZNet.instance.IsServer()) { try { ZRoutedRpc.instance.Register("Lelouis", (Action)RPC_ApplyEffectsToOtherPlayers); } catch { logger.LogInfo((object)"The RPC has already been registered!\nThis can happen if you are hosting without a dedicated server"); } } } } 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 worldExpModifier; public Shader standardSurface2; public Shader CustomParticleUnlit; public Shader CustomCreature; public Shader CustomGrass; public Shader CustomPlayer; 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("wax"); capesBundle = AssetUtils.LoadAssetBundle(text2 += "capes"); capeDeer = capesBundle.LoadAsset("capeDeer"); capeTroll = capesBundle.LoadAsset("capeTroll"); capeWolfWaterproof = capesBundle.LoadAsset("capeWolfWaterproof"); capeLoxWaterproof = capesBundle.LoadAsset("capeLoxWaterproof"); capeLinenWaterproof = capesBundle.LoadAsset("capeLinenWaterproof"); capeFeatherWaterproof = capesBundle.LoadAsset("capeFeatherWaterproof"); capeAsksvinWaterproof = capesBundle.LoadAsset("capeAsksvinWaterproof"); capeAshWaterproof = capesBundle.LoadAsset("capeAshWaterproof"); newHaldorAssetBundle = AssetUtils.LoadAssetBundle(text3 += "newhaldor"); newHaldor = newHaldorAssetBundle.LoadAsset("newhaldor"); foodsAssetBundle = AssetUtils.LoadAssetBundle(text4 += "foods"); worldExpModifier = ((BaseUnityPlugin)this).Config.Bind("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 //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Expected O, but got Unknown //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Expected O, but got Unknown //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0188: 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()).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().materials[0].shader; ItemConfig val5 = new ItemConfig(); val5.Name = "creatureshader"; CustomItem val6 = new CustomItem("CreatureShader", "CapeDeerHide", val5); CustomCreature = ((Renderer)((Component)((Component)val6.ItemDrop).transform.Find("attach_skin/cape2")).GetComponent()).material.shader; PieceConfig val7 = new PieceConfig(); val7.Name = "grass"; CustomPiece val8 = new CustomPiece("piece_barleycopy", "sapling_barley", val7); CustomGrass = ((Renderer)((Component)val8.PiecePrefab.transform.Find("healthy/barley_sapling")).GetComponent()).material.shader; ItemConfig val9 = new ItemConfig(); val9.Name = "player"; CustomItem val10 = new CustomItem("PlayerShader", "ArmorTrollLeatherChest", val9); CustomPlayer = ((Renderer)((Component)((Component)val10.ItemDrop).transform.Find("attach_skin/shorts")).GetComponent()).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_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Expected O, but got Unknown //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Expected O, but got Unknown //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Expected O, but got Unknown //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Expected O, but got Unknown //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Expected O, but got Unknown //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Expected O, but got Unknown //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Expected O, but got Unknown //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Expected O, but got Unknown //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Expected O, but got Unknown //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Expected O, but got Unknown //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Expected O, but got Unknown //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Expected O, but got Unknown //IL_0898: Unknown result type (might be due to invalid IL or missing references) //IL_089f: Expected O, but got Unknown //IL_0909: Unknown result type (might be due to invalid IL or missing references) //IL_0913: Expected O, but got Unknown //IL_0c3b: Unknown result type (might be due to invalid IL or missing references) //IL_0c42: Expected O, but got Unknown //IL_0c69: Unknown result type (might be due to invalid IL or missing references) //IL_0c70: Expected O, but got Unknown //IL_0f94: Unknown result type (might be due to invalid IL or missing references) //IL_0fa6: Unknown result type (might be due to invalid IL or missing references) //IL_0fad: Expected O, but got Unknown //IL_0fd4: Unknown result type (might be due to invalid IL or missing references) //IL_0fdb: Expected O, but got Unknown //IL_12ff: Unknown result type (might be due to invalid IL or missing references) //IL_1311: Unknown result type (might be due to invalid IL or missing references) //IL_1318: Expected O, but got Unknown //IL_133f: Unknown result type (might be due to invalid IL or missing references) //IL_1346: Expected O, but got Unknown //IL_16e8: Unknown result type (might be due to invalid IL or missing references) //IL_16fa: Unknown result type (might be due to invalid IL or missing references) //IL_1701: Expected O, but got Unknown //IL_1728: Unknown result type (might be due to invalid IL or missing references) //IL_172f: Expected O, but got Unknown //IL_1ad1: Unknown result type (might be due to invalid IL or missing references) //IL_1ae3: Unknown result type (might be due to invalid IL or missing references) //IL_1aea: Expected O, but got Unknown //IL_1b11: Unknown result type (might be due to invalid IL or missing references) //IL_1b18: Expected O, but got Unknown //IL_1eba: Unknown result type (might be due to invalid IL or missing references) //IL_1ecc: Unknown result type (might be due to invalid IL or missing references) //IL_1ed3: Expected O, but got Unknown //IL_1efa: Unknown result type (might be due to invalid IL or missing references) //IL_1f01: Expected O, but got Unknown //IL_231b: Unknown result type (might be due to invalid IL or missing references) //IL_232d: Unknown result type (might be due to invalid IL or missing references) //IL_2334: Expected O, but got Unknown //IL_235b: Unknown result type (might be due to invalid IL or missing references) //IL_2362: Expected O, but got Unknown //IL_26fe: Unknown result type (might be due to invalid IL or missing references) //IL_2710: Unknown result type (might be due to invalid IL or missing references) //IL_2717: Expected O, but got Unknown //IL_273e: Unknown result type (might be due to invalid IL or missing references) //IL_2745: Expected O, but got Unknown //IL_2ae1: Unknown result type (might be due to invalid IL or missing references) //IL_2af3: Unknown result type (might be due to invalid IL or missing references) //IL_2afa: Expected O, but got Unknown //IL_2b77: Unknown result type (might be due to invalid IL or missing references) //IL_2b7e: Expected O, but got Unknown //IL_2bf2: Unknown result type (might be due to invalid IL or missing references) //IL_2bf9: Expected O, but got Unknown //IL_2c45: Unknown result type (might be due to invalid IL or missing references) //IL_2c4c: Expected O, but got Unknown //IL_2c79: Unknown result type (might be due to invalid IL or missing references) //IL_2c80: Expected O, but got Unknown //IL_2cee: Unknown result type (might be due to invalid IL or missing references) //IL_2cf5: Expected O, but got Unknown //IL_2d69: Unknown result type (might be due to invalid IL or missing references) //IL_2d70: Expected O, but got Unknown //IL_2dbc: Unknown result type (might be due to invalid IL or missing references) //IL_2dc3: Expected O, but got Unknown //IL_2df0: Unknown result type (might be due to invalid IL or missing references) //IL_2df7: Expected O, but got Unknown //IL_2e43: Unknown result type (might be due to invalid IL or missing references) //IL_2e4a: Expected O, but got Unknown //IL_2e9e: Unknown result type (might be due to invalid IL or missing references) //IL_2ea5: Expected O, but got Unknown //IL_2f1c: Unknown result type (might be due to invalid IL or missing references) //IL_2f23: Expected O, but got Unknown //IL_2f4c: Unknown result type (might be due to invalid IL or missing references) //IL_2f9d: Unknown result type (might be due to invalid IL or missing references) //IL_3027: Unknown result type (might be due to invalid IL or missing references) //IL_302e: Expected O, but got Unknown //IL_30a7: Unknown result type (might be due to invalid IL or missing references) //IL_30ae: Expected O, but got Unknown //IL_3104: Unknown result type (might be due to invalid IL or missing references) //IL_310b: Expected O, but got Unknown //IL_3184: Unknown result type (might be due to invalid IL or missing references) //IL_318b: Expected O, but got Unknown //IL_31b3: Unknown result type (might be due to invalid IL or missing references) //IL_31ba: Expected O, but got Unknown //IL_321f: Unknown result type (might be due to invalid IL or missing references) //IL_3226: Expected O, but got Unknown //IL_327b: Unknown result type (might be due to invalid IL or missing references) //IL_32b8: Unknown result type (might be due to invalid IL or missing references) //IL_3345: Unknown result type (might be due to invalid IL or missing references) //IL_334c: Expected O, but got Unknown //IL_3372: Unknown result type (might be due to invalid IL or missing references) //IL_3379: Expected O, but got Unknown //IL_33ab: Unknown result type (might be due to invalid IL or missing references) //IL_33b2: Expected O, but got Unknown //IL_3460: Unknown result type (might be due to invalid IL or missing references) //IL_3467: Expected O, but got Unknown //IL_356a: Unknown result type (might be due to invalid IL or missing references) //IL_3571: Expected O, but got Unknown //IL_3601: Unknown result type (might be due to invalid IL or missing references) //IL_3608: Expected O, but got Unknown //IL_3666: Unknown result type (might be due to invalid IL or missing references) //IL_366d: Expected O, but got Unknown //IL_36ee: Unknown result type (might be due to invalid IL or missing references) //IL_36f5: Expected O, but got Unknown //IL_3753: Unknown result type (might be due to invalid IL or missing references) //IL_375a: Expected O, but got Unknown //IL_37db: Unknown result type (might be due to invalid IL or missing references) //IL_37e2: Expected O, but got Unknown //IL_385b: Unknown result type (might be due to invalid IL or missing references) //IL_3862: Expected O, but got Unknown //IL_38e2: Unknown result type (might be due to invalid IL or missing references) //IL_38e9: Expected O, but got Unknown //IL_3962: Unknown result type (might be due to invalid IL or missing references) //IL_3969: Expected O, but got Unknown //IL_39e9: Unknown result type (might be due to invalid IL or missing references) //IL_39f0: Expected O, but got Unknown //IL_3a69: Unknown result type (might be due to invalid IL or missing references) //IL_3a70: Expected O, but got Unknown //IL_3ad8: Unknown result type (might be due to invalid IL or missing references) //IL_3adf: Expected O, but got Unknown //IL_3b6a: Unknown result type (might be due to invalid IL or missing references) //IL_3b71: Expected O, but got Unknown //IL_3bbb: Unknown result type (might be due to invalid IL or missing references) //IL_3bc2: Expected O, but got Unknown //IL_3c4d: Unknown result type (might be due to invalid IL or missing references) //IL_3c54: Expected O, but got Unknown //IL_3cb6: Unknown result type (might be due to invalid IL or missing references) //IL_3cbd: Expected O, but got Unknown //IL_3cca: Unknown result type (might be due to invalid IL or missing references) //IL_3cd1: Expected O, but got Unknown //IL_3d39: Unknown result type (might be due to invalid IL or missing references) //IL_3d40: Expected O, but got Unknown //IL_3db9: Unknown result type (might be due to invalid IL or missing references) //IL_3dc0: Expected O, but got Unknown //IL_3e0a: Unknown result type (might be due to invalid IL or missing references) //IL_3e11: Expected O, but got Unknown //IL_3e1e: Unknown result type (might be due to invalid IL or missing references) //IL_3e25: Expected O, but got Unknown //IL_3e6f: Unknown result type (might be due to invalid IL or missing references) //IL_3e76: Expected O, but got Unknown //IL_3e88: Unknown result type (might be due to invalid IL or missing references) //IL_3e9a: Unknown result type (might be due to invalid IL or missing references) //IL_3ea1: Expected O, but got Unknown //IL_3f09: Unknown result type (might be due to invalid IL or missing references) //IL_3f10: Expected O, but got Unknown //IL_3f22: Unknown result type (might be due to invalid IL or missing references) //IL_3f34: Unknown result type (might be due to invalid IL or missing references) //IL_3f3b: Expected O, but got Unknown //IL_3f85: Unknown result type (might be due to invalid IL or missing references) //IL_3f8c: Expected O, but got Unknown //IL_3fef: Unknown result type (might be due to invalid IL or missing references) //IL_4018: Unknown result type (might be due to invalid IL or missing references) //IL_401f: Expected O, but got Unknown //IL_40b4: Unknown result type (might be due to invalid IL or missing references) //IL_40bb: Expected O, but got Unknown //IL_40cd: Unknown result type (might be due to invalid IL or missing references) //IL_40f6: Unknown result type (might be due to invalid IL or missing references) //IL_40fd: Expected O, but got Unknown //IL_4174: Unknown result type (might be due to invalid IL or missing references) //IL_417b: Expected O, but got Unknown //IL_41f4: Unknown result type (might be due to invalid IL or missing references) //IL_41fb: Expected O, but got Unknown //IL_4273: Unknown result type (might be due to invalid IL or missing references) //IL_427a: Expected O, but got Unknown //IL_428c: Unknown result type (might be due to invalid IL or missing references) //IL_42b5: Unknown result type (might be due to invalid IL or missing references) //IL_42bc: Expected O, but got Unknown //IL_4325: Unknown result type (might be due to invalid IL or missing references) //IL_432c: Expected O, but got Unknown //IL_438a: Unknown result type (might be due to invalid IL or missing references) //IL_4391: Expected O, but got Unknown //IL_43f4: Unknown result type (might be due to invalid IL or missing references) //IL_43fb: Expected O, but got Unknown //IL_4408: Unknown result type (might be due to invalid IL or missing references) //IL_440f: Expected O, but got Unknown //IL_4435: Unknown result type (might be due to invalid IL or missing references) //IL_443c: Expected O, but got Unknown //IL_4449: Unknown result type (might be due to invalid IL or missing references) //IL_4450: Expected O, but got Unknown //IL_44aa: Unknown result type (might be due to invalid IL or missing references) //IL_44b1: Expected O, but got Unknown //IL_44be: Unknown result type (might be due to invalid IL or missing references) //IL_44c5: Expected O, but got Unknown //IL_4503: Unknown result type (might be due to invalid IL or missing references) //IL_450a: Expected O, but got Unknown //IL_458e: Unknown result type (might be due to invalid IL or missing references) //IL_4595: Expected O, but got Unknown //IL_45ac: Unknown result type (might be due to invalid IL or missing references) //IL_45b3: Expected O, but got Unknown //IL_45ca: Unknown result type (might be due to invalid IL or missing references) //IL_45d1: Expected O, but got Unknown //IL_45e8: Unknown result type (might be due to invalid IL or missing references) //IL_45ef: Expected O, but got Unknown //IL_4606: Unknown result type (might be due to invalid IL or missing references) //IL_460d: Expected O, but got Unknown //IL_4624: Unknown result type (might be due to invalid IL or missing references) //IL_462b: Expected O, but got Unknown //IL_4642: Unknown result type (might be due to invalid IL or missing references) //IL_4649: Expected O, but got Unknown //IL_4660: Unknown result type (might be due to invalid IL or missing references) //IL_4667: Expected O, but got Unknown //IL_467e: Unknown result type (might be due to invalid IL or missing references) //IL_4685: Expected O, but got Unknown //IL_469c: Unknown result type (might be due to invalid IL or missing references) //IL_46a3: Expected O, but got Unknown //IL_46b0: Unknown result type (might be due to invalid IL or missing references) //IL_46b7: Expected O, but got Unknown //IL_4702: Unknown result type (might be due to invalid IL or missing references) //IL_4709: Expected O, but got Unknown //IL_472e: Unknown result type (might be due to invalid IL or missing references) //IL_4735: Expected O, but got Unknown //IL_47a3: Unknown result type (might be due to invalid IL or missing references) //IL_47aa: Expected O, but got Unknown //IL_4901: Unknown result type (might be due to invalid IL or missing references) //IL_4908: Expected O, but got Unknown //IL_4986: Unknown result type (might be due to invalid IL or missing references) //IL_498d: Expected O, but got Unknown //IL_4a01: Unknown result type (might be due to invalid IL or missing references) //IL_4a08: Expected O, but got Unknown //IL_4a94: Unknown result type (might be due to invalid IL or missing references) //IL_4a9b: Expected O, but got Unknown //IL_4b66: Unknown result type (might be due to invalid IL or missing references) //IL_4b6d: Expected O, but got Unknown //IL_4bec: Unknown result type (might be due to invalid IL or missing references) //IL_4bf3: Expected O, but got Unknown //IL_4c9e: Unknown result type (might be due to invalid IL or missing references) //IL_4ca5: Expected O, but got Unknown //IL_4d23: Unknown result type (might be due to invalid IL or missing references) //IL_4d2a: Expected O, but got Unknown //IL_4df0: Unknown result type (might be due to invalid IL or missing references) //IL_4df7: Expected O, but got Unknown //IL_4e80: Unknown result type (might be due to invalid IL or missing references) //IL_4e87: Expected O, but got Unknown //IL_5064: Unknown result type (might be due to invalid IL or missing references) //IL_506b: Expected O, but got Unknown //IL_50d5: Unknown result type (might be due to invalid IL or missing references) //IL_50dc: Expected O, but got Unknown //IL_5257: Unknown result type (might be due to invalid IL or missing references) //IL_525e: Expected O, but got Unknown //IL_52c8: Unknown result type (might be due to invalid IL or missing references) //IL_52cf: Expected O, but got Unknown //IL_5439: Unknown result type (might be due to invalid IL or missing references) //IL_5440: Expected O, but got Unknown //IL_54aa: Unknown result type (might be due to invalid IL or missing references) //IL_54b1: Expected O, but got Unknown //IL_55c7: Unknown result type (might be due to invalid IL or missing references) //IL_55d1: Expected O, but got Unknown //IL_55d2: Unknown result type (might be due to invalid IL or missing references) //IL_55d9: Expected O, but got Unknown //IL_564e: Unknown result type (might be due to invalid IL or missing references) //IL_5655: Expected O, but got Unknown //IL_5690: Unknown result type (might be due to invalid IL or missing references) //IL_5697: Expected O, but got Unknown //IL_56eb: Unknown result type (might be due to invalid IL or missing references) //IL_56f2: Expected O, but got Unknown //IL_5708: Unknown result type (might be due to invalid IL or missing references) //IL_570f: Expected O, but got Unknown //IL_5742: Unknown result type (might be due to invalid IL or missing references) //IL_5749: Expected O, but got Unknown //IL_57c3: Unknown result type (might be due to invalid IL or missing references) //IL_57ca: Expected O, but got Unknown //IL_5849: Unknown result type (might be due to invalid IL or missing references) //IL_5850: Expected O, but got Unknown //IL_5876: Unknown result type (might be due to invalid IL or missing references) //IL_587d: Expected O, but got Unknown //IL_59a5: Unknown result type (might be due to invalid IL or missing references) //IL_59ac: Expected O, but got Unknown //IL_59f1: Unknown result type (might be due to invalid IL or missing references) //IL_59f8: Expected O, but got Unknown //IL_5a11: Unknown result type (might be due to invalid IL or missing references) //IL_5a18: Expected O, but got Unknown //IL_5a45: Unknown result type (might be due to invalid IL or missing references) //IL_5a4f: Expected O, but got Unknown //IL_5b3d: Unknown result type (might be due to invalid IL or missing references) //IL_5b44: Expected O, but got Unknown //IL_5b89: Unknown result type (might be due to invalid IL or missing references) //IL_5b90: Expected O, but got Unknown //IL_5ba9: Unknown result type (might be due to invalid IL or missing references) //IL_5bb0: Expected O, but got Unknown //IL_5bdd: Unknown result type (might be due to invalid IL or missing references) //IL_5be7: Expected O, but got Unknown //IL_5be8: Unknown result type (might be due to invalid IL or missing references) //IL_5bef: Expected O, but got Unknown //IL_5c09: Unknown result type (might be due to invalid IL or missing references) //IL_5c10: Expected O, but got Unknown //IL_5ca7: Unknown result type (might be due to invalid IL or missing references) //IL_5cae: Expected O, but got Unknown //IL_5d03: Unknown result type (might be due to invalid IL or missing references) //IL_5d0a: Expected O, but got Unknown //IL_5d17: Unknown result type (might be due to invalid IL or missing references) //IL_5d1e: Expected O, but got Unknown //IL_5da7: Unknown result type (might be due to invalid IL or missing references) //IL_5dae: Expected O, but got Unknown //IL_5e47: Unknown result type (might be due to invalid IL or missing references) //IL_5e4e: Expected O, but got Unknown //IL_5e90: Unknown result type (might be due to invalid IL or missing references) //IL_5e97: Expected O, but got Unknown //IL_5ec9: Unknown result type (might be due to invalid IL or missing references) //IL_5ed0: Expected O, but got Unknown //IL_5f12: Unknown result type (might be due to invalid IL or missing references) //IL_5f19: Expected O, but got Unknown //IL_5f4b: Unknown result type (might be due to invalid IL or missing references) //IL_5f52: Expected O, but got Unknown //IL_5f94: Unknown result type (might be due to invalid IL or missing references) //IL_5f9b: Expected O, but got Unknown //IL_5fcd: Unknown result type (might be due to invalid IL or missing references) //IL_5fd4: Expected O, but got Unknown //IL_605d: Unknown result type (might be due to invalid IL or missing references) //IL_6064: Expected O, but got Unknown //IL_6171: Unknown result type (might be due to invalid IL or missing references) //IL_6178: Expected O, but got Unknown //IL_6201: Unknown result type (might be due to invalid IL or missing references) //IL_6208: Expected O, but got Unknown //IL_6315: Unknown result type (might be due to invalid IL or missing references) //IL_631c: Expected O, but got Unknown //IL_63a4: Unknown result type (might be due to invalid IL or missing references) //IL_63ab: Expected O, but got Unknown //IL_64b8: Unknown result type (might be due to invalid IL or missing references) //IL_64bf: Expected O, but got Unknown //IL_64f7: Unknown result type (might be due to invalid IL or missing references) //IL_64fe: Expected O, but got Unknown //IL_6526: Unknown result type (might be due to invalid IL or missing references) //IL_652d: Expected O, but got Unknown //IL_6565: Unknown result type (might be due to invalid IL or missing references) //IL_656c: 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 = "roofCopy"; val11.PieceTable = PieceTables.Hammer; CustomPiece val12 = new CustomPiece("roofCopy", "wood_roof", val11); PieceManager.Instance.AddPiece(val12); PieceConfig val13 = new PieceConfig(); val13.Name = "infiniteWoodTorch"; val13.AddRequirement("Resin", 20, true); val13.AddRequirement("Wood", 2, true); PieceConfig val14 = new PieceConfig(); val14.Name = "infiniteIronTorch"; val14.AddRequirement("Resin", 20, true); val14.AddRequirement("Iron", 2, true); PieceConfig val15 = new PieceConfig(); val15.Name = "infiniteGuckTorch"; val15.AddRequirement("GreydwarfEye", 20, true); val15.AddRequirement("Iron", 2, true); PieceConfig val16 = new PieceConfig(); val16.Name = "infiniteEyeTorch"; val16.AddRequirement("Guck", 20, true); val16.AddRequirement("Iron", 2, true); CustomPiece val17 = new CustomPiece("InfiniteWoodTorch", "piece_groundtorch_wood", val13); val17.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(val17); CustomPiece val18 = new CustomPiece("InfiniteIronTorch", "piece_groundtorch", val14); val18.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(val18); CustomPiece val19 = new CustomPiece("InfiniteGuckTorch", "piece_groundtorch_green", val15); val19.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(val19); CustomPiece val20 = new CustomPiece("InfiniteEyeTorch", "piece_groundtorch_blue", val16); val20.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(val20); PieceConfig val21 = new PieceConfig(); val21.Name = "infiniteSconce"; val21.AddRequirement("Copper", 2, true); val21.AddRequirement("Wood", 2, true); val21.AddRequirement("Resin", 20, true); CustomPiece val22 = new CustomPiece("InfiniteSconce", "piece_walltorch", val21); val22.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(val22); Shader shader = ((Renderer)((Component)PieceManager.Instance.GetPiece("Smelter").PiecePrefab.transform.Find("New/default")).GetComponent()).material.shader; Shader shader2 = ((Component)PieceManager.Instance.GetPiece("Smelter").PiecePrefab.transform.Find("_enabled/smoke (1)")).GetComponent().material.shader; Shader shader3 = ((Component)PieceManager.Instance.GetPiece("Smelter").PiecePrefab.transform.Find("_enabled/flames (1)")).GetComponent().material.shader; Shader shader4 = ((Component)PieceManager.Instance.GetPiece("Smelter").PiecePrefab.transform.Find("_enabled/flare (1)")).GetComponent().material.shader; PieceConfig val23 = new PieceConfig(); val23.Name = "Supercharged Smelter"; val23.Description = "If heat is too slow to melt metals, try extreme cold!"; val23.AddRequirement("Stone", 20, true); val23.AddRequirement("SurtlingCore", 5, true); val23.AddRequirement("TrophyCultist_Hildir", 1, true); val23.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(new CustomPiece(newHaldorAssetBundle, "SuperchargedSmelter", false, val23)); ((Renderer)((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("New/default")).GetComponent()).material.shader = shader; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/smoke (1)")).GetComponent().material.shader = shader2; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flames")).GetComponent().material.shader = shader3; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flames (1)")).GetComponent().material.shader = shader3; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flames (2)")).GetComponent().material.shader = shader3; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/SmokeSpawner")).GetComponent().m_smokePrefab = ((Component)PieceManager.Instance.GetPiece("Smelter").PiecePrefab.transform.Find("_enabled/SmokeSpawner")).GetComponent().m_smokePrefab; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flare (1)")).GetComponent().material.shader = shader4; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flare (2)")).GetComponent().material.shader = shader4; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flare (3)")).GetComponent().material.shader = shader4; ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("_enabled/flare")).GetComponent().material.shader = shader4; PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.GetComponent().m_produceEffects.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("Smelter").PiecePrefab.GetComponent().m_produceEffects.m_effectPrefabs[0]; PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.GetComponent().m_fuelAddedEffects.m_effectPrefabs[1] = PieceManager.Instance.GetPiece("Smelter").PiecePrefab.GetComponent().m_fuelAddedEffects.m_effectPrefabs[1]; PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.GetComponent().m_oreAddedEffects.m_effectPrefabs[1] = PieceManager.Instance.GetPiece("Smelter").PiecePrefab.GetComponent().m_oreAddedEffects.m_effectPrefabs[1]; PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("Smelter").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs[0]; PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("Smelter").PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs[0]; MeshRenderer[] componentsInChildren = ((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("smelter_Destruction")).GetComponentsInChildren(); MeshRenderer[] array = componentsInChildren; foreach (MeshRenderer val24 in array) { ((Renderer)val24).material.shader = shader; } PieceConfig val25 = new PieceConfig(); val25.PieceTable = PieceTables.Hammer; val25.Name = "Turbo Cart"; val25.AddRequirement("Wood", 20, true); val25.AddRequirement("BronzeNails", 10, true); val25.AddRequirement("TrophyGoblinBruteBrosShaman", 1, true); val25.AddRequirement("TrophyGoblinBruteBrosBrute", 1, true); PieceManager.Instance.AddPiece(new CustomPiece(newHaldorAssetBundle, "TurboCart", false, val25)); ((Renderer)((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("Vagon/new/default")).GetComponent()).material.shader = shader; ((Renderer)((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("Wheel1/default")).GetComponent()).material.shader = shader; ((Renderer)((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("Wheel2/default")).GetComponent()).material.shader = shader; ((Renderer)((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("Vagon/worn/default")).GetComponent()).material.shader = shader; ((Renderer)((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("Vagon/broken/default")).GetComponent()).material.shader = shader; PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("cartCopy").PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs[0]; PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("cartCopy").PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs[0]; PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.GetComponent().m_switchEffect.m_effectPrefabs[0] = PieceManager.Instance.GetPiece("cartCopy").PiecePrefab.GetComponent().m_switchEffect.m_effectPrefabs[0]; PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("cartCopy").PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs; MeshRenderer[] componentsInChildren2 = ((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("cart_Destruction")).GetComponentsInChildren(); MeshRenderer[] array2 = componentsInChildren2; foreach (MeshRenderer val26 in array2) { ((Renderer)val26).material.shader = shader; } PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("cartCopy").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs; componentsInChildren2 = ((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("load")).GetComponentsInChildren(); MeshRenderer[] array3 = componentsInChildren2; foreach (MeshRenderer val27 in array3) { ((Renderer)val27).material.shader = shader; } PieceConfig val28 = new PieceConfig(); val28.PieceTable = PieceTables.Hammer; val28.Category = PieceCategories.HeavyBuild; CustomPiece val29 = new CustomPiece(newHaldorAssetBundle, "wood_roof_grass", true, val28); ((Renderer)((Component)val29.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val29.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val29.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; ((Renderer)((Component)val29.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val29.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val29.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; ((Renderer)((Component)val29.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val29.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; val29.PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs; val29.PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs; val29.PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs; GameObject[] combinedGameOjects = ((Component)val29.PiecePrefab.transform.Find("New/high")).GetComponent().combinedGameOjects; foreach (GameObject val30 in combinedGameOjects) { ((Renderer)val30.GetComponent()).materials[0].shader = shader; } GameObject[] combinedGameOjects2 = ((Component)val29.PiecePrefab.transform.Find("Worn/high")).GetComponent().combinedGameOjects; foreach (GameObject val31 in combinedGameOjects2) { ((Renderer)val31.GetComponent()).materials[0].shader = shader; } GameObject[] combinedGameOjects3 = ((Component)val29.PiecePrefab.transform.Find("Broken/high")).GetComponent().combinedGameOjects; foreach (GameObject val32 in combinedGameOjects3) { ((Renderer)val32.GetComponent()).materials[0].shader = shader; } val29.Piece.m_name = "Grass Roof 26°"; val29.Piece.m_description = "Keeps you cool in heat and warm in cold. +1 comfort."; val29.Piece.m_comfortGroup = (ComfortGroup)7; PieceManager.Instance.AddPiece(val29); PieceConfig val33 = new PieceConfig(); val33.PieceTable = PieceTables.Hammer; val33.Category = PieceCategories.HeavyBuild; CustomPiece val34 = new CustomPiece(newHaldorAssetBundle, "wood_roof_45_grass", true, val33); ((Renderer)((Component)val34.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val34.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val34.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; ((Renderer)((Component)val34.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val34.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val34.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; ((Renderer)((Component)val34.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val29.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; val34.PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs; val34.PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs; val34.PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs; GameObject[] combinedGameOjects4 = ((Component)val34.PiecePrefab.transform.Find("New/high")).GetComponent().combinedGameOjects; foreach (GameObject val35 in combinedGameOjects4) { ((Renderer)val35.GetComponent()).materials[0].shader = shader; } GameObject[] combinedGameOjects5 = ((Component)val34.PiecePrefab.transform.Find("Worn/high")).GetComponent().combinedGameOjects; foreach (GameObject val36 in combinedGameOjects5) { ((Renderer)val36.GetComponent()).materials[0].shader = shader; } GameObject[] combinedGameOjects6 = ((Component)val34.PiecePrefab.transform.Find("Broken/high")).GetComponent().combinedGameOjects; foreach (GameObject val37 in combinedGameOjects6) { ((Renderer)val37.GetComponent()).materials[0].shader = shader; } val34.Piece.m_name = "Grass Roof 45°"; val34.Piece.m_description = "Keeps you cool in heat and warm in cold. +1 comfort."; val34.Piece.m_comfortGroup = (ComfortGroup)7; PieceManager.Instance.AddPiece(val34); PieceConfig val38 = new PieceConfig(); val38.PieceTable = PieceTables.Hammer; val38.Category = PieceCategories.HeavyBuild; CustomPiece val39 = new CustomPiece(newHaldorAssetBundle, "wood_roof_icorner_45_grass", true, val38); ((Renderer)((Component)val39.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val39.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val39.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; ((Renderer)((Component)val39.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[3].shader = shader; ((Renderer)((Component)val39.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val39.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val39.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; ((Renderer)((Component)val39.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[3].shader = shader; ((Renderer)((Component)val39.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val39.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val39.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; val39.PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs; val39.PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs; val39.PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs; GameObject[] combinedGameOjects7 = ((Component)val39.PiecePrefab.transform.Find("New/high")).GetComponent().combinedGameOjects; foreach (GameObject val40 in combinedGameOjects7) { ((Renderer)val40.GetComponent()).materials[0].shader = shader; } GameObject[] combinedGameOjects8 = ((Component)val39.PiecePrefab.transform.Find("Worn/high")).GetComponent().combinedGameOjects; foreach (GameObject val41 in combinedGameOjects8) { ((Renderer)val41.GetComponent()).materials[0].shader = shader; } GameObject[] combinedGameOjects9 = ((Component)val39.PiecePrefab.transform.Find("Broken/high")).GetComponent().combinedGameOjects; foreach (GameObject val42 in combinedGameOjects9) { ((Renderer)val42.GetComponent()).materials[0].shader = shader; } val39.Piece.m_name = "Grass Roof Interior Corner 45°"; val39.Piece.m_description = "Keeps you cool in heat and warm in cold. +1 comfort."; val39.Piece.m_comfortGroup = (ComfortGroup)7; PieceManager.Instance.AddPiece(val39); PieceConfig val43 = new PieceConfig(); val43.PieceTable = PieceTables.Hammer; val43.Category = PieceCategories.HeavyBuild; CustomPiece val44 = new CustomPiece(newHaldorAssetBundle, "wood_roof_icorner_grass", true, val43); ((Renderer)((Component)val44.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val44.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val44.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; ((Renderer)((Component)val44.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[3].shader = shader; ((Renderer)((Component)val44.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val44.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val44.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; ((Renderer)((Component)val44.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[3].shader = shader; ((Renderer)((Component)val44.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val44.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val44.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; val44.PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs; val44.PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs; val44.PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs; GameObject[] combinedGameOjects10 = ((Component)val44.PiecePrefab.transform.Find("New/high")).GetComponent().combinedGameOjects; foreach (GameObject val45 in combinedGameOjects10) { ((Renderer)val45.GetComponent()).materials[0].shader = shader; } GameObject[] combinedGameOjects11 = ((Component)val44.PiecePrefab.transform.Find("Worn/high")).GetComponent().combinedGameOjects; foreach (GameObject val46 in combinedGameOjects11) { ((Renderer)val46.GetComponent()).materials[0].shader = shader; } GameObject[] combinedGameOjects12 = ((Component)val44.PiecePrefab.transform.Find("Broken/high")).GetComponent().combinedGameOjects; foreach (GameObject val47 in combinedGameOjects12) { ((Renderer)val47.GetComponent()).materials[0].shader = shader; } val44.Piece.m_name = "Grass Roof Interior Corner 26°"; val44.Piece.m_description = "Keeps you cool in heat and warm in cold. +1 comfort."; val44.Piece.m_comfortGroup = (ComfortGroup)7; PieceManager.Instance.AddPiece(val44); PieceConfig val48 = new PieceConfig(); val48.PieceTable = PieceTables.Hammer; val48.Category = PieceCategories.HeavyBuild; CustomPiece val49 = new CustomPiece(newHaldorAssetBundle, "wood_roof_ocorner_45_grass", true, val48); ((Renderer)((Component)val49.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val49.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val49.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; ((Renderer)((Component)val49.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[3].shader = shader; ((Renderer)((Component)val49.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val49.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val49.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; ((Renderer)((Component)val49.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[3].shader = shader; ((Renderer)((Component)val49.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val49.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val49.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; val49.PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs; val49.PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs; val49.PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs; GameObject[] combinedGameOjects13 = ((Component)val49.PiecePrefab.transform.Find("New/high")).GetComponent().combinedGameOjects; foreach (GameObject val50 in combinedGameOjects13) { ((Renderer)val50.GetComponent()).materials[0].shader = shader; } GameObject[] combinedGameOjects14 = ((Component)val49.PiecePrefab.transform.Find("Worn/high")).GetComponent().combinedGameOjects; foreach (GameObject val51 in combinedGameOjects14) { ((Renderer)val51.GetComponent()).materials[0].shader = shader; } GameObject[] combinedGameOjects15 = ((Component)val49.PiecePrefab.transform.Find("Broken/high")).GetComponent().combinedGameOjects; foreach (GameObject val52 in combinedGameOjects15) { ((Renderer)val52.GetComponent()).materials[0].shader = shader; } val49.Piece.m_name = "Grass Roof Outside Corner 45°"; val49.Piece.m_description = "Keeps you cool in heat and warm in cold. +1 comfort."; val49.Piece.m_comfortGroup = (ComfortGroup)7; PieceManager.Instance.AddPiece(val49); PieceConfig val53 = new PieceConfig(); val53.PieceTable = PieceTables.Hammer; val53.Category = PieceCategories.HeavyBuild; CustomPiece val54 = new CustomPiece(newHaldorAssetBundle, "wood_roof_ocorner_grass", true, val53); ((Renderer)((Component)val54.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val54.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val54.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; ((Renderer)((Component)val54.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[3].shader = shader; ((Renderer)((Component)val54.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val54.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val54.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; ((Renderer)((Component)val54.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[3].shader = shader; ((Renderer)((Component)val54.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val54.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val54.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; val54.PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs; val54.PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs; val54.PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs; GameObject[] combinedGameOjects16 = ((Component)val54.PiecePrefab.transform.Find("New/high")).GetComponent().combinedGameOjects; foreach (GameObject val55 in combinedGameOjects16) { ((Renderer)val55.GetComponent()).materials[0].shader = shader; } GameObject[] combinedGameOjects17 = ((Component)val54.PiecePrefab.transform.Find("Worn/high")).GetComponent().combinedGameOjects; foreach (GameObject val56 in combinedGameOjects17) { ((Renderer)val56.GetComponent()).materials[0].shader = shader; } GameObject[] combinedGameOjects18 = ((Component)val54.PiecePrefab.transform.Find("Broken/high")).GetComponent().combinedGameOjects; foreach (GameObject val57 in combinedGameOjects18) { ((Renderer)val57.GetComponent()).materials[0].shader = shader; } val54.Piece.m_name = "Grass Roof Outside Corner 26°"; val54.Piece.m_description = "Keeps you cool in heat and warm in cold. +1 comfort."; val54.Piece.m_comfortGroup = (ComfortGroup)7; PieceManager.Instance.AddPiece(val54); PieceConfig val58 = new PieceConfig(); val58.PieceTable = PieceTables.Hammer; val58.Category = PieceCategories.HeavyBuild; CustomPiece val59 = new CustomPiece(newHaldorAssetBundle, "wood_roof_top_45_grass", true, val58); ((Renderer)((Component)val59.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val59.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val59.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; ((Renderer)((Component)val59.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val59.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val59.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; ((Renderer)((Component)val59.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val59.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; val59.PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs; val59.PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs; val59.PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs; GameObject[] combinedGameOjects19 = ((Component)val59.PiecePrefab.transform.Find("New/high")).GetComponent().combinedGameOjects; foreach (GameObject val60 in combinedGameOjects19) { ((Renderer)val60.GetComponent()).materials[0].shader = shader; } GameObject[] combinedGameOjects20 = ((Component)val59.PiecePrefab.transform.Find("Worn/high")).GetComponent().combinedGameOjects; foreach (GameObject val61 in combinedGameOjects20) { ((Renderer)val61.GetComponent()).materials[0].shader = shader; } GameObject[] combinedGameOjects21 = ((Component)val59.PiecePrefab.transform.Find("Broken/high")).GetComponent().combinedGameOjects; foreach (GameObject val62 in combinedGameOjects21) { ((Renderer)val62.GetComponent()).materials[0].shader = shader; } val59.Piece.m_name = "Grass Roof Top 45°"; val59.Piece.m_description = "Keeps you cool in heat and warm in cold. +1 comfort."; val59.Piece.m_comfortGroup = (ComfortGroup)7; PieceManager.Instance.AddPiece(val59); PieceConfig val63 = new PieceConfig(); val63.PieceTable = PieceTables.Hammer; val63.Category = PieceCategories.HeavyBuild; CustomPiece val64 = new CustomPiece(newHaldorAssetBundle, "wood_roof_top_grass", true, val63); ((Renderer)((Component)val64.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val64.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val64.PiecePrefab.transform.Find("New/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; ((Renderer)((Component)val64.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val64.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; ((Renderer)((Component)val64.PiecePrefab.transform.Find("Worn/_Combined Mesh [high]")).GetComponent()).materials[2].shader = shader; ((Renderer)((Component)val64.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[0].shader = shader; ((Renderer)((Component)val64.PiecePrefab.transform.Find("Broken/_Combined Mesh [high]")).GetComponent()).materials[1].shader = shader; val64.PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_destroyedEffect.m_effectPrefabs; val64.PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_hitEffect.m_effectPrefabs; val64.PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("roofCopy").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs; GameObject[] combinedGameOjects22 = ((Component)val64.PiecePrefab.transform.Find("New/high")).GetComponent().combinedGameOjects; foreach (GameObject val65 in combinedGameOjects22) { ((Renderer)val65.GetComponent()).materials[0].shader = shader; } GameObject[] combinedGameOjects23 = ((Component)val64.PiecePrefab.transform.Find("Worn/high")).GetComponent().combinedGameOjects; foreach (GameObject val66 in combinedGameOjects23) { ((Renderer)val66.GetComponent()).materials[0].shader = shader; } GameObject[] combinedGameOjects24 = ((Component)val64.PiecePrefab.transform.Find("Broken/high")).GetComponent().combinedGameOjects; foreach (GameObject val67 in combinedGameOjects24) { ((Renderer)val67.GetComponent()).materials[0].shader = shader; } val64.Piece.m_name = "Grass Roof Top 26°"; val64.Piece.m_description = "Keeps you cool in heat and warm in cold. +1 comfort."; val64.Piece.m_comfortGroup = (ComfortGroup)7; PieceManager.Instance.AddPiece(val64); ItemConfig val68 = new ItemConfig(); val68.Name = "Bone Crossbow"; val68.Description = "Withered bones waster."; val68.CraftingStation = CraftingStations.Forge; val68.AddRequirement("RoundLog", 15, 5); val68.AddRequirement("Iron", 5, 2); val68.AddRequirement("Root", 1, 1); val68.AddRequirement("BoneFragments", 5, 5); val68.RepairStation = CraftingStations.Forge; CustomItem val69 = new CustomItem("BoneCrossbow", "CrossbowArbalest", val68); val69.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 150f; val69.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 5f; val69.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("BoneCrossbow"); ItemManager.Instance.AddItem(val69); ItemConfig val70 = new ItemConfig(); val70.Name = "Withered Bone Bolt"; val70.Description = "More frail than it's standard bone counterpart, but much less expensive."; val70.CraftingStation = CraftingStations.Forge; val70.AddRequirement("WitheredBone", 4, 0); val70.Amount = 20; CustomItem val71 = new CustomItem("WitheredBoneBolt", "BoltBone", val70); val71.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 16f; ItemManager.Instance.AddItem(val71); ItemConfig val72 = new ItemConfig(); val72.Name = "Wooden Crossbow"; val72.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."; val72.CraftingStation = CraftingStations.Workbench; val72.AddRequirement("Wood", 15, 5); val72.AddRequirement("LeatherScraps", 5, 2); val72.AddRequirement("Resin", 6, 3); val72.RepairStation = CraftingStations.Workbench; CustomItem val73 = new CustomItem("WoodenCrossbow", "CrossbowArbalest", val72); val73.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 55f; val73.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 5f; val73.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("WoodenCrossbow"); ItemManager.Instance.AddItem(val73); ItemConfig val74 = new ItemConfig(); val74.Name = "Antler Bolt"; val74.Description = "It is really worth the time to summon and destroy Eikthyr over and over again?"; val74.CraftingStation = CraftingStations.Workbench; val74.AddRequirement("HardAntler", 3, 0); val74.Amount = 20; CustomItem val75 = new CustomItem("AntlerBolt", "BoltBone", val74); val75.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 42f; ItemManager.Instance.AddItem(val75); ItemConfig val76 = new ItemConfig(); val76.Name = "Majestic Carapace Bolt"; val76.Description = "Sturdiest. Bolt. Ever."; val76.CraftingStation = CraftingStations.BlackForge; val76.AddRequirement("QueenDrop", 1, 0); val76.Amount = 20; CustomItem val77 = new CustomItem("CarapaceBolt", "BoltCarapace", val76); val77.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 112f; val77.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("carapacebolt"); ItemManager.Instance.AddItem(val77); ItemConfig val78 = new ItemConfig(); val78.Name = "Apprentice Hood"; val78.Description = "Makes you look like a real mage"; val78.CraftingStation = CraftingStations.Workbench; val78.Icon = newHaldorAssetBundle.LoadAsset("ApprenticeHoodIcon"); val78.AddRequirement("DeerHide", 4, 2); val78.AddRequirement("TrollHide", 5, 3); val78.AddRequirement("TrophyGreydwarfBrute", 1, 0); CustomItem val79 = new CustomItem("ApprenticeHood", "HelmetTrollLeather", val78); Material material = ((Renderer)((Component)val79.ItemDrop).GetComponentInChildren()).material; material.color = new Color(0.3550981f, 0f, 0.5450981f, 1f); GameObject gameObject = ((Component)((Component)val79.ItemDrop).gameObject.transform.Find("attach_skin/hood")).gameObject; material = ((Renderer)gameObject.GetComponentInChildren()).material; material.color = new Color(0.3550981f, 0f, 0.5450981f, 1f); val79.ItemDrop.m_itemData.m_shared.m_setName = "Apprentice Hood"; val79.ItemDrop.m_itemData.m_shared.m_setStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset("SetEffect_Apprentice"); val79.ItemDrop.m_itemData.m_shared.m_setSize = 3; val79.ItemDrop.m_itemData.m_shared.m_eitrRegenModifier = 0.1f; ItemManager.Instance.AddItem(val79); ItemConfig val80 = new ItemConfig(); val80.Name = "Apprentice Robe"; val80.Description = "Fancy."; val80.CraftingStation = CraftingStations.Workbench; val80.Icon = newHaldorAssetBundle.LoadAsset("ApprenticeRobeIcon"); val80.AddRequirement("DeerHide", 8, 4); val80.AddRequirement("TrollHide", 10, 5); val80.AddRequirement("TrophyGreydwarfShaman", 2, 1); CustomItem val81 = new CustomItem(newHaldorAssetBundle, "ApprenticeChest", false, val80); ((Renderer)((Component)((Component)val81.ItemDrop).transform.Find("attach_skin/shorts")).GetComponent()).materials[0].shader = CustomPlayer; val81.ItemDrop.m_itemData.m_shared.m_eitrRegenModifier = 0.2f; ItemManager.Instance.AddItem(val81); ItemConfig val82 = new ItemConfig(); val82.Name = "Apprentice Leggings"; val82.Description = "Not made of spandex."; val82.CraftingStation = CraftingStations.Workbench; val82.Icon = newHaldorAssetBundle.LoadAsset("ApprenticeLegsIcon"); val82.AddRequirement("DeerHide", 8, 4); val82.AddRequirement("TrollHide", 10, 5); val82.AddRequirement("TrophyGreydwarf", 2, 1); CustomItem val83 = new CustomItem(newHaldorAssetBundle, "ApprenticeLegs", false, val82); val83.ItemDrop.m_itemData.m_shared.m_eitrRegenModifier = 0.2f; ItemManager.Instance.AddItem(val83); ItemConfig val84 = new ItemConfig(); val84.Name = "Chef Hat"; val84.Description = "Bork! Bork! Bork! \n ~Sweedish Chef - The Muppets"; val84.CraftingStation = CraftingStations.Workbench; val84.AddRequirement("DeerHide", 100, 0); val84.AddRequirement("LeatherScraps", 200, 0); val84.AddRequirement("TrophySkeletonHildir", 1, 0); CustomItem val85 = new CustomItem("ChefHat", "HelmetTrollLeather", val84); val85.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset("SetEffect_ChefHat"); val85.ItemDrop.m_itemData.m_shared.m_subtitle = "Doubles your chance to cook a bonus item!"; material = ((Renderer)((Component)val85.ItemDrop).GetComponentInChildren()).material; material.color = Color.white; gameObject = ((Component)((Component)val85.ItemDrop).gameObject.transform.Find("attach_skin/hood")).gameObject; material = ((Renderer)gameObject.GetComponentInChildren()).material; material.color = Color.white; val85.ItemDrop.m_itemData.m_shared.m_setStatusEffect = null; val85.ItemDrop.m_itemData.m_shared.m_setName = ""; val85.ItemDrop.m_itemData.m_shared.m_setSize = 0; val85.ItemDrop.m_itemData.m_shared.m_icons[0] = ((StatusEffect)newHaldorAssetBundle.LoadAsset("SetEffect_ChefHat")).m_icon; ItemManager.Instance.AddItem(val85); ItemConfig val86 = new ItemConfig(); val86.Name = "Mining Hat"; val86.Description = "I am a dwarf and I'm digging a hole! Diggy diggy hole! Diggy diggy hole!"; CustomItem val87 = new CustomItem("MiningHat", "HelmetDverger", val86); val87.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset("SetEffect_MiningHat"); ItemManager.Instance.AddItem(val87); ItemConfig val88 = new ItemConfig(); val88.AddRequirement("DeerHide", 8, 0); val88.AddRequirement("LeatherScraps", 10, 0); val88.AddRequirement("TrophyWraith", 1, 0); val88.AddRequirement("Raspberry", 5, 0); val88.AddRequirement("Mushroom", 5, 0); val88.AddRequirement("Dandelion", 5, 0); val88.AddRequirement("Blueberries", 5, 0); val88.AddRequirement("Thistle", 5, 0); val88.AddRequirement("BjornPaw", 1, 0); val88.Name = "Gloves"; val88.Description = "With this wraith trophy's essence you can infuse these gloves with reaping abilities! Simply walk nearby gatherables to reap them."; CustomItem val89 = new CustomItem("GatheringGloves", "TrinketBlackDamageHealth", val88); val89.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset("SetEffect_GathererGloves"); val89.ItemDrop.m_itemData.m_shared.m_subtitle = ""; val89.ItemDrop.m_itemData.m_shared.m_icons[0] = val89.ItemDrop.m_itemData.m_shared.m_equipStatusEffect.m_icon; val89.ItemDrop.m_itemData.m_shared.m_description = "Gathering has never been easier!"; val89.ItemDrop.m_itemData.m_shared.m_blockAdrenaline = 0f; val89.ItemDrop.m_itemData.m_shared.m_fullAdrenalineSE = null; val89.ItemDrop.m_itemData.m_shared.m_maxAdrenaline = 0f; val89.ItemDrop.m_itemData.m_shared.m_perfectBlockAdrenaline = 0f; ItemManager.Instance.AddItem(val89); ItemConfig val90 = new ItemConfig(); val90.CraftingStation = CraftingStations.Cauldron; val90.Name = "Meatloaf"; val90.Description = "Meatloaf.... it sustains you. It's like........ oatmeal."; val90.Icon = foodsAssetBundle.LoadAsset("meatloaficonreal"); val90.AddRequirement("BjornMeat", 3, 0); val90.AddRequirement("RawMeat", 1, 0); val90.AddRequirement("DeerMeat", 1, 0); val90.AddRequirement("Carrot", 1, 0); val90.Amount = 3; CustomItem val91 = new CustomItem("Meatloaf", "BloodPudding", val90); val91.ItemDrop.m_itemData.m_shared.m_food = 50f; val91.ItemDrop.m_itemData.m_shared.m_foodStamina = 45f; val91.ItemDrop.m_itemData.m_shared.m_foodRegen = 3f; ItemManager.Instance.AddItem(val91); ItemConfig val92 = new ItemConfig(); val92.CraftingStation = CraftingStations.Cauldron; val92.Name = "Dandelion Salad"; val92.Description = "Dandelion salad. Yummy yummy."; val92.Icon = foodsAssetBundle.LoadAsset("dandelionsalad"); val92.AddRequirement("Dandelion", 3, 0); val92.AddRequirement("BeechSeeds", 2, 0); val92.AddRequirement("Mushroom", 1, 0); val92.Amount = 2; CustomItem val93 = new CustomItem("DandelionSalad", "Salad", val92); val93.ItemDrop.m_itemData.m_shared.m_food = 13f; val93.ItemDrop.m_itemData.m_shared.m_foodStamina = 40f; val93.ItemDrop.m_itemData.m_shared.m_foodRegen = 2f; ItemManager.Instance.AddItem(val93); ItemConfig val94 = new ItemConfig(); val94.CraftingStation = CraftingStations.Cauldron; val94.Name = "EitrJam"; val94.Description = "Surely there are magical energies to be drawn from these ingredients... Because taste sure isn't."; val94.Icon = foodsAssetBundle.LoadAsset("eitrjam"); val94.AddRequirement("Pukeberries", 6, 0); val94.AddRequirement("MushroomYellow", 2, 0); val94.AddRequirement("AncientSeed", 1, 0); val94.Amount = 2; CustomItem val95 = new CustomItem("EitrJam", "QueensJam", val94); val95.ItemDrop.m_itemData.m_shared.m_food = 20f; val95.ItemDrop.m_itemData.m_shared.m_foodStamina = 20f; val95.ItemDrop.m_itemData.m_shared.m_foodRegen = 2f; val95.ItemDrop.m_itemData.m_shared.m_foodEitr = 31f; ItemManager.Instance.AddItem(val95); ItemConfig val96 = new ItemConfig(); val96.Name = "Goulash"; val96.Description = "Actually it's like gibelotte. Nobody knows what it is, but as least it's got turninp in it."; val96.CraftingStation = CraftingStations.Cauldron; val96.Icon = newHaldorAssetBundle.LoadAsset("GoulashIcon"); val96.AddRequirement("Turnip", 3, 0); val96.AddRequirement("Guck", 2, 0); val96.AddRequirement("Ooze", 2, 0); val96.Amount = 2; CustomItem val97 = new CustomItem("Goulash", "TurnipStew", val96); val97.ItemDrop.m_itemData.m_shared.m_food = 10f; val97.ItemDrop.m_itemData.m_shared.m_foodStamina = 35f; val97.ItemDrop.m_itemData.m_shared.m_foodRegen = 2f; val97.ItemDrop.m_itemData.m_shared.m_foodEitr = 40f; ItemManager.Instance.AddItem(val97); ItemConfig val98 = new ItemConfig(); val98.Name = "Magic Sausage"; val98.Description = "It's long and hard... and blue?"; val98.CraftingStation = CraftingStations.Cauldron; val98.Icon = newHaldorAssetBundle.LoadAsset("MagicSausageIcon"); val98.AddRequirement("Entrails", 4, 0); val98.AddRequirement("WolfMeat", 1, 0); val98.AddRequirement("Crystal", 1, 0); val98.Amount = 2; CustomItem val99 = new CustomItem("MagicSausage", "Sausages", val98); val99.ItemDrop.m_itemData.m_shared.m_food = 45f; val99.ItemDrop.m_itemData.m_shared.m_foodStamina = 15f; val99.ItemDrop.m_itemData.m_shared.m_foodRegen = 3f; val99.ItemDrop.m_itemData.m_shared.m_foodEitr = 50f; ItemManager.Instance.AddItem(val99); ItemConfig val100 = new ItemConfig(); val100.Name = "Empty Bucket"; val100.Description = "Go swim to fill it up. Or you can try and see if any creature is willing to part with its milk."; val100.CraftingStation = CraftingStations.Workbench; val100.Icon = newHaldorAssetBundle.LoadAsset("BucketIcon"); val100.AddRequirement("Wood", 5, 0); val100.AddRequirement("BarrelRings", 2, 0); CustomItem val101 = new CustomItem("EmptyWaterBucket", "Wood", val100); ((Component)((Component)val101.ItemDrop).gameObject.transform.Find("log (1)")).GetComponent().mesh = newHaldorAssetBundle.LoadAsset("EmptyBucket").GetComponent().mesh; ((Renderer)((Component)((Component)val101.ItemDrop).gameObject.transform.Find("log (1)")).GetComponent()).material = ((Renderer)newHaldorAssetBundle.LoadAsset("EmptyBucket").GetComponent()).material; ItemManager.Instance.AddItem(val101); ItemConfig val102 = new ItemConfig(); val102.Name = "Water Bucket"; val102.Description = "Did you steal it from Lolrus?"; val102.CraftingStation = CraftingStations.None; val102.Icon = newHaldorAssetBundle.LoadAsset("FilledBucketIcon"); CustomItem val103 = new CustomItem("WaterBucket", "EmptyWaterBucket", val102); ((Component)((Component)val103.ItemDrop).gameObject.transform.Find("log (1)")).GetComponent().mesh = newHaldorAssetBundle.LoadAsset("Bucket").GetComponent().mesh; ((Renderer)((Component)((Component)val103.ItemDrop).gameObject.transform.Find("log (1)")).GetComponent()).material = ((Renderer)newHaldorAssetBundle.LoadAsset("Bucket").GetComponent()).material; ItemManager.Instance.AddItem(val103); ItemConfig val104 = new ItemConfig(); val104.Name = "Salt"; val104.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."; val104.CraftingStation = CraftingStations.Cauldron; val104.Icon = newHaldorAssetBundle.LoadAsset("SaltIcon"); val104.AddRequirement("WaterBucket", 1, 0); val104.Amount = 5; CustomItem val105 = new CustomItem("Salt", "SpiceMountains", val104); ItemManager.Instance.AddItem(val105); ItemConfig val106 = new ItemConfig(); val106.Name = "Turnip Fries"; val106.Description = "Next best thing to potato fries, and sweet potato fries, and..."; val106.CraftingStation = CraftingStations.Cauldron; val106.Icon = newHaldorAssetBundle.LoadAsset("TurnipFriesIcon"); val106.AddRequirement("Turnip", 3, 0); val106.AddRequirement("Salt", 1, 0); CustomItem val107 = new CustomItem("TurnipFries", "BoarJerky", val106); val107.ItemDrop.m_itemData.m_shared.m_food = 15f; val107.ItemDrop.m_itemData.m_shared.m_foodStamina = 45f; val107.ItemDrop.m_itemData.m_shared.m_foodRegen = 3f; val107.ItemDrop.m_itemData.m_shared.m_foodEitr = 50f; ItemManager.Instance.AddItem(val107); ItemConfig val108 = new ItemConfig(); val108.Name = "Milk Bucket"; val108.Description = "Unpasteurized, not fit for raw consumption. But it could make a great cheese!"; val108.CraftingStation = CraftingStations.None; val108.Icon = newHaldorAssetBundle.LoadAsset("MilkBucketIcon"); CustomItem val109 = new CustomItem("MilkBucket", "EmptyWaterBucket", val108); ItemManager.Instance.AddItem(val109); ItemConfig val110 = new ItemConfig(); val110.Name = "Cheese Curd"; val110.Description = "Needs to be salted."; val110.CraftingStation = CraftingStations.None; val110.Icon = newHaldorAssetBundle.LoadAsset("CheeseCurdIcon"); CustomItem val111 = new CustomItem("CheeseCurd", "Cloudberry", val110); val111.ItemDrop.m_itemData.m_shared.m_itemType = (ItemType)1; ItemManager.Instance.AddItem(val111); ItemConfig val112 = new ItemConfig(); val112.Name = "Salted Cheese Curd"; val112.Description = "Can be further fermented or used as is."; val112.CraftingStation = CraftingStations.FoodPreparationTable; val112.Icon = newHaldorAssetBundle.LoadAsset("CheeseCurdIcon"); val112.AddRequirement("CheeseCurd", 1, 0); val112.AddRequirement("Salt", 1, 0); CustomItem val113 = new CustomItem("SaltedCheeseCurd", "Cloudberry", val112); val113.ItemDrop.m_itemData.m_shared.m_itemType = (ItemType)1; ItemManager.Instance.AddItem(val113); ItemConfig val114 = new ItemConfig(); val114.Name = "Cheese"; val114.Description = "Excellent source of organic calcium!"; val114.CraftingStation = CraftingStations.None; val114.Icon = newHaldorAssetBundle.LoadAsset("CheeseIcon"); CustomItem val115 = new CustomItem("Cheese", "BreadDough", val114); val115.ItemDrop.m_itemData.m_shared.m_food = 50f; val115.ItemDrop.m_itemData.m_shared.m_foodStamina = 50f; val115.ItemDrop.m_itemData.m_shared.m_foodRegen = 3f; val115.ItemDrop.m_itemData.m_shared.m_itemType = (ItemType)2; val115.ItemDrop.m_itemData.m_shared.m_appendToolTip = null; ItemManager.Instance.AddItem(val115); ItemConfig val116 = new ItemConfig(); val116.Name = "Gravy"; val116.Description = "So much better than the deer gravy you used to make hastily while in the black forest."; val116.CraftingStation = CraftingStations.Cauldron; val116.Icon = newHaldorAssetBundle.LoadAsset("GravyIcon"); val116.AddRequirement("BoneFragments", 5, 0); val116.AddRequirement("CookedLoxMeat", 1, 0); val116.AddRequirement("CookedMeat", 1, 0); val116.AddRequirement("Broth", 1, 0); val116.AddRequirement("BarleyFlour", 1, 0); CustomItem val117 = new CustomItem("Gravy", "MeadBugRepellent", val116); val117.ItemDrop.m_itemData.m_shared.m_itemType = (ItemType)1; val117.ItemDrop.m_itemData.m_shared.m_consumeStatusEffect = null; ItemManager.Instance.AddItem(val117); ItemConfig val118 = new ItemConfig(); val118.Name = "Poutine"; val118.Description = "Best food in the Universe."; val118.CraftingStation = CraftingStations.FoodPreparationTable; val118.Icon = newHaldorAssetBundle.LoadAsset("PoutineIcon"); val118.AddRequirement("TurnipFries", 1, 0); val118.AddRequirement("SaltedCheeseCurd", 1, 0); val118.AddRequirement("Gravy", 1, 0); CustomItem val119 = new CustomItem("Poutine", "DeerStew", val118); val119.ItemDrop.m_itemData.m_shared.m_food = 70f; val119.ItemDrop.m_itemData.m_shared.m_foodStamina = 70f; val119.ItemDrop.m_itemData.m_shared.m_foodEitr = 70f; val119.ItemDrop.m_itemData.m_shared.m_foodRegen = 5f; ItemManager.Instance.AddItem(val119); ItemConfig val120 = new ItemConfig(); val120.Name = "Broth"; val120.Description = "Can't tell if it's made from beef bones, chicken bones, vegetables..."; val120.CraftingStation = CraftingStations.Cauldron; val120.AddRequirement("Wishbone", 1, 0); val120.AddRequirement("Carrot", 1, 0); val120.AddRequirement("Turnip", 1, 0); val120.Icon = foodsAssetBundle.LoadAsset("brothicon"); CustomItem val121 = new CustomItem("Broth", "MeadBugRepellent", val120); val121.ItemDrop.m_itemData.m_shared.m_itemType = (ItemType)1; val121.ItemDrop.m_itemData.m_shared.m_consumeStatusEffect = null; ItemManager.Instance.AddItem(val121); ItemConfig val122 = new ItemConfig(); val122.Name = "Fish Stew"; val122.Description = "Only missing noodles, and then it's a ramen."; val122.CraftingStation = CraftingStations.Cauldron; val122.AddRequirement("FishCooked", 1, 0); val122.AddRequirement("Broth", 1, 0); val122.Icon = foodsAssetBundle.LoadAsset("fishstew"); CustomItem val123 = new CustomItem("FishStew", "SerpentStew", val122); val123.ItemDrop.m_itemData.m_shared.m_food = 85f; val123.ItemDrop.m_itemData.m_shared.m_foodStamina = 75f; val123.ItemDrop.m_itemData.m_shared.m_foodRegen = 4f; ItemManager.Instance.AddItem(val123); ItemConfig val124 = new ItemConfig(); val124.Name = "Organic Iron"; val124.Description = "The magical energies from the Swamp Key allows its mineral iron to be easily convertible into organic iron."; val124.CraftingStation = CraftingStations.Cauldron; val124.AddRequirement("CryptKey", 1, 0); val124.Amount = 5; val124.Icon = foodsAssetBundle.LoadAsset("organiciron"); CustomItem val125 = new CustomItem("OrganicIron", "PowderedDragonEgg", val124); ItemManager.Instance.AddItem(val125); ItemConfig val126 = new ItemConfig(); val126.Name = "PotionPrefab"; val126.Description = "SHOULD NOT BE SEEN!!!"; CustomItem val127 = new CustomItem("PotionPrefab", "MeadHealthMajor", val126); ItemManager.Instance.AddItem(val127); ItemConfig val128 = new ItemConfig(); val128.Name = "Salty Mead"; val128.Description = "Made from the finest tears that could rivalize with those from League of Legends."; val128.CraftingStation = CraftingStations.MeadKetill; val128.AddRequirement("DragonTear", 1, 0); val128.Icon = foodsAssetBundle.LoadAsset("SaltyMeadBase"); CustomItem val129 = new CustomItem("SaltyMead", "MeadBaseFrostResist", val128); ItemManager.Instance.AddItem(val129); ItemConfig val130 = new ItemConfig(); val130.Name = "Salty Potion"; val130.Description = "Drink the tears of your enemies."; val130.Icon = foodsAssetBundle.LoadAsset("SaltyPotion"); CustomItem val131 = new CustomItem("SaltyPotion", "MeadHealthMajor", val130); val131.ItemDrop.m_itemData.m_shared.m_consumeStatusEffect = (StatusEffect)(object)foodsAssetBundle.LoadAsset("SaltyPotionEffect"); EffectList startEffects = ItemManager.Instance.GetItem("PotionPrefab").ItemDrop.m_itemData.m_shared.m_consumeStatusEffect.m_startEffects; val131.ItemDrop.m_itemData.m_shared.m_consumeStatusEffect.m_startEffects = startEffects; ItemManager.Instance.AddItem(val131); CustomItem val132 = new CustomItem("newMossyBait", "FishingBaitForest"); ItemManager.Instance.AddItem(val132); CustomItem val133 = new CustomItem("newStickyBait", "FishingBaitSwamp"); ItemManager.Instance.AddItem(val133); CustomItem val134 = new CustomItem("newStingyBait", "FishingBaitPlains"); ItemManager.Instance.AddItem(val134); CustomItem val135 = new CustomItem("newHeavyBait", "FishingBaitOcean"); ItemManager.Instance.AddItem(val135); CustomItem val136 = new CustomItem("newMistyBait", "FishingBaitMistlands"); ItemManager.Instance.AddItem(val136); CustomItem val137 = new CustomItem("newHotBait", "FishingBaitAshlands"); ItemManager.Instance.AddItem(val137); CustomItem val138 = new CustomItem("newFrostyBait", "FishingBaitDeepNorth"); ItemManager.Instance.AddItem(val138); CustomItem val139 = new CustomItem("newColdBait", "FishingBaitCave"); ItemManager.Instance.AddItem(val139); CustomItem val140 = new CustomItem("newFishingRod", "FishingRod"); ItemManager.Instance.AddItem(val140); CustomItem val141 = new CustomItem("newHoops", "BarrelRings"); ItemManager.Instance.AddItem(val141); ItemConfig val142 = new ItemConfig(); val142.Name = "Worm food"; val142.Description = "Word is a certain peddler is looking for some."; val142.CraftingStation = CraftingStations.FoodPreparationTable; val142.Icon = foodsAssetBundle.LoadAsset("WormFood"); CustomItem val143 = new CustomItem("WormFood", "BarleyFlour", val142); val143.ItemDrop.m_itemData.m_shared.m_value = 100; ItemManager.Instance.AddItem(val143); ItemConfig val144 = new ItemConfig(); val144.Name = "Phantasmal Sword"; val144.Description = "Spooky scary. Goes right through physical things."; val144.CraftingStation = CraftingStations.Forge; val144.AddRequirement("RoundLog", 10, 5); val144.AddRequirement("Ectoplasm", 2, 1); val144.AddRequirement("Tin", 6, 3); val144.RepairStation = CraftingStations.Forge; CustomItem val145 = new CustomItem("PhantasmalSword", "THSwordSlayer", val144); val145.ItemDrop.m_itemData.m_shared.m_damages.m_slash = 0f; val145.ItemDrop.m_itemData.m_shared.m_damages.m_spirit = 100f; val145.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_spirit = 20f; val145.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_slash = 0f; val145.ItemDrop.m_itemData.m_shared.m_attackForce = 25f; val145.ItemDrop.m_itemData.m_shared.m_blockPower = 32f; val145.ItemDrop.m_itemData.m_shared.m_attack.m_attackStamina = 18f; val145.ItemDrop.m_itemData.m_shared.m_deflectionForce = 25f; val145.ItemDrop.m_itemData.m_shared.m_deflectionForcePerLevel = 5f; val145.ItemDrop.m_itemData.m_shared.m_toolTier = 1; val145.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("PhantasmalSword"); ItemManager.Instance.AddItem(val145); ItemConfig val146 = new ItemConfig(); val146.Name = "Fire Knife"; val146.Description = "Enough resin to burn for a lifetime."; val146.CraftingStation = CraftingStations.Workbench; val146.AddRequirement("Wood", 2, 0); val146.AddRequirement("Flint", 4, 2); val146.AddRequirement("LeatherScraps", 2, 0); val146.AddRequirement("Resin", 50, 10); val146.RepairStation = CraftingStations.Workbench; CustomItem val147 = new CustomItem("FireKnife", "KnifeFlint", val146); val147.ItemDrop.m_itemData.m_shared.m_damages.m_fire = 10f; val147.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_fire = 1f; val147.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("FireKnife"); ItemManager.Instance.AddItem(val147); ItemConfig val148 = new ItemConfig(); val148.Name = "Fire Wand"; val148.Description = "Pew! Pew! Made from only the finest of finewoods among the selection."; val148.CraftingStation = CraftingStations.Forge; val148.AddRequirement("FineWood", 18, 5); val148.AddRequirement("Copper", 4, 2); val148.AddRequirement("Bronze", 2, 1); val148.AddRequirement("Acorn", 2, 0); val148.AddRequirement("SurtlingCore", 1, 1); val148.RepairStation = CraftingStations.Forge; CustomItem val149 = new CustomItem("FireWand", "StaffFireball", val148); val149.ItemDrop.m_itemData.m_shared.m_toolTier = 1; val149.ItemDrop.m_itemData.m_shared.m_damages.m_blunt = 12f; val149.ItemDrop.m_itemData.m_shared.m_damages.m_fire = 24f; val149.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_fire = 4f; val149.ItemDrop.m_itemData.m_shared.m_attack.m_attackEitr = 10f; val149.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("FireWand"); ItemManager.Instance.AddItem(val149); ItemConfig val150 = new ItemConfig(); val150.Name = "Frost Wand"; val150.Description = "BRRRRRRR! Made from only the finest of corewoods among the selection."; val150.CraftingStation = CraftingStations.Forge; val150.AddRequirement("RoundLog", 28, 10); val150.AddRequirement("Silver", 4, 2); val150.AddRequirement("Bronze", 2, 1); val150.AddRequirement("FreezeGland", 20, 2); val150.RepairStation = CraftingStations.Forge; CustomItem val151 = new CustomItem("FrostWand", "StaffIceShards", val150); val151.ItemDrop.m_itemData.m_shared.m_toolTier = 1; val151.ItemDrop.m_itemData.m_shared.m_damages.m_frost = 25f; val151.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_frost = 1f; val151.ItemDrop.m_itemData.m_shared.m_attack.m_attackEitr = 4f; val151.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("FrostWand"); ItemManager.Instance.AddItem(val151); ItemConfig val152 = new ItemConfig(); val152.Name = "Lightning Wand"; val152.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\"."; val152.CraftingStation = CraftingStations.Forge; val152.AddRequirement("Iron", 3, 3); val152.AddRequirement("Copper", 40, 5); val152.AddRequirement("Ruby", 10, 1); val152.AddRequirement("Feathers", 6, 0); val152.RepairStation = CraftingStations.Forge; CustomItem val153 = new CustomItem("LightningWand", "StaffLightning", val152); val153.ItemDrop.m_itemData.m_shared.m_toolTier = 1; val153.ItemDrop.m_itemData.m_shared.m_damages.m_lightning = 10f; val153.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_lightning = 1f; val153.ItemDrop.m_itemData.m_shared.m_attack.m_reloadEitrDrain = 12f; val153.ItemDrop.m_itemData.m_shared.m_attackForce = 20f; val153.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("LightningWand"); ItemManager.Instance.AddItem(val153); ItemConfig val154 = new ItemConfig(); val154.Name = "Blood Wand"; val154.CraftingStation = CraftingStations.Forge; val154.Icon = newHaldorAssetBundle.LoadAsset("BloodWandIcon"); val154.AddRequirement("BlackMetal", 10, 2); val154.AddRequirement("GoblinTotem", 2, 1); val154.AddRequirement("Bloodbag", 10, 2); val154.AddRequirement("CuredSquirrelHamstring", 5, 1); val154.RepairStation = CraftingStations.Forge; CustomItem val155 = new CustomItem(newHaldorAssetBundle, "BloodWand", false, val154); ItemManager.Instance.AddItem(val155); Projectile component = ItemManager.Instance.GetItem("BloodWand").ItemDrop.m_itemData.m_shared.m_attack.m_attackProjectile.GetComponent(); GameObject prefab = component.m_hitEffects.m_effectPrefabs[0].m_prefab; prefab.GetComponent().material.shader = shader4; ((Component)prefab.transform.Find("vfx_RockHit (1)")).GetComponent().material.shader = shader; ((Component)prefab.transform.Find("vfx_ice_hit")).GetComponent().material.shader = shader2; ((Component)prefab.transform.Find("smoke")).GetComponent().material.shader = shader2; ((Component)((Component)component).transform.Find("flames (1)")).GetComponent().material.shader = shader; ((Component)((Component)component).transform.Find("sparcs_world")).GetComponent().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().material.shader = shader; ((Component)prefab2.transform.Find("smoke")).GetComponent().material.shader = shader2; GameObject itemPrefab = ItemManager.Instance.GetItem("BloodWand").ItemPrefab; ((Component)itemPrefab.transform.Find("attach/default (1)/effects/flare")).GetComponent().material.shader = shader4; ((Component)itemPrefab.transform.Find("attach/default (1)/effects/embers (1)")).GetComponent().material.shader = shader2; ItemConfig val156 = new ItemConfig(); val156.Name = "ResinBomb"; val156.CraftingStation = CraftingStations.Workbench; val156.Icon = newHaldorAssetBundle.LoadAsset("BombResinIcon"); val156.AddRequirement("Resin", 12, 0); val156.AddRequirement("LeatherScraps", 5, 0); val156.RepairStation = CraftingStations.Workbench; CustomItem val157 = new CustomItem(newHaldorAssetBundle, "BombResin", false, val156); ItemManager.Instance.AddItem(val157); PrefabManager.Instance.AddPrefab(val157.ItemPrefab); ItemDrop itemDrop = ItemManager.Instance.GetItem("BombResin").ItemDrop; GameObject attackProjectile = itemDrop.m_itemData.m_shared.m_attack.m_attackProjectile; PrefabManager.Instance.AddPrefab(attackProjectile); GameObject spawnOnHit = attackProjectile.GetComponent().m_spawnOnHit; PrefabManager.Instance.AddPrefab(spawnOnHit); ((Component)spawnOnHit.transform.Find("particles/wetsplsh")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/ooz (1)")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/flakes")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/low_flames")).GetComponent().material.shader = shader3; ((Component)spawnOnHit.transform.Find("particles/flame ring")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/flames (2)")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/splash_overtime")).GetComponent().material.shader = shader2; CustomItem item = ItemManager.Instance.GetItem("capeDeerHideCopy"); ItemConfig val158 = new ItemConfig(); val158.Name = "FrostBomb"; val158.CraftingStation = CraftingStations.Workbench; val158.Icon = newHaldorAssetBundle.LoadAsset("BombFrostIcon"); val158.AddRequirement("FreezeGland", 12, 0); val158.AddRequirement("LeatherScraps", 5, 0); val158.RepairStation = CraftingStations.Workbench; CustomItem val159 = new CustomItem(newHaldorAssetBundle, "BombFrost", false, val158); ItemManager.Instance.AddItem(val159); PrefabManager.Instance.AddPrefab(val159.ItemPrefab); ItemDrop itemDrop2 = ItemManager.Instance.GetItem("BombFrost").ItemDrop; GameObject attackProjectile2 = itemDrop2.m_itemData.m_shared.m_attack.m_attackProjectile; PrefabManager.Instance.AddPrefab(attackProjectile2); GameObject spawnOnHit2 = attackProjectile2.GetComponent().m_spawnOnHit; PrefabManager.Instance.AddPrefab(spawnOnHit2); ((Component)spawnOnHit2.transform.Find("particles/wetsplsh")).GetComponent().material.shader = shader2; ((Component)spawnOnHit2.transform.Find("particles/ooz (1)")).GetComponent().material.shader = shader2; ((Component)spawnOnHit2.transform.Find("particles/flakes")).GetComponent().material.shader = shader2; ((Component)spawnOnHit2.transform.Find("particles/low_flames")).GetComponent().material.shader = shader3; ((Component)spawnOnHit2.transform.Find("particles/flame ring")).GetComponent().material.shader = shader2; ((Component)spawnOnHit2.transform.Find("particles/flames (2)")).GetComponent().material.shader = shader2; ((Component)spawnOnHit2.transform.Find("particles/splash_overtime")).GetComponent().material.shader = shader2; ItemConfig val160 = new ItemConfig(); val160.Name = "HealingBomb"; val160.CraftingStation = CraftingStations.Workbench; val160.Icon = newHaldorAssetBundle.LoadAsset("BombHealingIcon"); val160.AddRequirement("MushroomYellow", 12, 0); val160.AddRequirement("LeatherScraps", 5, 0); val160.RepairStation = CraftingStations.Workbench; CustomItem val161 = new CustomItem(newHaldorAssetBundle, "BombHealing", false, val160); ItemManager.Instance.AddItem(val161); PrefabManager.Instance.AddPrefab(val161.ItemPrefab); ItemDrop itemDrop3 = ItemManager.Instance.GetItem("BombHealing").ItemDrop; GameObject attackProjectile3 = itemDrop3.m_itemData.m_shared.m_attack.m_attackProjectile; PrefabManager.Instance.AddPrefab(attackProjectile3); GameObject spawnOnHit3 = attackProjectile3.GetComponent().m_spawnOnHit; PrefabManager.Instance.AddPrefab(spawnOnHit3); ((Component)spawnOnHit3.transform.Find("particles/wetsplsh")).GetComponent().material.shader = shader2; ((Component)spawnOnHit3.transform.Find("particles/ooz (1)")).GetComponent().material.shader = shader2; ((Component)spawnOnHit3.transform.Find("particles/interior_dust")).GetComponent().material.shader = shader2; ((Component)spawnOnHit3.transform.Find("particles/splash_overtime")).GetComponent().material.shader = shader2; ItemManager.Instance.AddStatusEffect(new CustomStatusEffect((StatusEffect)(object)newHaldorAssetBundle.LoadAsset("StatusEffect_AoEHeal"), false)); ItemConfig val162 = new ItemConfig(); val162.Name = "Refillable Torch"; val162.Description = "Automatically consumes resin to refill itself when it is about to break."; val162.CraftingStation = CraftingStations.Forge; val162.RepairStation = CraftingStations.Forge; val162.Icon = newHaldorAssetBundle.LoadAsset("TorchIcon"); val162.AddRequirement("Iron", 1, 0); val162.AddRequirement("wax", 1, 0); CustomItem val163 = new CustomItem("RefillableTorch", "Torch", val162); val163.ItemDrop.m_itemData.m_shared.m_canBeReparied = true; val163.ItemDrop.m_itemData.m_shared.m_destroyBroken = false; ItemManager.Instance.AddItem(val163); ItemConfig val164 = new ItemConfig(); val164.Name = "MegaWisplight"; val164.Description = "Twice as potent as a normal wisplight."; val164.AddRequirement("Wisp", 100, 0); val164.AddRequirement("Silver", 1, 0); val164.AddRequirement("TrophyTick", 1, 0); CustomItem val165 = new CustomItem("MegaWisplight", "Demister", val164); SE_Demister val166 = (SE_Demister)val165.ItemDrop.m_itemData.m_shared.m_equipStatusEffect; ((Component)val166.m_ballPrefab.transform.Find("effects/Particle System Force Field")).GetComponent().endRange = 20f; ItemManager.Instance.AddItem(val165); ItemConfig val167 = new ItemConfig(); val167.Name = "Magic Shield"; val167.Description = "We stand together! Block any hit with enough Eitr to activate the shield's protective powers over you and your allies."; val167.CraftingStation = CraftingStations.Forge; val167.Icon = newHaldorAssetBundle.LoadAsset("MagicShieldIcon"); val167.AddRequirement("FineWood", 25, 10); val167.AddRequirement("Copper", 10, 3); val167.AddRequirement("SerpentScale", 3, 1); CustomItem val168 = new CustomItem("MagicShield", "ShieldIronTower", val167); val168.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset("SetEffect_MagicShield"); val168.ItemDrop.m_itemData.m_shared.m_blockPower = 30f; val168.ItemDrop.m_itemData.m_shared.m_blockPowerPerLevel = 6f; val168.ItemDrop.m_itemData.m_shared.m_toolTier = 1; ItemManager.Instance.AddItem(val168); ItemConfig val169 = new ItemConfig(); val169.Name = "Staff Protection Copy"; val169.Description = "not supposed to show up"; CustomItem val170 = new CustomItem("StaffProtectionCopy", "StaffShield", val169); ItemManager.Instance.AddItem(val170); SE_Shield val171 = newHaldorAssetBundle.LoadAsset("StatusEffect_MagicShieldActivated"); GameObject val172 = newHaldorAssetBundle.LoadAsset("Bubble"); GameObject prefab3 = ItemManager.Instance.GetItem("StaffProtectionCopy").ItemDrop.m_itemData.m_shared.m_attackStatusEffect.m_startEffects.m_effectPrefabs[0].m_prefab; ((Component)val172.transform.Find("smoke_world")).GetComponent().material.shader = ((Component)prefab3.transform.Find("smoke_world")).GetComponent().material.shader; ((Component)val172.transform.Find("smoke_world (1)")).GetComponent().material.shader = ((Component)prefab3.transform.Find("smoke_world (1)")).GetComponent().material.shader; ((Component)val172.transform.Find("Sphere")).GetComponent().material.shader = ((Component)prefab3.transform.Find("Sphere")).GetComponent().material.shader; EffectData val173 = new EffectData(); val173.m_prefab = val172; val173.m_attach = true; val173.m_enabled = true; val173.m_variant = -1; val173.m_scale = true; EffectData[] effectPrefabs = (EffectData[])(object)new EffectData[1] { val173 }; ((StatusEffect)val171).m_startEffects.m_effectPrefabs = effectPrefabs; ItemConfig val174 = new ItemConfig(); val174.Name = "woodCopy1"; CustomItem val175 = new CustomItem("WoodCopy1", "Wood", val174); val175.ItemDrop.m_itemData.m_shared.m_attackStatusEffect = (StatusEffect)(object)val171; ItemManager.Instance.AddItem(val175); ItemManager.Instance.AddStatusEffect(new CustomStatusEffect((StatusEffect)(object)val171, false)); SE_Burning val176 = newHaldorAssetBundle.LoadAsset("StatusEffect_AttackBuffVisual"); GameObject val177 = newHaldorAssetBundle.LoadAsset("AttackBuff"); val177.GetComponent().material.shader = standardSurface2; ((Component)val177.transform.Find("flare")).GetComponent().material.shader = shader4; ((Component)val177.transform.Find("flames")).GetComponent().material.shader = shader3; ((Component)val177.transform.Find("flames_world")).GetComponent().material.shader = shader3; ((Component)val177.transform.Find("sparcs (1)")).GetComponent().material.shader = shader; ((Component)val177.transform.Find("flames (1)")).GetComponent().material.shader = CustomParticleUnlit; EffectData val178 = new EffectData(); val178.m_prefab = val177; val178.m_attach = true; val178.m_enabled = true; val178.m_variant = -1; val178.m_scale = true; EffectData[] effectPrefabs2 = (EffectData[])(object)new EffectData[1] { val178 }; ((StatusEffect)val176).m_startEffects.m_effectPrefabs = effectPrefabs2; ItemConfig val179 = new ItemConfig(); val179.Name = "woodCopy2"; CustomItem val180 = new CustomItem("WoodCopy2", "Wood", val179); val180.ItemDrop.m_itemData.m_shared.m_attackStatusEffect = (StatusEffect)(object)val176; ItemManager.Instance.AddItem(val180); ItemManager.Instance.AddStatusEffect(new CustomStatusEffect((StatusEffect)(object)val176, false)); ItemConfig val181 = new ItemConfig(); val181.Name = "Odin's Tankard"; CustomItem val182 = new CustomItem(newHaldorAssetBundle, "OdinsTankard", false, val181); ((Component)val182.ItemDrop.m_itemData.m_shared.m_startEffect.m_effectPrefabs[0].m_prefab.transform.Find("wetsplsh")).GetComponent().material.shader = shader2; ((Component)val182.ItemDrop.m_itemData.m_shared.m_startEffect.m_effectPrefabs[0].m_prefab.transform.Find("vfx_MeadSplash")).GetComponent().material.shader = standardSurface2; ItemManager.Instance.AddItem(val182); ItemConfig val183 = new ItemConfig(); val183.Name = "French Horn"; val183.CraftingStation = CraftingStations.Workbench; val183.AddRequirement("FineWood", 6, 0); val183.AddRequirement("Iron", 3, 0); val183.AddRequirement("TrophyDraugr", 9, 0); CustomItem val184 = new CustomItem(newHaldorAssetBundle, "FrenchHorn", false, val183); ItemManager.Instance.AddItem(val184); ItemConfig val185 = new ItemConfig(); val185.Name = "Enchanter Clothes"; val185.Description = "Simply enchanting."; val185.Icon = newHaldorAssetBundle.LoadAsset("EnchanterClothesIcon"); val185.AddRequirement("JuteRed", 15, 5); val185.AddRequirement("Dandelion", 5, 2); val185.AddRequirement("Blueberries", 5, 2); val185.AddRequirement("WolfHairBundle", 15, 5); val185.CraftingStation = CraftingStations.Workbench; CustomItem val186 = new CustomItem(newHaldorAssetBundle, "EnchanterClothes", false, val185); val186.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset("StatusEffect_EnchanterBuffRange"); val186.ItemDrop.m_itemData.m_shared.m_armor = 10f; val186.ItemDrop.m_itemData.m_shared.m_armorPerLevel = 2f; ((Renderer)((Component)((Component)val186.ItemDrop).gameObject.transform.Find("attach_skin/Dress2")).GetComponent()).material.shader = CustomCreature; ItemManager.Instance.AddItem(val186); ItemConfig val187 = new ItemConfig(); val187.Name = "Lumberjack's Bronze Axe"; val187.CraftingStation = CraftingStations.Forge; val187.Description = "Automatically replants trees if you destroy their stumps. You need a high enough level in woodcutting and the seeds in your inventory to do so. Dodge to toggle off and re-equip to toggle back on."; val187.AddRequirement("AxeBronze", 1, 0); CustomItem val188 = new CustomItem("LumberjackBronzeAxe", "AxeBronze", val187); val188.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset("SetEffect_Lumberjack"); ItemManager.Instance.AddItem(val188); ItemConfig val189 = new ItemConfig(); val189.Name = "Lumberjack's Iron Axe"; val189.CraftingStation = CraftingStations.Forge; val189.Description = "Automatically replants trees if you destroy their stumps. You need a high enough level in woodcutting and the seeds in your inventory to do so. Dodge to toggle off and re-equip to toggle back on."; val189.AddRequirement("AxeIron", 1, 0); CustomItem val190 = new CustomItem("LumberjackIronAxe", "AxeIron", val189); val190.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset("SetEffect_Lumberjack"); ItemManager.Instance.AddItem(val190); ItemConfig val191 = new ItemConfig(); val191.Name = "Lumberjack's Black Metal Axe"; val191.CraftingStation = CraftingStations.Forge; val191.Description = "Automatically replants trees if you destroy their stumps. You need a high enough level in woodcutting and the seeds in your inventory to do so. Dodge to toggle off and re-equip to toggle back on."; val191.AddRequirement("AxeBlackMetal", 1, 0); CustomItem val192 = new CustomItem("LumberjackBlackMetalAxe", "AxeBlackMetal", val191); val192.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset("SetEffect_Lumberjack"); ItemManager.Instance.AddItem(val192); ItemConfig val193 = new ItemConfig(); val193.Name = "Arbalist Briefs"; val193.Description = "Reload harder, better, faster, stronger with these."; val193.CraftingStation = CraftingStations.Forge; val193.Icon = newHaldorAssetBundle.LoadAsset("ArbalistLegsIcon"); val193.AddRequirement("JuteRed", 11, 3); val193.AddRequirement("Silver", 4, 1); val193.AddRequirement("Obsidian", 11, 3); val193.AddRequirement("WolfHairBundle", 3, 1); CustomItem val194 = new CustomItem(newHaldorAssetBundle, "ArbalistLegs", false, val193); val194.ItemDrop.m_itemData.m_shared.m_setStatusEffect = newHaldorAssetBundle.LoadAsset("SetEffect_Arbalist"); val194.ItemDrop.m_itemData.m_shared.m_setSize = 3; val194.ItemDrop.m_itemData.m_shared.m_setName = "Improved Reloading Speed"; val194.ItemDrop.m_itemData.m_shared.m_armor = 15f; val194.ItemDrop.m_itemData.m_shared.m_armorPerLevel = 2f; val194.ItemDrop.m_itemData.m_shared.m_movementModifier = 0f; ((Renderer)((Component)((Component)val194.ItemDrop).transform.Find("attach_skin/FenringBoots")).GetComponent()).material.shader = CustomCreature; ((Renderer)((Component)((Component)val194.ItemDrop).transform.Find("default")).GetComponent()).material.shader = CustomCreature; ItemManager.Instance.AddItem(val194); ItemConfig val195 = new ItemConfig(); val195.Name = "Arbalist Armor"; val195.Description = "Reload harder, better, faster, stronger with this."; val195.CraftingStation = CraftingStations.Forge; val195.Icon = newHaldorAssetBundle.LoadAsset("ArbalistChestIcon"); val195.AddRequirement("JuteRed", 11, 3); val195.AddRequirement("Silver", 4, 1); val195.AddRequirement("Obsidian", 11, 3); val195.AddRequirement("WolfHairBundle", 3, 1); CustomItem val196 = new CustomItem(newHaldorAssetBundle, "ArbalistChest", false, val195); val196.ItemDrop.m_itemData.m_shared.m_setStatusEffect = newHaldorAssetBundle.LoadAsset("SetEffect_Arbalist"); val196.ItemDrop.m_itemData.m_shared.m_setSize = 3; val196.ItemDrop.m_itemData.m_shared.m_setName = "Improved Reloading Speed"; val196.ItemDrop.m_itemData.m_shared.m_armor = 15f; val196.ItemDrop.m_itemData.m_shared.m_armorPerLevel = 2f; val196.ItemDrop.m_itemData.m_shared.m_movementModifier = 0f; ((Renderer)((Component)((Component)val196.ItemDrop).transform.Find("attach_skin/FenringPants")).GetComponent()).material.shader = CustomCreature; ((Renderer)((Component)((Component)val196.ItemDrop).transform.Find("default")).GetComponent()).material.shader = CustomCreature; ItemManager.Instance.AddItem(val196); ItemConfig val197 = new ItemConfig(); val197.Name = "Arbalist Helmet"; val197.Description = "Reload harder, better, faster, stronger with this."; val197.CraftingStation = CraftingStations.Forge; val197.Icon = newHaldorAssetBundle.LoadAsset("ArbalistHoodIcon"); val197.AddRequirement("JuteRed", 11, 3); val197.AddRequirement("Silver", 4, 1); val197.AddRequirement("TrophyUlv", 1, 1); val197.AddRequirement("WolfHairBundle", 3, 1); CustomItem val198 = new CustomItem(newHaldorAssetBundle, "ArbalistHood", false, val197); val198.ItemDrop.m_itemData.m_shared.m_setStatusEffect = newHaldorAssetBundle.LoadAsset("SetEffect_Arbalist"); val198.ItemDrop.m_itemData.m_shared.m_setSize = 3; val198.ItemDrop.m_itemData.m_shared.m_setName = "Improved Reloading Speed"; val198.ItemDrop.m_itemData.m_shared.m_armor = 15f; val198.ItemDrop.m_itemData.m_shared.m_armorPerLevel = 2f; val198.ItemDrop.m_itemData.m_shared.m_movementModifier = 0f; ((Renderer)((Component)((Component)val198.ItemDrop).transform.Find("attach_skin/FenringHood")).GetComponent()).material.shader = CustomCreature; ((Renderer)((Component)((Component)val198.ItemDrop).transform.Find("default")).GetComponent()).material.shader = CustomCreature; ItemManager.Instance.AddItem(val198); ItemConfig val199 = new ItemConfig(); val199.Name = "Cape of Odin"; val199.AddRequirement("Coal", 4, 2); val199.AddRequirement("LeatherScraps", 10, 5); CustomItem val200 = new CustomItem("OdinCape1", "CapeOdin", val199); val200.ItemDrop.m_itemData.m_shared.m_dlc = ""; ItemManager.Instance.AddItem(val200); ItemConfig val201 = new ItemConfig(); val201.Name = "Hood of Odin"; val201.AddRequirement("Coal", 4, 2); val201.AddRequirement("LeatherScraps", 10, 5); CustomItem val202 = new CustomItem("OdinHood", "HelmetOdin", val201); val202.ItemDrop.m_itemData.m_shared.m_dlc = ""; ItemManager.Instance.AddItem(val202); PrefabManager.OnVanillaPrefabsAvailable -= AddClonedItems; } private void FixShaders() { Shader shader = ((Renderer)ItemManager.Instance.GetItem("CapeDeerHideCopy").ItemPrefab.GetComponentInChildren()).sharedMaterial.shader; Material[] materials = ((Renderer)capeDeer.GetComponentInChildren()).materials; materials[0].shader = shader; Transform val = capeDeer.transform.Find("attach_skin/cape2"); Material[] materials2 = ((Renderer)((Component)val).GetComponent()).materials; materials2[0].shader = shader; materials = ((Renderer)capeTroll.GetComponentInChildren()).materials; materials[0].shader = shader; val = capeTroll.transform.Find("attach_skin/cape2"); materials2 = ((Renderer)((Component)val).GetComponent()).materials; materials2[0].shader = shader; Shader shader2 = ((Renderer)ItemManager.Instance.GetItem("CapeWolfCopy").ItemPrefab.GetComponentInChildren()).sharedMaterial.shader; materials = ((Renderer)capeWolfWaterproof.GetComponentInChildren()).materials; materials[0].shader = shader2; val = capeWolfWaterproof.transform.Find("attach_skin/WolfCape"); materials2 = ((Renderer)((Component)val).GetComponent()).materials; materials2[0].shader = shader; materials2[1].shader = shader; Transform val2 = capeWolfWaterproof.transform.Find("attach_skin/WolfCape_Cloth/WolfCape_cloth"); Material[] materials3 = ((Renderer)((Component)val2).GetComponent()).materials; materials3[0].shader = shader; materials = ((Renderer)capeLoxWaterproof.GetComponentInChildren()).materials; materials[0].shader = shader; val = capeLoxWaterproof.transform.Find("attach_skin/LoxCape"); materials2 = ((Renderer)((Component)val).GetComponent()).materials; materials2[0].shader = shader; materials = ((Renderer)capeLinenWaterproof.GetComponentInChildren()).materials; materials[0].shader = shader; val = capeLinenWaterproof.transform.Find("attach_skin/cape1"); materials2 = ((Renderer)((Component)val).GetComponent()).materials; materials2[0].shader = shader; materials = ((Renderer)capeFeatherWaterproof.GetComponentInChildren()).materials; materials[0].shader = shader; val = capeFeatherWaterproof.transform.Find("attach_skin/MageCape"); materials2 = ((Renderer)((Component)val).GetComponent()).materials; materials2[0].shader = shader; materials = ((Renderer)capeAsksvinWaterproof.GetComponentInChildren()).materials; materials[0].shader = shader; val = capeAsksvinWaterproof.transform.Find("attach_skin/Asksvincape"); materials2 = ((Renderer)((Component)val).GetComponent()).materials; materials2[0].shader = shader; materials = ((Renderer)capeAshWaterproof.GetComponentInChildren()).materials; materials[0].shader = shader; val = capeAshWaterproof.transform.Find("attach_skin/Plane"); materials2 = ((Renderer)((Component)val).GetComponent()).materials; materials2[0].shader = shader; PrefabManager.OnVanillaPrefabsAvailable -= FixShaders; } private void CreateNewHaldor() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Expected O, but got Unknown //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Expected O, but got Unknown //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Expected O, but got Unknown //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Expected O, but got Unknown //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Expected O, but got Unknown //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Expected O, but got Unknown //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Expected O, but got Unknown Trader component = newHaldor.GetComponent(); TradeItem val = new TradeItem(); val.m_price = 50; val.m_stack = 20; val.m_prefab = ItemManager.Instance.GetItem("newMossyBait").ItemDrop; val.m_requiredGlobalKey = GlobalKey.KilledEikthyr; component.m_items.Add(val); TradeItem val2 = new TradeItem(); val2.m_price = 100; val2.m_stack = 20; val2.m_prefab = ItemManager.Instance.GetItem("newStickyBait").ItemDrop; val2.m_requiredGlobalKey = GlobalKey.KilledElder; component.m_items.Add(val2); TradeItem val3 = new TradeItem(); val3.m_price = 150; val3.m_stack = 20; val3.m_prefab = ItemManager.Instance.GetItem("newStingyBait").ItemDrop; val3.m_requiredGlobalKey = GlobalKey.KilledModer; component.m_items.Add(val3); TradeItem val4 = new TradeItem(); val4.m_price = 200; val4.m_stack = 20; val4.m_prefab = ItemManager.Instance.GetItem("newHeavyBait").ItemDrop; val4.m_requiredGlobalKey = GlobalKey.KilledTroll; component.m_items.Add(val4); TradeItem val5 = new TradeItem(); val5.m_price = 250; val5.m_stack = 20; val5.m_prefab = ItemManager.Instance.GetItem("newMistyBait").ItemDrop; val5.m_requiredGlobalKey = GlobalKey.KilledYagluth; component.m_items.Add(val5); TradeItem val6 = new TradeItem(); val6.m_price = 300; val6.m_stack = 20; val6.m_prefab = ItemManager.Instance.GetItem("newHotBait").ItemDrop; val6.m_requiredGlobalKey = GlobalKey.KilledYagluth; component.m_items.Add(val6); TradeItem val7 = new TradeItem(); val7.m_price = 350; val7.m_stack = 20; val7.m_prefab = ItemManager.Instance.GetItem("newFrostyBait").ItemDrop; val7.m_requiredGlobalKey = GlobalKey.KilledYagluth; component.m_items.Add(val7); TradeItem val8 = new TradeItem(); val8.m_price = 400; val8.m_stack = 20; val8.m_prefab = ItemManager.Instance.GetItem("newColdBait").ItemDrop; val8.m_requiredGlobalKey = GlobalKey.KilledBonemass; component.m_items.Add(val8); TradeItem val9 = new TradeItem(); val9.m_prefab = ItemManager.Instance.GetItem("newFishingRod").ItemDrop; val9.m_price = 350; component.m_items[4] = val9; TradeItem val10 = new TradeItem(); val10.m_price = 100; val10.m_stack = 3; val10.m_prefab = ItemManager.Instance.GetItem("newHoops").ItemDrop; component.m_items[8] = val10; TradeItem val11 = new TradeItem(); val11.m_price = 620; val11.m_stack = 1; val11.m_prefab = ItemManager.Instance.GetItem("MiningHat").ItemDrop; component.m_items[1] = val11; PrefabManager.Instance.AddPrefab(newHaldor); CustomPiece piece = PieceManager.Instance.GetPiece("InfiniteWoodTorch"); Fireplace component2 = ((Component)piece.Piece).gameObject.GetComponent(); component2.m_infiniteFuel = true; CustomPiece piece2 = PieceManager.Instance.GetPiece("InfiniteIronTorch"); component2 = ((Component)piece2.Piece).gameObject.GetComponent(); component2.m_infiniteFuel = true; CustomPiece piece3 = PieceManager.Instance.GetPiece("InfiniteGuckTorch"); component2 = ((Component)piece3.Piece).gameObject.GetComponent(); component2.m_infiniteFuel = true; CustomPiece piece4 = PieceManager.Instance.GetPiece("InfiniteEyeTorch"); component2 = ((Component)piece4.Piece).gameObject.GetComponent(); component2.m_infiniteFuel = true; CustomPiece piece5 = PieceManager.Instance.GetPiece("InfiniteSconce"); component2 = ((Component)piece5.Piece).gameObject.GetComponent(); component2.m_infiniteFuel = true; PrefabManager.OnVanillaPrefabsAvailable -= CreateNewHaldor; } private void CreateWax() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown CustomItem val = new CustomItem(waxPrefab, false); ItemManager.Instance.AddItem(val); PrefabManager.OnVanillaPrefabsAvailable -= CreateWax; } private void CreateCapes() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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 CustomItem val = new CustomItem(capeDeer, false); CustomItem val2 = new CustomItem(capeTroll, false); CustomItem val3 = new CustomItem(capeWolfWaterproof, false); CustomItem val4 = new CustomItem(capeLoxWaterproof, false); CustomItem val5 = new CustomItem(capeLinenWaterproof, false); CustomItem val6 = new CustomItem(capeFeatherWaterproof, false); CustomItem val7 = new CustomItem(capeAsksvinWaterproof, false); CustomItem val8 = new CustomItem(capeAshWaterproof, false); ItemManager.Instance.AddItem(val); ItemManager.Instance.AddItem(val2); ItemManager.Instance.AddItem(val3); ItemManager.Instance.AddItem(val4); ItemManager.Instance.AddItem(val5); ItemManager.Instance.AddItem(val6); ItemManager.Instance.AddItem(val7); ItemManager.Instance.AddItem(val8); PrefabManager.OnVanillaPrefabsAvailable -= CreateCapes; } private void AddRecipes() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Expected O, but got Unknown //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Expected O, but got Unknown //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Expected O, but got Unknown //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Expected O, but got Unknown //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Expected O, but got Unknown //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Expected O, but got Unknown //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Expected O, but got Unknown //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Expected O, but got Unknown //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Expected O, but got Unknown //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Expected O, but got Unknown //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Expected O, but got Unknown //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Expected O, but got Unknown //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Expected O, but got Unknown //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Expected O, but got Unknown //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Expected O, but got Unknown //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Expected O, but got Unknown //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Expected O, but got Unknown //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Expected O, but got Unknown //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Expected O, but got Unknown //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Expected O, but got Unknown //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Expected O, but got Unknown //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Expected O, but got Unknown //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Expected O, but got Unknown //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Expected O, but got Unknown //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Expected O, but got Unknown //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Expected O, but got Unknown //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Expected O, but got Unknown //IL_0486: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Expected O, but got Unknown //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Expected O, but got Unknown //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_04aa: Expected O, but got Unknown //IL_04f0: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Expected O, but got Unknown //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0502: Expected O, but got Unknown //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Expected O, but got Unknown //IL_0554: Unknown result type (might be due to invalid IL or missing references) //IL_055b: Expected O, but got Unknown //IL_05a1: Unknown result type (might be due to invalid IL or missing references) //IL_05ab: Expected O, but got Unknown //IL_05ac: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Expected O, but got Unknown //IL_05f9: Unknown result type (might be due to invalid IL or missing references) //IL_0603: Expected O, but got Unknown //IL_0604: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Expected O, but got Unknown //IL_0651: Unknown result type (might be due to invalid IL or missing references) //IL_065b: Expected O, but got Unknown //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_0663: Expected O, but got Unknown //IL_06a9: Unknown result type (might be due to invalid IL or missing references) //IL_06b3: Expected O, but got Unknown //IL_06b4: Unknown result type (might be due to invalid IL or missing references) //IL_06bb: Expected O, but got Unknown //IL_0701: Unknown result type (might be due to invalid IL or missing references) //IL_070b: Expected O, but got Unknown //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0713: Expected O, but got Unknown //IL_0768: Unknown result type (might be due to invalid IL or missing references) //IL_0772: Expected O, but got Unknown //IL_0773: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Expected O, but got Unknown //IL_07b1: Unknown result type (might be due to invalid IL or missing references) //IL_07bb: Expected O, but got Unknown //IL_07bc: Unknown result type (might be due to invalid IL or missing references) //IL_07c3: Expected O, but got Unknown //IL_07fa: Unknown result type (might be due to invalid IL or missing references) //IL_0804: Expected O, but got Unknown //IL_0805: Unknown result type (might be due to invalid IL or missing references) //IL_080c: Expected O, but got Unknown //IL_0843: Unknown result type (might be due to invalid IL or missing references) //IL_084d: Expected O, but got Unknown //IL_084e: Unknown result type (might be due to invalid IL or missing references) //IL_0855: Expected O, but got Unknown //IL_0892: Unknown result type (might be due to invalid IL or missing references) //IL_089c: Expected O, but got Unknown //IL_089d: Unknown result type (might be due to invalid IL or missing references) //IL_08a4: Expected O, but got Unknown //IL_08d2: Unknown result type (might be due to invalid IL or missing references) //IL_08dc: Expected O, but got Unknown RecipeConfig val = new RecipeConfig(); val.CraftingStation = CraftingStations.Cauldron; val.Name = "Waterproof Deer Hide Cape"; val.RepairStation = CraftingStations.Workbench; val.Item = "CapeDeer"; val.AddRequirement(new RequirementConfig("CapeDeerHide", 1, 0, true)); val.AddRequirement(new RequirementConfig("wax", 5, 0, true)); val.AddRequirement(new RequirementConfig("DeerHide", 0, 4, true)); val.AddRequirement(new RequirementConfig("BoneFragments", 0, 5, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val)); RecipeConfig val2 = new RecipeConfig(); val2.CraftingStation = CraftingStations.Cauldron; val2.Name = "Waterproof Troll Hide Cape"; val2.RepairStation = CraftingStations.Workbench; val2.Item = "CapeTroll"; val2.AddRequirement(new RequirementConfig("CapeTrollHide", 1, 0, true)); val2.AddRequirement(new RequirementConfig("wax", 5, 0, true)); val2.AddRequirement(new RequirementConfig("TrollHide", 0, 5, true)); val2.AddRequirement(new RequirementConfig("BoneFragments", 0, 5, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val2)); RecipeConfig val3 = new RecipeConfig(); val3.CraftingStation = CraftingStations.Cauldron; val3.Name = "Waterproof Wolf Fur Cape"; val3.RepairStation = CraftingStations.Workbench; val3.Item = "CapeWolfWaterproof"; val3.AddRequirement(new RequirementConfig("CapeWolf", 1, 0, true)); val3.AddRequirement(new RequirementConfig("wax", 5, 0, true)); val3.AddRequirement(new RequirementConfig("WolfPelt", 0, 4, true)); val3.AddRequirement(new RequirementConfig("Silver", 2, 0, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val3)); RecipeConfig val4 = new RecipeConfig(); val4.CraftingStation = CraftingStations.Cauldron; val4.Name = "Waterproof Lox Cape"; val4.RepairStation = CraftingStations.Workbench; val4.Item = "CapeLoxWaterproof"; val4.AddRequirement(new RequirementConfig("CapeLox", 1, 0, true)); val4.AddRequirement(new RequirementConfig("wax", 5, 0, true)); val4.AddRequirement(new RequirementConfig("LoxPelt", 0, 2, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val4)); RecipeConfig val5 = new RecipeConfig(); val5.CraftingStation = CraftingStations.Cauldron; val5.Name = "Waterproof Linen Cape"; val5.RepairStation = CraftingStations.Workbench; val5.Item = "CapeLinenWaterproof"; val5.AddRequirement(new RequirementConfig("CapeLinen", 1, 0, true)); val5.AddRequirement(new RequirementConfig("wax", 5, 0, true)); val5.AddRequirement(new RequirementConfig("LinenThread", 0, 4, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val5)); RecipeConfig val6 = new RecipeConfig(); val6.CraftingStation = CraftingStations.Cauldron; val6.Name = "Waterproof Feather Cape"; val6.RepairStation = CraftingStations.Workbench; val6.Item = "CapeFeatherWaterproof"; val6.AddRequirement(new RequirementConfig("CapeFeather", 1, 0, true)); val6.AddRequirement(new RequirementConfig("wax", 5, 0, true)); val6.AddRequirement(new RequirementConfig("Feathers", 0, 2, true)); val6.AddRequirement(new RequirementConfig("ScaleHide", 0, 5, true)); val6.AddRequirement(new RequirementConfig("Eitr", 0, 3, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val6)); RecipeConfig val7 = new RecipeConfig(); val7.CraftingStation = CraftingStations.Cauldron; val7.Name = "Waterproof Asksvin Cloak"; val7.RepairStation = CraftingStations.Workbench; val7.Item = "CapeAsksvinWaterproof"; val7.AddRequirement(new RequirementConfig("CapeAsksvin", 1, 0, true)); val7.AddRequirement(new RequirementConfig("wax", 5, 0, true)); val7.AddRequirement(new RequirementConfig("AskHide", 0, 2, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val7)); RecipeConfig val8 = new RecipeConfig(); val8.CraftingStation = CraftingStations.Cauldron; val8.Name = "Waterproof Ashen Cape"; val8.RepairStation = CraftingStations.Workbench; val8.Item = "CapeAshWaterproof"; val8.AddRequirement(new RequirementConfig("CapeAsh", 1, 0, true)); val8.AddRequirement(new RequirementConfig("wax", 5, 0, true)); val8.AddRequirement(new RequirementConfig("AskHide", 0, 2, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val8)); RecipeConfig val9 = new RecipeConfig(); val9.CraftingStation = CraftingStations.Cauldron; val9.Name = "Transmute Gold (Elder)"; val9.Item = "TrophyEikthyr"; val9.Amount = 2; val9.AddRequirement("TrophyTheElder", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val9)); RecipeConfig val10 = new RecipeConfig(); val10.CraftingStation = CraftingStations.Cauldron; val10.Name = "Transmute Gold (Eikthyr)"; val10.Item = "Coins"; val10.Amount = 50; val10.AddRequirement("TrophyEikthyr", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val10)); RecipeConfig val11 = new RecipeConfig(); val11.CraftingStation = CraftingStations.Cauldron; val11.Name = "Transmute Gold (Bonemass)"; val11.Item = "TrophyTheElder"; val11.Amount = 2; val11.AddRequirement("TrophyBonemass", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val11)); RecipeConfig val12 = new RecipeConfig(); val12.CraftingStation = CraftingStations.Cauldron; val12.Name = "Transmute Gold (Moder)"; val12.Item = "TrophyBonemass"; val12.Amount = 2; val12.AddRequirement("TrophyDragonQueen", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val12)); RecipeConfig val13 = new RecipeConfig(); val13.CraftingStation = CraftingStations.Cauldron; val13.Name = "Transmute Gold (Yagluth)"; val13.Item = "TrophyDragonQueen"; val13.Amount = 2; val13.AddRequirement("TrophyGoblinKing", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val13)); RecipeConfig val14 = new RecipeConfig(); val14.CraftingStation = CraftingStations.Cauldron; val14.Name = "Transmute Gold (Queen)"; val14.Item = "TrophyGoblinKing"; val14.Amount = 2; val14.AddRequirement("TrophySeekerQueen", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val14)); RecipeConfig val15 = new RecipeConfig(); val15.CraftingStation = CraftingStations.Cauldron; val15.Name = "Transmute Gold (Fader)"; val15.Item = "TrophySeekerQueen"; val15.Amount = 2; val15.AddRequirement("TrophyFader", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val15)); RecipeConfig val16 = new RecipeConfig(); val16.CraftingStation = CraftingStations.Cauldron; val16.Name = "OrganicIron to Bloodbags"; val16.Item = "Bloodbag"; val16.Amount = 2; val16.AddRequirement("OrganicIron", 1, 0); val16.AddRequirement("Entrails", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val16)); FermenterConversionConfig val17 = new FermenterConversionConfig(); ((ConversionConfig)val17).ToItem = "SaltyPotion"; ((ConversionConfig)val17).FromItem = "SaltyMead"; ((ConversionConfig)val17).Station = Fermenters.Fermenter; val17.ProducedItems = 6; ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val17)); FermenterConversionConfig val18 = new FermenterConversionConfig(); ((ConversionConfig)val18).ToItem = "CheeseCurd"; ((ConversionConfig)val18).FromItem = "MilkBucket"; val18.ProducedItems = 1; ((ConversionConfig)val18).Station = Fermenters.Fermenter; ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val18)); FermenterConversionConfig val19 = new FermenterConversionConfig(); ((ConversionConfig)val19).ToItem = "Cheese"; ((ConversionConfig)val19).FromItem = "SaltedCheeseCurd"; val19.ProducedItems = 1; ((ConversionConfig)val19).Station = Fermenters.Fermenter; ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val19)); RecipeConfig val20 = new RecipeConfig(); val20.Name = "Worm Food"; val20.Item = "WormFood"; val20.CraftingStation = CraftingStations.FoodPreparationTable; val20.AddRequirement("RottenMeat", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val20)); SmelterConversionConfig val21 = new SmelterConversionConfig(); ((ConversionConfig)val21).Station = Smelters.SpinningWheel; ((ConversionConfig)val21).FromItem = "JuteRed"; ((ConversionConfig)val21).ToItem = "LinenThread"; ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val21)); } }