using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Managers; using Jotunn.Utils; using UnityEngine; using UnityEngine.Experimental.Rendering; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("ValheimSkillCapMod")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ValheimSkillCapMod")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("19F0E6BA-DE2B-4504-9801-0F9360E3D9EB")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace MyBepInExPlugin; [BepInPlugin("com.example.GUID", "MyPlugin", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Main : BaseUnityPlugin { [HarmonyPatch] private static class ChangeRaiseSkillMethod { public static Player vagonUser; public static bool hasDoubleJumped = false; public static float moveTimer; public static bool canBeInvisible; public static HashSet autoPickables = new HashSet { "Pickable_Dandelion(Clone)", "RaspberryBush(Clone)", "Pickable_Mushroom(Clone)", "BlueberryBush(Clone)" }; private static GameObject _diablo; [HarmonyPrefix] [HarmonyPatch(typeof(Skills), "RaiseSkill")] public static bool RaiseSkill(Skills __instance, SkillType skillType, float factor = 1f) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 //IL_0012: Unknown result type (might be due to invalid IL or missing references) if ((int)skillType == 0) { return false; } float skillLevel = __instance.GetSkillLevel(skillType); float num = skillLevel; float num2 = num; if (num2 >= 10f && num2 < 20f) { if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_eikthyr")) { return false; } } else { float num3 = num2; if (num3 >= 20f && num3 < 30f) { if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_gdking")) { return false; } } else { float num4 = num2; if (num4 >= 30f && num4 < 40f) { if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_bonemass")) { return false; } } else { float num5 = num2; if (num5 >= 40f && num5 < 50f) { if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_dragon")) { return false; } } else { float num6 = num2; if (num6 >= 50f && num6 < 60f) { if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_goblinking")) { return false; } } else { float num7 = num2; if (num7 >= 60f && num7 < 75f) { if (!ZoneSystem.instance.GetGlobalKeys().Contains("defeated_queen")) { return false; } } else { float num8 = num2; if (num8 >= 75f && num8 < 100f && !ZoneSystem.instance.GetGlobalKeys().Contains("defeated_fader")) { return false; } } } } } } } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(Skills), "OnDeath")] public static bool DoNotLowerSkills() { return false; } [HarmonyPostfix] [HarmonyPatch(typeof(Vagon), "FixedUpdate")] public static void RaiseCarrierSpeed(Vagon __instance) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown if (!(((Object)((Component)__instance).gameObject).name == "TurboCart(Clone)")) { return; } Type type = ((object)__instance).GetType(); FieldInfo field = type.GetField("m_attachedObject", BindingFlags.Instance | BindingFlags.NonPublic); GameObject val = (GameObject)field.GetValue(__instance); if ((Object)(object)val != (Object)null) { if ((Object)(object)vagonUser != (Object)(object)val.GetComponent()) { 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(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), "CustomFixedUpdate")] public static void Dive(Humanoid __instance) { if (((Character)__instance).IsPlayer() && (Object)(object)__instance == (Object)(object)Player.m_localPlayer) { ((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))); } } } [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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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++; } logger.LogInfo(field.GetValue(__instance)); type = ((object)__instance).GetType(); field = type.GetField("m_rightItem", BindingFlags.Instance | BindingFlags.NonPublic); if (field.GetValue(__instance) == null) { num++; } logger.LogInfo((object)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(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); } } } } } [HarmonyPostfix] [HarmonyPatch(typeof(Aoe), "Setup")] public static void CheckSetup(Aoe __instance) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) logger.LogInfo((object)__instance.m_damage); } [HarmonyPostfix] [HarmonyPatch(typeof(Player), "Start")] public static void RemovePieceDuplicates() { PieceManager.Instance.RemovePiece("Smelter"); PieceManager.Instance.RemovePiece("cartCopy"); } [HarmonyPostfix] [HarmonyPatch(typeof(Game), "Start")] public static void Remove5PlayersLimit(Game __instance) { __instance.m_difficultyScaleMaxPlayers = 99; } [HarmonyPostfix] [HarmonyPatch(typeof(Pickable), "Awake")] public static void AddFarmingToDandelion(Pickable __instance) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) if (((Object)((Component)__instance).gameObject).name == "Pickable_Dandelion(Clone)" || ((Object)((Component)__instance).gameObject).name == "Pickable_SmokePuff(Clone)" || ((Object)((Component)__instance).gameObject).name == "Pickable_Thistle(Clone)") { __instance.m_pickRaiseSkill = (SkillType)106; } if (((Object)((Component)__instance).gameObject).name == "Pickable_MeatPile(Clone)") { DropData item = default(DropData); item.m_item = ZNetScene.instance.GetPrefab("RottenMeat"); item.m_weight = 0.8f; item.m_stackMin = 1; item.m_stackMax = 1; DropTable extraDrops = ((Component)__instance).GetComponent().m_extraDrops; extraDrops.m_dropMax = 4; extraDrops.m_drops.Add(item); } } [HarmonyPrefix] [HarmonyPatch(typeof(ZNet), "SetPublicReferencePosition")] public static bool ForcePublic(ZNet __instance) { Type type = ((object)__instance).GetType(); FieldInfo field = type.GetField("m_publicReferencePosition", BindingFlags.Instance | BindingFlags.NonPublic); field.SetValue(__instance, true); return false; } [HarmonyPostfix] [HarmonyPatch(typeof(Attack), "ProjectileAttackTriggered")] public static void ShootSecondProjectile(Attack __instance) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Invalid comparison between Unknown and I4 //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Invalid comparison between Unknown and I4 //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown Type type = ((object)__instance).GetType(); FieldInfo field = type.GetField("m_ammoItem", BindingFlags.Instance | BindingFlags.NonPublic); if (field.GetValue(__instance) == null || !(field.GetValue(__instance).GetType() == typeof(ItemData))) { return; } ItemData val = (ItemData)field.GetValue(__instance); if ((int)__instance.m_attackType != 2 || (int)val.m_shared.m_skillType != 8) { return; } type = ((object)__instance).GetType(); field = type.GetField("m_character", BindingFlags.Instance | BindingFlags.NonPublic); if (!(field.GetValue(__instance).GetType() == typeof(Player))) { return; } Player val2 = (Player)field.GetValue(__instance); if ((Object)(object)val2 == (Object)(object)Player.m_localPlayer) { Random random = new Random(); if (((Character)val2).GetSkillFactor((SkillType)8) >= 0.5f && random.Next(2) < 1) { MethodInfo method = typeof(Attack).GetMethod("FireProjectileBurst", BindingFlags.Instance | BindingFlags.NonPublic); method.Invoke(__instance, Array.Empty()); } } } [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; } [HarmonyPostfix] [HarmonyPatch(typeof(ItemDrop), "Start")] public static void SpearRaycast(ItemDrop __instance) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 if ((int)__instance.m_itemData.m_shared.m_skillType != 5) { } } [HarmonyPrefix] [HarmonyPatch(typeof(Player), "CheckRun")] public static void ActivateSecondWind(Player __instance) { if (!((Object)(object)__instance == (Object)(object)Player.m_localPlayer) || ((Character)__instance).HaveStamina(0f)) { return; } SEMan sEMan = ((Character)__instance).GetSEMan(); List 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); } [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)); } } } } [HarmonyPostfix] [HarmonyPatch(typeof(Minimap), "Awake")] private static void OnAwake() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown _diablo = new GameObject(); CustomBoiiiii customBoiiiii = _diablo.AddComponent(); } [HarmonyPrefix] [HarmonyPatch(typeof(Minimap), "OnDestroy")] private static void OnDestroy() { Object.Destroy((Object)(object)_diablo); RenderPipelineManager.beginCameraRendering -= OnRender; } private static void OnRender(ScriptableRenderContext context, Camera camera) { } } private class CustomBoiiiii : MonoBehaviour { private static GameObject _targetToRender; private static List _renderers = new List(); private static Material _postProcessMaterial; private static Texture2D tex; private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) Shader val = Shader.Find("Sprites/Default"); _postProcessMaterial = new Material(val); _targetToRender = Minimap.instance.m_largeRoot; Camera.onPostRender = (CameraCallback)Delegate.Combine((Delegate?)(object)Camera.onPostRender, (Delegate?)new CameraCallback(OnPostRenderTamere)); tex = new Texture2D(8, 8, (TextureFormat)4, false); for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { tex.SetPixel(i, j, Color.red); } } tex.Apply(); } private void OnDestroy() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown Camera.onPostRender = (CameraCallback)Delegate.Remove((Delegate?)(object)Camera.onPostRender, (Delegate?)new CameraCallback(OnPostRenderTamere)); } private void OnPostRenderTamere(Camera camera) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) RenderTexture temporary = RenderTexture.GetTemporary(1024, 1024, 0, (GraphicsFormat)8); List list = new List(); _targetToRender.GetComponentsInChildren(true, list); CommandBuffer val = new CommandBuffer(); val.SetRenderTarget(RenderTargetIdentifier.op_Implicit((Texture)(object)temporary)); foreach (Renderer item in list) { val.DrawRenderer(item, (Material)null); } Graphics.ExecuteCommandBuffer(val); Graphics.Blit((Texture)(object)temporary, camera.activeTexture, _postProcessMaterial); Graphics.DrawTexture(new Rect(0f, 0f, 1600f, 900f), (Texture)(object)temporary); RenderTexture.ReleaseTemporary(temporary); } } private const string pluginGUID = "com.example.GUID"; private const string pluginName = "MyPlugin"; private const string pluginVersion = "1.0.0"; private readonly Harmony HarmonyInstance = new Harmony("com.example.GUID"); public static ManualLogSource logger = Logger.CreateLogSource("MyPlugin"); public AssetBundle waxAsset; public GameObject waxPrefab; public AssetBundle capesBundle; public GameObject capeDeer; public GameObject capeTroll; public GameObject capeWolfWaterproof; public GameObject capeLoxWaterproof; public GameObject capeLinenWaterproof; public GameObject capeFeatherWaterproof; public GameObject capeAsksvinWaterproof; public GameObject capeAshWaterproof; public static AssetBundle newHaldorAssetBundle; public GameObject newHaldor; public AssetBundle foodsAssetBundle; public static ConfigEntry worldExpModifier; 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 AddClonedItems() { //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_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Expected O, but got Unknown //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Expected O, but got Unknown //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Expected O, but got Unknown //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Expected O, but got Unknown //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Expected O, but got Unknown //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Expected O, but got Unknown //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Expected O, but got Unknown //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Expected O, but got Unknown //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Expected O, but got Unknown //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Expected O, but got Unknown //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Expected O, but got Unknown //IL_07cc: Unknown result type (might be due to invalid IL or missing references) //IL_07d3: Expected O, but got Unknown //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_0847: Expected O, but got Unknown //IL_0b6f: Unknown result type (might be due to invalid IL or missing references) //IL_0b76: Expected O, but got Unknown //IL_0bf3: Unknown result type (might be due to invalid IL or missing references) //IL_0bfa: Expected O, but got Unknown //IL_0c6e: Unknown result type (might be due to invalid IL or missing references) //IL_0c75: Expected O, but got Unknown //IL_0cc1: Unknown result type (might be due to invalid IL or missing references) //IL_0cc8: Expected O, but got Unknown //IL_0cf5: Unknown result type (might be due to invalid IL or missing references) //IL_0cfc: Expected O, but got Unknown //IL_0d6a: Unknown result type (might be due to invalid IL or missing references) //IL_0d71: Expected O, but got Unknown //IL_0de5: Unknown result type (might be due to invalid IL or missing references) //IL_0dec: Expected O, but got Unknown //IL_0e38: Unknown result type (might be due to invalid IL or missing references) //IL_0e3f: Expected O, but got Unknown //IL_0e6c: Unknown result type (might be due to invalid IL or missing references) //IL_0e73: Expected O, but got Unknown //IL_0ebf: Unknown result type (might be due to invalid IL or missing references) //IL_0ec6: Expected O, but got Unknown //IL_0f1a: Unknown result type (might be due to invalid IL or missing references) //IL_0f21: Expected O, but got Unknown //IL_0f81: Unknown result type (might be due to invalid IL or missing references) //IL_0f88: Expected O, but got Unknown //IL_0fb1: Unknown result type (might be due to invalid IL or missing references) //IL_1002: Unknown result type (might be due to invalid IL or missing references) //IL_107e: Unknown result type (might be due to invalid IL or missing references) //IL_1085: Expected O, but got Unknown //IL_10e6: Unknown result type (might be due to invalid IL or missing references) //IL_10ed: Expected O, but got Unknown //IL_1116: Unknown result type (might be due to invalid IL or missing references) //IL_1244: Unknown result type (might be due to invalid IL or missing references) //IL_124b: Expected O, but got Unknown //IL_12ac: Unknown result type (might be due to invalid IL or missing references) //IL_12b3: Expected O, but got Unknown //IL_134d: Unknown result type (might be due to invalid IL or missing references) //IL_1354: Expected O, but got Unknown //IL_13b9: Unknown result type (might be due to invalid IL or missing references) //IL_13c0: Expected O, but got Unknown //IL_1415: Unknown result type (might be due to invalid IL or missing references) //IL_1452: Unknown result type (might be due to invalid IL or missing references) //IL_14df: Unknown result type (might be due to invalid IL or missing references) //IL_14e6: Expected O, but got Unknown //IL_14ff: Unknown result type (might be due to invalid IL or missing references) //IL_1506: Expected O, but got Unknown //IL_1538: Unknown result type (might be due to invalid IL or missing references) //IL_153f: Expected O, but got Unknown //IL_15e0: Unknown result type (might be due to invalid IL or missing references) //IL_15e7: Expected O, but got Unknown //IL_16ea: Unknown result type (might be due to invalid IL or missing references) //IL_16f1: Expected O, but got Unknown //IL_1781: Unknown result type (might be due to invalid IL or missing references) //IL_1788: Expected O, but got Unknown //IL_17e6: Unknown result type (might be due to invalid IL or missing references) //IL_17ed: Expected O, but got Unknown //IL_186e: Unknown result type (might be due to invalid IL or missing references) //IL_1875: Expected O, but got Unknown //IL_18d3: Unknown result type (might be due to invalid IL or missing references) //IL_18da: Expected O, but got Unknown //IL_195b: Unknown result type (might be due to invalid IL or missing references) //IL_1962: Expected O, but got Unknown //IL_19db: Unknown result type (might be due to invalid IL or missing references) //IL_19e2: Expected O, but got Unknown //IL_1a4b: Unknown result type (might be due to invalid IL or missing references) //IL_1a52: Expected O, but got Unknown //IL_1acb: Unknown result type (might be due to invalid IL or missing references) //IL_1ad2: Expected O, but got Unknown //IL_1b3b: Unknown result type (might be due to invalid IL or missing references) //IL_1b42: Expected O, but got Unknown //IL_1bbb: Unknown result type (might be due to invalid IL or missing references) //IL_1bc2: Expected O, but got Unknown //IL_1c3a: Unknown result type (might be due to invalid IL or missing references) //IL_1c41: Expected O, but got Unknown //IL_1c53: Unknown result type (might be due to invalid IL or missing references) //IL_1c7c: Unknown result type (might be due to invalid IL or missing references) //IL_1c83: Expected O, but got Unknown //IL_1cec: Unknown result type (might be due to invalid IL or missing references) //IL_1cf3: Expected O, but got Unknown //IL_1d51: Unknown result type (might be due to invalid IL or missing references) //IL_1d58: Expected O, but got Unknown //IL_1dbb: Unknown result type (might be due to invalid IL or missing references) //IL_1dc2: Expected O, but got Unknown //IL_1dcf: Unknown result type (might be due to invalid IL or missing references) //IL_1dd6: Expected O, but got Unknown //IL_1dfc: Unknown result type (might be due to invalid IL or missing references) //IL_1e03: Expected O, but got Unknown //IL_1e10: Unknown result type (might be due to invalid IL or missing references) //IL_1e17: Expected O, but got Unknown //IL_1e71: Unknown result type (might be due to invalid IL or missing references) //IL_1e78: Expected O, but got Unknown //IL_1e85: Unknown result type (might be due to invalid IL or missing references) //IL_1e8c: Expected O, but got Unknown //IL_1eca: Unknown result type (might be due to invalid IL or missing references) //IL_1ed1: Expected O, but got Unknown //IL_1f55: Unknown result type (might be due to invalid IL or missing references) //IL_1f5c: Expected O, but got Unknown //IL_1f73: Unknown result type (might be due to invalid IL or missing references) //IL_1f7a: Expected O, but got Unknown //IL_1f91: Unknown result type (might be due to invalid IL or missing references) //IL_1f98: Expected O, but got Unknown //IL_1faf: Unknown result type (might be due to invalid IL or missing references) //IL_1fb6: Expected O, but got Unknown //IL_1fcd: Unknown result type (might be due to invalid IL or missing references) //IL_1fd4: Expected O, but got Unknown //IL_1feb: Unknown result type (might be due to invalid IL or missing references) //IL_1ff2: Expected O, but got Unknown //IL_2009: Unknown result type (might be due to invalid IL or missing references) //IL_2010: Expected O, but got Unknown //IL_2027: Unknown result type (might be due to invalid IL or missing references) //IL_202e: Expected O, but got Unknown //IL_2045: Unknown result type (might be due to invalid IL or missing references) //IL_204c: Expected O, but got Unknown //IL_2063: Unknown result type (might be due to invalid IL or missing references) //IL_206a: Expected O, but got Unknown //IL_2077: Unknown result type (might be due to invalid IL or missing references) //IL_207e: Expected O, but got Unknown //IL_20c9: Unknown result type (might be due to invalid IL or missing references) //IL_20d0: Expected O, but got Unknown //IL_20e8: Unknown result type (might be due to invalid IL or missing references) //IL_20ef: Expected O, but got Unknown //IL_215d: Unknown result type (might be due to invalid IL or missing references) //IL_2164: Expected O, but got Unknown //IL_22bb: Unknown result type (might be due to invalid IL or missing references) //IL_22c2: Expected O, but got Unknown //IL_2340: Unknown result type (might be due to invalid IL or missing references) //IL_2347: Expected O, but got Unknown //IL_23bb: Unknown result type (might be due to invalid IL or missing references) //IL_23c2: Expected O, but got Unknown //IL_244e: Unknown result type (might be due to invalid IL or missing references) //IL_2455: Expected O, but got Unknown //IL_2520: Unknown result type (might be due to invalid IL or missing references) //IL_2527: Expected O, but got Unknown //IL_25a6: Unknown result type (might be due to invalid IL or missing references) //IL_25ad: Expected O, but got Unknown //IL_2658: Unknown result type (might be due to invalid IL or missing references) //IL_265f: Expected O, but got Unknown //IL_26dd: Unknown result type (might be due to invalid IL or missing references) //IL_26e4: Expected O, but got Unknown //IL_278f: Unknown result type (might be due to invalid IL or missing references) //IL_2796: Expected O, but got Unknown //IL_27e8: Unknown result type (might be due to invalid IL or missing references) //IL_27ef: Expected O, but got Unknown //IL_2810: Unknown result type (might be due to invalid IL or missing references) //IL_2817: Expected O, but got Unknown //IL_2838: Unknown result type (might be due to invalid IL or missing references) //IL_283f: Expected O, but got Unknown //IL_2a1c: Unknown result type (might be due to invalid IL or missing references) //IL_2a23: Expected O, but got Unknown //IL_2a76: Unknown result type (might be due to invalid IL or missing references) //IL_2a7d: Expected O, but got Unknown //IL_2bbb: Unknown result type (might be due to invalid IL or missing references) //IL_2bc2: Expected O, but got Unknown //IL_2c15: Unknown result type (might be due to invalid IL or missing references) //IL_2c1c: Expected O, but got Unknown //IL_2d5a: Unknown result type (might be due to invalid IL or missing references) //IL_2d61: Expected O, but got Unknown //IL_2db4: Unknown result type (might be due to invalid IL or missing references) //IL_2dbb: Expected O, but got Unknown //IL_2e90: Unknown result type (might be due to invalid IL or missing references) //IL_2e97: Expected O, but got Unknown //IL_2ede: Unknown result type (might be due to invalid IL or missing references) //IL_2ee5: Expected O, but got Unknown //IL_2efb: Unknown result type (might be due to invalid IL or missing references) //IL_2f02: Expected O, but got Unknown ItemConfig val = new ItemConfig(); val.Name = "capeDeerHideCopy"; CustomItem val2 = new CustomItem("CapeDeerHideCopy", "CapeDeerHide", val); ItemManager.Instance.AddItem(val2); ItemConfig val3 = new ItemConfig(); val3.Name = "capeWolfCopy"; CustomItem val4 = new CustomItem("CapeWolfCopy", "CapeWolf", val3); ItemManager.Instance.AddItem(val4); ItemConfig val5 = new ItemConfig(); val5.Name = "TrollArmorCopy"; CustomItem val6 = new CustomItem("TrollArmorCopy", "ArmorTrollLeatherChest", val5); ItemManager.Instance.AddItem(val6); PieceConfig val7 = new PieceConfig(); val7.Name = "smelterCopy"; val7.PieceTable = PieceTables.Hammer; CustomPiece val8 = new CustomPiece("Smelter", "smelter", val7); PieceManager.Instance.AddPiece(val8); PieceConfig val9 = new PieceConfig(); val9.Name = "cartCopy"; val9.PieceTable = PieceTables.Hammer; CustomPiece val10 = new CustomPiece("cartCopy", "Cart", val9); PieceManager.Instance.AddPiece(val10); PieceConfig val11 = new PieceConfig(); val11.Name = "infiniteWoodTorch"; val11.AddRequirement("Resin", 20, true); val11.AddRequirement("Wood", 2, true); PieceConfig val12 = new PieceConfig(); val12.Name = "infiniteIronTorch"; val12.AddRequirement("Resin", 20, true); val12.AddRequirement("Iron", 2, true); PieceConfig val13 = new PieceConfig(); val13.Name = "infiniteGuckTorch"; val13.AddRequirement("GreydwarfEye", 20, true); val13.AddRequirement("Iron", 2, true); PieceConfig val14 = new PieceConfig(); val14.Name = "infiniteEyeTorch"; val14.AddRequirement("Guck", 20, true); val14.AddRequirement("Iron", 2, true); CustomPiece val15 = new CustomPiece("InfiniteWoodTorch", "piece_groundtorch_wood", val11); val15.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(val15); CustomPiece val16 = new CustomPiece("InfiniteIronTorch", "piece_groundtorch", val12); val16.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(val16); CustomPiece val17 = new CustomPiece("InfiniteGuckTorch", "piece_groundtorch_green", val13); val17.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(val17); CustomPiece val18 = new CustomPiece("InfiniteEyeTorch", "piece_groundtorch_blue", val14); val18.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(val18); PieceConfig val19 = new PieceConfig(); val19.Name = "infiniteSconce"; val19.AddRequirement("Copper", 2, true); val19.AddRequirement("Wood", 2, true); val19.AddRequirement("Resin", 20, true); CustomPiece val20 = new CustomPiece("InfiniteSconce", "piece_walltorch", val19); val20.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(val20); Shader shader = ((Renderer)((Component)PieceManager.Instance.GetPiece("Smelter").PiecePrefab.transform.Find("New/default")).GetComponent()).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 val21 = new PieceConfig(); val21.Name = "Supercharged Smelter"; val21.Description = "If heat is too slow to melt metals, try extreme cold!"; val21.AddRequirement("Stone", 20, true); val21.AddRequirement("SurtlingCore", 5, true); val21.AddRequirement("TrophyCultist_Hildir", 1, true); val21.PieceTable = PieceTables.Hammer; PieceManager.Instance.AddPiece(new CustomPiece(newHaldorAssetBundle, "SuperchargedSmelter", false, val21)); ((Renderer)((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("New/default")).GetComponent()).material.shader = shader; ((Renderer)((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("Worn/default")).GetComponent()).material.shader = shader; ((Renderer)((Component)PieceManager.Instance.GetPiece("SuperchargedSmelter").PiecePrefab.transform.Find("Broken/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]; PieceConfig val22 = new PieceConfig(); val22.PieceTable = PieceTables.Hammer; val22.Name = "Turbo Cart"; val22.AddRequirement("Wood", 20, true); val22.AddRequirement("BronzeNails", 10, true); val22.AddRequirement("TrophyGoblinBruteBrosShaman", 1, true); val22.AddRequirement("TrophyGoblinBruteBrosBrute", 1, true); PieceManager.Instance.AddPiece(new CustomPiece(newHaldorAssetBundle, "TurboCart", false, val22)); ((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[] componentsInChildren = ((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("cart_Destruction")).GetComponentsInChildren(); MeshRenderer[] array = componentsInChildren; foreach (MeshRenderer val23 in array) { ((Renderer)val23).material.shader = shader; } PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs = PieceManager.Instance.GetPiece("cartCopy").PiecePrefab.GetComponent().m_placeEffect.m_effectPrefabs; componentsInChildren = ((Component)PieceManager.Instance.GetPiece("TurboCart").PiecePrefab.transform.Find("load")).GetComponentsInChildren(); MeshRenderer[] array2 = componentsInChildren; foreach (MeshRenderer val24 in array2) { ((Renderer)val24).material.shader = shader; } ItemConfig val25 = new ItemConfig(); val25.Name = "Bone Crossbow"; val25.Description = "Withered bones waster."; val25.CraftingStation = CraftingStations.Forge; val25.AddRequirement("RoundLog", 15, 5); val25.AddRequirement("Iron", 5, 2); val25.AddRequirement("Root", 1, 1); val25.AddRequirement("BoneFragments", 5, 5); val25.RepairStation = CraftingStations.Forge; CustomItem val26 = new CustomItem("BoneCrossbow", "CrossbowArbalest", val25); val26.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 150f; val26.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 5f; val26.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("BoneCrossbow"); ItemManager.Instance.AddItem(val26); ItemConfig val27 = new ItemConfig(); val27.Name = "Withered Bone Bolt"; val27.Description = "More frail than it's standard bone counterpart, but much less expensive."; val27.CraftingStation = CraftingStations.Forge; val27.AddRequirement("WitheredBone", 4, 0); val27.Amount = 20; CustomItem val28 = new CustomItem("WitheredBoneBolt", "BoltBone", val27); val28.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 16f; ItemManager.Instance.AddItem(val28); ItemConfig val29 = new ItemConfig(); val29.Name = "Wooden Crossbow"; val29.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."; val29.CraftingStation = CraftingStations.Workbench; val29.AddRequirement("Wood", 15, 5); val29.AddRequirement("LeatherScraps", 5, 2); val29.AddRequirement("Resin", 6, 3); val29.RepairStation = CraftingStations.Workbench; CustomItem val30 = new CustomItem("WoodenCrossbow", "CrossbowArbalest", val29); val30.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 55f; val30.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_pierce = 5f; val30.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("WoodenCrossbow"); ItemManager.Instance.AddItem(val30); ItemConfig val31 = new ItemConfig(); val31.Name = "Antler Bolt"; val31.Description = "It is really worth the time to summon and destroy Eikthyr over and over again?"; val31.CraftingStation = CraftingStations.Workbench; val31.AddRequirement("HardAntler", 3, 0); val31.Amount = 20; CustomItem val32 = new CustomItem("AntlerBolt", "BoltBone", val31); val32.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 42f; ItemManager.Instance.AddItem(val32); ItemConfig val33 = new ItemConfig(); val33.Name = "Majestic Carapace Bolt"; val33.Description = "Sturdiest. Bolt. Ever."; val33.CraftingStation = CraftingStations.BlackForge; val33.AddRequirement("QueenDrop", 1, 0); val33.Amount = 20; CustomItem val34 = new CustomItem("CarapaceBolt", "BoltCarapace", val33); val34.ItemDrop.m_itemData.m_shared.m_damages.m_pierce = 112f; val34.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("carapacebolt"); ItemManager.Instance.AddItem(val34); ItemConfig val35 = new ItemConfig(); val35.Name = "Apprentice Hood"; val35.Description = "Makes you look like a real mage"; val35.CraftingStation = CraftingStations.Workbench; val35.AddRequirement("DeerHide", 4, 2); val35.AddRequirement("TrollHide", 5, 3); val35.AddRequirement("TrophyGreydwarfBrute", 1, 0); CustomItem val36 = new CustomItem("ApprenticeHood", "HelmetTrollLeather", val35); Material material = ((Renderer)((Component)val36.ItemDrop).GetComponentInChildren()).material; material.color = new Color(0.3550981f, 0f, 0.5450981f, 1f); GameObject gameObject = ((Component)((Component)val36.ItemDrop).gameObject.transform.Find("attach_skin/hood")).gameObject; material = ((Renderer)gameObject.GetComponentInChildren()).material; material.color = new Color(0.3550981f, 0f, 0.5450981f, 1f); val36.ItemDrop.m_itemData.m_shared.m_setStatusEffect = null; val36.ItemDrop.m_itemData.m_shared.m_setName = ""; val36.ItemDrop.m_itemData.m_shared.m_setSize = 0; val36.ItemDrop.m_itemData.m_shared.m_eitrRegenModifier = 0.1f; ItemManager.Instance.AddItem(val36); ItemConfig val37 = new ItemConfig(); val37.Name = "Apprentice Robe"; val37.Description = "Fancy."; val37.CraftingStation = CraftingStations.Workbench; val37.AddRequirement("DeerHide", 8, 4); val37.AddRequirement("TrollHide", 10, 5); val37.AddRequirement("TrophyGreydwarfShaman", 2, 1); CustomItem val38 = new CustomItem("ApprenticeRobe", "ArmorTrollLeatherChest", val37); material = ((Renderer)((Component)val38.ItemDrop).GetComponentInChildren()).material; material.color = new Color(0.3550981f, 0f, 0.5450981f, 1f); gameObject = ((Component)((Component)val38.ItemDrop).gameObject.transform.Find("attach_skin/shorts")).gameObject; SkinnedMeshRenderer component = gameObject.GetComponent(); List list = new List(); list.Add(newHaldorAssetBundle.LoadAsset("TrollLeatherChest")); list[0].shader = ItemManager.Instance.GetItem("TrollArmorCopy").ItemDrop.m_itemData.m_shared.m_armorMaterial.shader; ((Renderer)component).SetMaterials(list); material = newHaldorAssetBundle.LoadAsset("TrollLeatherChest"); val38.ItemDrop.m_itemData.m_shared.m_armorMaterial = material; val38.ItemDrop.m_itemData.m_shared.m_setStatusEffect = null; val38.ItemDrop.m_itemData.m_shared.m_setName = ""; val38.ItemDrop.m_itemData.m_shared.m_setSize = 0; val38.ItemDrop.m_itemData.m_shared.m_eitrRegenModifier = 0.2f; ItemManager.Instance.AddItem(val38); ItemConfig val39 = new ItemConfig(); val39.Name = "Apprentice Leggings"; val39.Description = "Not made of spandex."; val39.CraftingStation = CraftingStations.Workbench; val39.AddRequirement("DeerHide", 8, 4); val39.AddRequirement("TrollHide", 10, 5); val39.AddRequirement("TrophyGreydwarf", 2, 1); CustomItem val40 = new CustomItem("ApprenticeLegs", "ArmorTrollLeatherLegs", val39); material = newHaldorAssetBundle.LoadAsset("TrollLeatherPants"); val40.ItemDrop.m_itemData.m_shared.m_armorMaterial = material; val40.ItemDrop.m_itemData.m_shared.m_setStatusEffect = null; val40.ItemDrop.m_itemData.m_shared.m_setName = ""; val40.ItemDrop.m_itemData.m_shared.m_setSize = 0; val40.ItemDrop.m_itemData.m_shared.m_eitrRegenModifier = 0.2f; ItemManager.Instance.AddItem(val40); ItemConfig val41 = new ItemConfig(); val41.Name = "Chef Hat"; val41.Description = "Bork! Bork! Bork! \n ~Sweedish Chef - The Muppets"; val41.CraftingStation = CraftingStations.Workbench; val41.AddRequirement("DeerHide", 100, 0); val41.AddRequirement("LeatherScraps", 200, 0); val41.AddRequirement("TrophySkeletonHildir", 1, 0); CustomItem val42 = new CustomItem("ChefHat", "HelmetTrollLeather", val41); val42.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset("SetEffect_ChefHat"); val42.ItemDrop.m_itemData.m_shared.m_subtitle = "Doubles your chance to cook a bonus item!"; material = ((Renderer)((Component)val42.ItemDrop).GetComponentInChildren()).material; material.color = Color.white; gameObject = ((Component)((Component)val42.ItemDrop).gameObject.transform.Find("attach_skin/hood")).gameObject; material = ((Renderer)gameObject.GetComponentInChildren()).material; material.color = Color.white; val42.ItemDrop.m_itemData.m_shared.m_setStatusEffect = null; val42.ItemDrop.m_itemData.m_shared.m_setName = ""; val42.ItemDrop.m_itemData.m_shared.m_setSize = 0; val42.ItemDrop.m_itemData.m_shared.m_icons[0] = ((StatusEffect)newHaldorAssetBundle.LoadAsset("SetEffect_ChefHat")).m_icon; ItemManager.Instance.AddItem(val42); ItemConfig val43 = new ItemConfig(); val43.Name = "Mining Hat"; CustomItem val44 = new CustomItem("MiningHat", "HelmetDverger", val43); val44.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset("SetEffect_MiningHat"); ItemManager.Instance.AddItem(val44); ItemConfig val45 = new ItemConfig(); val45.AddRequirement("DeerHide", 8, 0); val45.AddRequirement("LeatherScraps", 10, 0); val45.AddRequirement("TrophyBlob", 1, 0); val45.AddRequirement("Raspberry", 5, 0); val45.AddRequirement("Mushroom", 5, 0); val45.AddRequirement("Dandelion", 5, 0); val45.AddRequirement("Blueberries", 5, 0); val45.AddRequirement("Thistle", 5, 0); val45.AddRequirement("BjornPaw", 1, 0); val45.Name = "Gloves"; CustomItem val46 = new CustomItem("GatheringGloves", "TrinketBlackDamageHealth", val45); val46.ItemDrop.m_itemData.m_shared.m_equipStatusEffect = (StatusEffect)(object)newHaldorAssetBundle.LoadAsset("SetEffect_GathererGloves"); val46.ItemDrop.m_itemData.m_shared.m_subtitle = ""; val46.ItemDrop.m_itemData.m_shared.m_icons[0] = val46.ItemDrop.m_itemData.m_shared.m_equipStatusEffect.m_icon; val46.ItemDrop.m_itemData.m_shared.m_description = "Gathering has never been easier!"; val46.ItemDrop.m_itemData.m_shared.m_blockAdrenaline = 0f; val46.ItemDrop.m_itemData.m_shared.m_fullAdrenalineSE = null; val46.ItemDrop.m_itemData.m_shared.m_maxAdrenaline = 0f; val46.ItemDrop.m_itemData.m_shared.m_perfectBlockAdrenaline = 0f; ItemManager.Instance.AddItem(val46); ItemConfig val47 = new ItemConfig(); val47.CraftingStation = CraftingStations.Cauldron; val47.Name = "Meatloaf"; val47.Description = "Meatloaf.... it sustains you. It's like........ oatmeal."; val47.Icon = foodsAssetBundle.LoadAsset("meatloaficonreal"); val47.AddRequirement("BjornMeat", 3, 0); val47.AddRequirement("RawMeat", 1, 0); val47.AddRequirement("DeerMeat", 1, 0); val47.AddRequirement("Carrot", 1, 0); val47.Amount = 3; CustomItem val48 = new CustomItem("Meatloaf", "BloodPudding", val47); val48.ItemDrop.m_itemData.m_shared.m_food = 50f; val48.ItemDrop.m_itemData.m_shared.m_foodStamina = 45f; val48.ItemDrop.m_itemData.m_shared.m_foodRegen = 3f; ItemManager.Instance.AddItem(val48); ItemConfig val49 = new ItemConfig(); val49.CraftingStation = CraftingStations.Cauldron; val49.Name = "Dandelion Salad"; val49.Description = "Dandelion salad. Yummy yummy."; val49.Icon = foodsAssetBundle.LoadAsset("dandelionsalad"); val49.AddRequirement("Dandelion", 3, 0); val49.AddRequirement("BeechSeeds", 2, 0); val49.AddRequirement("Mushroom", 1, 0); val49.Amount = 2; CustomItem val50 = new CustomItem("DandelionSalad", "Salad", val49); val50.ItemDrop.m_itemData.m_shared.m_food = 13f; val50.ItemDrop.m_itemData.m_shared.m_foodStamina = 40f; val50.ItemDrop.m_itemData.m_shared.m_foodRegen = 2f; ItemManager.Instance.AddItem(val50); ItemConfig val51 = new ItemConfig(); val51.CraftingStation = CraftingStations.Cauldron; val51.Name = "EitrJam"; val51.Description = "Surely there are magical energies to be drawn from these ingredients... Because taste sure isn't."; val51.Icon = foodsAssetBundle.LoadAsset("eitrjam"); val51.AddRequirement("Pukeberries", 6, 0); val51.AddRequirement("MushroomYellow", 2, 0); val51.AddRequirement("AncientSeed", 1, 0); val51.Amount = 2; CustomItem val52 = new CustomItem("EitrJam", "QueensJam", val51); val52.ItemDrop.m_itemData.m_shared.m_food = 20f; val52.ItemDrop.m_itemData.m_shared.m_foodStamina = 20f; val52.ItemDrop.m_itemData.m_shared.m_foodRegen = 2f; val52.ItemDrop.m_itemData.m_shared.m_foodEitr = 31f; ItemManager.Instance.AddItem(val52); ItemConfig val53 = new ItemConfig(); val53.Name = "Goulash"; val53.Description = "Actually it's like gibelotte. Nobody knows what it is, but as least it's got turninp in it."; val53.CraftingStation = CraftingStations.Cauldron; val53.AddRequirement("Turnip", 3, 0); val53.AddRequirement("Guck", 2, 0); val53.AddRequirement("Ooze", 2, 0); val53.Amount = 2; CustomItem val54 = new CustomItem("Goulash", "TurnipStew", val53); val54.ItemDrop.m_itemData.m_shared.m_food = 10f; val54.ItemDrop.m_itemData.m_shared.m_foodStamina = 35f; val54.ItemDrop.m_itemData.m_shared.m_foodRegen = 2f; val54.ItemDrop.m_itemData.m_shared.m_foodEitr = 40f; ItemManager.Instance.AddItem(val54); ItemConfig val55 = new ItemConfig(); val55.Name = "Magic Sausage"; val55.Description = "It's long and hard."; val55.CraftingStation = CraftingStations.Cauldron; val55.AddRequirement("Entrails", 4, 0); val55.AddRequirement("WolfMeat", 1, 0); val55.AddRequirement("Crystal", 1, 0); val55.Amount = 2; CustomItem val56 = new CustomItem("MagicSausage", "Sausages", val55); val56.ItemDrop.m_itemData.m_shared.m_food = 45f; val56.ItemDrop.m_itemData.m_shared.m_foodStamina = 15f; val56.ItemDrop.m_itemData.m_shared.m_foodRegen = 3f; val56.ItemDrop.m_itemData.m_shared.m_foodEitr = 50f; ItemManager.Instance.AddItem(val56); ItemConfig val57 = new ItemConfig(); val57.Name = "Broth"; val57.Description = "Can't tell if it's made from beef bones, chicken bones, vegetables..."; val57.CraftingStation = CraftingStations.Cauldron; val57.AddRequirement("Wishbone", 1, 0); val57.AddRequirement("Carrot", 1, 0); val57.AddRequirement("Turnip", 1, 0); val57.Icon = foodsAssetBundle.LoadAsset("brothicon"); CustomItem val58 = new CustomItem("Broth", "MeadBugRepellent", val57); val58.ItemDrop.m_itemData.m_shared.m_itemType = (ItemType)1; val58.ItemDrop.m_itemData.m_shared.m_consumeStatusEffect = null; ItemManager.Instance.AddItem(val58); ItemConfig val59 = new ItemConfig(); val59.Name = "Fish Stew"; val59.Description = "Only missing noodles, and then it's a ramen."; val59.CraftingStation = CraftingStations.Cauldron; val59.AddRequirement("FishCooked", 1, 0); val59.AddRequirement("Broth", 1, 0); val59.Icon = foodsAssetBundle.LoadAsset("fishstew"); CustomItem val60 = new CustomItem("FishStew", "SerpentStew", val59); val60.ItemDrop.m_itemData.m_shared.m_food = 85f; val60.ItemDrop.m_itemData.m_shared.m_foodStamina = 75f; val60.ItemDrop.m_itemData.m_shared.m_foodRegen = 4f; ItemManager.Instance.AddItem(val60); ItemConfig val61 = new ItemConfig(); val61.Name = "Organic Iron"; val61.Description = "The magical energies from the Swamp Key allows its mineral iron to be easily convertible into organic iron."; val61.CraftingStation = CraftingStations.Cauldron; val61.AddRequirement("CryptKey", 1, 0); val61.Amount = 5; val61.Icon = foodsAssetBundle.LoadAsset("organiciron"); CustomItem val62 = new CustomItem("OrganicIron", "PowderedDragonEgg", val61); ItemManager.Instance.AddItem(val62); ItemConfig val63 = new ItemConfig(); val63.Name = "PotionPrefab"; val63.Description = "SHOULD NOT BE SEEN!!!"; CustomItem val64 = new CustomItem("PotionPrefab", "MeadHealthMajor", val63); ItemManager.Instance.AddItem(val64); ItemConfig val65 = new ItemConfig(); val65.Name = "Salty Mead"; val65.Description = "Made from the finest tears that could rivalize with those from League of Legends."; val65.CraftingStation = CraftingStations.MeadKetill; val65.AddRequirement("DragonTear", 1, 0); val65.Icon = foodsAssetBundle.LoadAsset("SaltyMeadBase"); CustomItem val66 = new CustomItem("SaltyMead", "MeadBaseFrostResist", val65); ItemManager.Instance.AddItem(val66); ItemConfig val67 = new ItemConfig(); val67.Name = "Salty Potion"; val67.Description = "Drink the tears of your enemies."; val67.Icon = foodsAssetBundle.LoadAsset("SaltyPotion"); CustomItem val68 = new CustomItem("SaltyPotion", "MeadHealthMajor", val67); val68.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; val68.ItemDrop.m_itemData.m_shared.m_consumeStatusEffect.m_startEffects = startEffects; ItemManager.Instance.AddItem(val68); CustomItem val69 = new CustomItem("newMossyBait", "FishingBaitForest"); ItemManager.Instance.AddItem(val69); CustomItem val70 = new CustomItem("newStickyBait", "FishingBaitSwamp"); ItemManager.Instance.AddItem(val70); CustomItem val71 = new CustomItem("newStingyBait", "FishingBaitPlains"); ItemManager.Instance.AddItem(val71); CustomItem val72 = new CustomItem("newHeavyBait", "FishingBaitOcean"); ItemManager.Instance.AddItem(val72); CustomItem val73 = new CustomItem("newMistyBait", "FishingBaitMistlands"); ItemManager.Instance.AddItem(val73); CustomItem val74 = new CustomItem("newHotBait", "FishingBaitAshlands"); ItemManager.Instance.AddItem(val74); CustomItem val75 = new CustomItem("newFrostyBait", "FishingBaitDeepNorth"); ItemManager.Instance.AddItem(val75); CustomItem val76 = new CustomItem("newColdBait", "FishingBaitCave"); ItemManager.Instance.AddItem(val76); CustomItem val77 = new CustomItem("newFishingRod", "FishingRod"); ItemManager.Instance.AddItem(val77); CustomItem val78 = new CustomItem("newHoops", "BarrelRings"); ItemManager.Instance.AddItem(val78); ItemConfig val79 = new ItemConfig(); val79.Name = "Worm food"; val79.Description = "Word is a certain peddler is looking for some."; val79.CraftingStation = CraftingStations.FoodPreparationTable; val79.Icon = foodsAssetBundle.LoadAsset("WormFood"); CustomItem val80 = new CustomItem("WormFood", "BarleyFlour", val79); val80.ItemDrop.m_itemData.m_shared.m_value = 100; ItemConfig val81 = new ItemConfig(); val81.Name = "Phantasmal Sword"; val81.Description = "Spooky scary. Goes right through physical things."; val81.CraftingStation = CraftingStations.Forge; val81.AddRequirement("RoundLog", 10, 5); val81.AddRequirement("Ectoplasm", 2, 1); val81.AddRequirement("Tin", 6, 3); val81.RepairStation = CraftingStations.Forge; CustomItem val82 = new CustomItem("PhantasmalSword", "THSwordSlayer", val81); val82.ItemDrop.m_itemData.m_shared.m_damages.m_slash = 0f; val82.ItemDrop.m_itemData.m_shared.m_damages.m_spirit = 100f; val82.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_spirit = 20f; val82.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_slash = 0f; val82.ItemDrop.m_itemData.m_shared.m_attackForce = 25f; val82.ItemDrop.m_itemData.m_shared.m_blockPower = 32f; val82.ItemDrop.m_itemData.m_shared.m_attack.m_attackStamina = 18f; val82.ItemDrop.m_itemData.m_shared.m_deflectionForce = 25f; val82.ItemDrop.m_itemData.m_shared.m_deflectionForcePerLevel = 5f; val82.ItemDrop.m_itemData.m_shared.m_toolTier = 1; val82.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("PhantasmalSword"); ItemManager.Instance.AddItem(val82); ItemConfig val83 = new ItemConfig(); val83.Name = "Fire Knife"; val83.Description = "Enough resin to burn for a lifetime."; val83.CraftingStation = CraftingStations.Workbench; val83.AddRequirement("Wood", 2, 0); val83.AddRequirement("Flint", 4, 2); val83.AddRequirement("LeatherScraps", 2, 0); val83.AddRequirement("Resin", 50, 10); val83.RepairStation = CraftingStations.Workbench; CustomItem val84 = new CustomItem("FireKnife", "KnifeFlint", val83); val84.ItemDrop.m_itemData.m_shared.m_damages.m_fire = 10f; val84.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_fire = 1f; val84.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("FireKnife"); ItemManager.Instance.AddItem(val84); ItemConfig val85 = new ItemConfig(); val85.Name = "Fire Wand"; val85.Description = "Pew! Pew! Made from only the finest of finewoods among the selection."; val85.CraftingStation = CraftingStations.Forge; val85.AddRequirement("FineWood", 18, 5); val85.AddRequirement("Copper", 4, 2); val85.AddRequirement("Bronze", 2, 1); val85.AddRequirement("Acorn", 2, 0); val85.AddRequirement("SurtlingCore", 1, 1); val85.RepairStation = CraftingStations.Forge; CustomItem val86 = new CustomItem("FireWand", "StaffFireball", val85); val86.ItemDrop.m_itemData.m_shared.m_toolTier = 1; val86.ItemDrop.m_itemData.m_shared.m_damages.m_blunt = 12f; val86.ItemDrop.m_itemData.m_shared.m_damages.m_fire = 24f; val86.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_fire = 4f; val86.ItemDrop.m_itemData.m_shared.m_attack.m_attackEitr = 10f; val86.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("FireWand"); ItemManager.Instance.AddItem(val86); ItemConfig val87 = new ItemConfig(); val87.Name = "Frost Wand"; val87.Description = "BRRRRRRR! Made from only the finest of corewoods among the selection."; val87.CraftingStation = CraftingStations.Forge; val87.AddRequirement("RoundLog", 28, 10); val87.AddRequirement("Silver", 4, 2); val87.AddRequirement("Bronze", 2, 1); val87.AddRequirement("FreezeGland", 20, 2); val87.RepairStation = CraftingStations.Forge; CustomItem val88 = new CustomItem("FrostWand", "StaffIceShards", val87); val88.ItemDrop.m_itemData.m_shared.m_toolTier = 1; val88.ItemDrop.m_itemData.m_shared.m_damages.m_frost = 25f; val88.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_frost = 1f; val88.ItemDrop.m_itemData.m_shared.m_attack.m_attackEitr = 4f; val88.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("FrostWand"); ItemManager.Instance.AddItem(val88); ItemConfig val89 = new ItemConfig(); val89.Name = "Lightning Wand"; val89.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\"."; val89.CraftingStation = CraftingStations.Forge; val89.AddRequirement("Iron", 3, 3); val89.AddRequirement("Copper", 40, 5); val89.AddRequirement("Ruby", 10, 1); val89.AddRequirement("Feathers", 6, 0); val89.RepairStation = CraftingStations.Forge; CustomItem val90 = new CustomItem("LightningWand", "StaffLightning", val89); val90.ItemDrop.m_itemData.m_shared.m_toolTier = 1; val90.ItemDrop.m_itemData.m_shared.m_damages.m_lightning = 10f; val90.ItemDrop.m_itemData.m_shared.m_damagesPerLevel.m_lightning = 1f; val90.ItemDrop.m_itemData.m_shared.m_attack.m_reloadEitrDrain = 12f; val90.ItemDrop.m_itemData.m_shared.m_icons[0] = newHaldorAssetBundle.LoadAsset("LightningWand"); ItemManager.Instance.AddItem(val90); ItemConfig val91 = new ItemConfig(); val91.Name = "Blood Wand"; val91.CraftingStation = CraftingStations.Forge; val91.AddRequirement("Tin", 1, 1); val91.AddRequirement("Bloodbag", 1, 1); val91.RepairStation = CraftingStations.Forge; CustomItem val92 = new CustomItem(newHaldorAssetBundle, "BloodWand", false, val91); ItemManager.Instance.AddItem(val92); StatusEffect val93 = newHaldorAssetBundle.LoadAsset("StatusEffect_SecondWind"); CustomStatusEffect val94 = new CustomStatusEffect(val93, false); ItemManager.Instance.AddStatusEffect(val94); StatusEffect val95 = newHaldorAssetBundle.LoadAsset("StatusEffect_AoEHeal"); CustomStatusEffect val96 = new CustomStatusEffect(val95, false); ItemManager.Instance.AddStatusEffect(val96); Projectile component2 = ItemManager.Instance.GetItem("BloodWand").ItemDrop.m_itemData.m_shared.m_attack.m_attackProjectile.GetComponent(); GameObject prefab = component2.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)component2).transform.Find("flames (1)")).GetComponent().material.shader = shader; ((Component)((Component)component2).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 val97 = new ItemConfig(); val97.Name = "ResinBomb"; val97.CraftingStation = CraftingStations.Workbench; val97.AddRequirement("Resin", 12, 0); val97.AddRequirement("LeatherScraps", 5, 0); val97.RepairStation = CraftingStations.Workbench; CustomItem val98 = new CustomItem(newHaldorAssetBundle, "BombResin", false, val97); ItemManager.Instance.AddItem(val98); ItemDrop itemDrop = ItemManager.Instance.GetItem("BombResin").ItemDrop; GameObject attackProjectile = itemDrop.m_itemData.m_shared.m_attack.m_attackProjectile; GameObject spawnOnHit = attackProjectile.GetComponent().m_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; ItemConfig val99 = new ItemConfig(); val99.Name = "FrostBomb"; val99.CraftingStation = CraftingStations.Workbench; val99.AddRequirement("Resin", 12, 0); val99.AddRequirement("LeatherScraps", 5, 0); val99.RepairStation = CraftingStations.Workbench; CustomItem val100 = new CustomItem(newHaldorAssetBundle, "BombFrost", false, val99); ItemManager.Instance.AddItem(val100); itemDrop = ItemManager.Instance.GetItem("BombFrost").ItemDrop; attackProjectile = itemDrop.m_itemData.m_shared.m_attack.m_attackProjectile; spawnOnHit = attackProjectile.GetComponent().m_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; ItemConfig val101 = new ItemConfig(); val101.Name = "HealingBomb"; val101.CraftingStation = CraftingStations.Workbench; val101.AddRequirement("Resin", 12, 0); val101.AddRequirement("LeatherScraps", 5, 0); val101.RepairStation = CraftingStations.Workbench; CustomItem val102 = new CustomItem(newHaldorAssetBundle, "BombHealing", false, val101); ItemManager.Instance.AddItem(val102); itemDrop = ItemManager.Instance.GetItem("BombHealing").ItemDrop; attackProjectile = itemDrop.m_itemData.m_shared.m_attack.m_attackProjectile; spawnOnHit = attackProjectile.GetComponent().m_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/interior_dust")).GetComponent().material.shader = shader2; ((Component)spawnOnHit.transform.Find("particles/splash_overtime")).GetComponent().material.shader = shader2; ItemConfig val103 = new ItemConfig(); val103.Name = "MegaWisplight"; val103.AddRequirement("Wisp", 100, 0); val103.AddRequirement("Silver", 1, 0); val103.AddRequirement("TrophyTick", 1, 0); CustomItem val104 = new CustomItem("MegaWisplight", "Demister", val103); SE_Demister val105 = (SE_Demister)val104.ItemDrop.m_itemData.m_shared.m_equipStatusEffect; ((Component)val105.m_ballPrefab.transform.Find("effects/Particle System Force Field")).GetComponent().endRange = 20f; ItemManager.Instance.AddItem(val104); 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.KilledModer; 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.KilledYagluth; 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_0800: Unknown result type (might be due to invalid IL or missing references) //IL_080a: 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)); RecipeConfig val18 = new RecipeConfig(); val18.Name = "Worm Food"; val18.Item = "WormFood"; val18.CraftingStation = CraftingStations.FoodPreparationTable; val18.AddRequirement("RottenMeat", 1, 0); ItemManager.Instance.AddRecipe(new CustomRecipe(val18)); } }