Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of GraveyardPieces v1.0.4
BepInEx/plugins/GraveyardPieces/GraveyardPieces.dll
Decompiled 2 years ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using HarmonyLib; using Jotunn; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Managers; using Jotunn.Utils; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("GraveyardPieces")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("GraveyardPieces")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("e3243d22-4307-4008-ba36-9f326008cde5")] [assembly: AssemblyFileVersion("1.0.4")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.4.0")] namespace GraveyardPieces; [BepInPlugin("MagicMike.GraveyardPieces", "GraveyardPieces", "1.0.4")] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class GraveyardPiecesMod : BaseUnityPlugin { internal enum Toggle { On = 1, Off = 0 } [HarmonyPatch(typeof(Pickable), "Awake")] public class DropYields { private static void Postfix(Pickable __instance) { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) if (enableHalloween.Value == Toggle.On) { ZNetView nview = __instance.m_nview; ZDO val = ((nview != null) ? nview.GetZDO() : null); if (val != null && ((Object)((Component)__instance).gameObject).name.Contains("Pickable_Pumpkin_Plant")) { GameObject prefab = PrefabManager.Instance.GetPrefab("mm_pumpkin"); __instance.m_amount = pumpkinDrop.Value; __instance.m_dontScale = true; __instance.m_extraDrops.m_drops.Add(new DropData { m_item = prefab, m_stackMin = seedsDrop.Value, m_stackMax = seedsDrop.Value, m_weight = 0.01f, m_dontScale = true }); __instance.m_extraDrops.m_dropMin = 1; __instance.m_extraDrops.m_dropMax = 1; __instance.m_extraDrops.m_dropChance = 1f; __instance.m_respawnTimeMinutes = respawnTimePumpkin.Value; } } } } [HarmonyPatch(typeof(Pickable), "GetHoverText")] public static class PickableHoverText { [HarmonyPostfix] public static void Postfix(Pickable __instance, ref string __result) { if (enableGrowTimer.Value && enableHalloween.Value == Toggle.On && __instance.m_picked && __instance.m_nview.GetZDO() != null && ((Object)((Component)__instance).gameObject).name.Contains("Pickable_Pumpkin_Plant")) { float growthTime = respawnTimePumpkin.Value * 60; DateTime placedTime = new DateTime(__instance.m_nview.GetZDO().GetLong(ZDOVars.s_pickedTime, 0L)); string text = FormatTimeString(growthTime, placedTime); __result = Localization.instance.Localize(__instance.GetHoverName()) + "\n" + text; } } } [HarmonyPatch(typeof(Plant), "GetHoverText")] public static class PlantHoverText { [HarmonyPostfix] public static void Postfix(Plant __instance, ref string __result) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (enableGrowTimer.Value && enableHalloween.Value == Toggle.On && (int)__instance.m_status == 0 && __instance.m_nview.GetZDO() != null && ((Object)((Component)__instance).gameObject).name.Contains("sapling_pumpkin")) { float growTime = __instance.GetGrowTime(); DateTime placedTime = new DateTime(__instance.m_nview.GetZDO().GetLong(ZDOVars.s_plantTime, ZNet.instance.GetTime().Ticks)); string text = FormatTimeString(growTime, placedTime); __result = __result + "\n" + text; } } } internal const string PluginName = "GraveyardPieces"; internal const string PluginVersion = "1.0.4"; internal const string Author = "MagicMike"; internal const string PluginGUID = "MagicMike.GraveyardPieces"; public AssetBundle magicBundle; private GameObject _gameObject; private CustomPiece _customPiece; private CustomItem _customItem; private CustomPrefab _customPrefab; internal static ConfigEntry<Toggle> modEnabled; internal static ConfigEntry<Toggle> enableHalloween; internal static ConfigEntry<int> nexusID; internal static ConfigEntry<bool> enableGrowTimer; internal static ConfigEntry<int> growTimePumpkin; internal static ConfigEntry<int> respawnTimePumpkin; internal static ConfigEntry<float> minScalePumpkin; internal static ConfigEntry<float> maxScalePumpkin; internal static ConfigEntry<float> growRadiusPumpkin; internal static ConfigEntry<bool> cultivatedGroundPumpkin; internal static ConfigEntry<int> pumpkinDrop; internal static ConfigEntry<int> seedsDrop; public EffectList buildWood; public EffectList breakWood; public EffectList hitWood; public EffectList buildMetal; public EffectList breakMetal; public EffectList hitMetal; public EffectList buildStone; public EffectList breakStone; public EffectList hitStone; public EffectList gateOpen; public EffectList gateClose; public EffectList buildGround; public EffectList hitPlant; public EffectList fireAddFuel; private Harmony harmony = new Harmony("MagicMike.GraveyardPieces"); private void Awake() { InitConfig(); if (modEnabled.Value != Toggle.On) { return; } LoadAssets(); PrefabManager.OnVanillaPrefabsAvailable += LoadSFX; PrefabManager.OnVanillaPrefabsAvailable += LoadPrefabs; ((BaseUnityPlugin)this).Config.SaveOnConfigSet = true; if (enableHalloween.Value == Toggle.On) { ((BaseUnityPlugin)this).Config.SettingChanged += delegate(object sender, SettingChangedEventArgs args) { SettingChanged(((BaseUnityPlugin)this).Config, args); }; } harmony = Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "MagicMike.GraveyardPieces"); } private void InitConfig() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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) //IL_0082: Expected O, but got Unknown //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Expected O, but got Unknown //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Expected O, but got Unknown //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Expected O, but got Unknown //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Expected O, but got Unknown //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Expected O, but got Unknown //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Expected O, but got Unknown //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Expected O, but got Unknown //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Expected O, but got Unknown //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Expected O, but got Unknown //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Expected O, but got Unknown //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Expected O, but got Unknown //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Expected O, but got Unknown //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Expected O, but got Unknown //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Expected O, but got Unknown //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Expected O, but got Unknown //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Expected O, but got Unknown //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Expected O, but got Unknown modEnabled = ((BaseUnityPlugin)this).Config.Bind<Toggle>("01 - General Settings", "Enable Plugin", Toggle.On, new ConfigDescription("Enable or disable this Plugin.", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true, Order = 3 } })); enableHalloween = ((BaseUnityPlugin)this).Config.Bind<Toggle>("01 - General Settings", "Enable Halloween", Toggle.On, new ConfigDescription("Enable Halloween items and pieces. (logout required).", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = false, Order = 2 } })); nexusID = ((BaseUnityPlugin)this).Config.Bind<int>("01 - General Settings", "NexusID", 2565, new ConfigDescription("Nexus mod ID for updates.", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { ReadOnly = true, Order = 1 } })); enableGrowTimer = ((BaseUnityPlugin)this).Config.Bind<bool>("02 - Pumpkin Grow Settings", "Enable Grow Timer", true, new ConfigDescription("Displays growth time remaining on pumpkins as hover text.", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = false, Order = 9 } })); growTimePumpkin = ((BaseUnityPlugin)this).Config.Bind<int>("02 - Pumpkin Grow Settings", "Pumpkin Grow Time", 3600, new ConfigDescription("Time in seconds for a pumpkin to grow. (86400 = 24hrs, 43200 = 12hrs, 21600 = 6hrs, 3600 = 1hr)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(60, 86400), new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true, Order = 8 } })); minScalePumpkin = ((BaseUnityPlugin)this).Config.Bind<float>("02 - Pumpkin Grow Settings", "Minimum Plant Scale", 0.9f, new ConfigDescription("Minimum size for a pumpkin plant.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.5f, 2.5f), new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true, Order = 7 } })); maxScalePumpkin = ((BaseUnityPlugin)this).Config.Bind<float>("02 - Pumpkin Grow Settings", "Maximum Plant Scale", 1.1f, new ConfigDescription("Maximum size for a pumpkin plant. (Needs to be the same as or more than Minimum Plant Scale)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.5f, 2.5f), new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true, Order = 6 } })); growRadiusPumpkin = ((BaseUnityPlugin)this).Config.Bind<float>("02 - Pumpkin Grow Settings", "Pumpkin Grow Radius", 0.5f, new ConfigDescription("Area needed for a pumpkin to grow healthy.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.5f, 2f), new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true, Order = 5 } })); respawnTimePumpkin = ((BaseUnityPlugin)this).Config.Bind<int>("02 - Pumpkin Grow Settings", "Pumpkin Respawn Time", 1440, new ConfigDescription("Time in minutes for pumpkin to respawn. (1440 = 24hrs, 720 = 12hrs, 360 = 6hrs, 60 = 1hr)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 1440), new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true, Order = 4 } })); pumpkinDrop = ((BaseUnityPlugin)this).Config.Bind<int>("02 - Pumpkin Grow Settings", "Pumpkin Drop Amount", 9, new ConfigDescription("Amount of pumpkins to drop from a plant.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 20), new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true, Order = 3 } })); seedsDrop = ((BaseUnityPlugin)this).Config.Bind<int>("02 - Pumpkin Grow Settings", "Seeds Drop Amount", 6, new ConfigDescription("Amount of pumpkin seeds to drop from a plant.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 20), new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true, Order = 2 } })); cultivatedGroundPumpkin = ((BaseUnityPlugin)this).Config.Bind<bool>("02 - Pumpkin Grow Settings", "Cultivated Ground Only", true, new ConfigDescription("Enable this for the pumpkins to only be grown on cultivated ground.", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true, Order = 1 } })); } public void LoadAssets() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown try { magicBundle = AssetUtils.LoadAssetBundleFromResources("graveyardpieces", Assembly.GetExecutingAssembly()); _gameObject = magicBundle.LoadAsset<GameObject>("Pickable_Pumpkin_Plant"); _customPrefab = new CustomPrefab(_gameObject, false); PrefabManager.Instance.AddPrefab(_customPrefab); } catch (Exception ex) { Logger.LogError((object)("Exception caught while loading bundle: " + ex.Message)); } } private void LoadSFX() { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Expected O, but got Unknown //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Expected O, but got Unknown //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013b: 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_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Expected O, but got Unknown //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Expected O, but got Unknown //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Expected O, but got Unknown //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Expected O, but got Unknown //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Expected O, but got Unknown //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Expected O, but got Unknown //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Expected O, but got Unknown //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Expected O, but got Unknown //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Expected O, but got Unknown //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Expected O, but got Unknown //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Expected O, but got Unknown //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Expected O, but got Unknown //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Expected O, but got Unknown //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Expected O, but got Unknown //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Expected O, but got Unknown //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Expected O, but got Unknown //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Expected O, but got Unknown try { GameObject prefab = Cache.GetPrefab<GameObject>("sfx_build_hammer_wood"); GameObject prefab2 = Cache.GetPrefab<GameObject>("sfx_wood_break"); GameObject prefab3 = Cache.GetPrefab<GameObject>("sfx_wood_hit"); GameObject prefab4 = Cache.GetPrefab<GameObject>("sfx_build_hammer_metal"); GameObject prefab5 = Cache.GetPrefab<GameObject>("sfx_metal_blocked"); GameObject prefab6 = Cache.GetPrefab<GameObject>("sfx_build_hammer_stone"); GameObject prefab7 = Cache.GetPrefab<GameObject>("sfx_rock_destroyed"); GameObject prefab8 = Cache.GetPrefab<GameObject>("sfx_Rock_Hit"); GameObject prefab9 = Cache.GetPrefab<GameObject>("sfx_metalgate_open"); GameObject prefab10 = Cache.GetPrefab<GameObject>("sfx_metalgate_close"); GameObject prefab11 = Cache.GetPrefab<GameObject>("sfx_build_cultivator"); GameObject prefab12 = Cache.GetPrefab<GameObject>("sfx_bush_hit"); GameObject prefab13 = Cache.GetPrefab<GameObject>("sfx_FireAddFuel"); EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab } }; buildWood = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab2 } }; breakWood = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab3 } }; hitWood = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab6 } }; buildMetal = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab5 } }; breakMetal = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab5 } }; hitMetal = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab6 } }; buildStone = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab7 } }; breakStone = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab8 } }; hitStone = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab9 } }; gateOpen = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab10 } }; gateClose = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab11 } }; buildGround = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab12 } }; hitPlant = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab13 } }; fireAddFuel = val; } catch (Exception ex) { Logger.LogError((object)("Error while running OnVanillaLoad SFX: " + ex.Message)); } finally { Logger.LogMessage((object)"Loading Graveyard SFX..."); PrefabManager.OnVanillaPrefabsAvailable -= LoadSFX; } } private void LoadPrefabs() { try { LoadGroundGrave(); LoadWrappedCorpse(); LoadDeadTree01(); LoadDeadTree02(); LoadDeadTree03(); LoadDeadTree04(); LoadDeadTree05(); LoadDeadTree06(); LoadGraveCandle01(); LoadGraveCandle02(); LoadGraveCandle03(); LoadGraveyardLight(); LoadGraveyardBrazier(); LoadGraveyardFence(); LoadGraveyardGate(); LoadGraveyardPost(); LoadGargoyle01(); LoadGargoyle02(); LoadCoffinCart(); LoadGraveCross01(); LoadGraveCross02(); LoadGraveCross03(); LoadGravestone01(); LoadGravestone02(); LoadGravestone03(); LoadGravestone04(); LoadGravestone05(); LoadGravestone06(); LoadGravestone07(); LoadGravestone08(); LoadSarcophagus01(); LoadSarcophagus02(); LoadSarcophagus03(); LoadStoneCasket01(); LoadStoneCasket02(); LoadStoneCasket03(); LoadStoneCasket04(); LoadOldCoffin(); LoadOldCoffinOpen(); LoadSmallSealedTomb(); LoadLargeSealedTomb(); if (enableHalloween.Value == Toggle.On) { AddPumpkinSeeds(); AddPumpkinDrop(); AddPumpkinSapling(); LoadCarvedPumpkin01(); LoadCarvedPumpkin02(); LoadCarvedPumpkin03(); LoadCarvedPumpkin04(); LoadCarvedPumpkin05(); AddPumpkinSoup(); AddPumpkinSoupRecipe(); AddWitchHat(); AddTopHat(); AddPumpkinWallLights(); AddPumpkinStandingLights(); } } catch (Exception ex) { Logger.LogError((object)("Error while running OnVanillaLoad Prefabs: " + ex.Message)); } finally { Logger.LogMessage((object)"Loading Graveyard Pieces..."); PrefabManager.OnVanillaPrefabsAvailable -= LoadPrefabs; } } private void SettingChanged(ConfigFile sender, SettingChangedEventArgs args) { //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) InitConfig(); GameObject prefab = PrefabManager.Instance.GetPrefab("mm_pumpkin"); Plant component = PrefabManager.Instance.GetPrefab("sapling_pumpkin").GetComponent<Plant>(); component.m_growTime = growTimePumpkin.Value; component.m_growTimeMax = growTimePumpkin.Value; component.m_minScale = minScalePumpkin.Value; component.m_maxScale = maxScalePumpkin.Value; component.m_growRadius = growRadiusPumpkin.Value; component.m_needCultivatedGround = cultivatedGroundPumpkin.Value; Piece component2 = PrefabManager.Instance.GetPrefab("sapling_pumpkin").GetComponent<Piece>(); component2.m_cultivatedGroundOnly = cultivatedGroundPumpkin.Value; Pickable component3 = PrefabManager.Instance.GetPrefab("Pickable_Pumpkin_Plant").GetComponent<Pickable>(); component3.m_amount = pumpkinDrop.Value; component3.m_extraDrops.m_drops.Add(new DropData { m_item = prefab, m_stackMin = seedsDrop.Value, m_stackMax = seedsDrop.Value, m_weight = 0.01f, m_dontScale = true }); component3.m_respawnTimeMinutes = respawnTimePumpkin.Value; } private void LoadGroundGrave() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //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_0041: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_ground_grave"); _customPiece = new CustomPiece(_gameObject, false, new PieceConfig { PieceTable = "_HammerPieceTable", Category = "Misc" }); _gameObject.GetComponent<Piece>().m_placeEffect = buildGround; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = buildGround; PieceManager.Instance.AddPiece(_customPiece); } private void LoadWrappedCorpse() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //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_0041: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_corpse"); _customPiece = new CustomPiece(_gameObject, false, new PieceConfig { PieceTable = "_HammerPieceTable", Category = "Misc" }); _gameObject.GetComponent<Piece>().m_placeEffect = buildGround; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = buildGround; PieceManager.Instance.AddPiece(_customPiece); } private void LoadDeadTree01() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //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_0041: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_dead_tree_01"); _customPiece = new CustomPiece(_gameObject, false, new PieceConfig { PieceTable = "_HammerPieceTable", Category = "Misc" }); _gameObject.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(_customPiece); } private void LoadDeadTree02() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //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_0041: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_dead_tree_02"); _customPiece = new CustomPiece(_gameObject, false, new PieceConfig { PieceTable = "_HammerPieceTable", Category = "Misc" }); _gameObject.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(_customPiece); } private void LoadDeadTree03() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //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_0041: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_dead_tree_03"); _customPiece = new CustomPiece(_gameObject, false, new PieceConfig { PieceTable = "_HammerPieceTable", Category = "Misc" }); _gameObject.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(_customPiece); } private void LoadDeadTree04() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //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_0041: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_dead_tree_04"); _customPiece = new CustomPiece(_gameObject, false, new PieceConfig { PieceTable = "_HammerPieceTable", Category = "Misc" }); _gameObject.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(_customPiece); } private void LoadDeadTree05() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //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_0041: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_dead_tree_05"); _customPiece = new CustomPiece(_gameObject, false, new PieceConfig { PieceTable = "_HammerPieceTable", Category = "Misc" }); _gameObject.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(_customPiece); } private void LoadDeadTree06() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //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_0041: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_dead_tree_06"); _customPiece = new CustomPiece(_gameObject, false, new PieceConfig { PieceTable = "_HammerPieceTable", Category = "Misc" }); _gameObject.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGraveCandle01() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_candle_01"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Resin", Amount = 1, Recover = true } }; _customPiece = new CustomPiece(gameObject, false, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildGround; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = buildGround; Fireplace component2 = _gameObject.GetComponent<Fireplace>(); component2.m_fuelAddedEffects = fireAddFuel; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGraveCandle02() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_candle_02"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Resin", Amount = 1, Recover = true } }; _customPiece = new CustomPiece(gameObject, false, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildGround; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = buildGround; Fireplace component2 = _gameObject.GetComponent<Fireplace>(); component2.m_fuelAddedEffects = fireAddFuel; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGraveCandle03() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_candle_03"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Resin", Amount = 1, Recover = true } }; _customPiece = new CustomPiece(gameObject, false, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildGround; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = buildGround; Fireplace component2 = _gameObject.GetComponent<Fireplace>(); component2.m_fuelAddedEffects = fireAddFuel; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGraveyardLight() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_008c: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_graveyard_light"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "Resin", Amount = 1, Recover = true }, new RequirementConfig { Item = "Iron", Amount = 1, Recover = true } }; _customPiece = new CustomPiece(gameObject, false, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildMetal; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakMetal; component.m_hitEffect = hitMetal; Fireplace component2 = _gameObject.GetComponent<Fireplace>(); component2.m_fuelAddedEffects = fireAddFuel; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGraveyardBrazier() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_008c: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_graveyard_brazier"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[3] { new RequirementConfig { Item = "Stone", Amount = 6, Recover = true }, new RequirementConfig { Item = "Crystal", Amount = 1, Recover = true }, new RequirementConfig { Item = "Iron", Amount = 1, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGraveyardFence() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_graveyard_fence"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_workbench"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Iron", Amount = 3, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildMetal; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakMetal; component.m_hitEffect = hitMetal; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGraveyardGate() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_graveyard_gate"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_workbench"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "Iron", Amount = 2, Recover = true }, new RequirementConfig { Item = "Stone", Amount = 8, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildMetal; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakMetal; component.m_hitEffect = hitMetal; Door component2 = _gameObject.GetComponent<Door>(); component2.m_openEffects = gateOpen; component2.m_closeEffects = gateClose; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGraveyardPost() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_graveyard_post"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_workbench"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 8, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGargoyle01() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_gargoyle_01"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_workbench"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 6, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGargoyle02() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_gargoyle_02"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_workbench"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 6, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadCoffinCart() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_coffin_cart"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_workbench"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Wood", Amount = 10, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGraveCross01() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_cross_01"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_workbench"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Wood", Amount = 1, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGraveCross02() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_cross_02"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_workbench"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Wood", Amount = 1, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGraveCross03() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_cross_03"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_workbench"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Wood", Amount = 1, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGravestone01() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_gravestone_01"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_stonecutter"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 6, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGravestone02() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_gravestone_02"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_stonecutter"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 6, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGravestone03() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_gravestone_03"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_stonecutter"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 4, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGravestone04() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_gravestone_04"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_stonecutter"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 10, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGravestone05() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_gravestone_05"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_stonecutter"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 10, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGravestone06() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_gravestone_06"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_stonecutter"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 10, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGravestone07() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_gravestone_07"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_stonecutter"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 6, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadGravestone08() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_gravestone_08"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_stonecutter"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 4, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadSarcophagus01() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_sarcophagus_01"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_stonecutter"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 8, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadSarcophagus02() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_sarcophagus_02"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_stonecutter"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 8, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadSarcophagus03() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_sarcophagus_03"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_stonecutter"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 8, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadStoneCasket01() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_stone_casket_01"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_stonecutter"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 12, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadStoneCasket02() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_stone_casket_02"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_stonecutter"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 12, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadStoneCasket03() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_stone_casket_03"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_stonecutter"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 12, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadStoneCasket04() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_stone_casket_04"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_stonecutter"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 10, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadOldCoffin() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_old_coffin"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_workbench"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Wood", Amount = 8, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(_customPiece); } private void LoadOldCoffinOpen() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_old_coffin_open"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_workbench"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Wood", Amount = 8, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(_customPiece); } private void LoadSmallSealedTomb() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_small_sealed_tomb"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_stonecutter"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 25, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void LoadLargeSealedTomb() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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 _gameObject = magicBundle.LoadAsset<GameObject>("mm_large_sealed_tomb"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.CraftingStation = "piece_stonecutter"; val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 50, Recover = true } }; _customPiece = new CustomPiece(gameObject, true, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(_customPiece); } private void AddPumpkinSeeds() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("PumpkinSeeds"); GameObject gameObject = _gameObject; ItemConfig val = new ItemConfig(); val.Amount = 6; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "AncientSeed", Amount = 1, Recover = false } }; _customItem = new CustomItem(gameObject, false, val); ItemManager.Instance.AddItem(_customItem); } private void AddPumpkinDrop() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_pumpkin"); ItemManager.Instance.AddItem(new CustomItem(_gameObject, false)); } private void AddPumpkinSapling() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("sapling_pumpkin"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.PieceTable = "_CultivatorPieceTable"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "PumpkinSeeds", Amount = 1, Recover = false } }; _customPiece = new CustomPiece(gameObject, false, val); Destructible component = _gameObject.GetComponent<Destructible>(); component.m_destroyedEffect = hitPlant; component.m_hitEffect = hitPlant; Piece component2 = _gameObject.GetComponent<Piece>(); component2.m_placeEffect = buildGround; PieceManager.Instance.AddPiece(_customPiece); } private void LoadCarvedPumpkin01() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_008c: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_carved_pumpkin_01"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_pumpkin", Amount = 1, Recover = false }, new RequirementConfig { Item = "Resin", Amount = 1, Recover = true } }; _customPiece = new CustomPiece(gameObject, false, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildGround; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = hitPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(_customPiece); } private void LoadCarvedPumpkin02() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_008c: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_carved_pumpkin_02"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_pumpkin", Amount = 1, Recover = false }, new RequirementConfig { Item = "Resin", Amount = 1, Recover = true } }; _customPiece = new CustomPiece(gameObject, false, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildGround; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = hitPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(_customPiece); } private void LoadCarvedPumpkin03() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_008c: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_carved_pumpkin_03"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_pumpkin", Amount = 1, Recover = false }, new RequirementConfig { Item = "Resin", Amount = 1, Recover = true } }; _customPiece = new CustomPiece(gameObject, false, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildGround; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = hitPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(_customPiece); } private void LoadCarvedPumpkin04() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_008c: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_carved_pumpkin_04"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_pumpkin", Amount = 1, Recover = false }, new RequirementConfig { Item = "Resin", Amount = 1, Recover = true } }; _customPiece = new CustomPiece(gameObject, false, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildGround; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = hitPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(_customPiece); } private void LoadCarvedPumpkin05() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_008c: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_carved_pumpkin_05"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_pumpkin", Amount = 1, Recover = false }, new RequirementConfig { Item = "Resin", Amount = 1, Recover = true } }; _customPiece = new CustomPiece(gameObject, false, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildGround; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = hitPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(_customPiece); } private void AddPumpkinSoup() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_pumpkinsoup"); ItemManager.Instance.AddItem(new CustomItem(_gameObject, false)); } private void AddPumpkinSoupRecipe() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown RecipeConfig val = new RecipeConfig(); val.CraftingStation = "piece_cauldron"; val.Item = "mm_pumpkinsoup"; val.Amount = 4; val.AddRequirement(new RequirementConfig("mm_pumpkin", 1, 0, false)); ItemManager.Instance.AddRecipe(new CustomRecipe(val)); } private void AddWitchHat() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_witch_hat"); GameObject gameObject = _gameObject; ItemConfig val = new ItemConfig(); val.Amount = 1; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "LeatherScraps", Amount = 4 } }; _customItem = new CustomItem(gameObject, false, val); ItemManager.Instance.AddItem(_customItem); } private void AddTopHat() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_top_hat"); GameObject gameObject = _gameObject; ItemConfig val = new ItemConfig(); val.Amount = 1; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "LeatherScraps", Amount = 4 } }; _customItem = new CustomItem(gameObject, false, val); ItemManager.Instance.AddItem(_customItem); } private void AddPumpkinWallLights() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_008c: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown _gameObject = magicBundle.LoadAsset<GameObject>("mm_pumpkin_wall_lights"); GameObject gameObject = _gameObject; PieceConfig val = new PieceConfig(); val.PieceTable = "_HammerPieceTable"; val.Category = "Misc"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[4] { new RequirementConfig { Item = "mm_pumpkin", Amount = 1, Recover = false }, new RequirementConfig { Item = "LinenThread", Amount = 1, Recover = true }, new RequirementConfig { Item = "Crystal", Amount = 1, Recover = true }, new RequirementConfig { Item = "Wood", Amount = 1, Recover = true } }; _customPiece = new CustomPiece(gameObject, false, val); _gameObject.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = _gameObject.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(_customPiece); } private void AddPumpkinStandingLights() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due