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 BoneAppetit v3.4.0
plugins/BoneAppetit.dll
Decompiled a month 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.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Threading; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using Digitalroot.Modding.Framework.Common.Json; using Digitalroot.Modding.Framework.Logging; using Digitalroot.Modding.Framework.Names.Vanilla; using Digitalroot.Modding.Framework.Utils; using HarmonyLib; using JetBrains.Annotations; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Managers; using Jotunn.Utils; using SimpleJson; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("BoneAppetit")] [assembly: AssemblyDescription("BoneAppetit")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Digitalroot Technologies")] [assembly: AssemblyProduct("Digitalroot Valheim Mods")] [assembly: AssemblyCopyright("Copyright © Digitalroot Technologies 2021 - 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("3ccc4dc1-5b17-47c1-b996-ca03b8639a61")] [assembly: AssemblyFileVersion("3.4.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("3.4.0.0")] [module: UnverifiableCode] namespace Boneappetit { [UsedImplicitly] [Obsolete("", true)] public class SE_ChefHat : SE_Stats { private void OnEnable() { } private void SetMessages() { } public override void Setup(Character character) { } } public static class RandomJuliaChildPhrase { private static readonly List<string> PhrasesList = new List<string> { "No one is born a great cook, one learns by doing. - Julia Child", "You don’t have to cook fancy or complicated masterpieces, just good food from fresh ingredients. - Julia Child", "People who love to eat are always the best people. - Julia Child", "Cooking well doesn’t mean cooking fancy. - Julia Child", "The only time to eat diet food is while you’re waiting for the steak to cook. - Julia Child", "Until I discovered cooking, I was never really interested in anything. - Julia Child", "You are the butter to my bread, and the breath to my life. - Julia Child", "Fat gives things flavor. - Julia Child", "If you’re afraid of butter, use cream. - Julia Child", "I was 32 when I started cooking; up until then, I just ate. - Julia Child", "A party without cake is just a meeting. - Julia Child", "The only real stumbling block is fear of failure. In cooking you’ve got to have a what-the-hell attitude. - Julia Child", "In France, cooking is a serious art form and a national sport. - Julia Child", "You are the BOSS of that dough. - Julia Child", "with enough butter anything is good. - Julia Child", "Usually, one’s cooking is better than one thinks it is. - Julia Child" }; public static string GetRandomPhrase() { return PhrasesList[Random.Range(0, PhrasesList.Count - 1)]; } } } namespace BoneAppetit { internal static class BoneAppetitNames { internal const string Smokeless = "Smokeless"; internal const string PieceTable = "_HammerPieceTable"; internal static readonly string ChefHat = LocalizationManager.Instance.TryTranslate("$mod_item_chefhat"); internal static readonly string SmokelessFire = LocalizationManager.Instance.TryTranslate("$mod_item_smokeless_fire"); internal const string GriddlePrefabName = "rk_griddle"; internal const string PrepTablePrefabName = "rk_prep"; internal const string GrillPrefabName = "rk_grill"; internal const string PorkPrefabName = "rk_pork"; internal const string PorkrindPrefabName = "rk_porkrind"; internal const string KabobPrefabName = "rk_kabob"; internal const string FriedLoxMeatPrefabName = "rk_friedloxmeat"; internal const string EggPrefabName = "rk_egg"; internal const string ButterPrefabName = "rk_butter"; internal const string GlazedCarrotsPrefabName = "rk_glazedcarrots"; internal const string MeadPrefabName = "rk_mead"; internal const string MoochiPrefabName = "rk_moochi"; internal const string DragonEggPrefabName = "rk_dragonegg"; internal const string NutEllaPrefabName = "rk_nut_ella"; internal const string OmlettePrefabName = "rk_omlette"; internal const string PancakePrefabName = "rk_pancake"; internal const string PbjPrefabName = "rk_pbj"; internal const string PizzaPrefabName = "rk_pizza"; internal const string PorridgePrefabName = "rk_porridge"; internal const string SmokedFishPrefabName = "rk_smokedfish"; internal const string ChefHatPrefabName = "rk_chef"; internal const string GrillExtensionOvenPrefabName = "rk_oven"; internal const string SmokelessHangingBrazierPrefabName = "rk_brazier"; internal const string SmokelessHearthPrefabName = "rk_hearth"; internal const string SmokelessFirePitPrefabName = "rk_campfire"; internal const string AcidCreamPrefabName = "rk_acidcream"; internal const string BaconPrefabName = "rk_bacon"; internal const string BloodSausagePrefabName = "rk_bloodsausage"; internal const string BoiledEggPrefabName = "rk_boiledegg"; internal const string BrothPrefabName = "rk_broth"; internal const string BurgerPrefabName = "rk_burger"; internal const string CakePrefabName = "rk_birthday"; internal const string CandiedTurnipPrefabName = "rk_candiedturnip"; internal const string CarrotSticksPrefabName = "rk_carrotsticks"; internal const string CoffeePrefabName = "rk_coffee"; internal const string ElectricCreamPrefabName = "rk_electriccream"; internal const string FireCreamPrefabName = "rk_firecream"; internal const string FishStewPrefabName = "rk_fishstew"; internal const string HaggisPrefabName = "rk_haggis"; internal const string IceCreamPrefabName = "rk_icecream"; internal const string LattePrefabName = "rk_latte"; } internal static class FoodNames { internal static readonly string Cones = LocalizationManager.Instance.TryTranslate("$mod_food_cones"); internal static readonly string PorkRind = LocalizationManager.Instance.TryTranslate("$mod_food_porkrind"); internal static readonly string FriedLox = LocalizationManager.Instance.TryTranslate("$mod_food_fried_lox"); internal static readonly string GlazedCarrots = LocalizationManager.Instance.TryTranslate("$mod_food_glazed_carrots"); internal static readonly string SmokedFish = LocalizationManager.Instance.TryTranslate("$mod_food_smoked_fish"); internal static readonly string CandiedTurnip = LocalizationManager.Instance.TryTranslate("$mod_food_candied_turnip"); internal static readonly string Kabob = LocalizationManager.Instance.TryTranslate("$mod_food_kabob"); internal static readonly string Bacon = LocalizationManager.Instance.TryTranslate("$mod_food_bacon"); internal static readonly string Pancakes = LocalizationManager.Instance.TryTranslate("$mod_food_pancakes"); internal static readonly string Pizza = LocalizationManager.Instance.TryTranslate("$mod_food_pizza"); internal static readonly string Coffee = LocalizationManager.Instance.TryTranslate("$mod_food_coffee"); internal static readonly string Latte = LocalizationManager.Instance.TryTranslate("$mod_food_spice_latte"); internal static readonly string Porridge = LocalizationManager.Instance.TryTranslate("$mod_food_porridge"); internal static readonly string PBJ = LocalizationManager.Instance.TryTranslate("$mod_food_pbj"); internal static readonly string Cake = LocalizationManager.Instance.TryTranslate("$mod_food_cake"); internal static readonly string Haggis = LocalizationManager.Instance.TryTranslate("$mod_food_haggis"); internal static readonly string Moochi = LocalizationManager.Instance.TryTranslate("$mod_food_moochi"); internal static readonly string Burger = LocalizationManager.Instance.TryTranslate("$mod_food_burger"); internal static readonly string Omlette = LocalizationManager.Instance.TryTranslate("$mod_food_omlette"); internal static readonly string Broth = LocalizationManager.Instance.TryTranslate("$mod_food_bone_broth"); internal static readonly string Butter = LocalizationManager.Instance.TryTranslate("$mod_food_butter"); internal static readonly string Mead = LocalizationManager.Instance.TryTranslate("$mod_food_mead"); internal static readonly string NutElla = LocalizationManager.Instance.TryTranslate("$mod_food_nut_ella"); internal static readonly string FishStew = LocalizationManager.Instance.TryTranslate("$mod_food_fish_stew"); internal static readonly string BloodSausage = LocalizationManager.Instance.TryTranslate("$mod_food_blood_sausage"); internal static readonly string BoiledEgg = LocalizationManager.Instance.TryTranslate("$mod_food_boiled_egg"); internal static readonly string CarrotSticks = LocalizationManager.Instance.TryTranslate("$mod_food_carrot_sticks"); internal static readonly string AcidCream = LocalizationManager.Instance.TryTranslate("$mod_food_acid_cream"); internal static readonly string ElectricCream = LocalizationManager.Instance.TryTranslate("$mod_food_electric_cream"); internal static readonly string FireCream = LocalizationManager.Instance.TryTranslate("$mod_food_fire_cream"); internal static readonly string IceCream = LocalizationManager.Instance.TryTranslate("$mod_food_ice_cream"); } [BepInPlugin("com.rockerkitten.boneappetit", "BoneAppetit", "3.4.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class Main : BaseUnityPlugin, ITraceableLogging { internal static class PluginConfigSection { internal static string General = "General"; internal static string Food = "Food"; } private Harmony _harmony; public static Main Instance; public Sprite CookingSprite; public AssetBundle GrillAssetBundle; public AssetBundle FoodAssetBundle; public EffectList buildStone; public EffectList cookingSound; public EffectList breakStone; public EffectList hitStone; public EffectList buildKitten; public EffectList hearthAddFuel; public EffectList fireAddFuel; private ConfigEntry<bool> _configPorkRindEnable; private ConfigEntry<bool> _configKabobEnable; private ConfigEntry<bool> _configFriedLoxEnable; private ConfigEntry<bool> _configGlazedCarrotEnable; private ConfigEntry<bool> _configBaconEnable; private ConfigEntry<bool> _configSmokedFishEnable; private ConfigEntry<bool> _configPancakesEnable; private ConfigEntry<bool> _configPizzaEnable; private ConfigEntry<bool> _configCoffeeEnable; private ConfigEntry<bool> _configLatteEnable; private ConfigEntry<bool> _configSmokelessEnable; private ConfigEntry<bool> _configHaggisEnable; private ConfigEntry<bool> _configCandiedTurnipEnable; private ConfigEntry<bool> _configMoochiEnable; private ConfigEntry<bool> _configConesEnable; private ConfigEntry<bool> _configNut_EllaEnable; private ConfigEntry<bool> _configBrothEnable; private ConfigEntry<bool> _configFishStewEnable; private ConfigEntry<bool> _configButterEnable; private ConfigEntry<bool> _configBloodSausageEnable; private ConfigEntry<bool> _configOmletteEnable; private ConfigEntry<bool> _configBurgerEnable; private ConfigEntry<bool> _configPorridgeEnable; private ConfigEntry<bool> _configPBJEnable; private ConfigEntry<bool> _configBoiledEggEnable; private ConfigEntry<bool> _configCakeEnable; private ConfigEntry<bool> _configCarrotSticksEnable; private ConfigEntry<bool> _configMeadEnable; private ConfigEntry<bool> _configChefHatEnable; public Dictionary<string, GameObject> Prefabs = new Dictionary<string, GameObject>(); public GameObject icecream_prefab; public CustomItem icecream; public GameObject porkrind_prefab; public CustomItem porkrind; public GameObject kabob_prefab; public CustomItem kabob; public GameObject friedlox_prefab; public CustomItem friedlox; public GameObject glazedcarrot_prefab; public CustomItem glazedcarrot; public GameObject bacon_prefab; public CustomItem bacon; public GameObject smokedfish_prefab; public CustomItem smokedfish; public GameObject pancake_prefab; public CustomItem pancake; public GameObject pizza_prefab; public CustomItem pizza; public GameObject coffee_prefab; public CustomItem coffee; public GameObject latte_prefab; public CustomItem latte; public GameObject firecream_prefab; public CustomItem firecream; public CustomItem electriccream; public GameObject electriccream_prefab; public CustomItem acidcream; public GameObject acidcream_prefab; public GameObject porridge_prefab; public CustomItem porridge; public GameObject pbj_prefab; public CustomItem pbj; public GameObject cake_prefab; public CustomItem cake; public AudioSource fireVol; public GameObject haggisFab; public CustomItem haggis; public GameObject candiedTurnipFab; public CustomItem candiedTurnip; public GameObject moochiFab; public CustomItem moochi; public GameObject omletteFab; public CustomItem omlette; public GameObject fishStewFab; public CustomItem fishStew; public GameObject brothFab; public CustomItem broth; public GameObject butterFab; public CustomItem butter; public GameObject bloodsausageFab; public CustomItem bloodsausage; public GameObject burgerFab; public CustomItem burger; public GameObject nut_ellaFab; public CustomItem nut_ella; public GameObject boiledeggFab; public CustomItem boiledegg; public GameObject carrotstickFab; public CustomItem carrotstick; public GameObject meadFab; public CustomItem mead; public GameObject hatFab; public CustomItem hat; public GameObject fireFab1; public CustomPiece fire1; public GameObject fireFab2; public CustomPiece fire2; public GameObject fireFab3; private CustomPiece fire3; public GameObject eggFab; public GameObject deggFab; public GameObject porkFab; public const string Version = "3.4.0"; public const string Name = "BoneAppetit"; public const string Guid = "com.rockerkitten.boneappetit"; public const string Namespace = "BoneAppetit"; [UsedImplicitly] public static ConfigEntry<int> NexusId { get; private set; } public string Source => "BoneAppetit"; public bool EnableTrace { get; } public Main() { Instance = this; EnableTrace = false; Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); } [UsedImplicitly] private void Awake() { try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); LoadAssets(); LoadNewItemDropPrefabs(); PrefabManager.OnVanillaPrefabsAvailable += PrefabManager_OnVanillaPrefabsAvailable; ItemManager.OnItemsRegistered += ItemManager_OnItemsRegistered; LocalizationManager.OnLocalizationAdded += LocalizationManager_OnLocalizationAdded; SynchronizationManager.OnConfigurationSynchronized += SynchronizationManager_OnConfigurationSynchronized; _harmony = Harmony.CreateAndPatchAll(typeof(Main).Assembly, "com.rockerkitten.boneappetit"); } catch (Exception e) { Log.Error(Instance, e); } } [UsedImplicitly] private void OnDestroy() { try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); Harmony harmony = _harmony; if (harmony != null) { harmony.UnpatchSelf(); } } catch (Exception e) { Log.Error(Instance, e); } } private void ItemManager_OnItemsRegistered() { try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); AddNewItemDropsToDropTables(); } catch (Exception e) { Log.Error(Instance, e); } finally { ItemManager.OnItemsRegistered -= AddNewItemDropsToDropTables; } } [Obsolete("Removed in favor of built-in cooking skill", true)] public void OnCookingStationCookItem(ref bool __result) { } [Obsolete("Removed in favor of built-in cooking skill", true)] public void OnInventoryAddItemPostFix(string itemName, int stack, int quality, int variant, long crafterID, string crafterName, bool cheated, bool pickedUp) { } private void PrefabManager_OnVanillaPrefabsAvailable() { try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); LoadSfxVfx(); LoadButter(); LoadNut_Ella(); LoadIceCream(); LoadPorkRind(); LoadKabob(); LoadFriedLox(); LoadGlazedCarrot(); LoadBacon(); LoadSmokedFish(); LoadPancakes(); LoadPizza(); LoadCoffee(); LoadLatte(); LoadFireCream(); LoadElectricCream(); LoadAcidCream(); LoadPorridge(); LoadPBJ(); LoadCake(); LoadHaggis(); LoadCandiedTurnip(); LoadMoochi(); LoadBroth(); LoadFishStew(); LoadBloodSausage(); LoadBurger(); LoadOmlette(); LoadBoiledEgg(); LoadCarrotSticks(); LoadChefHat(); LoadMead(); LoadGrillPiece(); LoadGriddlePiece(); LoadGrillExtensionOvenPiece(); LoadSmokelessFirePitPiece(); LoadSmokelessHearthPiece(); LoadPrepstationPiece(); LoadSmokelessHangingBrazierPiece(); } catch (Exception e) { Log.Error(Instance, e); } finally { PrefabManager.OnVanillaPrefabsAvailable -= PrefabManager_OnVanillaPrefabsAvailable; } } private void SynchronizationManager_OnConfigurationSynchronized(object sender, ConfigurationSynchronizationEventArgs attr) { try { if (attr.InitialSynchronization) { Log.Info(Instance, "Initial Config sync event received"); EnableConfiguredNewFoodRecipes(); EnableConfiguredNewPieces(); } else { Log.Info(Instance, "Config sync event received"); } } catch (Exception e) { Log.Error(Instance, e); } } private void LocalizationManager_OnLocalizationAdded() { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); InitConfigs(); LocalizationManager.OnLocalizationAdded -= LocalizationManager_OnLocalizationAdded; } private void InitConfigs() { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0162: 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_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Expected O, but got Unknown //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Expected O, but got Unknown //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Expected O, but got Unknown //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Expected O, but got Unknown //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Expected O, but got Unknown //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Expected O, but got Unknown //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Expected O, but got Unknown //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Expected O, but got Unknown //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Expected O, but got Unknown //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Expected O, but got Unknown //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Expected O, but got Unknown //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0430: Expected O, but got Unknown //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Expected O, but got Unknown //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_0478: Unknown result type (might be due to invalid IL or missing references) //IL_0484: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Expected O, but got Unknown //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Expected O, but got Unknown //IL_04ea: Unknown result type (might be due to invalid IL or missing references) //IL_04ef: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Expected O, but got Unknown //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0519: Expected O, but got Unknown //IL_0552: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_0563: Unknown result type (might be due to invalid IL or missing references) //IL_056f: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Expected O, but got Unknown //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_0581: Expected O, but got Unknown //IL_05ba: Unknown result type (might be due to invalid IL or missing references) //IL_05bf: Unknown result type (might be due to invalid IL or missing references) //IL_05cb: Unknown result type (might be due to invalid IL or missing references) //IL_05d7: Unknown result type (might be due to invalid IL or missing references) //IL_05df: Expected O, but got Unknown //IL_05df: Unknown result type (might be due to invalid IL or missing references) //IL_05e9: Expected O, but got Unknown //IL_0622: Unknown result type (might be due to invalid IL or missing references) //IL_0627: Unknown result type (might be due to invalid IL or missing references) //IL_0633: Unknown result type (might be due to invalid IL or missing references) //IL_063f: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Expected O, but got Unknown //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_0651: Expected O, but got Unknown //IL_068a: Unknown result type (might be due to invalid IL or missing references) //IL_068f: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_06a7: Unknown result type (might be due to invalid IL or missing references) //IL_06af: Expected O, but got Unknown //IL_06af: Unknown result type (might be due to invalid IL or missing references) //IL_06b9: Expected O, but got Unknown //IL_06f2: Unknown result type (might be due to invalid IL or missing references) //IL_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_0703: Unknown result type (might be due to invalid IL or missing references) //IL_070f: Unknown result type (might be due to invalid IL or missing references) //IL_0717: Expected O, but got Unknown //IL_0717: Unknown result type (might be due to invalid IL or missing references) //IL_0721: Expected O, but got Unknown //IL_075a: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_076b: Unknown result type (might be due to invalid IL or missing references) //IL_0777: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Expected O, but got Unknown //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0789: Expected O, but got Unknown //IL_07c2: Unknown result type (might be due to invalid IL or missing references) //IL_07c7: Unknown result type (might be due to invalid IL or missing references) //IL_07d3: Unknown result type (might be due to invalid IL or missing references) //IL_07df: Unknown result type (might be due to invalid IL or missing references) //IL_07e7: Expected O, but got Unknown //IL_07e7: Unknown result type (might be due to invalid IL or missing references) //IL_07f1: Expected O, but got Unknown //IL_082a: Unknown result type (might be due to invalid IL or missing references) //IL_082f: Unknown result type (might be due to invalid IL or missing references) //IL_083b: Unknown result type (might be due to invalid IL or missing references) //IL_0847: Unknown result type (might be due to invalid IL or missing references) //IL_084f: Expected O, but got Unknown //IL_084f: Unknown result type (might be due to invalid IL or missing references) //IL_0859: Expected O, but got Unknown //IL_0892: Unknown result type (might be due to invalid IL or missing references) //IL_0897: Unknown result type (might be due to invalid IL or missing references) //IL_08a3: Unknown result type (might be due to invalid IL or missing references) //IL_08af: Unknown result type (might be due to invalid IL or missing references) //IL_08b7: Expected O, but got Unknown //IL_08b7: Unknown result type (might be due to invalid IL or missing references) //IL_08c1: Expected O, but got Unknown //IL_08fa: Unknown result type (might be due to invalid IL or missing references) //IL_08ff: Unknown result type (might be due to invalid IL or missing references) //IL_090b: Unknown result type (might be due to invalid IL or missing references) //IL_0917: Unknown result type (might be due to invalid IL or missing references) //IL_091f: Expected O, but got Unknown //IL_091f: Unknown result type (might be due to invalid IL or missing references) //IL_0929: Expected O, but got Unknown //IL_0962: Unknown result type (might be due to invalid IL or missing references) //IL_0967: Unknown result type (might be due to invalid IL or missing references) //IL_0973: Unknown result type (might be due to invalid IL or missing references) //IL_097f: Unknown result type (might be due to invalid IL or missing references) //IL_0987: Expected O, but got Unknown //IL_0987: Unknown result type (might be due to invalid IL or missing references) //IL_0991: Expected O, but got Unknown //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Unknown result type (might be due to invalid IL or missing references) //IL_09db: Unknown result type (might be due to invalid IL or missing references) //IL_09e7: Unknown result type (might be due to invalid IL or missing references) //IL_09ef: Expected O, but got Unknown //IL_09ef: Unknown result type (might be due to invalid IL or missing references) //IL_09f9: Expected O, but got Unknown //IL_0a32: Unknown result type (might be due to invalid IL or missing references) //IL_0a37: Unknown result type (might be due to invalid IL or missing references) //IL_0a43: Unknown result type (might be due to invalid IL or missing references) //IL_0a4f: Unknown result type (might be due to invalid IL or missing references) //IL_0a57: Expected O, but got Unknown //IL_0a57: Unknown result type (might be due to invalid IL or missing references) //IL_0a61: Expected O, but got Unknown //IL_0a9a: Unknown result type (might be due to invalid IL or missing references) //IL_0a9f: Unknown result type (might be due to invalid IL or missing references) //IL_0aab: Unknown result type (might be due to invalid IL or missing references) //IL_0ab7: Unknown result type (might be due to invalid IL or missing references) //IL_0abf: Expected O, but got Unknown //IL_0abf: Unknown result type (might be due to invalid IL or missing references) //IL_0ac9: Expected O, but got Unknown //IL_0b02: Unknown result type (might be due to invalid IL or missing references) //IL_0b07: Unknown result type (might be due to invalid IL or missing references) //IL_0b13: Unknown result type (might be due to invalid IL or missing references) //IL_0b1f: Unknown result type (might be due to invalid IL or missing references) //IL_0b27: Expected O, but got Unknown //IL_0b27: Unknown result type (might be due to invalid IL or missing references) //IL_0b31: Expected O, but got Unknown //IL_0b6a: Unknown result type (might be due to invalid IL or missing references) //IL_0b6f: Unknown result type (might be due to invalid IL or missing references) //IL_0b7b: Unknown result type (might be due to invalid IL or missing references) //IL_0b87: Unknown result type (might be due to invalid IL or missing references) //IL_0b8f: Expected O, but got Unknown //IL_0b8f: Unknown result type (might be due to invalid IL or missing references) //IL_0b99: Expected O, but got Unknown //IL_0bd2: Unknown result type (might be due to invalid IL or missing references) //IL_0bd7: Unknown result type (might be due to invalid IL or missing references) //IL_0be3: Unknown result type (might be due to invalid IL or missing references) //IL_0bef: Unknown result type (might be due to invalid IL or missing references) //IL_0bf7: Expected O, but got Unknown //IL_0bf7: Unknown result type (might be due to invalid IL or missing references) //IL_0c01: Expected O, but got Unknown //IL_0c3a: Unknown result type (might be due to invalid IL or missing references) //IL_0c3f: Unknown result type (might be due to invalid IL or missing references) //IL_0c4b: Unknown result type (might be due to invalid IL or missing references) //IL_0c57: Unknown result type (might be due to invalid IL or missing references) //IL_0c5f: Expected O, but got Unknown //IL_0c5f: Unknown result type (might be due to invalid IL or missing references) //IL_0c69: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); NexusId = ((BaseUnityPlugin)this).Config.Bind<int>(PluginConfigSection.General, "NexusID", 1250, new ConfigDescription("Nexus mod ID for updates", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = false, ReadOnly = true } })); _configConesEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.Cones, true, new ConfigDescription(Localization.instance.Localize("$mod_enable $mod_all " + FoodNames.Cones), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configPorkRindEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.PorkRind, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.PorkRind), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configKabobEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.Kabob, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.Kabob), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configFriedLoxEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.FriedLox, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.FriedLox), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configGlazedCarrotEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.GlazedCarrots, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.GlazedCarrots), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configMeadEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.Mead, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.Mead), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configMoochiEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.Moochi, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.Moochi), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configNut_EllaEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.NutElla, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.NutElla), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configPancakesEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.Pancakes, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.Pancakes), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configOmletteEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.Omlette, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.Omlette), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configPBJEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.PBJ.Replace("'", "_"), true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.PBJ), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configButterEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.Butter, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.Butter), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configPizzaEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.Pizza, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.Pizza), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configPorridgeEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.Porridge, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.Porridge), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configSmokedFishEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.SmokedFish, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.SmokedFish), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configBloodSausageEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.BloodSausage, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.BloodSausage), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configBaconEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.Bacon, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.Bacon), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configBoiledEggEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.BoiledEgg, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.BoiledEgg), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configBrothEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.Broth, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.Broth), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configBurgerEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.Burger, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.Burger), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configCakeEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.Cake, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.Cake), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configCandiedTurnipEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.CandiedTurnip, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.CandiedTurnip), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configCarrotSticksEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.CarrotSticks, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.CarrotSticks), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configCoffeeEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.Coffee, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.Coffee), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configFishStewEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.FishStew, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.FishStew), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configHaggisEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.Haggis, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.Haggis), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configLatteEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.Food, FoodNames.Latte, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + FoodNames.Latte), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configChefHatEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.General, BoneAppetitNames.ChefHat, true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + BoneAppetitNames.ChefHat), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); _configSmokelessEnable = ((BaseUnityPlugin)this).Config.Bind<bool>(PluginConfigSection.General, "Smokeless", true, new ConfigDescription(Localization.instance.Localize("$mod_enable " + BoneAppetitNames.SmokelessFire), (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = true, ReadOnly = false, isAdminOnly = true } })); } catch (Exception e) { Log.Error(Instance, e); } } public void EnableConfiguredNewFoodRecipes() { try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); icecream.Recipe.Recipe.m_enabled = _configConesEnable.Value; firecream.Recipe.Recipe.m_enabled = _configConesEnable.Value; electriccream.Recipe.Recipe.m_enabled = _configConesEnable.Value; acidcream.Recipe.Recipe.m_enabled = _configConesEnable.Value; porkrind.Recipe.Recipe.m_enabled = _configPorkRindEnable.Value; kabob.Recipe.Recipe.m_enabled = _configKabobEnable.Value; friedlox.Recipe.Recipe.m_enabled = _configFriedLoxEnable.Value; glazedcarrot.Recipe.Recipe.m_enabled = _configGlazedCarrotEnable.Value; bacon.Recipe.Recipe.m_enabled = _configBaconEnable.Value; smokedfish.Recipe.Recipe.m_enabled = _configSmokedFishEnable.Value; pancake.Recipe.Recipe.m_enabled = _configPancakesEnable.Value; pizza.Recipe.Recipe.m_enabled = _configPizzaEnable.Value; coffee.Recipe.Recipe.m_enabled = _configCoffeeEnable.Value; latte.Recipe.Recipe.m_enabled = _configLatteEnable.Value; porridge.Recipe.Recipe.m_enabled = _configPorridgeEnable.Value; pbj.Recipe.Recipe.m_enabled = _configPBJEnable.Value; cake.Recipe.Recipe.m_enabled = _configCakeEnable.Value; haggis.Recipe.Recipe.m_enabled = _configHaggisEnable.Value; candiedTurnip.Recipe.Recipe.m_enabled = _configCandiedTurnipEnable.Value; moochi.Recipe.Recipe.m_enabled = _configMoochiEnable.Value; nut_ella.Recipe.Recipe.m_enabled = _configNut_EllaEnable.Value; burger.Recipe.Recipe.m_enabled = _configBurgerEnable.Value; omlette.Recipe.Recipe.m_enabled = _configOmletteEnable.Value; broth.Recipe.Recipe.m_enabled = _configBrothEnable.Value; fishStew.Recipe.Recipe.m_enabled = _configFishStewEnable.Value; butter.Recipe.Recipe.m_enabled = _configButterEnable.Value; bloodsausage.Recipe.Recipe.m_enabled = _configBloodSausageEnable.Value; boiledegg.Recipe.Recipe.m_enabled = _configBoiledEggEnable.Value; carrotstick.Recipe.Recipe.m_enabled = _configCarrotSticksEnable.Value; mead.Recipe.Recipe.m_enabled = _configMeadEnable.Value; } catch (Exception e) { Log.Error(Instance, e); } } private void EnableConfiguredNewPieces() { try { fire1.Piece.m_enabled = _configSmokelessEnable.Value; fire2.Piece.m_enabled = _configSmokelessEnable.Value; fire3.Piece.m_enabled = _configSmokelessEnable.Value; } catch (Exception e) { Log.Error(Instance, e); } } public static void AddNewItemDropsToDropTables() { //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0211: 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_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject prefab = PrefabManager.Instance.GetPrefab(EnemyNames.Boar); GameObject prefab2 = PrefabManager.Instance.GetPrefab("Hatchling"); GameObject prefab3 = PrefabManager.Instance.GetPrefab(EnemyNames.Seagal); GameObject prefab4 = PrefabManager.Instance.GetPrefab(EnemyNames.Crow); GameObject prefab5 = PrefabManager.Instance.GetPrefab("rk_pork"); GameObject prefab6 = PrefabManager.Instance.GetPrefab("rk_egg"); GameObject prefab7 = PrefabManager.Instance.GetPrefab("rk_dragonegg"); DropOnDestroyed component = prefab3.GetComponent<DropOnDestroyed>(); component.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab6, m_stackMin = 1, m_stackMax = 1, m_weight = 1f }); component.m_dropWhenDestroyed.m_oneOfEach = true; component.m_dropWhenDestroyed.m_dropMax = 2; component.m_dropWhenDestroyed.m_dropMin = 2; component.m_dropWhenDestroyed.m_dropChance = 1f; component.m_spawnYStep = 0.3f; component.m_spawnYOffset = 0.5f; DropOnDestroyed component2 = prefab4.GetComponent<DropOnDestroyed>(); component2.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab6, m_stackMin = 1, m_stackMax = 1, m_weight = 1f }); component2.m_dropWhenDestroyed.m_oneOfEach = true; component2.m_dropWhenDestroyed.m_dropMax = 2; component2.m_dropWhenDestroyed.m_dropMin = 2; component2.m_dropWhenDestroyed.m_dropChance = 1f; component2.m_spawnYStep = 0.3f; component2.m_spawnYOffset = 0.5f; prefab.GetComponent<CharacterDrop>().m_drops.Add(new Drop { m_prefab = prefab5, m_amountMin = 1, m_amountMax = 1, m_chance = 1f, m_levelMultiplier = true, m_onePerPlayer = false }); prefab2.GetComponent<CharacterDrop>().m_drops.Add(new Drop { m_prefab = prefab7, m_amountMin = 1, m_amountMax = 1, m_chance = 1f, m_levelMultiplier = true, m_onePerPlayer = false }); } catch (Exception e) { Log.Error(Instance, e); } } [Obsolete("Removed in favor of built-in cooking skill", true)] public void AddSkills() { } public void LoadAssets() { try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GrillAssetBundle = AssetUtils.LoadAssetBundleFromResources("grill", Assembly.GetExecutingAssembly()); FoodAssetBundle = AssetUtils.LoadAssetBundleFromResources("customfood", Assembly.GetExecutingAssembly()); CookingSprite = FoodAssetBundle.LoadAsset<Sprite>("rkcookingsprite"); } catch (Exception e) { Log.Error(Instance, e); } } public void LoadNewItemDropPrefabs() { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); Log.Info(Instance, "Prepping Kitchen..."); porkFab = FoodAssetBundle.LoadAsset<GameObject>("rk_pork"); ItemManager.Instance.AddItem(new CustomItem(porkFab, false)); eggFab = FoodAssetBundle.LoadAsset<GameObject>("rk_egg"); ItemManager.Instance.AddItem(new CustomItem(eggFab, false)); deggFab = FoodAssetBundle.LoadAsset<GameObject>("rk_dragonegg"); ItemManager.Instance.AddItem(new CustomItem(deggFab, false)); Log.Info(Instance, "Big thanks to MeatwareMonster!"); } catch (Exception e) { Log.Error(Instance, e); } } public void LoadSfxVfx() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_006f: 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_007c: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Expected O, but got Unknown //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Expected O, but got Unknown //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Expected O, but got Unknown //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Expected O, but got Unknown //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Expected O, but got Unknown //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Expected O, but got Unknown //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Expected O, but got Unknown //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject prefab = Cache.GetPrefab<GameObject>("sfx_build_hammer_stone"); GameObject prefab2 = Cache.GetPrefab<GameObject>("vfx_Place_stone_wall_2x1"); EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[2] { new EffectData { m_prefab = prefab }, new EffectData { m_prefab = prefab2 } }; buildStone = val; GameObject prefab3 = Cache.GetPrefab<GameObject>("sfx_rock_destroyed"); val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab3 } }; breakStone = val; GameObject prefab4 = Cache.GetPrefab<GameObject>("sfx_rock_hit"); val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab4 } }; hitStone = val; GameObject prefab5 = Cache.GetPrefab<GameObject>("sfx_cooking_station_done"); val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab5 } }; cookingSound = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab } }; buildKitten = val; GameObject prefab6 = Cache.GetPrefab<GameObject>("sfx_FireAddFuel"); GameObject prefab7 = Cache.GetPrefab<GameObject>("vfx_HearthAddFuel"); val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[2] { new EffectData { m_prefab = prefab7 }, new EffectData { m_prefab = prefab6 } }; hearthAddFuel = val; GameObject prefab8 = Cache.GetPrefab<GameObject>("vfx_FireAddFuel"); val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[2] { new EffectData { m_prefab = prefab8 }, new EffectData { m_prefab = prefab6 } }; fireAddFuel = val; Log.Debug(Instance, "Loaded Game VFX and SFX"); fireVol = AudioMan.instance.m_ambientLoopSource; } catch (Exception e) { Log.Error(Instance, e); } finally { Log.Info(Instance, "Load Complete. Bone Appetit yall."); } } [Obsolete("Removed in favor of built-in cooking skill", true)] private void AddExtraItem(string itemName) { } [Obsolete("Removed in favor of built-in cooking skill", true)] private void AddItem(string itemName) { } private bool IsCrafterLucky(float skillLevel) { try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); if (skillLevel < 1f) { return false; } int num = Random.Range(1, 100); Log.Debug(Instance, $"Skill Level: {skillLevel} - Rand: {num}"); Log.Debug(Instance, $"rand < skillLevel : {(float)num < skillLevel}"); return (float)num < skillLevel; } catch (Exception e) { Log.Error(Instance, e); } return false; } [Obsolete("Removed in favor of built-in cooking skill", true)] private void RaiseCookingSkill() { } [Conditional("DEBUG")] [Obsolete("Removed in favor of built-in cooking skill", true)] private void PrintCookingSkillInfo() { } private bool IsValidCookingCraftingStation(string currentCraftingStationName) { try { Log.Debug(Instance, "currentCraftingStationName : " + currentCraftingStationName); switch (currentCraftingStationName) { case "rk_griddle(Clone)": case "rk_grill(Clone)": case "rk_prep(Clone)": case "piece_cauldron(Clone)": return true; } } catch (Exception e) { Log.Error(Instance, e); } return false; } private bool IsFromCrafting(long crafterID, string crafterName) { try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); Log.Debug(Instance, $"Player.m_localPlayer.GetPlayerID : {Player.m_localPlayer.GetPlayerID()}"); return !string.IsNullOrEmpty(crafterName) && crafterID == Player.m_localPlayer.GetPlayerID(); } catch (Exception e) { Log.Error(Instance, e); } return false; } private bool IsConsumable(string prefabName) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Invalid comparison between Unknown and I4 try { GameObject itemPrefab = ObjectDB.instance.GetItemPrefab(prefabName); if ((Object)(object)itemPrefab == (Object)null) { return false; } ItemDrop component = itemPrefab.GetComponent<ItemDrop>(); if ((Object)(object)component == (Object)null) { return false; } return (int)component.m_itemData.m_shared.m_itemType == 2; } catch (Exception e) { Log.Error(Instance, e); } return false; } private void LoadChefHat() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); hatFab = FoodAssetBundle.LoadAsset<GameObject>("rk_chef"); GameObject obj = hatFab; ItemConfig val = new ItemConfig(); val.Name = BoneAppetitNames.ChefHat; val.Description = "Improves Cooking Skill XP Earned."; val.Enabled = _configChefHatEnable.Value; val.Amount = 1; val.CraftingStation = string.Empty; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = ItemDropNames.Dandelion, Amount = 5 } }; hat = new CustomItem(obj, true, val); ItemManager.Instance.AddItem(hat); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadGriddlePiece() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00de: Unknown result type (might be due to invalid IL or missing references) try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject val = GrillAssetBundle.LoadAsset<GameObject>("rk_griddle"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = string.Empty; val2.AllowedInDungeons = false; val2.Enabled = true; val2.PieceTable = "_HammerPieceTable"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = ItemDropNames.Stone, Amount = 10, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildStone; CraftingStation component = val.GetComponent<CraftingStation>(); component.m_craftItemEffects = cookingSound; component.m_craftingSkill = (SkillType)105; WearNTear component2 = val.GetComponent<WearNTear>(); component2.m_destroyedEffect = breakStone; component2.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(val3); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadGrillExtensionOvenPiece() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject val = GrillAssetBundle.LoadAsset<GameObject>("rk_oven"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = string.Empty; val2.AllowedInDungeons = false; val2.Enabled = true; val2.PieceTable = "_HammerPieceTable"; val2.ExtendStation = "rk_grill"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[3] { new RequirementConfig { Item = ItemDropNames.SurtlingCore, Amount = 2, Recover = true }, new RequirementConfig { Item = ItemDropNames.TrophySurtling, Amount = 1, Recover = true }, new RequirementConfig { Item = ItemDropNames.Stone, Amount = 10, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildStone; PieceManager.Instance.AddPiece(val3); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadGrillPiece() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Expected O, but got Unknown //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_011c: Unknown result type (might be due to invalid IL or missing references) try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject val = GrillAssetBundle.LoadAsset<GameObject>("rk_grill"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = CraftingStationNames.Forge; val2.AllowedInDungeons = false; val2.Enabled = true; val2.PieceTable = "_HammerPieceTable"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = ItemDropNames.Stone, Amount = 10, Recover = true }, new RequirementConfig { Item = ItemDropNames.Iron, Amount = 2, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildKitten; WearNTear component = val.GetComponent<WearNTear>(); component.m_hitEffect = hitStone; component.m_destroyedEffect = breakStone; CraftingStation component2 = val.GetComponent<CraftingStation>(); component2.m_craftItemEffects = cookingSound; component2.m_craftingSkill = (SkillType)105; PieceManager.Instance.AddPiece(val3); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadPrepstationPiece() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_013c: Unknown result type (might be due to invalid IL or missing references) try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); GameObject val = GrillAssetBundle.LoadAsset<GameObject>("rk_prep"); PieceConfig val2 = new PieceConfig(); val2.PieceTable = "_HammerPieceTable"; val2.AllowedInDungeons = false; val2.CraftingStation = CraftingStationNames.Forge; val2.Enabled = true; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[3] { new RequirementConfig { Item = ItemDropNames.Wood, Amount = 4, Recover = true }, new RequirementConfig { Item = ItemDropNames.Tin, Amount = 5, Recover = true }, new RequirementConfig { Item = ItemDropNames.Stone, Amount = 3, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildKitten; WearNTear component = val.GetComponent<WearNTear>(); component.m_hitEffect = hitStone; component.m_destroyedEffect = breakStone; fireVol = val.GetComponentInChildren<AudioSource>(); val.GetComponent<CraftingStation>().m_craftingSkill = (SkillType)105; PieceManager.Instance.AddPiece(val3); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadSmokelessHangingBrazierPiece() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); fireFab3 = GrillAssetBundle.LoadAsset<GameObject>("rk_brazier"); GameObject obj = fireFab3; PieceConfig val = new PieceConfig(); val.CraftingStation = CraftingStationNames.Forge; val.AllowedInDungeons = false; val.Enabled = _configSmokelessEnable.Value; val.PieceTable = "_HammerPieceTable"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[3] { new RequirementConfig { Item = ItemDropNames.Bronze, Amount = 5, Recover = true }, new RequirementConfig { Item = ItemDropNames.Coal, Amount = 2, Recover = true }, new RequirementConfig { Item = ItemDropNames.Chain, Amount = 1, Recover = true } }; fire3 = new CustomPiece(obj, true, val); fireFab3.GetComponent<Piece>().m_placeEffect = buildStone; fireFab3.GetComponent<WearNTear>().m_destroyedEffect = breakStone; fireFab3.GetComponent<Fireplace>().m_fuelAddedEffects = hearthAddFuel; fireVol = fireFab3.GetComponentInChildren<AudioSource>(); PieceManager.Instance.AddPiece(fire3); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadSmokelessHearthPiece() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); fireFab2 = GrillAssetBundle.LoadAsset<GameObject>("rk_hearth"); GameObject obj = fireFab2; PieceConfig val = new PieceConfig(); val.CraftingStation = CraftingStationNames.Stonecutter; val.AllowedInDungeons = false; val.Enabled = _configSmokelessEnable.Value; val.PieceTable = "_HammerPieceTable"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = ItemDropNames.Stone, Amount = 15, Recover = true } }; fire2 = new CustomPiece(obj, true, val); fireFab2.GetComponent<Piece>().m_placeEffect = buildStone; fireFab2.GetComponent<WearNTear>().m_destroyedEffect = breakStone; fireFab2.GetComponent<Fireplace>().m_fuelAddedEffects = hearthAddFuel; fireVol = fireFab2.GetComponentInChildren<AudioSource>(); PieceManager.Instance.AddPiece(fire2); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadSmokelessFirePitPiece() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); fireFab1 = GrillAssetBundle.LoadAsset<GameObject>("rk_campfire"); GameObject obj = fireFab1; PieceConfig val = new PieceConfig(); val.CraftingStation = string.Empty; val.AllowedInDungeons = false; val.Enabled = _configSmokelessEnable.Value; val.PieceTable = "_HammerPieceTable"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = ItemDropNames.Stone, Amount = 5, Recover = true }, new RequirementConfig { Item = ItemDropNames.Wood, Amount = 2, Recover = true } }; fire1 = new CustomPiece(obj, true, val); fireFab1.GetComponent<Piece>().m_placeEffect = buildStone; fireFab1.GetComponent<WearNTear>().m_destroyedEffect = breakStone; fireFab1.GetComponent<Fireplace>().m_fuelAddedEffects = fireAddFuel; fireVol = fireFab1.GetComponentInChildren<AudioSource>(); PieceManager.Instance.AddPiece(fire1); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadAcidCream() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); acidcream_prefab = FoodAssetBundle.LoadAsset<GameObject>("rk_acidcream"); GameObject obj = acidcream_prefab; ItemConfig val = new ItemConfig(); val.Name = FoodNames.AcidCream; val.Enabled = _configConesEnable.Value; val.Amount = 2; val.CraftingStation = "rk_prep"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[4] { new RequirementConfig { Item = ItemDropNames.Guck, Amount = 4 }, new RequirementConfig { Item = ItemDropNames.MushroomYellow, Amount = 8 }, new RequirementConfig { Item = ItemDropNames.Honey, Amount = 2 }, new RequirementConfig { Item = "rk_dragonegg", Amount = 2 } }; acidcream = new CustomItem(obj, false, val); ItemManager.Instance.AddItem(acidcream); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadBacon() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); bacon_prefab = FoodAssetBundle.LoadAsset<GameObject>("rk_bacon"); GameObject obj = bacon_prefab; ItemConfig val = new ItemConfig(); val.Name = FoodNames.Bacon; val.Enabled = _configBaconEnable.Value; val.Amount = 2; val.CraftingStation = "rk_griddle"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "rk_pork", Amount = 2 } }; bacon = new CustomItem(obj, false, val); ItemManager.Instance.AddItem(bacon); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadBloodSausage() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); bloodsausageFab = FoodAssetBundle.LoadAsset<GameObject>("rk_bloodsausage"); GameObject obj = bloodsausageFab; ItemConfig val = new ItemConfig(); val.Name = FoodNames.BloodSausage; val.Enabled = _configBloodSausageEnable.Value; val.Amount = 2; val.CraftingStation = "rk_grill"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[4] { new RequirementConfig { Item = ItemDropNames.Entrails, Amount = 2 }, new RequirementConfig { Item = ItemDropNames.Bloodbag, Amount = 1 }, new RequirementConfig { Item = ItemDropNames.Thistle, Amount = 2 }, new RequirementConfig { Item = "rk_pork", Amount = 2 } }; bloodsausage = new CustomItem(obj, false, val); ItemManager.Instance.AddItem(bloodsausage); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadBoiledEgg() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); boiledeggFab = FoodAssetBundle.LoadAsset<GameObject>("rk_boiledegg"); GameObject obj = boiledeggFab; ItemConfig val = new ItemConfig(); val.Name = FoodNames.BoiledEgg; val.Enabled = _configBoiledEggEnable.Value; val.Amount = 1; val.CraftingStation = "rk_prep"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "rk_egg", Amount = 2 } }; boiledegg = new CustomItem(obj, false, val); ItemManager.Instance.AddItem(boiledegg); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadBroth() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); brothFab = FoodAssetBundle.LoadAsset<GameObject>("rk_broth"); GameObject obj = brothFab; ItemConfig val = new ItemConfig(); val.Name = FoodNames.Broth; val.Enabled = _configBrothEnable.Value; val.Amount = 1; val.CraftingStation = "rk_prep"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = ItemDropNames.BoneFragments, Amount = 2 }, new RequirementConfig { Item = "rk_butter", Amount = 1 } }; broth = new CustomItem(obj, false, val); ItemManager.Instance.AddItem(broth); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadBurger() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); burgerFab = FoodAssetBundle.LoadAsset<GameObject>("rk_burger"); GameObject obj = burgerFab; ItemConfig val = new ItemConfig(); val.Name = FoodNames.Burger; val.Enabled = _configBurgerEnable.Value; val.Amount = 2; val.CraftingStation = "rk_grill"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[4] { new RequirementConfig { Item = ItemDropNames.RawMeat, Amount = 2 }, new RequirementConfig { Item = ItemDropNames.LoxMeat, Amount = 2 }, new RequirementConfig { Item = ItemDropNames.Turnip, Amount = 2 }, new RequirementConfig { Item = ItemDropNames.Bread, Amount = 1 } }; burger = new CustomItem(obj, false, val); ItemManager.Instance.AddItem(burger); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadButter() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); butterFab = FoodAssetBundle.LoadAsset<GameObject>("rk_butter"); GameObject obj = butterFab; ItemConfig val = new ItemConfig(); val.Name = FoodNames.Butter; val.Enabled = _configButterEnable.Value; val.Amount = 2; val.CraftingStation = "rk_prep"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = ItemDropNames.CarrotSeeds, Amount = 8 } }; butter = new CustomItem(obj, false, val); ItemManager.Instance.AddItem(butter); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadCake() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); cake_prefab = FoodAssetBundle.LoadAsset<GameObject>("rk_birthday"); GameObject obj = cake_prefab; ItemConfig val = new ItemConfig(); val.Name = FoodNames.Cake; val.Enabled = _configCakeEnable.Value; val.Amount = 1; val.CraftingStation = "rk_grill"; val.MinStationLevel = 2; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[4] { new RequirementConfig { Item = ItemDropNames.BarleyFlour, Amount = 2 }, new RequirementConfig { Item = ItemDropNames.Honey, Amount = 4 }, new RequirementConfig { Item = ItemDropNames.Cloudberry, Amount = 4 }, new RequirementConfig { Item = "rk_egg", Amount = 2 } }; cake = new CustomItem(obj, false, val); ItemManager.Instance.AddItem(cake); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadCandiedTurnip() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); candiedTurnipFab = FoodAssetBundle.LoadAsset<GameObject>("rk_candiedturnip"); GameObject obj = candiedTurnipFab; ItemConfig val = new ItemConfig(); val.Name = FoodNames.CandiedTurnip; val.Enabled = _configCandiedTurnipEnable.Value; val.Amount = 1; val.CraftingStation = "rk_grill"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[3] { new RequirementConfig { Item = ItemDropNames.Thistle, Amount = 1 }, new RequirementConfig { Item = ItemDropNames.Honey, Amount = 2 }, new RequirementConfig { Item = ItemDropNames.Turnip, Amount = 2 } }; candiedTurnip = new CustomItem(obj, false, val); ItemManager.Instance.AddItem(candiedTurnip); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadCarrotSticks() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); carrotstickFab = FoodAssetBundle.LoadAsset<GameObject>("rk_carrotsticks"); GameObject obj = carrotstickFab; ItemConfig val = new ItemConfig(); val.Name = FoodNames.CarrotSticks; val.Enabled = _configCarrotSticksEnable.Value; val.Amount = 1; val.CraftingStation = "rk_prep"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = ItemDropNames.Carrot, Amount = 2 }, new RequirementConfig { Item = "rk_nut_ella", Amount = 1 } }; carrotstick = new CustomItem(obj, false, val); ItemManager.Instance.AddItem(carrotstick); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadCoffee() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown try { Log.Trace(Instance, "BoneAppetit." + MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); coffee_prefab = FoodAssetBundle.LoadAsset<GameObject>("rk_coffee"); GameObject obj = coffee_prefab; ItemConfig val = new ItemConfig(); val.Name = FoodNames.Coffee; val.Enabled = _configCoffeeEnable.Value; val.Amount = 1; val.CraftingStation = "rk_prep"; val.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = ItemDropNames.AncientSeed, Amount = 2 } }; coffee = new CustomItem(obj, false, val); ItemManager.Instance.AddItem(coffee); } catch (Exception e) { Log.Error(Instance, e); } } private void LoadElectricCream() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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) /