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 WeedheimDecor v1.0.3
plugins/WeedheimDecor.dll
Decompiled 11 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using HarmonyLib; using Jotunn; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Extensions; using Jotunn.Managers; using Jotunn.Utils; using Microsoft.CodeAnalysis; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("WeedheimDecor")] [assembly: AssemblyDescription("https://discord.gg/zRucjV8rqc")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("MagicMike")] [assembly: AssemblyProduct("WeedheimDecor")] [assembly: AssemblyCopyright("Copyright © MagicMike 2025WeedheimDecor")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("e3243d22-4307-4008-ba36-9f326008cde5")] [assembly: AssemblyFileVersion("1.0.3")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.3.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace WeedheimDecor { public static class InventoryHelper { public static string PrefabName(this ItemData item) { if (Object.op_Implicit((Object)(object)item.m_dropPrefab)) { return ((Object)item.m_dropPrefab).name; } Logger.LogWarning((object)("Item has missing prefab " + item.m_shared.m_name)); return item.m_shared.m_name; } } [HarmonyPatch] internal static class RestrictContainers { private static string _loadingContainer; private static string _targetContainer; private static HashSet<string> _allowedItems; [HarmonyPrefix] [HarmonyPatch(typeof(InventoryGrid), "DropItem")] private static bool DropItemPrefix(InventoryGrid __instance, Inventory fromInventory, ItemData item, Vector2i pos) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) if (!CanAddItem(__instance.m_inventory, item)) { return false; } ItemData itemAt = __instance.m_inventory.GetItemAt(pos.x, pos.y); if (itemAt != null) { return CanAddItem(fromInventory, itemAt); } return true; } private static bool CanAddItem(Inventory inventory, ItemData item) { if (inventory == null || item == null) { return false; } if (inventory.m_name == _loadingContainer) { return true; } if (IsRestrictedContainer(inventory.m_name, out var allowedItems)) { bool num = allowedItems.Contains(item.PrefabName()); if (!num) { Player localPlayer = Player.m_localPlayer; if (localPlayer == null) { return num; } ((Character)localPlayer).Message((MessageType)2, Localization.instance.Localize("$message_restricted"), 0, (Sprite)null); } return num; } return true; } public static bool IsRestrictedContainer(string containerName, out HashSet<string> allowedItems) { return WeedheimDecorMod.allowedItemsByContainer.TryGetValue(containerName, out allowedItems); } [HarmonyPrefix] [HarmonyPatch(typeof(Inventory), "AddItem", new Type[] { typeof(ItemData) })] [HarmonyPatch(typeof(Inventory), "AddItem", new Type[] { typeof(ItemData), typeof(int), typeof(int), typeof(int) })] [HarmonyPriority(800)] private static bool AddItemPrefix(Inventory __instance, ItemData item, ref bool __result) { if (!CanAddItem(__instance, item)) { __result = false; return __result; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(Inventory), "MoveItemToThis", new Type[] { typeof(Inventory), typeof(ItemData) })] [HarmonyPatch(typeof(Inventory), "MoveItemToThis", new Type[] { typeof(Inventory), typeof(ItemData), typeof(int), typeof(int), typeof(int) })] [HarmonyPriority(800)] private static bool MoveItemToThisPrefix(Inventory __instance, Inventory fromInventory, ItemData item) { if (__instance == null || fromInventory == null || item == null) { return false; } return CanAddItem(__instance, item); } [HarmonyPrefix] [HarmonyPatch(typeof(Inventory), "MoveAll", new Type[] { typeof(Inventory) })] [HarmonyPriority(800)] private static void MoveAllPrefix(Inventory __instance, Inventory fromInventory) { if (__instance != null && fromInventory != null && IsRestrictedContainer(__instance.m_name, out var allowedItems)) { _targetContainer = __instance.m_name; _allowedItems = allowedItems; } } [HarmonyPrefix] [HarmonyPatch(typeof(Inventory), "MoveAll", new Type[] { typeof(Inventory) })] [HarmonyPriority(800)] private static void MoveAllPostfix() { _targetContainer = null; _allowedItems = null; } [HarmonyPrefix] [HarmonyPatch(typeof(Inventory), "RemoveItem", new Type[] { typeof(ItemData) })] [HarmonyPatch(typeof(Inventory), "RemoveItem", new Type[] { typeof(ItemData), typeof(int) })] [HarmonyPriority(800)] private static bool RemoveItemPrefix(Inventory __instance, ItemData item) { return ShouldRemoveItem(__instance, item); } [HarmonyPrefix] [HarmonyPatch(typeof(Inventory), "RemoveOneItem", new Type[] { typeof(ItemData) })] [HarmonyPriority(800)] private static bool RemoveOneItemPrefix(Inventory __instance, ItemData item) { return ShouldRemoveItem(__instance, item); } private static bool ShouldRemoveItem(Inventory __instance, ItemData item) { if (__instance == null || item == null) { return false; } if (!string.IsNullOrEmpty(_targetContainer) && _allowedItems != null) { return _allowedItems.Contains(item.PrefabName()); } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(Inventory), "Load")] private static void LoadPrefix(Inventory __instance) { if (__instance != null) { _loadingContainer = __instance.m_name; } } [HarmonyPostfix] [HarmonyPatch(typeof(Inventory), "Load")] private static void LoadPostfix() { _loadingContainer = null; } } internal class FileWatcher { public static void WatchFileChanges(string path, Action onChanged) { FileSystemWatcher fileSystemWatcher = new FileSystemWatcher(); string directoryName = Path.GetDirectoryName(path); string fileName = Path.GetFileName(path); fileSystemWatcher.Path = directoryName; fileSystemWatcher.Filter = fileName; fileSystemWatcher.NotifyFilter = NotifyFilters.FileName | NotifyFilters.LastWrite; fileSystemWatcher.Changed += delegate { onChanged?.Invoke(); }; fileSystemWatcher.Deleted += delegate { onChanged?.Invoke(); }; fileSystemWatcher.Created += delegate { onChanged?.Invoke(); }; fileSystemWatcher.Renamed += delegate { onChanged?.Invoke(); }; fileSystemWatcher.EnableRaisingEvents = true; } public static void WatchTranslationChanges(string path, Action onChanged) { if (!Directory.Exists(WeedheimDecorMod.TranslationFilePath)) { return; } try { WatchFileChanges(Path.Combine(path, "*.*"), onChanged); } catch { Logger.LogError((object)"There was an issue loading Translation files!"); } } } internal static class LocalisedText { public static CustomLocalization Localization = LocalizationManager.Instance.GetLocalization(); public static void AddLocalisations() { CustomLocalization localization = Localization; string text = "English"; localization.AddTranslation(ref text, new Dictionary<string, string> { { "piece_weed_sack_kush", "Purple Kush Sack" }, { "piece_weed_sack_kush_desc", "A sack full of Purple Kush." }, { "piece_weed_sack_badger", "Honey Badger Sack" }, { "piece_weed_sack_badger_desc", "A sack full of Honey Badger." }, { "piece_weed_sack_cherry", "Black Cherry Sack" }, { "piece_weed_sack_cherry_desc", "A sack full of Black Cherry." }, { "piece_weed_sack_mystic", "Blue Mystic Sack" }, { "piece_weed_sack_mystic_desc", "A sack full of Blue Mystic." }, { "piece_weed_sack_widow", "White Widow Sack" }, { "piece_weed_sack_widow_desc", "A sack full of White Widow." }, { "piece_weed_sack_desire", "Burning Desire Sack" }, { "piece_weed_sack_desire_desc", "A sack full of Burning Desire." }, { "piece_weed_sack_lights", "Northern Lights Sack" }, { "piece_weed_sack_lights_desc", "A sack full of Northern Lights." }, { "piece_weed_sack_poison", "Durban Poison Sack" }, { "piece_weed_sack_poison_desc", "A sack full of Durban Poison." }, { "piece_weed_bundle_kush", "Purple Kush Bundle" }, { "piece_weed_bundle_kush_desc", "A bundle of Purple Kush." }, { "piece_weed_bundle_badger", "Honey Badger Bundle" }, { "piece_weed_bundle_badger_desc", "A bundle of Honey Badger." }, { "piece_weed_bundle_cherry", "Black Cherry Bundle" }, { "piece_weed_bundle_cherry_desc", "A bundle of Black Cherry." }, { "piece_weed_bundle_mystic", "Blue Mystic Bundle" }, { "piece_weed_bundle_mystic_desc", "A bundle of Blue Mystic." }, { "piece_weed_bundle_widow", "White Widow Bundle" }, { "piece_weed_bundle_widow_desc", "A bundle of White Widow." }, { "piece_weed_bundle_desire", "Burning Desire Bundle" }, { "piece_weed_bundle_desire_desc", "A bundle of Burning Desire." }, { "piece_weed_bundle_lights", "Northern Lights Bundle" }, { "piece_weed_bundle_lights_desc", "A bundle of Northern Lights." }, { "piece_weed_bundle_poison", "Durban Poison Bundle" }, { "piece_weed_bundle_poison_desc", "A bundle of Durban Poison." }, { "piece_kush_jar", "Purple Kush Jar" }, { "piece_kush_jar_desc", "A jar of Purple Kush buds." }, { "piece_badger_jar", "Honey Badger Jar" }, { "piece_badger_jar_desc", "A jar of Honey Badger buds." }, { "piece_cherry_jar", "Black Cherry Jar" }, { "piece_cherry_jar_desc", "A jar of Black Cherry buds." }, { "piece_mystic_jar", "Blue Mystic Jar" }, { "piece_mystic_jar_desc", "A jar of Blue Mystic buds." }, { "piece_widow_jar", "White Widow Jar" }, { "piece_widow_jar_desc", "A jar of White Widow buds." }, { "piece_desire_jar", "Burning Desire Jar" }, { "piece_desire_jar_desc", "A jar of Burning Desire buds." }, { "piece_lights_jar", "Northern Lights Jar" }, { "piece_lights_jar_desc", "A jar of Northern Lights buds." }, { "piece_poison_jar", "Durban Poison Jar" }, { "piece_poison_jar_desc", "A jar of Durban Poison buds." }, { "piece_weed_barrel_kush", "Purple Kush Barrel" }, { "piece_weed_barrel_kush_desc", "A barrel container for storing your buds." }, { "piece_weed_barrel_badger", "Honey Badger Barrel" }, { "piece_weed_barrel_badger_desc", "A barrel container for storing your buds." }, { "piece_weed_barrel_cherry", "Black Cherry Barrel" }, { "piece_weed_barrel_cherry_desc", "A barrel container for storing your buds." }, { "piece_weed_barrel_mystic", "Blue Mystic Barrel" }, { "piece_weed_barrel_mystic_desc", "A barrel container for storing your buds." }, { "piece_weed_barrel_widow", "White Widow Barrel" }, { "piece_weed_barrel_widow_desc", "A barrel container for storing your buds." }, { "piece_weed_barrel_desire", "Burning Desire Barrel" }, { "piece_weed_barrel_desire_desc", "A barrel container for storing your buds." }, { "piece_weed_barrel_lights", "Northern Lights Barrel" }, { "piece_weed_barrel_lights_desc", "A barrel container for storing your buds." }, { "piece_weed_barrel_poison", "Durban Poison Barrel" }, { "piece_weed_barrel_poison_desc", "A barrel container for storing your buds." }, { "piece_wl_banner_01", "Hippie Banner" }, { "piece_wl_banner_01_desc", "A cool banner to brighten up your build." }, { "piece_wl_banner_02", "Hippie Banner" }, { "piece_wl_banner_02_desc", "A cool banner to brighten up your build." }, { "piece_wl_banner_03", "Hippie Banner" }, { "piece_wl_banner_03_desc", "A cool banner to brighten up your build." }, { "piece_wl_banner_04", "Hippie Banner" }, { "piece_wl_banner_04_desc", "A cool banner to brighten up your build." }, { "piece_wl_banner_05", "Hippie Banner" }, { "piece_wl_banner_05_desc", "A cool banner to brighten up your build." }, { "piece_wl_tapestry_01", "Hippie Tapestry" }, { "piece_wl_tapestry_01_desc", "A cool tapestry to brighten up your build." }, { "piece_wl_tapestry_02", "Hippie Tapestry" }, { "piece_wl_tapestry_02_desc", "A cool tapestry to brighten up your build." }, { "piece_wl_tapestry_03", "Hippie Tapestry" }, { "piece_wl_tapestry_03_desc", "A cool tapestry to brighten up your build." }, { "piece_wl_tapestry_04", "Hippie Tapestry" }, { "piece_wl_tapestry_04_desc", "A cool tapestry to brighten up your build." }, { "piece_wl_tapestry_05", "Hippie Tapestry" }, { "piece_wl_tapestry_05_desc", "A cool tapestry to brighten up your build." }, { "piece_wl_rug_01", "Hippie Rug" }, { "piece_wl_rug_01_desc", "A cool rug to brighten up your build." }, { "piece_wl_rug_02", "Hippie Rug" }, { "piece_wl_rug_02_desc", "A cool rug to brighten up your build." }, { "piece_wl_rug_03", "Hippie Rug" }, { "piece_wl_rug_03_desc", "A cool rug to brighten up your build." }, { "piece_wl_rug_04", "Hippie Rug" }, { "piece_wl_rug_04_desc", "A cool rug to brighten up your build." }, { "piece_wl_rug_05", "Hippie Rug" }, { "piece_wl_rug_05_desc", "A cool rug to brighten up your build." }, { "piece_buddha_statue", "Buddha Statue" }, { "piece_buddha_statue_desc", "A cool stone Buddha statue." }, { "piece_elephant_statue", "Elephant Statue" }, { "piece_elephant_statue_desc", "A cool stone Elephant statue." }, { "piece_rope_lights", "Crystal Lights" }, { "piece_rope_lights_desc", "Rasta coloured crystal lights." }, { "piece_rope_lights_wall", "Crystal Wall Lights" }, { "piece_rope_lights_wall_desc", "Rasta coloured crystal wall lights." }, { "piece_big_gong", "Big Gong" }, { "piece_big_gong_desc", "A big Gong to hit!" }, { "piece_driftwood_male", "Driftwood Carving" }, { "piece_driftwood_male_desc", "A male driftwood carving." }, { "piece_driftwood_female", "Driftwood Carving" }, { "piece_driftwood_female_desc", "A female driftwood carving." }, { "piece_potted_mystic", "Blue Mystic (Decor)" }, { "piece_potted_mystic_desc", "A Blue Mystic plant for decoration only. Cannot be picked!" }, { "piece_potted_badger", "Honey Badger (Decor)" }, { "piece_potted_badger_desc", "A Honey Badger plant for decoration only. Cannot be picked!" }, { "piece_potted_kush", "Purple Kush (Decor)" }, { "piece_potted_kush_desc", "A Purple Kush plant for decoration only. Cannot be picked!" }, { "piece_potted_cherry", "Black Cherry (Decor)" }, { "piece_potted_cherry_desc", "A Black Cherry plant for decoration only. Cannot be picked!" }, { "piece_potted_widow", "White Widow (Decor)" }, { "piece_potted_widow_desc", "A White Widow plant for decoration only. Cannot be picked!" }, { "piece_potted_desire", "Burning Desire (Decor)" }, { "piece_potted_desire_desc", "A Burning Desire plant for decoration only. Cannot be picked!" }, { "piece_potted_lights", "Northern Lights (Decor)" }, { "piece_potted_lights_desc", "A Northern Lights plant for decoration only. Cannot be picked!" }, { "piece_potted_poison", "Durban Poison (Decor)" }, { "piece_potted_poison_desc", "A Durban Poison plant for decoration only. Cannot be picked!" }, { "piece_pile_o_mystic", "Blue Mystic Pile" }, { "piece_pile_o_badger", "Honey Badger Pile" }, { "piece_pile_o_kush", "Purple Kush Pile" }, { "piece_pile_o_cherry", "Black Cherry Pile" }, { "piece_pile_o_widow", "White Widow Pile" }, { "piece_pile_o_desire", "Burning Desire Pile" }, { "piece_pile_o_lights", "Northern Lights Pile" }, { "piece_pile_o_poison", "Durban Poison Pile" }, { "piece_crystal_light_blue", "Blue Crystal Light" }, { "piece_crystal_light_blue_desc", "A fancy crystal light." }, { "piece_crystal_light_green", "Green Crystal Light" }, { "piece_crystal_light_green_desc", "A fancy crystal light." }, { "piece_crystal_light_purple", "Purple Crystal Light" }, { "piece_crystal_light_purple_desc", "A fancy crystal light." }, { "piece_crystal_light_red", "Red Crystal Light" }, { "piece_crystal_light_red_desc", "A fancy crystal light." }, { "piece_crystal_light_white", "White Crystal Light" }, { "piece_crystal_light_white_desc", "A fancy crystal light." }, { "piece_crystal_light_yellow", "Yellow Crystal Light" }, { "piece_crystal_light_yellow_desc", "A fancy crystal light." }, { "piece_crystal_light_blue_small", "Small Blue Crystal Light" }, { "piece_crystal_light_blue_small_desc", "A fancy crystal light." }, { "piece_crystal_light_green_small", "Small Green Crystal Light" }, { "piece_crystal_light_green_small_desc", "A fancy crystal light." }, { "piece_crystal_light_purple_small", "Small Purple Crystal Light" }, { "piece_crystal_light_purple_small_desc", "A fancy crystal light." }, { "piece_crystal_light_red_small", "Small Red Crystal Light" }, { "piece_crystal_light_red_small_desc", "A fancy crystal light." }, { "piece_crystal_light_white_small", "Small White Crystal Light" }, { "piece_crystal_light_white_small_desc", "A fancy crystal light." }, { "piece_crystal_light_yellow_small", "Small Yellow Crystal Light" }, { "piece_crystal_light_yellow_small_desc", "A fancy crystal light." }, { "piece_weedchair_01", "Weed Leaf Chair" }, { "piece_weedchair_02", "Plain Weed Leaf Chair" }, { "piece_blackmarble_weed_throne", "Weed Leaf Throne" } }); } } internal class MainConfig { internal const string GeneralSection = "General_Settings"; internal static ConfigEntry<bool> enablePlugin; public static void InitConfigs(ConfigFile config) { enablePlugin = ConfigFileExtensions.BindConfigInOrder<bool>(config, "General_Settings", "EnableWeedheimDecor", true, "Enable the Weedheim Decor plugin.\n", true, true, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); } } public class VisualStack : MonoBehaviour { public List<Transform> stackMeshes = new List<Transform>(); private Container container; private Inventory inventory; public void Start() { container = ((Component)this).GetComponentInParent<Container>(); if (Object.op_Implicit((Object)(object)container)) { inventory = container.GetInventory(); } if (inventory != null) { Inventory obj = inventory; obj.m_onChanged = (Action)Delegate.Combine(obj.m_onChanged, new Action(UpdateVisuals)); UpdateVisuals(); } } public void UpdateVisuals() { SetVisualsActive(inventory.SlotsUsedPercentage()); } public void SetVisualsActive(float fillPercentage) { float num = Mathf.Ceil(fillPercentage / 100f * (float)stackMeshes.Count); for (int i = 0; i < stackMeshes.Count; i++) { bool active = i == 0 || (float)i < num; ((Component)stackMeshes[i]).gameObject.SetActive(active); } } } [BepInPlugin("MagicMike.WeedheimDecor", "WeedheimDecor", "1.0.3")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class WeedheimDecorMod : BaseUnityPlugin { internal const string PluginName = "WeedheimDecor"; internal const string PluginVersion = "1.0.3"; internal const string PluginAuthor = "MagicMike"; internal const string PluginGUID = "MagicMike.WeedheimDecor"; internal const string PluginCopy = "Copyright © MagicMike 2025WeedheimDecor"; public const string PluginLink = "https://discord.gg/zRucjV8rqc"; private static char pds = Path.DirectorySeparatorChar; public static readonly string _basePath = Paths.ConfigPath + pds + "Weedheim"; public static readonly string TranslationFilePath = _basePath + pds + "Translations"; private CustomLocalization Localization = LocalizationManager.Instance.GetLocalization(); public static WeedheimDecorMod plugininstance; public static AssetBundle whdecor; public static string decorBundle = "whdecorbundle"; public static GameObject hitTheGong = null; public static GameObject breakPlantNoise = null; public static GameObject hitGlassNoise = null; public static GameObject breakGlassNoise = null; private Harmony harmony = new Harmony("MagicMike.WeedheimDecor"); public static Dictionary<string, HashSet<string>> allowedItemsByContainer = new Dictionary<string, HashSet<string>>(); public static GameObject PrepareContainer(GameObject prefab) { VisualStack visualStack = prefab.AddComponent<VisualStack>(); MeshRenderer[] componentsInChildren = prefab.GetComponentsInChildren<MeshRenderer>(); foreach (MeshRenderer val in componentsInChildren) { if (Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponent<BoxCollider>())) { visualStack.stackMeshes.Add(((Component)val).transform); } } return prefab; } public void Awake() { plugininstance = this; MainConfig.InitConfigs(((BaseUnityPlugin)this).Config); if (MainConfig.enablePlugin.Value) { LoadAssetBundles(); AddFXAssets(); CheckForFolders(); LocalisedText.AddLocalisations(); LoadLocalisationData(TranslationFilePath); FileWatcher.WatchTranslationChanges(TranslationFilePath, delegate { LoadLocalisationData(TranslationFilePath); }); PrefabManager.OnVanillaPrefabsAvailable += AddWHPieces; harmony = Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "MagicMike.WeedheimDecor"); Game.isModded = true; } } public void OnDestroy() { ((BaseUnityPlugin)this).Config.Save(); } public static void LoadAssetBundles() { whdecor = AssetUtils.LoadAssetBundleFromResources(decorBundle, Assembly.GetExecutingAssembly()); if ((Object)(object)whdecor == (Object)null) { Logger.LogError((object)("Failed to load asset bundle with name: " + decorBundle)); } } public static void AddFXAssets() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown try { hitTheGong = whdecor.LoadAsset<GameObject>("sfx_hit_gong_decor"); CustomPrefab val = new CustomPrefab(hitTheGong, false); PrefabManager.Instance.AddPrefab(val); breakPlantNoise = whdecor.LoadAsset<GameObject>("sfx_destroy_plant_decor"); CustomPrefab val2 = new CustomPrefab(breakPlantNoise, false); PrefabManager.Instance.AddPrefab(val2); hitGlassNoise = whdecor.LoadAsset<GameObject>("sfx_hit_glass_decor"); CustomPrefab val3 = new CustomPrefab(hitGlassNoise, false); PrefabManager.Instance.AddPrefab(val3); breakGlassNoise = whdecor.LoadAsset<GameObject>("sfx_break_glass_decor"); CustomPrefab val4 = new CustomPrefab(breakGlassNoise, false); PrefabManager.Instance.AddPrefab(val4); } catch (Exception ex) { Logger.LogError((object)("Exception caught while loading Weedheim Decor FX Assets: " + ex.Message)); } } public static void CheckForFolders() { if (!Directory.Exists(_basePath)) { Logger.LogInfo((object)"Creating Weedheim Directory"); Directory.CreateDirectory(_basePath); } if (!Directory.Exists(TranslationFilePath)) { Logger.LogInfo((object)"Creating Translations folder"); Directory.CreateDirectory(TranslationFilePath); } } public void LoadLocalisationData(string directory) { string[] fileSystemEntries = Directory.GetFileSystemEntries(directory, "*.json", SearchOption.AllDirectories); foreach (string path in fileSystemEntries) { string name = new DirectoryInfo(Path.GetDirectoryName(path)).Name; Path.GetFileNameWithoutExtension(path); Localization.AddJsonFile(name, File.ReadAllText(path)); } } public static void AddWHPieces() { try { WH_Pieces.AddPieces(); } catch (Exception ex) { Logger.LogError((object)("Exception caught while adding Weedheim Decor Pieces: " + ex.Message)); } finally { PrefabManager.OnVanillaPrefabsAvailable -= AddWHPieces; } } } internal class WH_Pieces { public static EffectList buildStone; public static EffectList breakStone; public static EffectList hitStone; public static EffectList buildWood; public static EffectList breakWood; public static EffectList hitWood; public static EffectList breakPlant; public static EffectList hitPlant; public static EffectList breakGlass; public static EffectList hitGlass; public static EffectList hitGong; public static EffectList chestOpen; public static EffectList chestClosed; public static void AddPieces() { LoadFX(); AddPurpleKushDecor(); AddBlueMysticDecor(); AddBlackCherryDecor(); AddHoneyBadgerDecor(); AddWhiteWidowDecor(); AddBurningDesireDecor(); AddNorthernLightsDecor(); AddDurbanPoisonDecor(); AddWeedSackKush(); AddWeedSackMystic(); AddWeedSackBadger(); AddWeedSackCherry(); AddWeedSackWidow(); AddWeedSackDesire(); AddWeedSackLights(); AddWeedSackPoison(); AddWeedBundleKush(); AddWeedBundleMystic(); AddWeedBundleBadger(); AddWeedBundleCherry(); AddWeedBundleWidow(); AddWeedBundleDesire(); AddWeedBundleLights(); AddWeedBundlePoison(); AddPurpleKushPile(); AddBlueMysticPile(); AddBlackCherryPile(); AddHoneyBadgerPile(); AddWhiteWidowPile(); AddBurningDesirePile(); AddNorthernLightsPile(); AddDurbanPoisonPile(); AddPurpleKushBarrel(); AddBlueMysticBarrel(); AddBlackCherryBarrel(); AddHoneyBadgerBarrel(); AddWhiteWidowBarrel(); AddBurningDesireBarrel(); AddNorthernLightsBarrel(); AddDurbanPoisonBarrel(); AddWeedJarKush(); AddWeedJarMystic(); AddWeedJarBadger(); AddWeedJarCherry(); AddWeedJarWidow(); AddWeedJarDesire(); AddWeedJarLights(); AddWeedJarPoison(); AddBuddhaStatue(); AddElephantStatue(); AddBigGong(); AddCarvingMale(); AddCarvingFemale(); AddCrystalLights(); AddCrystalWallLights(); AddCrystalLightWhite(); AddCrystalLightRed(); AddCrystalLightYellow(); AddCrystalLightGreen(); AddCrystalLightBlue(); AddCrystalLightPurple(); AddCrystalLightWhiteSmall(); AddCrystalLightRedSmall(); AddCrystalLightYellowSmall(); AddCrystalLightGreenSmall(); AddCrystalLightBlueSmall(); AddCrystalLightPurpleSmall(); AddWeedChair01(); AddWeedChair02(); AddWeedThrone(); AddHippieBanner_01(); AddHippieBanner_02(); AddHippieBanner_03(); AddHippieBanner_04(); AddHippieBanner_05(); AddHippieTapestry_01(); AddHippieTapestry_02(); AddHippieTapestry_03(); AddHippieTapestry_04(); AddHippieTapestry_05(); AddRug01(); AddRug02(); AddRug03(); AddRug04(); AddRug05(); } public static void LoadFX() { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Expected O, but got Unknown //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Expected O, but got Unknown //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Expected O, but got Unknown //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Expected O, but got Unknown //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Expected O, but got Unknown //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Expected O, but got Unknown //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Expected O, but got Unknown //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Expected O, but got Unknown //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Expected O, but got Unknown //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Expected O, but got Unknown //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Expected O, but got Unknown //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Expected O, but got Unknown //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Expected O, but got Unknown //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Expected O, but got Unknown 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_destroy_plant_decor"); GameObject prefab5 = Cache.GetPrefab<GameObject>("sfx_bush_hit"); GameObject prefab6 = Cache.GetPrefab<GameObject>("sfx_rock_destroyed"); GameObject prefab7 = Cache.GetPrefab<GameObject>("sfx_rock_hit"); GameObject prefab8 = Cache.GetPrefab<GameObject>("sfx_hit_gong_decor"); GameObject prefab9 = Cache.GetPrefab<GameObject>("sfx_chest_open"); GameObject prefab10 = Cache.GetPrefab<GameObject>("sfx_chest_close"); GameObject prefab11 = Cache.GetPrefab<GameObject>("sfx_break_glass_decor"); GameObject prefab12 = Cache.GetPrefab<GameObject>("sfx_hit_glass_decor"); 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 = prefab5 } }; hitPlant = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab4 } }; breakPlant = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab6 } }; breakStone = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab7 } }; hitStone = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab8 } }; hitGong = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab9 } }; chestOpen = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab10 } }; chestClosed = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab11 } }; breakGlass = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab12 } }; hitGlass = val; } public static void AddPurpleKushDecor() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("Potted_Purple_Kush"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "PurpleKushBud", Amount = 10, Recover = false }, new RequirementConfig { Item = "Wood", Amount = 2, Recover = false } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddBlueMysticDecor() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("Potted_Blue_Mystic"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "BlueMysticBud", Amount = 10, Recover = false }, new RequirementConfig { Item = "Wood", Amount = 2, Recover = false } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddBlackCherryDecor() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("Potted_Black_Cherry"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "BlackCherryBud", Amount = 10, Recover = false }, new RequirementConfig { Item = "Wood", Amount = 2, Recover = false } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddHoneyBadgerDecor() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("Potted_Honey_Badger"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "HoneyBadgerBud", Amount = 10, Recover = false }, new RequirementConfig { Item = "Wood", Amount = 2, Recover = false } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWhiteWidowDecor() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("Potted_White_Widow"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "WhiteWidowBud", Amount = 10, Recover = false }, new RequirementConfig { Item = "Wood", Amount = 2, Recover = false } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddBurningDesireDecor() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("Potted_Burning_Desire"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "BurningDesireBud", Amount = 10, Recover = false }, new RequirementConfig { Item = "Wood", Amount = 2, Recover = false } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddNorthernLightsDecor() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("Potted_Northern_Lights"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "NorthernLightsBud", Amount = 10, Recover = false }, new RequirementConfig { Item = "Wood", Amount = 2, Recover = false } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddDurbanPoisonDecor() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("Potted_Durban_Poison"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "DurbanPoisonBud", Amount = 10, Recover = false }, new RequirementConfig { Item = "Wood", Amount = 2, Recover = false } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWeedSackKush() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("weed_sack_kush"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "LinenThread", Amount = 2, Recover = true }, new RequirementConfig { Item = "PurpleKushBud", Amount = 20, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWeedSackMystic() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("weed_sack_mystic"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "LinenThread", Amount = 2, Recover = true }, new RequirementConfig { Item = "BlueMysticBud", Amount = 20, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWeedSackBadger() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("weed_sack_badger"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "LinenThread", Amount = 2, Recover = true }, new RequirementConfig { Item = "HoneyBadgerBud", Amount = 20, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWeedSackCherry() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("weed_sack_cherry"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "LinenThread", Amount = 2, Recover = true }, new RequirementConfig { Item = "BlackCherryBud", Amount = 20, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWeedSackWidow() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("weed_sack_widow"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "LinenThread", Amount = 2, Recover = true }, new RequirementConfig { Item = "WhiteWidowBud", Amount = 20, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWeedSackDesire() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("weed_sack_desire"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "LinenThread", Amount = 2, Recover = true }, new RequirementConfig { Item = "BurningDesireBud", Amount = 20, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWeedSackLights() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("weed_sack_lights"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "LinenThread", Amount = 2, Recover = true }, new RequirementConfig { Item = "NorthernLightsBud", Amount = 20, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWeedSackPoison() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("weed_sack_poison"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "LinenThread", Amount = 2, Recover = true }, new RequirementConfig { Item = "DurbanPoisonBud", Amount = 20, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWeedBundleKush() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("weed_bundle_kush"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "LinenThread", Amount = 1, Recover = true }, new RequirementConfig { Item = "PurpleKushBud", Amount = 20, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWeedBundleMystic() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("weed_bundle_mystic"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "LinenThread", Amount = 1, Recover = true }, new RequirementConfig { Item = "BlueMysticBud", Amount = 20, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWeedBundleBadger() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("weed_bundle_badger"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "LinenThread", Amount = 1, Recover = true }, new RequirementConfig { Item = "HoneyBadgerBud", Amount = 20, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWeedBundleCherry() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("weed_bundle_cherry"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "LinenThread", Amount = 1, Recover = true }, new RequirementConfig { Item = "BlackCherryBud", Amount = 20, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWeedBundleWidow() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("weed_bundle_widow"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "LinenThread", Amount = 1, Recover = true }, new RequirementConfig { Item = "WhiteWidowBud", Amount = 20, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWeedBundleDesire() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("weed_bundle_desire"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "LinenThread", Amount = 1, Recover = true }, new RequirementConfig { Item = "BurningDesireBud", Amount = 20, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWeedBundleLights() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("weed_bundle_lights"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "LinenThread", Amount = 1, Recover = true }, new RequirementConfig { Item = "NorthernLightsBud", Amount = 20, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWeedBundlePoison() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("weed_bundle_poison"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "LinenThread", Amount = 1, Recover = true }, new RequirementConfig { Item = "DurbanPoisonBud", Amount = 20, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddPurpleKushPile() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_0057: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("purple_kush_pile"); PieceConfig val2 = new PieceConfig(); val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "PurpleKushBud", Amount = 16, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddBlueMysticPile() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_0057: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("blue_mystic_pile"); PieceConfig val2 = new PieceConfig(); val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "BlueMysticBud", Amount = 16, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddBlackCherryPile() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_0057: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("black_cherry_pile"); PieceConfig val2 = new PieceConfig(); val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "BlackCherryBud", Amount = 16, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddHoneyBadgerPile() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_0057: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("honey_badger_pile"); PieceConfig val2 = new PieceConfig(); val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "HoneyBadgerBud", Amount = 16, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddWhiteWidowPile() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_0057: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("white_widow_pile"); PieceConfig val2 = new PieceConfig(); val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "WhiteWidowBud", Amount = 16, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddBurningDesirePile() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_0057: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("burning_desire_pile"); PieceConfig val2 = new PieceConfig(); val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "BurningDesireBud", Amount = 16, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddNorthernLightsPile() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_0057: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("burning_lights_pile"); PieceConfig val2 = new PieceConfig(); val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "NorthernLightsBud", Amount = 16, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddDurbanPoisonPile() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_0057: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("durban_poison_pile"); PieceConfig val2 = new PieceConfig(); val2.PieceTable = "_HammerPieceTable"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "DurbanPoisonBud", Amount = 16, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakPlant; component.m_hitEffect = hitPlant; PieceManager.Instance.AddPiece(val3); } public static void AddPurpleKushBarrel() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("kush_barrel_container"); PieceConfig val2 = new PieceConfig(); val2.PieceTable = "_HammerPieceTable"; val2.CraftingStation = "piece_workbench"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "Wood", Amount = 8, Recover = true }, new RequirementConfig { Item = "PurpleKushBud", Amount = 1, Recover = false } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; Container component2 = val.GetComponent<Container>(); component2.m_openEffects = chestOpen; component2.m_closeEffects = chestClosed; PieceManager.Instance.AddPiece(val3); WeedheimDecorMod.PrepareContainer(val); WeedheimDecorMod.allowedItemsByContainer.Add(val.GetComponent<Container>().m_name, new HashSet<string> { "PurpleKushBud" }); } public static void AddBlueMysticBarrel() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("mystic_barrel_container"); PieceConfig val2 = new PieceConfig(); val2.PieceTable = "_HammerPieceTable"; val2.CraftingStation = "piece_workbench"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "Wood", Amount = 8, Recover = true }, new RequirementConfig { Item = "BlueMysticBud", Amount = 1, Recover = false } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; Container component2 = val.GetComponent<Container>(); component2.m_openEffects = chestOpen; component2.m_closeEffects = chestClosed; PieceManager.Instance.AddPiece(val3); WeedheimDecorMod.PrepareContainer(val); WeedheimDecorMod.allowedItemsByContainer.Add(val.GetComponent<Container>().m_name, new HashSet<string> { "BlueMysticBud" }); } public static void AddBlackCherryBarrel() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("cherry_barrel_container"); PieceConfig val2 = new PieceConfig(); val2.PieceTable = "_HammerPieceTable"; val2.CraftingStation = "piece_workbench"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "Wood", Amount = 8, Recover = true }, new RequirementConfig { Item = "BlackCherryBud", Amount = 1, Recover = false } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; Container component2 = val.GetComponent<Container>(); component2.m_openEffects = chestOpen; component2.m_closeEffects = chestClosed; PieceManager.Instance.AddPiece(val3); WeedheimDecorMod.PrepareContainer(val); WeedheimDecorMod.allowedItemsByContainer.Add(val.GetComponent<Container>().m_name, new HashSet<string> { "BlackCherryBud" }); } public static void AddHoneyBadgerBarrel() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = WeedheimDecorMod.whdecor.LoadAsset<GameObject>("badger_barrel_container"); PieceConfig val2 = new PieceConfig(); val2.PieceTable = "_HammerPieceTable"; val2.CraftingStation = "piece_workbench"; val2.Category = "Weedheim_Decor"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "Wood", Amount = 8, Recover = true }, new RequirementConfig { Item = "HoneyBadgerBud", Amount = 1, Recover = false } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; Container component2 = val.GetComponent<Container>(); component2.m_openEffects = chestOpen; component2.m_closeEffects = chestClosed; PieceManager.Instance.AddPiece(val3); WeedheimDecorMod.PrepareContainer(val); WeedheimDecorMod.allowedItemsByContainer.Add(val.GetComponent<Container>().m_name, new HashSet<string> { "HoneyBadgerBud" }); } public static void AddWhiteWidowBarrel() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to in