Please disclose if your mod was created primarily 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 RtDOceanFoods v0.2.0
RtDOceanFoods.dll
Decompiled 3 months agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Managers; using Jotunn.Utils; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("RtDOceanFoods")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("RtDOceanFoods")] [assembly: AssemblyTitle("RtDOceanFoods")] [assembly: AssemblyVersion("1.0.0.0")] namespace RtDOceanFoods; [BepInPlugin("Soloredis.RtDOceanFoods", "RtDOceanFoods", "0.2.0")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class RtDOceanFoods : BaseUnityPlugin { public const string PluginGUID = "Soloredis.RtDOceanFoods"; public const string PluginName = "RtDOceanFoods"; public const string PluginVersion = "0.2.0"; public static bool isModded = true; public AssetBundle MyAssets; public ConfigEntry<bool> LoggingEnable; private CustomLocalization Localization; public string[] ItemList = new string[31] { "FishWraps1_RtD", "FishWraps2_RtD", "FishWraps3_RtD", "FishWraps4_RtD", "FishWraps5_RtD", "FishWraps6_RtD", "FishWraps7_RtD", "FishWraps8_RtD", "FishWraps9_RtD", "FishWraps10_RtD", "FishWraps11_RtD", "FishWraps12_RtD", "SeaMonsterStew_RtD", "SharkMeatStew_RtD", "SeaMonsterTailCooked_RtD", "SeaMonsterTailRaw_RtD", "SeaWeed_RtD", "SharkMeatCooked_RtD", "SharkMeatRaw_RtD", "FishCooked1_RtD", "FishCooked2_RtD", "FishCooked3_RtD", "FishCooked4_RtD", "FishCooked5_RtD", "FishCooked6_RtD", "FishCooked7_RtD", "FishCooked8_RtD", "FishCooked9_RtD", "FishCooked10_RtD", "FishCooked11_RtD", "FishCooked12_RtD" }; private void Awake() { CreateConfigs(); LoadBundle(); AddItems(); CreateRecipes(); LoadTranslations(); AddLocalizations(); PrefabManager.OnPrefabsRegistered += EditDrops; PrefabManager.OnPrefabsRegistered += AddDropsCheck; PrefabManager.OnPrefabsRegistered += CharacterFoodDrops; if (LoggingEnable.Value) { ((BaseUnityPlugin)this).Logger.LogWarning((object)"Logging is enabled in the config."); } } private void LoadBundle() { try { MyAssets = AssetUtils.LoadAssetBundleFromResources("rtdoceanfoods", Assembly.GetExecutingAssembly()); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while loading bundle: {arg}"); } } public void CreateConfigs() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown try { ((BaseUnityPlugin)this).Config.SaveOnConfigSet = true; LoggingEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("RtDOceanFoods Logging", "Enable", false, new ConfigDescription("Enables logging. Disabled by default", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true } })); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding configuration values: {arg}"); } } private void AddLocalizations() { Localization = LocalizationManager.Instance.GetLocalization(); CustomLocalization localization = Localization; string text = "English"; localization.AddTranslation(ref text, new Dictionary<string, string> { { "SeaWeed_RtD", "SeaWeed" }, { "SeaWeed_desc_RtD", "Delicious SeaWeed" }, { "FishCooked1_RtD", "Cooked Perch" }, { "FishCooked1_desc_RtD", "Tasty Fish" }, { "FishCooked2_RtD", "Cooked Pike" }, { "FishCooked2_desc_RtD", "Tasty Fish" }, { "FishCooked3_RtD", "Cooked Tuna" }, { "FishCooked3_desc_RtD", "Tasty Fish" }, { "FishCooked4_RtD", "Cooked Tetra" }, { "FishCooked4_desc_RtD", "Tasty Fish" }, { "FishCooked5_RtD", "Cooked TrollFish" }, { "FishCooked5_desc_RtD", "Tasty Fish" }, { "FishCooked6_RtD", "Cooked Herring" }, { "FishCooked6_desc_RtD", "Tasty Fish" }, { "FishCooked7_RtD", "Cooked Grouper" }, { "FishCooked7_desc_RtD", "Tasty Fish" }, { "FishCooked8_RtD", "Cooked Cod" }, { "FishCooked8_desc_RtD", "Tasty Fish" }, { "FishCooked9_RtD", "Cooked Angler" }, { "FishCooked9_desc_RtD", "Tasty Fish" }, { "FishCooked10_RtD", "Cooked Salmon" }, { "FishCooked10_desc_RtD", "Tasty Fish" }, { "FishCooked11_RtD", "Cooked MagmaFish" }, { "FishCooked11_desc_RtD", "Tasty Fish" }, { "FishCooked12_RtD", "Cooked PufferFish" }, { "FishCooked12_desc_RtD", "Tasty Fish" }, { "SeaMonsterTailCooked_RtD", "Cooked Tail" }, { "SeaMonsterTailCooked_desc_RtD", "Tasty SeaMonster Meat" }, { "SeaMonsterTailRaw_RtD", "SeaMonster Tail" }, { "SeaMonsterTailRaw_desc_RtD", "Make sure to cook this..." }, { "SharkMeatCooked_RtD", "Cooked SharkMeat" }, { "SharkMeatCooked_desc_RtD", "Tasty SharkMeat" }, { "SharkMeatRaw_RtD", "SharkMeat" }, { "SharkMeatRaw_desc_RtD", "Be sure to cook this..." }, { "SeaMonsterStew_RtD", "SeaMonster Stew" }, { "SeaMonsterStew_desc_RtD", "Delicious stew" }, { "SharkMeatStew_RtD", "SharkMeat Stew" }, { "SharkMeatStew_desc_RtD", "Delicious stew" }, { "FishWraps1_RtD", "Perch Wrap" }, { "FishWraps1_desc_RtD", "A delicious meal" }, { "FishWraps2_RtD", "Pike Wrap" }, { "FishWraps2_desc_RtD", "A delicious meal" }, { "FishWraps3_RtD", "Tuna Wrap" }, { "FishWraps3_desc_RtD", "A delicious meal" }, { "FishWraps4_RtD", "Tetra Wrap" }, { "FishWraps4_desc_RtD", "A delicious meal" }, { "FishWraps5_RtD", "TrollFish Wrap" }, { "FishWraps5_desc_RtD", "A delicious meal" }, { "FishWraps6_RtD", "Herring Wrap" }, { "FishWraps6_desc_RtD", "A delicious meal" }, { "FishWraps7_RtD", "Grouper Wrap" }, { "FishWraps7_desc_RtD", "Made with raw Barley for the extra CRUNCH." }, { "FishWraps8_RtD", "Cod Wrap" }, { "FishWraps8_desc_RtD", "A delicious meal" }, { "FishWraps9_RtD", "Angler Wrap" }, { "FishWraps9_desc_RtD", "A delicious meal" }, { "FishWraps10_RtD", "Salmon Wrap" }, { "FishWraps10_desc_RtD", "A delicious meal" }, { "FishWraps11_RtD", "Magma Wrap" }, { "FishWraps11_desc_RtD", "Made with the wrong type of flour" }, { "FishWraps12_RtD", "Puff Wrap" }, { "FishWraps12_desc_RtD", "A delicious meal" } }); } private void LoadTranslations() { TextAsset[] array = MyAssets.LoadAllAssets<TextAsset>(); TextAsset[] array2 = array; foreach (TextAsset val in array2) { string text = ((Object)val).name.Replace("_RtDAdditions.json", null); Localization.AddJsonFile(text, ((object)val).ToString()); } } public void CreateRecipes() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: 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 //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Expected O, but got Unknown //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Expected O, but got Unknown //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Expected O, but got Unknown //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Expected O, but got Unknown //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Expected O, but got Unknown //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Expected O, but got Unknown //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Expected O, but got Unknown //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Expected O, but got Unknown //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Expected O, but got Unknown //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Expected O, but got Unknown //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Expected O, but got Unknown //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Expected O, but got Unknown //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Expected O, but got Unknown //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Expected O, but got Unknown //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Expected O, but got Unknown //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Expected O, but got Unknown //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Expected O, but got Unknown //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Expected O, but got Unknown //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Expected O, but got Unknown //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Expected O, but got Unknown //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Expected O, but got Unknown //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Expected O, but got Unknown //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Expected O, but got Unknown //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Expected O, but got Unknown //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Expected O, but got Unknown //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Expected O, but got Unknown //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Expected O, but got Unknown //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Expected O, but got Unknown //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Expected O, but got Unknown //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Expected O, but got Unknown //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Expected O, but got Unknown //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Expected O, but got Unknown //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_044f: Expected O, but got Unknown //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Expected O, but got Unknown //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0485: Expected O, but got Unknown //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Expected O, but got Unknown //IL_04a5: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Expected O, but got Unknown //IL_04b7: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Expected O, but got Unknown //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Expected O, but got Unknown //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_04f7: Expected O, but got Unknown //IL_0502: Unknown result type (might be due to invalid IL or missing references) //IL_050c: Expected O, but got Unknown //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Expected O, but got Unknown //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_0533: Expected O, but got Unknown //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Expected O, but got Unknown //IL_055f: Unknown result type (might be due to invalid IL or missing references) //IL_0569: Expected O, but got Unknown //IL_0574: Unknown result type (might be due to invalid IL or missing references) //IL_057e: Expected O, but got Unknown //IL_0589: Unknown result type (might be due to invalid IL or missing references) //IL_0593: Expected O, but got Unknown //IL_059b: Unknown result type (might be due to invalid IL or missing references) //IL_05a5: Expected O, but got Unknown //IL_05a6: Unknown result type (might be due to invalid IL or missing references) //IL_05ad: Expected O, but got Unknown //IL_05d1: Unknown result type (might be due to invalid IL or missing references) //IL_05db: Expected O, but got Unknown //IL_05e6: Unknown result type (might be due to invalid IL or missing references) //IL_05f0: Expected O, but got Unknown //IL_05fb: Unknown result type (might be due to invalid IL or missing references) //IL_0605: Expected O, but got Unknown //IL_060d: Unknown result type (might be due to invalid IL or missing references) //IL_0617: Expected O, but got Unknown //IL_0618: Unknown result type (might be due to invalid IL or missing references) //IL_061f: Expected O, but got Unknown //IL_0643: Unknown result type (might be due to invalid IL or missing references) //IL_064d: Expected O, but got Unknown //IL_0658: Unknown result type (might be due to invalid IL or missing references) //IL_0662: Expected O, but got Unknown //IL_066d: Unknown result type (might be due to invalid IL or missing references) //IL_0677: Expected O, but got Unknown //IL_067f: Unknown result type (might be due to invalid IL or missing references) //IL_0689: Expected O, but got Unknown //IL_068a: Unknown result type (might be due to invalid IL or missing references) //IL_0691: Expected O, but got Unknown //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06bf: Expected O, but got Unknown //IL_06ca: Unknown result type (might be due to invalid IL or missing references) //IL_06d4: Expected O, but got Unknown //IL_06df: Unknown result type (might be due to invalid IL or missing references) //IL_06e9: Expected O, but got Unknown //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_06fb: Expected O, but got Unknown //IL_06fc: Unknown result type (might be due to invalid IL or missing references) //IL_0703: Expected O, but got Unknown //IL_0727: Unknown result type (might be due to invalid IL or missing references) //IL_0731: Expected O, but got Unknown //IL_073c: Unknown result type (might be due to invalid IL or missing references) //IL_0746: Expected O, but got Unknown //IL_0751: Unknown result type (might be due to invalid IL or missing references) //IL_075b: Expected O, but got Unknown //IL_0763: Unknown result type (might be due to invalid IL or missing references) //IL_076d: Expected O, but got Unknown //IL_076e: Unknown result type (might be due to invalid IL or missing references) //IL_0775: Expected O, but got Unknown //IL_0799: Unknown result type (might be due to invalid IL or missing references) //IL_07a3: Expected O, but got Unknown //IL_07ae: Unknown result type (might be due to invalid IL or missing references) //IL_07b8: Expected O, but got Unknown //IL_07c3: Unknown result type (might be due to invalid IL or missing references) //IL_07cd: Expected O, but got Unknown //IL_07d5: Unknown result type (might be due to invalid IL or missing references) //IL_07df: Expected O, but got Unknown //IL_07e0: Unknown result type (might be due to invalid IL or missing references) //IL_07e7: Expected O, but got Unknown //IL_080b: Unknown result type (might be due to invalid IL or missing references) //IL_0815: Expected O, but got Unknown //IL_0820: Unknown result type (might be due to invalid IL or missing references) //IL_082a: Expected O, but got Unknown //IL_0835: Unknown result type (might be due to invalid IL or missing references) //IL_083f: Expected O, but got Unknown //IL_0847: Unknown result type (might be due to invalid IL or missing references) //IL_0851: Expected O, but got Unknown //IL_0852: Unknown result type (might be due to invalid IL or missing references) //IL_0859: Expected O, but got Unknown //IL_087d: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Expected O, but got Unknown //IL_0892: Unknown result type (might be due to invalid IL or missing references) //IL_089c: Expected O, but got Unknown //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08b1: Expected O, but got Unknown //IL_08b9: Unknown result type (might be due to invalid IL or missing references) //IL_08c3: Expected O, but got Unknown //IL_08c4: Unknown result type (might be due to invalid IL or missing references) //IL_08cb: Expected O, but got Unknown //IL_08ef: Unknown result type (might be due to invalid IL or missing references) //IL_08f9: Expected O, but got Unknown //IL_0904: Unknown result type (might be due to invalid IL or missing references) //IL_090e: Expected O, but got Unknown //IL_0919: Unknown result type (might be due to invalid IL or missing references) //IL_0923: Expected O, but got Unknown //IL_092b: Unknown result type (might be due to invalid IL or missing references) //IL_0935: Expected O, but got Unknown //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_093d: Expected O, but got Unknown //IL_0961: Unknown result type (might be due to invalid IL or missing references) //IL_096b: Expected O, but got Unknown //IL_0976: Unknown result type (might be due to invalid IL or missing references) //IL_0980: Expected O, but got Unknown //IL_098b: Unknown result type (might be due to invalid IL or missing references) //IL_0995: Expected O, but got Unknown //IL_09a0: Unknown result type (might be due to invalid IL or missing references) //IL_09aa: Expected O, but got Unknown //IL_09b2: Unknown result type (might be due to invalid IL or missing references) //IL_09bc: Expected O, but got Unknown //IL_09bd: Unknown result type (might be due to invalid IL or missing references) //IL_09c4: Expected O, but got Unknown //IL_09e8: Unknown result type (might be due to invalid IL or missing references) //IL_09f2: Expected O, but got Unknown //IL_09fd: Unknown result type (might be due to invalid IL or missing references) //IL_0a07: Expected O, but got Unknown //IL_0a12: Unknown result type (might be due to invalid IL or missing references) //IL_0a1c: Expected O, but got Unknown //IL_0a27: Unknown result type (might be due to invalid IL or missing references) //IL_0a31: Expected O, but got Unknown //IL_0a39: Unknown result type (might be due to invalid IL or missing references) //IL_0a43: Expected O, but got Unknown try { RecipeConfig val = new RecipeConfig(); val.Item = "FishCooked1_RtD"; val.AddRequirement(new RequirementConfig("Fish1", 1, 0, true)); val.CraftingStation = CraftingStations.Cauldron; ItemManager.Instance.AddRecipe(new CustomRecipe(val)); RecipeConfig val2 = new RecipeConfig(); val2.Item = "FishCooked2_RtD"; val2.AddRequirement(new RequirementConfig("Fish2", 1, 0, true)); val2.CraftingStation = CraftingStations.Cauldron; ItemManager.Instance.AddRecipe(new CustomRecipe(val2)); RecipeConfig val3 = new RecipeConfig(); val3.Item = "FishCooked3_RtD"; val3.AddRequirement(new RequirementConfig("Fish3", 1, 0, true)); val3.CraftingStation = CraftingStations.Cauldron; ItemManager.Instance.AddRecipe(new CustomRecipe(val3)); RecipeConfig val4 = new RecipeConfig(); val4.Item = "FishCooked4_RtD"; val4.AddRequirement(new RequirementConfig("Fish4_cave", 1, 0, true)); val4.CraftingStation = CraftingStations.Cauldron; ItemManager.Instance.AddRecipe(new CustomRecipe(val4)); RecipeConfig val5 = new RecipeConfig(); val5.Item = "FishCooked5_RtD"; val5.AddRequirement(new RequirementConfig("Fish5", 1, 0, true)); val5.CraftingStation = CraftingStations.Cauldron; ItemManager.Instance.AddRecipe(new CustomRecipe(val5)); RecipeConfig val6 = new RecipeConfig(); val6.Item = "FishCooked6_RtD"; val6.AddRequirement(new RequirementConfig("Fish6", 1, 0, true)); val6.CraftingStation = CraftingStations.Cauldron; ItemManager.Instance.AddRecipe(new CustomRecipe(val6)); RecipeConfig val7 = new RecipeConfig(); val7.Item = "FishCooked7_RtD"; val7.AddRequirement(new RequirementConfig("Fish7", 1, 0, true)); val7.CraftingStation = CraftingStations.Cauldron; ItemManager.Instance.AddRecipe(new CustomRecipe(val7)); RecipeConfig val8 = new RecipeConfig(); val8.Item = "FishCooked8_RtD"; val8.AddRequirement(new RequirementConfig("Fish8", 1, 0, true)); val8.CraftingStation = CraftingStations.Cauldron; ItemManager.Instance.AddRecipe(new CustomRecipe(val8)); RecipeConfig val9 = new RecipeConfig(); val9.Item = "FishCooked9_RtD"; val9.AddRequirement(new RequirementConfig("Fish9", 1, 0, true)); val9.CraftingStation = CraftingStations.Cauldron; ItemManager.Instance.AddRecipe(new CustomRecipe(val9)); RecipeConfig val10 = new RecipeConfig(); val10.Item = "FishCooked10_RtD"; val10.AddRequirement(new RequirementConfig("Fish10", 1, 0, true)); val10.CraftingStation = CraftingStations.Cauldron; ItemManager.Instance.AddRecipe(new CustomRecipe(val10)); RecipeConfig val11 = new RecipeConfig(); val11.Item = "FishCooked11_RtD"; val11.AddRequirement(new RequirementConfig("Fish11", 1, 0, true)); val11.CraftingStation = CraftingStations.Cauldron; ItemManager.Instance.AddRecipe(new CustomRecipe(val11)); RecipeConfig val12 = new RecipeConfig(); val12.Item = "FishCooked12_RtD"; val12.AddRequirement(new RequirementConfig("Fish12", 1, 0, true)); val12.CraftingStation = CraftingStations.Cauldron; ItemManager.Instance.AddRecipe(new CustomRecipe(val12)); RecipeConfig val13 = new RecipeConfig(); val13.Item = "SeaMonsterTailCooked_RtD"; val13.AddRequirement(new RequirementConfig("SeaMonsterTailRaw_RtD", 1, 0, true)); val13.CraftingStation = CraftingStations.Cauldron; ItemManager.Instance.AddRecipe(new CustomRecipe(val13)); RecipeConfig val14 = new RecipeConfig(); val14.Item = "SharkMeatCooked_RtD"; val14.AddRequirement(new RequirementConfig("SharkMeatRaw_RtD", 1, 0, true)); val14.CraftingStation = CraftingStations.Cauldron; ItemManager.Instance.AddRecipe(new CustomRecipe(val14)); RecipeConfig val15 = new RecipeConfig(); val15.Item = "FishWraps1_RtD"; val15.CraftingStation = CraftingStations.Cauldron; val15.AddRequirement(new RequirementConfig("FishCooked1_RtD", 1, 0, true)); val15.AddRequirement(new RequirementConfig("Mushroom", 1, 0, true)); val15.AddRequirement(new RequirementConfig("SeaWeed_RtD", 1, 0, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val15)); RecipeConfig val16 = new RecipeConfig(); val16.Item = "FishWraps2_RtD"; val16.CraftingStation = CraftingStations.Cauldron; val16.AddRequirement(new RequirementConfig("FishCooked2_RtD", 1, 0, true)); val16.AddRequirement(new RequirementConfig("Dandelion", 1, 0, true)); val16.AddRequirement(new RequirementConfig("SeaWeed_RtD", 1, 0, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val16)); RecipeConfig val17 = new RecipeConfig(); val17.Item = "FishWraps3_RtD"; val17.CraftingStation = CraftingStations.Cauldron; val17.AddRequirement(new RequirementConfig("FishCooked3_RtD", 1, 0, true)); val17.AddRequirement(new RequirementConfig("MushroomYellow", 1, 0, true)); val17.AddRequirement(new RequirementConfig("SeaWeed_RtD", 1, 0, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val17)); RecipeConfig val18 = new RecipeConfig(); val18.Item = "FishWraps4_RtD"; val18.CraftingStation = CraftingStations.Cauldron; val18.AddRequirement(new RequirementConfig("FishCooked4_RtD", 1, 0, true)); val18.AddRequirement(new RequirementConfig("Turnip", 1, 0, true)); val18.AddRequirement(new RequirementConfig("SeaWeed_RtD", 1, 0, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val18)); RecipeConfig val19 = new RecipeConfig(); val19.Item = "FishWraps5_RtD"; val19.CraftingStation = CraftingStations.Cauldron; val19.AddRequirement(new RequirementConfig("FishCooked5_RtD", 1, 0, true)); val19.AddRequirement(new RequirementConfig("Onion", 1, 0, true)); val19.AddRequirement(new RequirementConfig("SeaWeed_RtD", 1, 0, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val19)); RecipeConfig val20 = new RecipeConfig(); val20.Item = "FishWraps6_RtD"; val20.CraftingStation = CraftingStations.Cauldron; val20.AddRequirement(new RequirementConfig("FishCooked6_RtD", 1, 0, true)); val20.AddRequirement(new RequirementConfig("Carrot", 1, 0, true)); val20.AddRequirement(new RequirementConfig("SeaWeed_RtD", 1, 0, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val20)); RecipeConfig val21 = new RecipeConfig(); val21.Item = "FishWraps7_RtD"; val21.CraftingStation = CraftingStations.Cauldron; val21.AddRequirement(new RequirementConfig("FishCooked7_RtD", 1, 0, true)); val21.AddRequirement(new RequirementConfig("Barley", 1, 0, true)); val21.AddRequirement(new RequirementConfig("SeaWeed_RtD", 1, 0, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val21)); RecipeConfig val22 = new RecipeConfig(); val22.Item = "FishWraps8_RtD"; val22.CraftingStation = CraftingStations.Cauldron; val22.AddRequirement(new RequirementConfig("FishCooked8_RtD", 1, 0, true)); val22.AddRequirement(new RequirementConfig("Thistle", 1, 0, true)); val22.AddRequirement(new RequirementConfig("SeaWeed_RtD", 1, 0, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val22)); RecipeConfig val23 = new RecipeConfig(); val23.Item = "FishWraps9_RtD"; val23.CraftingStation = CraftingStations.Cauldron; val23.AddRequirement(new RequirementConfig("FishCooked9_RtD", 1, 0, true)); val23.AddRequirement(new RequirementConfig("Onion", 1, 0, true)); val23.AddRequirement(new RequirementConfig("SeaWeed_RtD", 1, 0, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val23)); RecipeConfig val24 = new RecipeConfig(); val24.Item = "FishWraps10_RtD"; val24.CraftingStation = CraftingStations.Cauldron; val24.AddRequirement(new RequirementConfig("FishCooked10_RtD", 1, 0, true)); val24.AddRequirement(new RequirementConfig("Turnip", 1, 0, true)); val24.AddRequirement(new RequirementConfig("SeaWeed_RtD", 1, 0, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val24)); RecipeConfig val25 = new RecipeConfig(); val25.Item = "FishWraps11_RtD"; val25.CraftingStation = CraftingStations.Cauldron; val25.AddRequirement(new RequirementConfig("FishCooked11_RtD", 1, 0, true)); val25.AddRequirement(new RequirementConfig("Dandelion", 1, 0, true)); val25.AddRequirement(new RequirementConfig("SeaWeed_RtD", 1, 0, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val25)); RecipeConfig val26 = new RecipeConfig(); val26.Item = "FishWraps12_RtD"; val26.CraftingStation = CraftingStations.Cauldron; val26.AddRequirement(new RequirementConfig("FishCooked12_RtD", 1, 0, true)); val26.AddRequirement(new RequirementConfig("Carrot", 1, 0, true)); val26.AddRequirement(new RequirementConfig("SeaWeed_RtD", 1, 0, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val26)); RecipeConfig val27 = new RecipeConfig(); val27.Item = "SharkMeatStew_RtD"; val27.CraftingStation = CraftingStations.Cauldron; val27.AddRequirement(new RequirementConfig("SharkMeatCooked_RtD", 1, 0, true)); val27.AddRequirement(new RequirementConfig("SeaWeed_RtD", 1, 0, true)); val27.AddRequirement(new RequirementConfig("Carrot", 5, 0, true)); val27.AddRequirement(new RequirementConfig("Mushroom", 5, 0, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val27)); RecipeConfig val28 = new RecipeConfig(); val28.Item = "SeaMonsterStew_RtD"; val28.CraftingStation = CraftingStations.Cauldron; val28.AddRequirement(new RequirementConfig("SeaMonsterTailCooked_RtD", 1, 0, true)); val28.AddRequirement(new RequirementConfig("SeaWeed_RtD", 1, 0, true)); val28.AddRequirement(new RequirementConfig("Carrot", 5, 0, true)); val28.AddRequirement(new RequirementConfig("MushroomYellow", 5, 0, true)); ItemManager.Instance.AddRecipe(new CustomRecipe(val28)); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding configuration values: {arg}"); } } private void AddItems() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown try { string[] itemList = ItemList; foreach (string text in itemList) { GameObject val = MyAssets.LoadAsset<GameObject>(text); if ((Object)(object)val != (Object)null) { CustomItem val2 = new CustomItem(val, true); ItemManager.Instance.AddItem(val2); if (LoggingEnable.Value) { ((BaseUnityPlugin)this).Logger.LogMessage((object)("Added: " + text + " to the Object database")); } } else { ((BaseUnityPlugin)this).Logger.LogMessage((object)("Failed to add: " + text + " to the object database")); } } } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding prefabs: {arg}"); } } private void CharacterFoodDrops() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_00b6: 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_00c9: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Expected O, but got Unknown //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0178: 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_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Expected O, but got Unknown //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Expected O, but got Unknown //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Expected O, but got Unknown //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Expected O, but got Unknown //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Expected O, but got Unknown //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Expected O, but got Unknown //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Expected O, but got Unknown //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Expected O, but got Unknown try { GameObject prefab = PrefabManager.Instance.GetPrefab("Shark_RtD"); GameObject prefab2 = PrefabManager.Instance.GetPrefab("SharkMeatRaw_RtD"); prefab.GetComponent<CharacterDrop>().m_drops.Add(new Drop { m_prefab = prefab2, m_chance = 1f, m_amountMin = 5, m_amountMax = 6, m_levelMultiplier = false, m_onePerPlayer = false }); GameObject prefab3 = PrefabManager.Instance.GetPrefab("BoneFish_RtD"); GameObject prefab4 = PrefabManager.Instance.GetPrefab("SeaMonsterTailRaw_RtD"); prefab3.GetComponent<CharacterDrop>().m_drops.Add(new Drop { m_prefab = prefab4, m_chance = 1f, m_amountMin = 2, m_amountMax = 3, m_levelMultiplier = false, m_onePerPlayer = false }); GameObject prefab5 = PrefabManager.Instance.GetPrefab("BoneSquid_RtD"); GameObject prefab6 = PrefabManager.Instance.GetPrefab("SeaMonsterTailRaw_RtD"); prefab5.GetComponent<CharacterDrop>().m_drops.Add(new Drop { m_prefab = prefab6, m_chance = 1f, m_amountMin = 2, m_amountMax = 3, m_levelMultiplier = false, m_onePerPlayer = false }); GameObject prefab7 = PrefabManager.Instance.GetPrefab("BoneSquid_RtD"); GameObject prefab8 = PrefabManager.Instance.GetPrefab("SeaMonsterTailRaw_RtD"); prefab7.GetComponent<CharacterDrop>().m_drops.Add(new Drop { m_prefab = prefab8, m_chance = 1f, m_amountMin = 2, m_amountMax = 3, m_levelMultiplier = false, m_onePerPlayer = false }); GameObject prefab9 = PrefabManager.Instance.GetPrefab("LuminousLooker_RtD"); GameObject prefab10 = PrefabManager.Instance.GetPrefab("SeaMonsterTailRaw_RtD"); prefab9.GetComponent<CharacterDrop>().m_drops.Add(new Drop { m_prefab = prefab10, m_chance = 1f, m_amountMin = 2, m_amountMax = 3, m_levelMultiplier = false, m_onePerPlayer = false }); GameObject prefab11 = PrefabManager.Instance.GetPrefab("Reptile_RtD"); GameObject prefab12 = PrefabManager.Instance.GetPrefab("SeaMonsterTailRaw_RtD"); prefab11.GetComponent<CharacterDrop>().m_drops.Add(new Drop { m_prefab = prefab12, m_chance = 1f, m_amountMin = 2, m_amountMax = 3, m_levelMultiplier = false, m_onePerPlayer = false }); GameObject prefab13 = PrefabManager.Instance.GetPrefab("CatFish_RtD"); GameObject prefab14 = PrefabManager.Instance.GetPrefab("SeaMonsterTailRaw_RtD"); prefab13.GetComponent<CharacterDrop>().m_drops.Add(new Drop { m_prefab = prefab14, m_chance = 1f, m_amountMin = 2, m_amountMax = 3, m_levelMultiplier = false, m_onePerPlayer = false }); GameObject prefab15 = PrefabManager.Instance.GetPrefab("CatFishWanderer_RtD"); GameObject prefab16 = PrefabManager.Instance.GetPrefab("SeaMonsterTailRaw_RtD"); prefab15.GetComponent<CharacterDrop>().m_drops.Add(new Drop { m_prefab = prefab16, m_chance = 1f, m_amountMin = 2, m_amountMax = 3, m_levelMultiplier = false, m_onePerPlayer = false }); GameObject prefab17 = PrefabManager.Instance.GetPrefab("ReptileWanderer_RtD"); GameObject prefab18 = PrefabManager.Instance.GetPrefab("SeaMonsterTailRaw_RtD"); prefab17.GetComponent<CharacterDrop>().m_drops.Add(new Drop { m_prefab = prefab18, m_chance = 1f, m_amountMin = 2, m_amountMax = 3, m_levelMultiplier = false, m_onePerPlayer = false }); GameObject prefab19 = PrefabManager.Instance.GetPrefab("MirLizard_RtD"); GameObject prefab20 = PrefabManager.Instance.GetPrefab("SeaMonsterTailRaw_RtD"); prefab19.GetComponent<CharacterDrop>().m_drops.Add(new Drop { m_prefab = prefab20, m_chance = 1f, m_amountMin = 2, m_amountMax = 3, m_levelMultiplier = false, m_onePerPlayer = false }); GameObject prefab21 = PrefabManager.Instance.GetPrefab("MirRake_RtD"); GameObject prefab22 = PrefabManager.Instance.GetPrefab("SeaMonsterTailRaw_RtD"); prefab21.GetComponent<CharacterDrop>().m_drops.Add(new Drop { m_prefab = prefab22, m_chance = 1f, m_amountMin = 2, m_amountMax = 3, m_levelMultiplier = false, m_onePerPlayer = false }); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while loading bundle: {arg}"); } finally { PrefabManager.OnPrefabsRegistered -= CharacterFoodDrops; } } private void EditDrops() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: 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_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_046f: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_0555: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_0610: Unknown result type (might be due to invalid IL or missing references) //IL_063b: Unknown result type (might be due to invalid IL or missing references) //IL_0683: Unknown result type (might be due to invalid IL or missing references) //IL_06ae: Unknown result type (might be due to invalid IL or missing references) //IL_06f6: Unknown result type (might be due to invalid IL or missing references) //IL_0721: Unknown result type (might be due to invalid IL or missing references) try { GameObject prefab = Cache.GetPrefab<GameObject>("SeaWeed1_RtD"); GameObject prefab2 = Cache.GetPrefab<GameObject>("SeaWeed_RtD"); DropOnDestroyed component = prefab.GetComponent<DropOnDestroyed>(); component.m_dropWhenDestroyed.m_dropChance = 1f; component.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab2, m_stackMin = 5, m_stackMax = 7, m_weight = 1f }); GameObject prefab3 = Cache.GetPrefab<GameObject>("SeaWeed2_RtD"); GameObject prefab4 = Cache.GetPrefab<GameObject>("SeaWeed_RtD"); DropOnDestroyed component2 = prefab3.GetComponent<DropOnDestroyed>(); component2.m_dropWhenDestroyed.m_dropChance = 1f; component2.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab4, m_stackMin = 5, m_stackMax = 7, m_weight = 1f }); GameObject prefab5 = Cache.GetPrefab<GameObject>("SeaWeed3_RtD"); GameObject prefab6 = Cache.GetPrefab<GameObject>("SeaWeed_RtD"); DropOnDestroyed component3 = prefab5.GetComponent<DropOnDestroyed>(); component3.m_dropWhenDestroyed.m_dropChance = 1f; component3.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab6, m_stackMin = 5, m_stackMax = 7, m_weight = 1f }); GameObject prefab7 = Cache.GetPrefab<GameObject>("SeaWeed4_RtD"); GameObject prefab8 = Cache.GetPrefab<GameObject>("SeaWeed_RtD"); DropOnDestroyed component4 = prefab7.GetComponent<DropOnDestroyed>(); component4.m_dropWhenDestroyed.m_dropChance = 1f; component4.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab8, m_stackMin = 5, m_stackMax = 7, m_weight = 1f }); GameObject prefab9 = Cache.GetPrefab<GameObject>("SeaWeed5_RtD"); GameObject prefab10 = Cache.GetPrefab<GameObject>("SeaWeed_RtD"); DropOnDestroyed component5 = prefab9.GetComponent<DropOnDestroyed>(); component5.m_dropWhenDestroyed.m_dropChance = 1f; component5.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab10, m_stackMin = 5, m_stackMax = 7, m_weight = 1f }); GameObject prefab11 = Cache.GetPrefab<GameObject>("SeaWeed6_RtD"); GameObject prefab12 = Cache.GetPrefab<GameObject>("SeaWeed_RtD"); DropOnDestroyed component6 = prefab11.GetComponent<DropOnDestroyed>(); component6.m_dropWhenDestroyed.m_dropChance = 1f; component6.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab12, m_stackMin = 5, m_stackMax = 7, m_weight = 1f }); GameObject prefab13 = Cache.GetPrefab<GameObject>("SeaWeed7_RtD"); GameObject prefab14 = Cache.GetPrefab<GameObject>("SeaWeed_RtD"); DropOnDestroyed component7 = prefab13.GetComponent<DropOnDestroyed>(); component7.m_dropWhenDestroyed.m_dropChance = 1f; component7.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab14, m_stackMin = 5, m_stackMax = 7, m_weight = 1f }); GameObject prefab15 = Cache.GetPrefab<GameObject>("SeaWeed8_RtD"); GameObject prefab16 = Cache.GetPrefab<GameObject>("SeaWeed_RtD"); DropOnDestroyed component8 = prefab15.GetComponent<DropOnDestroyed>(); component8.m_dropWhenDestroyed.m_dropChance = 1f; component8.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab16, m_stackMin = 5, m_stackMax = 7, m_weight = 1f }); GameObject prefab17 = Cache.GetPrefab<GameObject>("SeaWeed9_RtD"); GameObject prefab18 = Cache.GetPrefab<GameObject>("SeaWeed_RtD"); DropOnDestroyed component9 = prefab17.GetComponent<DropOnDestroyed>(); component9.m_dropWhenDestroyed.m_dropChance = 1f; component9.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab18, m_stackMin = 5, m_stackMax = 7, m_weight = 1f }); GameObject prefab19 = Cache.GetPrefab<GameObject>("SeaWeed10_RtD"); GameObject prefab20 = Cache.GetPrefab<GameObject>("SeaWeed_RtD"); DropOnDestroyed component10 = prefab19.GetComponent<DropOnDestroyed>(); component10.m_dropWhenDestroyed.m_dropChance = 1f; component10.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab20, m_stackMin = 5, m_stackMax = 7, m_weight = 1f }); GameObject prefab21 = Cache.GetPrefab<GameObject>("SeaWeed11_RtD"); GameObject prefab22 = Cache.GetPrefab<GameObject>("SeaWeed_RtD"); DropOnDestroyed component11 = prefab21.GetComponent<DropOnDestroyed>(); component11.m_dropWhenDestroyed.m_dropChance = 1f; component11.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab22, m_stackMin = 5, m_stackMax = 7, m_weight = 1f }); GameObject prefab23 = Cache.GetPrefab<GameObject>("SeaWeed12_RtD"); GameObject prefab24 = Cache.GetPrefab<GameObject>("SeaWeed_RtD"); DropOnDestroyed component12 = prefab23.GetComponent<DropOnDestroyed>(); component12.m_dropWhenDestroyed.m_dropChance = 1f; component12.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab24, m_stackMin = 5, m_stackMax = 7, m_weight = 1f }); GameObject prefab25 = Cache.GetPrefab<GameObject>("SeaWeed13_RtD"); GameObject prefab26 = Cache.GetPrefab<GameObject>("SeaWeed_RtD"); DropOnDestroyed component13 = prefab25.GetComponent<DropOnDestroyed>(); component13.m_dropWhenDestroyed.m_dropChance = 1f; component13.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab26, m_stackMin = 5, m_stackMax = 7, m_weight = 1f }); GameObject prefab27 = Cache.GetPrefab<GameObject>("SeaWeed14_RtD"); GameObject prefab28 = Cache.GetPrefab<GameObject>("SeaWeed_RtD"); DropOnDestroyed component14 = prefab27.GetComponent<DropOnDestroyed>(); component14.m_dropWhenDestroyed.m_dropChance = 1f; component14.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab28, m_stackMin = 5, m_stackMax = 7, m_weight = 1f }); GameObject prefab29 = Cache.GetPrefab<GameObject>("SeaWeed15_RtD"); GameObject prefab30 = Cache.GetPrefab<GameObject>("SeaWeed_RtD"); DropOnDestroyed component15 = prefab29.GetComponent<DropOnDestroyed>(); component15.m_dropWhenDestroyed.m_dropChance = 1f; component15.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab30, m_stackMin = 5, m_stackMax = 7, m_weight = 1f }); GameObject prefab31 = Cache.GetPrefab<GameObject>("SeaWeed16_RtD"); GameObject prefab32 = Cache.GetPrefab<GameObject>("SeaWeed_RtD"); DropOnDestroyed component16 = prefab31.GetComponent<DropOnDestroyed>(); component16.m_dropWhenDestroyed.m_dropChance = 1f; component16.m_dropWhenDestroyed.m_drops.Add(new DropData { m_item = prefab32, m_stackMin = 5, m_stackMax = 7, m_weight = 1f }); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while modifing Drops's: {arg}"); } finally { PrefabManager.OnPrefabsRegistered -= EditDrops; } } private void AddDropsCheck() { try { GameObject prefab = Cache.GetPrefab<GameObject>("Lobaco_RtD"); if (!Object.op_Implicit((Object)(object)prefab)) { ((BaseUnityPlugin)this).Logger.LogMessage((object)"RtDOcean was not installed, skipping drops related to this mod."); } } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding drops: {arg}"); } finally { PrefabManager.OnPrefabsRegistered -= AddDropsCheck; } } }