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 Slimes R Us v0.1.8
SlimesRUs.dll
Decompiled 2 years agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Managers; using Jotunn.Utils; using SpawnThat.Spawners; using SpawnThat.Spawners.WorldSpawner; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("Wildlife")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Wildlife")] [assembly: AssemblyCopyright("Copyright © 2022")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("f247181f-9da0-443a-8cd2-7b38a43a08c5")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace SlimesRUs; [BepInPlugin("horemvore.SlimesRUs", "SlimesRUs", "0.1.8")] [BepInIncompatibility("Azumatt.AzuDevMod")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] internal class slimesBundle : BaseUnityPlugin { public const string PluginGUID = "horemvore.SlimesRUs"; public const string PluginName = "SlimesRUs"; public const string PluginVersion = "0.1.8"; public static bool isModded = true; public static GameObject Slime1; public static GameObject Slime2; public static GameObject Slime3; public static GameObject Slime4; public static GameObject Slime5; public static GameObject Slime6; public static GameObject SBAttack1; public static GameObject SBAttack2; public static GameObject SBAttack3; public static GameObject SBAttack4; public static GameObject SGAttack1; public static GameObject SGAttack2; public static GameObject SGAttack3; public static GameObject SGAttack4; public static GameObject SRAttack1; public static GameObject SRAttack2; public static GameObject SRAttack3; public static GameObject SRAttack4; public static GameObject SPAttack1; public static GameObject SPAttack2; public static GameObject SPAttack3; public static GameObject SPAttack4; public static GameObject SPrAttack1; public static GameObject SPrAttack2; public static GameObject SPrAttack3; public static GameObject SPrAttack4; public static GameObject SYAttack1; public static GameObject SYAttack2; public static GameObject SYAttack3; public static GameObject SYAttack4; public static GameObject SFX1; public static GameObject SFX2; public static GameObject SFX3; public static GameObject SFX4; public static GameObject SFX5; public static GameObject VFX1; public static GameObject VFX2; public static GameObject VFX3; public static GameObject VFX4; public static GameObject VFX5; public static GameObject VFX6; public static GameObject VFX7; public static GameObject VFX8; public static GameObject VFX9; public static GameObject VFX10; public static GameObject VFX11; public static GameObject VFX12; public static GameObject VFX13; public static GameObject VFX14; public static GameObject FX1; public static GameObject FX2; public AssetBundle SlimesBundle; private CustomLocalization Localization; internal static ManualLogSource Log; private void Awake() { Log = ((BaseUnityPlugin)this).Logger; AddLocalizations(); LoadBundle(); LoadAssets(); AddSlimes(); PrefabManager.OnVanillaPrefabsAvailable += FixSFX; try { SpawnerConfigurationManager.OnConfigure += ConfigureBiomeSpawners; } catch (Exception value) { Console.WriteLine(value); } } private void AddLocalizations() { try { Localization = LocalizationManager.Instance.GetLocalization(); CustomLocalization localization = Localization; string text = "English"; localization.AddTranslation(ref text, new Dictionary<string, string> { { "item_trophy_slimeblue_hs", "Slime" }, { "item_trophy_slimeblue_desc_hs", "Animated trophy of an Slime" }, { "enemy_slimeblue_hs", "Slime" }, { "enemy_slimered_hs", "Slime" }, { "enemy_slimegreen_hs", "Slime" }, { "enemy_slimepink_hs", "Slime" }, { "enemy_slimepurple_hs", "Slime" }, { "enemy_slimeyellow_hs", "Slime" } }); CustomLocalization localization2 = Localization; text = "Russian"; localization2.AddTranslation(ref text, new Dictionary<string, string> { { "item_trophy_slimeblue_hs", "Cлизь" }, { "item_trophy_slimeblue_desc_hs", "Анимированный трофей Cлизи" }, { "enemy_slimeblue_hs", "Cлизь" }, { "enemy_slimered_hs", "Cлизь" }, { "enemy_slimegreen_hs", "слизь" }, { "enemy_slimepink_hs", "Cлизь" }, { "enemy_slimepurple_hs", "Cлизь" }, { "enemy_slimeyellow_hs", "Cлизь" } }); CustomLocalization localization3 = Localization; text = "German"; localization3.AddTranslation(ref text, new Dictionary<string, string> { { "item_trophy_slimeblue_hs", "Slime" }, { "item_trophy_slimeblue_desc_hs", "Animierte Trophäe eines Schleims" }, { "enemy_slimeblue_hs", "Schleim" }, { "enemy_slimered_hs", "Schleim" }, { "enemy_slimegreen_hs", "Schleim" }, { "enemy_slimepink_hs", "Schleim" }, { "enemy_slimepurple_hs", "Schleim" }, { "enemy_slimeyellow_hs", "Schleim" } }); CustomLocalization localization4 = Localization; text = "Turkish"; localization4.AddTranslation(ref text, new Dictionary<string, string> { { "item_trophy_slimeblue_hs", "Balçık" }, { "item_trophy_slimeblue_desc_hs", "Bir Slime animasyonlu kupa" }, { "enemy_slimeblue_hs", "Balçık" }, { "enemy_slimered_hs", "Balçık" }, { "enemy_slimegreen_hs", "Balçık" }, { "enemy_slimepink_hs", "Balçık" }, { "enemy_slimepurple_hs", "Balçık" }, { "enemy_slimeyellow_hs", "Balçık" } }); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding Localication for Deds Army: {arg}"); } } public void LoadBundle() { SlimesBundle = AssetUtils.LoadAssetBundleFromResources("slime", Assembly.GetExecutingAssembly()); } private void LoadAssets() { //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Expected O, but got Unknown //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Expected O, but got Unknown //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Expected O, but got Unknown //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Expected O, but got Unknown //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Expected O, but got Unknown //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Expected O, but got Unknown //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Expected O, but got Unknown //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Expected O, but got Unknown //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Expected O, but got Unknown //IL_0441: Unknown result type (might be due to invalid IL or missing references) //IL_0448: Expected O, but got Unknown //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Expected O, but got Unknown //IL_047d: Unknown result type (might be due to invalid IL or missing references) //IL_0484: Expected O, but got Unknown //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Expected O, but got Unknown //IL_04b9: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Expected O, but got Unknown //IL_04d7: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Expected O, but got Unknown //IL_04f5: Unknown result type (might be due to invalid IL or missing references) //IL_04fc: Expected O, but got Unknown //IL_0513: Unknown result type (might be due to invalid IL or missing references) //IL_051a: Expected O, but got Unknown //IL_0531: Unknown result type (might be due to invalid IL or missing references) //IL_0538: Expected O, but got Unknown //IL_054f: Unknown result type (might be due to invalid IL or missing references) //IL_0556: Expected O, but got Unknown //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_0574: Expected O, but got Unknown //IL_058b: Unknown result type (might be due to invalid IL or missing references) //IL_0592: Expected O, but got Unknown //IL_05a9: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Expected O, but got Unknown //IL_05c7: Unknown result type (might be due to invalid IL or missing references) //IL_05ce: Expected O, but got Unknown //IL_05e5: Unknown result type (might be due to invalid IL or missing references) //IL_05ec: Expected O, but got Unknown //IL_0603: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Expected O, but got Unknown //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_0628: Expected O, but got Unknown //IL_06a4: Unknown result type (might be due to invalid IL or missing references) //IL_06ab: Expected O, but got Unknown //IL_06be: Unknown result type (might be due to invalid IL or missing references) //IL_06c5: Expected O, but got Unknown //IL_06d8: Unknown result type (might be due to invalid IL or missing references) //IL_06df: Expected O, but got Unknown //IL_06f2: Unknown result type (might be due to invalid IL or missing references) //IL_06f9: Expected O, but got Unknown //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0713: Expected O, but got Unknown //IL_0876: Unknown result type (might be due to invalid IL or missing references) //IL_087d: Expected O, but got Unknown //IL_0890: Unknown result type (might be due to invalid IL or missing references) //IL_0897: Expected O, but got Unknown //IL_08aa: Unknown result type (might be due to invalid IL or missing references) //IL_08b1: 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_08de: Unknown result type (might be due to invalid IL or missing references) //IL_08e5: Expected O, but got Unknown //IL_08f8: Unknown result type (might be due to invalid IL or missing references) //IL_08ff: Expected O, but got Unknown //IL_0912: Unknown result type (might be due to invalid IL or missing references) //IL_0919: Expected O, but got Unknown //IL_092c: Unknown result type (might be due to invalid IL or missing references) //IL_0933: Expected O, but got Unknown //IL_0946: Unknown result type (might be due to invalid IL or missing references) //IL_094d: Expected O, but got Unknown //IL_0960: Unknown result type (might be due to invalid IL or missing references) //IL_0967: Expected O, but got Unknown //IL_097a: Unknown result type (might be due to invalid IL or missing references) //IL_0981: Expected O, but got Unknown //IL_0994: Unknown result type (might be due to invalid IL or missing references) //IL_099b: Expected O, but got Unknown //IL_09ae: Unknown result type (might be due to invalid IL or missing references) //IL_09b5: Expected O, but got Unknown //IL_09c8: Unknown result type (might be due to invalid IL or missing references) //IL_09cf: Expected O, but got Unknown //IL_09e2: Unknown result type (might be due to invalid IL or missing references) //IL_09e9: Expected O, but got Unknown //IL_09fc: Unknown result type (might be due to invalid IL or missing references) //IL_0a03: Expected O, but got Unknown Slime1 = SlimesBundle.LoadAsset<GameObject>("SlimeBlue_HS"); Slime2 = SlimesBundle.LoadAsset<GameObject>("SlimeGreen_HS"); Slime3 = SlimesBundle.LoadAsset<GameObject>("SlimeRed_HS"); Slime4 = SlimesBundle.LoadAsset<GameObject>("SlimePink_HS"); Slime5 = SlimesBundle.LoadAsset<GameObject>("SlimePurple_HS"); Slime6 = SlimesBundle.LoadAsset<GameObject>("SlimeYellow_HS"); GameObject val = SlimesBundle.LoadAsset<GameObject>("SlimeBlue_RD_HS"); CustomPrefab val2 = new CustomPrefab(val, true); PrefabManager.Instance.AddPrefab(val2); GameObject val3 = SlimesBundle.LoadAsset<GameObject>("SlimeRed_RD_HS"); CustomPrefab val4 = new CustomPrefab(val3, true); PrefabManager.Instance.AddPrefab(val4); GameObject val5 = SlimesBundle.LoadAsset<GameObject>("SlimeGreen_RD_HS"); CustomPrefab val6 = new CustomPrefab(val5, true); PrefabManager.Instance.AddPrefab(val6); GameObject val7 = SlimesBundle.LoadAsset<GameObject>("SlimePink_RD_HS"); CustomPrefab val8 = new CustomPrefab(val7, true); PrefabManager.Instance.AddPrefab(val8); GameObject val9 = SlimesBundle.LoadAsset<GameObject>("SlimePurple_RD_HS"); CustomPrefab val10 = new CustomPrefab(val9, true); PrefabManager.Instance.AddPrefab(val10); GameObject val11 = SlimesBundle.LoadAsset<GameObject>("SlimeYellow_RD_HS"); CustomPrefab val12 = new CustomPrefab(val11, true); PrefabManager.Instance.AddPrefab(val12); SBAttack1 = SlimesBundle.LoadAsset<GameObject>("SlimeBlue_Attack1_HS"); SBAttack2 = SlimesBundle.LoadAsset<GameObject>("SlimeBlue_Attack2_HS"); SBAttack3 = SlimesBundle.LoadAsset<GameObject>("SlimeBlue_Attack3_HS"); SBAttack4 = SlimesBundle.LoadAsset<GameObject>("SlimeBlue_Attack4_HS"); SGAttack1 = SlimesBundle.LoadAsset<GameObject>("SlimeGreen_Attack1_HS"); SGAttack2 = SlimesBundle.LoadAsset<GameObject>("SlimeGreen_Attack2_HS"); SGAttack3 = SlimesBundle.LoadAsset<GameObject>("SlimeGreen_Attack3_HS"); SGAttack4 = SlimesBundle.LoadAsset<GameObject>("SlimeGreen_Attack4_HS"); SRAttack1 = SlimesBundle.LoadAsset<GameObject>("SlimeRed_Attack1_HS"); SRAttack2 = SlimesBundle.LoadAsset<GameObject>("SlimeRed_Attack2_HS"); SRAttack3 = SlimesBundle.LoadAsset<GameObject>("SlimeRed_Attack3_HS"); SRAttack4 = SlimesBundle.LoadAsset<GameObject>("SlimeRed_Attack4_HS"); SPAttack1 = SlimesBundle.LoadAsset<GameObject>("SlimePink_Attack1_HS"); SPAttack2 = SlimesBundle.LoadAsset<GameObject>("SlimePink_Attack2_HS"); SPAttack3 = SlimesBundle.LoadAsset<GameObject>("SlimePink_Attack3_HS"); SPAttack4 = SlimesBundle.LoadAsset<GameObject>("SlimePink_Attack4_HS"); SPrAttack1 = SlimesBundle.LoadAsset<GameObject>("SlimePurple_Attack1_HS"); SPrAttack2 = SlimesBundle.LoadAsset<GameObject>("SlimePurple_Attack2_HS"); SPrAttack3 = SlimesBundle.LoadAsset<GameObject>("SlimePurple_Attack3_HS"); SPrAttack4 = SlimesBundle.LoadAsset<GameObject>("SlimePurple_Attack4_HS"); SYAttack1 = SlimesBundle.LoadAsset<GameObject>("SlimeYellow_Attack1_HS"); SYAttack2 = SlimesBundle.LoadAsset<GameObject>("SlimeYellow_Attack2_HS"); SYAttack3 = SlimesBundle.LoadAsset<GameObject>("SlimeYellow_Attack3_HS"); SYAttack4 = SlimesBundle.LoadAsset<GameObject>("SlimeYellow_Attack4_HS"); GameObject sBAttack = SBAttack1; CustomPrefab val13 = new CustomPrefab(sBAttack, false); PrefabManager.Instance.AddPrefab(val13); GameObject sBAttack2 = SBAttack2; CustomPrefab val14 = new CustomPrefab(sBAttack2, false); PrefabManager.Instance.AddPrefab(val14); GameObject sBAttack3 = SBAttack3; CustomPrefab val15 = new CustomPrefab(sBAttack3, false); PrefabManager.Instance.AddPrefab(val15); GameObject sBAttack4 = SBAttack4; CustomPrefab val16 = new CustomPrefab(sBAttack4, false); PrefabManager.Instance.AddPrefab(val16); GameObject sRAttack = SRAttack1; CustomPrefab val17 = new CustomPrefab(sRAttack, false); PrefabManager.Instance.AddPrefab(val17); GameObject sRAttack2 = SRAttack2; CustomPrefab val18 = new CustomPrefab(sRAttack2, false); PrefabManager.Instance.AddPrefab(val18); GameObject sRAttack3 = SRAttack3; CustomPrefab val19 = new CustomPrefab(sRAttack3, false); PrefabManager.Instance.AddPrefab(val19); GameObject sRAttack4 = SRAttack4; CustomPrefab val20 = new CustomPrefab(sRAttack4, false); PrefabManager.Instance.AddPrefab(val20); GameObject sGAttack = SGAttack1; CustomPrefab val21 = new CustomPrefab(sGAttack, false); PrefabManager.Instance.AddPrefab(val21); GameObject sGAttack2 = SGAttack2; CustomPrefab val22 = new CustomPrefab(sGAttack2, false); PrefabManager.Instance.AddPrefab(val22); GameObject sGAttack3 = SGAttack3; CustomPrefab val23 = new CustomPrefab(sGAttack3, false); PrefabManager.Instance.AddPrefab(val23); GameObject sGAttack4 = SGAttack4; CustomPrefab val24 = new CustomPrefab(sGAttack4, false); PrefabManager.Instance.AddPrefab(val24); GameObject sPAttack = SPAttack1; CustomPrefab val25 = new CustomPrefab(sPAttack, false); PrefabManager.Instance.AddPrefab(val25); GameObject sPAttack2 = SPAttack2; CustomPrefab val26 = new CustomPrefab(sPAttack2, false); PrefabManager.Instance.AddPrefab(val26); GameObject sPAttack3 = SPAttack3; CustomPrefab val27 = new CustomPrefab(sPAttack3, false); PrefabManager.Instance.AddPrefab(val27); GameObject sPAttack4 = SPAttack4; CustomPrefab val28 = new CustomPrefab(sPAttack4, false); PrefabManager.Instance.AddPrefab(val28); GameObject sPrAttack = SPrAttack1; CustomPrefab val29 = new CustomPrefab(sPrAttack, false); PrefabManager.Instance.AddPrefab(val29); GameObject sPrAttack2 = SPrAttack2; CustomPrefab val30 = new CustomPrefab(sPrAttack2, false); PrefabManager.Instance.AddPrefab(val30); GameObject sPrAttack3 = SPrAttack3; CustomPrefab val31 = new CustomPrefab(sPrAttack3, false); PrefabManager.Instance.AddPrefab(val31); GameObject sPrAttack4 = SPrAttack4; CustomPrefab val32 = new CustomPrefab(sPrAttack4, false); PrefabManager.Instance.AddPrefab(val32); GameObject sYAttack = SYAttack1; CustomPrefab val33 = new CustomPrefab(sYAttack, false); PrefabManager.Instance.AddPrefab(val33); GameObject sYAttack2 = SYAttack2; CustomPrefab val34 = new CustomPrefab(sYAttack2, false); PrefabManager.Instance.AddPrefab(val34); GameObject sYAttack3 = SYAttack3; CustomPrefab val35 = new CustomPrefab(sYAttack3, false); PrefabManager.Instance.AddPrefab(val35); GameObject sYAttack4 = SYAttack4; CustomPrefab val36 = new CustomPrefab(sYAttack4, false); PrefabManager.Instance.AddPrefab(val36); SFX1 = SlimesBundle.LoadAsset<GameObject>("SFX_SlimeAlert_HS"); SFX2 = SlimesBundle.LoadAsset<GameObject>("SFX_SlimeAttack_HS"); SFX3 = SlimesBundle.LoadAsset<GameObject>("SFX_SlimeDeath_HS"); SFX4 = SlimesBundle.LoadAsset<GameObject>("SFX_SlimeHit_HS"); SFX5 = SlimesBundle.LoadAsset<GameObject>("SFX_SlimeIdle_HS"); CustomPrefab val37 = new CustomPrefab(SFX1, false); PrefabManager.Instance.AddPrefab(val37); CustomPrefab val38 = new CustomPrefab(SFX2, false); PrefabManager.Instance.AddPrefab(val38); CustomPrefab val39 = new CustomPrefab(SFX3, false); PrefabManager.Instance.AddPrefab(val39); CustomPrefab val40 = new CustomPrefab(SFX4, false); PrefabManager.Instance.AddPrefab(val40); CustomPrefab val41 = new CustomPrefab(SFX5, false); PrefabManager.Instance.AddPrefab(val41); VFX1 = SlimesBundle.LoadAsset<GameObject>("VFX_HitSparks_HS"); VFX2 = SlimesBundle.LoadAsset<GameObject>("VFX_Water_Hit_HS"); VFX3 = SlimesBundle.LoadAsset<GameObject>("VFX_PurifyWater_HS"); VFX4 = SlimesBundle.LoadAsset<GameObject>("VFX_Acid_Hit_HS"); VFX5 = SlimesBundle.LoadAsset<GameObject>("VFX_Fire_Hit_HS"); VFX6 = SlimesBundle.LoadAsset<GameObject>("VFX_Pyro_Hit_HS"); VFX7 = SlimesBundle.LoadAsset<GameObject>("VFX_Shadow_Hit_HS"); VFX8 = SlimesBundle.LoadAsset<GameObject>("VFX_Sick_Hit_HS"); VFX9 = SlimesBundle.LoadAsset<GameObject>("VFX_SlimeSprayBlue_HS"); VFX10 = SlimesBundle.LoadAsset<GameObject>("VFX_SlimeSprayGreen_HS"); VFX11 = SlimesBundle.LoadAsset<GameObject>("VFX_SlimeSprayPink_HS"); VFX12 = SlimesBundle.LoadAsset<GameObject>("VFX_SlimeSprayPurple_HS"); VFX13 = SlimesBundle.LoadAsset<GameObject>("VFX_SlimeSprayRed_HS"); VFX14 = SlimesBundle.LoadAsset<GameObject>("VFX_SlimeSprayYellow_HS"); FX1 = SlimesBundle.LoadAsset<GameObject>("FX_Crit_HS"); FX2 = SlimesBundle.LoadAsset<GameObject>("FX_Backstab_HS"); CustomPrefab val42 = new CustomPrefab(VFX1, false); PrefabManager.Instance.AddPrefab(val42); CustomPrefab val43 = new CustomPrefab(VFX2, false); PrefabManager.Instance.AddPrefab(val43); CustomPrefab val44 = new CustomPrefab(VFX3, false); PrefabManager.Instance.AddPrefab(val44); CustomPrefab val45 = new CustomPrefab(VFX4, false); PrefabManager.Instance.AddPrefab(val45); CustomPrefab val46 = new CustomPrefab(VFX5, false); PrefabManager.Instance.AddPrefab(val46); CustomPrefab val47 = new CustomPrefab(VFX6, false); PrefabManager.Instance.AddPrefab(val47); CustomPrefab val48 = new CustomPrefab(VFX7, false); PrefabManager.Instance.AddPrefab(val48); CustomPrefab val49 = new CustomPrefab(VFX8, false); PrefabManager.Instance.AddPrefab(val49); CustomPrefab val50 = new CustomPrefab(VFX9, false); PrefabManager.Instance.AddPrefab(val50); CustomPrefab val51 = new CustomPrefab(VFX10, false); PrefabManager.Instance.AddPrefab(val51); CustomPrefab val52 = new CustomPrefab(VFX11, false); PrefabManager.Instance.AddPrefab(val52); CustomPrefab val53 = new CustomPrefab(VFX12, false); PrefabManager.Instance.AddPrefab(val53); CustomPrefab val54 = new CustomPrefab(VFX13, false); PrefabManager.Instance.AddPrefab(val54); CustomPrefab val55 = new CustomPrefab(VFX14, false); PrefabManager.Instance.AddPrefab(val55); CustomPrefab val56 = new CustomPrefab(FX1, false); PrefabManager.Instance.AddPrefab(val56); CustomPrefab val57 = new CustomPrefab(FX2, false); PrefabManager.Instance.AddPrefab(val57); } private void AddSlimes() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Expected O, but got Unknown //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00aa: 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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Expected O, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: 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_0152: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Expected O, but got Unknown //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Expected O, but got Unknown //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: 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_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: 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_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Expected O, but got Unknown //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0241: 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_0256: Expected O, but got Unknown //IL_0258: 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: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Expected O, but got Unknown //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Expected O, but got Unknown //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Expected O, but got Unknown //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Expected O, but got Unknown //IL_02e6: 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_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Expected O, but got Unknown //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Expected O, but got Unknown //IL_0347: 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: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Expected O, but got Unknown //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Expected O, but got Unknown //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Expected O, but got Unknown //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Expected O, but got Unknown //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Expected O, but got Unknown //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_041f: Unknown result type (might be due to invalid IL or missing references) //IL_0427: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Expected O, but got Unknown //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_044f: 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_0464: Expected O, but got Unknown //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Expected O, but got Unknown //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Expected O, but got Unknown //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Expected O, but got Unknown //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04cb: Unknown result type (might be due to invalid IL or missing references) //IL_04d7: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Expected O, but got Unknown //IL_04f7: Unknown result type (might be due to invalid IL or missing references) //IL_04fc: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Expected O, but got Unknown //IL_0527: Unknown result type (might be due to invalid IL or missing references) //IL_052c: Unknown result type (might be due to invalid IL or missing references) //IL_0538: Unknown result type (might be due to invalid IL or missing references) //IL_0540: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_0555: Expected O, but got Unknown //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Unknown result type (might be due to invalid IL or missing references) //IL_0568: Unknown result type (might be due to invalid IL or missing references) //IL_0570: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_0585: Expected O, but got Unknown //IL_058c: Unknown result type (might be due to invalid IL or missing references) //IL_0593: Expected O, but got Unknown try { GameObject slime = Slime1; CreatureConfig val = new CreatureConfig(); val.DropConfigs = (DropConfig[])(object)new DropConfig[4] { new DropConfig { Item = "Coins", MinAmount = 1, MaxAmount = 15, Chance = 100f }, new DropConfig { Item = "Ooze", MinAmount = 1, MaxAmount = 1, Chance = 25f }, new DropConfig { Item = "Guck", MinAmount = 1, MaxAmount = 1, Chance = 2f }, new DropConfig { Item = "BoneFragments", MinAmount = 1, MaxAmount = 2, Chance = 5f } }; CustomCreature val2 = new CustomCreature(slime, false, val); CreatureManager.Instance.AddCreature(val2); GameObject slime2 = Slime2; val = new CreatureConfig(); val.DropConfigs = (DropConfig[])(object)new DropConfig[4] { new DropConfig { Item = "Coins", MinAmount = 1, MaxAmount = 15, Chance = 100f }, new DropConfig { Item = "Ooze", MinAmount = 1, MaxAmount = 1, Chance = 25f }, new DropConfig { Item = "Guck", MinAmount = 1, MaxAmount = 1, Chance = 2f }, new DropConfig { Item = "BoneFragments", MinAmount = 1, MaxAmount = 2, Chance = 5f } }; CustomCreature val3 = new CustomCreature(slime2, false, val); CreatureManager.Instance.AddCreature(val3); GameObject slime3 = Slime3; val = new CreatureConfig(); val.DropConfigs = (DropConfig[])(object)new DropConfig[4] { new DropConfig { Item = "Coins", MinAmount = 1, MaxAmount = 15, Chance = 100f }, new DropConfig { Item = "Ooze", MinAmount = 1, MaxAmount = 1, Chance = 25f }, new DropConfig { Item = "Guck", MinAmount = 1, MaxAmount = 1, Chance = 2f }, new DropConfig { Item = "BoneFragments", MinAmount = 1, MaxAmount = 2, Chance = 5f } }; CustomCreature val4 = new CustomCreature(slime3, false, val); CreatureManager.Instance.AddCreature(val4); GameObject slime4 = Slime4; val = new CreatureConfig(); val.DropConfigs = (DropConfig[])(object)new DropConfig[4] { new DropConfig { Item = "Coins", MinAmount = 1, MaxAmount = 15, Chance = 100f }, new DropConfig { Item = "Ooze", MinAmount = 1, MaxAmount = 1, Chance = 25f }, new DropConfig { Item = "Guck", MinAmount = 1, MaxAmount = 1, Chance = 2f }, new DropConfig { Item = "BoneFragments", MinAmount = 1, MaxAmount = 2, Chance = 5f } }; CustomCreature val5 = new CustomCreature(slime4, false, val); CreatureManager.Instance.AddCreature(val5); GameObject slime5 = Slime5; val = new CreatureConfig(); val.DropConfigs = (DropConfig[])(object)new DropConfig[4] { new DropConfig { Item = "Coins", MinAmount = 1, MaxAmount = 15, Chance = 100f }, new DropConfig { Item = "Ooze", MinAmount = 1, MaxAmount = 1, Chance = 25f }, new DropConfig { Item = "Guck", MinAmount = 1, MaxAmount = 1, Chance = 2f }, new DropConfig { Item = "BoneFragments", MinAmount = 1, MaxAmount = 2, Chance = 5f } }; CustomCreature val6 = new CustomCreature(slime5, false, val); CreatureManager.Instance.AddCreature(val6); GameObject slime6 = Slime6; val = new CreatureConfig(); val.DropConfigs = (DropConfig[])(object)new DropConfig[4] { new DropConfig { Item = "Coins", MinAmount = 1, MaxAmount = 15, Chance = 100f }, new DropConfig { Item = "Ooze", MinAmount = 1, MaxAmount = 1, Chance = 25f }, new DropConfig { Item = "Guck", MinAmount = 1, MaxAmount = 1, Chance = 2f }, new DropConfig { Item = "BoneFragments", MinAmount = 1, MaxAmount = 2, Chance = 5f } }; CustomCreature val7 = new CustomCreature(slime6, false, val); CreatureManager.Instance.AddCreature(val7); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom creatures: {arg}"); } finally { SlimesBundle.Unload(false); } } private void FixSFX() { try { AudioSource prefab = Cache.GetPrefab<AudioSource>("sfx_arrow_hit"); GameObject prefab2 = Cache.GetPrefab<GameObject>("SFX_MinotaurAlert_HM"); GameObject prefab3 = Cache.GetPrefab<GameObject>("SFX_MinotaurAttack_HM"); GameObject prefab4 = Cache.GetPrefab<GameObject>("SFX_MinotaurDeath_HM"); GameObject prefab5 = Cache.GetPrefab<GameObject>("SFX_MinotaurHit_HM"); GameObject prefab6 = Cache.GetPrefab<GameObject>("SFX_MinotaurIdle_HM"); if ((Object)(object)prefab2 != (Object)null) { prefab2.GetComponent<AudioSource>().outputAudioMixerGroup = prefab.outputAudioMixerGroup; } if ((Object)(object)prefab3 != (Object)null) { prefab3.GetComponent<AudioSource>().outputAudioMixerGroup = prefab.outputAudioMixerGroup; } if ((Object)(object)prefab4 != (Object)null) { prefab4.GetComponent<AudioSource>().outputAudioMixerGroup = prefab.outputAudioMixerGroup; } if ((Object)(object)prefab5 != (Object)null) { prefab5.GetComponent<AudioSource>().outputAudioMixerGroup = prefab.outputAudioMixerGroup; } if ((Object)(object)prefab6 != (Object)null) { prefab6.GetComponent<AudioSource>().outputAudioMixerGroup = prefab.outputAudioMixerGroup; } } catch { Debug.LogWarning((object)"Minotaurs: SFX Fix Failed"); } } public static void ConfigureBiomeSpawners(ISpawnerConfigurationCollection config) { try { ConfigureWorldSpawner(config); } catch (Exception ex) { Console.WriteLine("Something went horribly wrong: " + ex.Message + "\nStackTrace:\n" + ex.StackTrace); } } private static void ConfigureWorldSpawner(ISpawnerConfigurationCollection config) { try { IWorldSpawnBuilderModifierExtensions.SetModifierFaction(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26205u).SetPrefabName("SlimeYellow_HS").SetTemplateName("Yellow Slime") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)512 }) .SetSpawnChance(18f) .SetSpawnInterval(TimeSpan.FromSeconds(210.0)) .SetPackSizeMin(1u) .SetPackSizeMax(2u) .SetMaxSpawned(2u) .SetConditionAltitudeMin(0f) .SetConditionAltitudeMax(1f), (Faction)7); IWorldSpawnBuilderModifierExtensions.SetModifierFaction(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26204u).SetPrefabName("SlimePurple_HS").SetTemplateName("Purple Slime") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)16 }) .SetSpawnChance(18f) .SetSpawnInterval(TimeSpan.FromSeconds(210.0)) .SetPackSizeMin(1u) .SetPackSizeMax(2u) .SetMaxSpawned(2u) .SetConditionAltitudeMin(0f) .SetConditionAltitudeMax(1f), (Faction)7); ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26203u).SetPrefabName("SlimePink_HS").SetTemplateName("Pink Slime") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)8 }) .SetSpawnChance(18f) .SetSpawnInterval(TimeSpan.FromSeconds(210.0)) .SetPackSizeMin(1u) .SetPackSizeMax(2u) .SetMaxSpawned(2u) .SetConditionAltitudeMin(0f) .SetConditionAltitudeMax(1f); IWorldSpawnBuilderModifierExtensions.SetModifierFaction(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26202u).SetPrefabName("SlimeRed_HS").SetTemplateName("Red Slime") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)32 }) .SetSpawnChance(18f) .SetSpawnInterval(TimeSpan.FromSeconds(210.0)) .SetPackSizeMin(1u) .SetPackSizeMax(2u) .SetMaxSpawned(2u) .SetConditionAltitudeMin(0f) .SetConditionAltitudeMax(1f), (Faction)4); IWorldSpawnBuilderModifierExtensions.SetModifierFaction(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26201u).SetPrefabName("SlimeGreen_HS").SetTemplateName("Green Slime") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)2 }) .SetSpawnChance(18f) .SetSpawnInterval(TimeSpan.FromSeconds(210.0)) .SetPackSizeMin(1u) .SetPackSizeMax(2u) .SetMaxSpawned(2u) .SetConditionAltitudeMin(0f) .SetConditionAltitudeMax(1f), (Faction)3); ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26200u).SetPrefabName("SlimeBlue_HS").SetTemplateName("Blue Slime") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)1 }) .SetSpawnChance(18f) .SetSpawnInterval(TimeSpan.FromSeconds(210.0)) .SetPackSizeMin(1u) .SetPackSizeMax(2u) .SetMaxSpawned(2u) .SetConditionAltitudeMin(0f) .SetConditionAltitudeMax(1f); } catch (Exception ex) { Log.LogError((object)ex); } } }