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 Creepy Crawlies v1.1.3
CreepyCrawlies.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.Configuration; using BepInEx.Logging; using Jotunn; 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("CreepyCrawlies")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("CreepyCrawlies")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("bf0b5eda-616e-4a25-91ed-725804fa45df")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace CreepyCrawlies; [BepInPlugin("horemvore.CreepyCrawlies", "Creepy Crawlies", "1.1.3")] [BepInIncompatibility("Azumatt.AzuDevMod")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class CreepyCrawliesBundle : BaseUnityPlugin { public const string PluginGUID = "horemvore.CreepyCrawlies"; public const string PluginName = "Creepy Crawlies"; public const string PluginVersion = "1.1.3"; public static bool isModded = true; public AssetBundle creepyAssets; public CustomLocalization LocalCreepy; public ConfigEntry<bool> ModEnable; public ConfigEntry<bool> LoggingEnable; public ConfigEntry<bool> SpawnsEnable; internal static ManualLogSource Log; public string[] prefabList = new string[29] { "VFX_ForestSpider_ProjectileHit_CC", "VFX_ForestSpider_ProjectileTrigger_CC", "VFX_CaveSpider_ProjectileHit_CC", "VFX_CaveSpider_ProjectileTrigger_CC", "VFX_LavaSpider_ProjectileHit_CC", "VFX_LavaSpider_ProjectileTrigger_CC", "VFX_SwampSpider_ProjectileHit_CC", "VFX_SwampSpider_ProjectileTrigger_CC", "Projectile_ForestSpider_CC", "Projectile_CaveSpider_CC", "Projectile_LavaSpider_CC", "Projectile_SwampSpider_CC", "Beetle_Gold_RD_CC", "Beetle_Scarab_RD_CC", "Beetle_Shrub_RD_CC", "Beetle_Stink_RD_CC", "Insect_Cave_RD_CC", "Insect_Lava_RD_CC", "Insect_Hoarfrost_RD_CC", "Insect_Mist_RD_CC", "Spider_Forest_RD_CC", "Spider_Plains_RD_CC", "Spider_Swamp_RD_CC", "Spider_Hoarfrost_RD_CC", "Spider_Lava_RD_CC", "Spider_Cave_RD_CC", "SpiderCrab_Ocean_RD_CC", "SpiderCrab_Forest_RD_CC", "SpiderCrab_Cave_RD_CC" }; public string[] sfxList = new string[15] { "SFX_Death_Bug_CC", "SFX_FlyingLoop_Bug_CC", "SFX_FlyingLand_Bug_CC", "SFX_Attack_Horn_Bug_CC", "SFX_Idle_Bug_CC", "SFX_GotHit_Bug_CC", "SFX_Attack_Jump_Bug_CC", "SFX_Attack_Pincer_Bug_CC", "SFX_LightningProjectile_Hit_CC", "SFX_PoisonProjectile_Hit_CC", "SFX_FireProjectile_Hit_CC", "SFX_IceProjectile_Hit_CC", "SFX_Attack_Spider_CC", "SFX_Death_Spider_CC", "SFX_GotHit_Spider_CC" }; public string[] itemList = new string[85] { "Trophy_Beetle_Gold_CC", "Trophy_Beetle_Scarab_CC", "Trophy_Beetle_Shrub_CC", "Trophy_Beetle_Stink_CC", "Trophy_Insect_Cave_CC", "Trophy_Insect_Lava_CC", "Trophy_Insect_Hoarfrost_CC", "Trophy_Insect_Mist_CC", "Trophy_Spider_Plains_CC", "Trophy_Spider_Hoarfrost_CC", "Trophy_Spider_Lava_CC", "Trophy_Spider_Cave_CC", "Trophy_Spider_Forest_CC", "Trophy_Spider_Swamp_CC", "Trophy_SpiderCrab_Cave_CC", "Trophy_SpiderCrab_Ocean_CC", "Trophy_SpiderCrab_Forest_CC", "Item_GoldWings_CC", "Item_ScarabWings_CC", "Item_ShrubWings_CC", "Item_StinkWings_CC", "Item_CrabMeat_CC", "Item_FireGland_CC", "Item_IceGland_CC", "Item_PoisonGland_CC", "Attack_BeetleGold_Fly_CC", "Attack_BeetleGold_Ground_CC", "Attack_BeetleScarab_Fly_CC", "Attack_BeetleScarab_Ground_CC", "Attack_BeetleShrub_Fly_CC", "Attack_BeetleShrub_Ground_CC", "Attack_BeetleStink_Fly_CC", "Attack_BeetleStink_Ground_CC", "Attack_InsectMist_Cast_CC", "Attack_InsectMist_Jump_CC", "Attack_InsectMist_Left_CC", "Attack_InsectMist_Double_CC", "Attack_InsectHoarfrost_Cast_CC", "Attack_InsectHoarfrost_Jump_CC", "Attack_InsectHoarfrost_Left_CC", "Attack_InsectHoarfrost_Double_CC", "Attack_InsectLava_Cast_CC", "Attack_InsectLava_Jump_CC", "Attack_InsectLava_Left_CC", "Attack_InsectLava_Double_CC", "Attack_InsectCave_Cast_CC", "Attack_InsectCave_Jump_CC", "Attack_InsectCave_Left_CC", "Attack_InsectCave_Double_CC", "Attack_SpiderForest_Close_CC", "Attack_SpiderForest_Cast_CC", "Attack_SpiderForest_Jump_CC", "Attack_SpiderForest_Pounce_CC", "Attack_SpiderCamel_Close_CC", "Attack_SpiderCamel_Cast_CC", "Attack_SpiderCamel_Jump_CC", "Attack_SpiderCamel_Pounce_CC", "Attack_SpiderSwamp_Close_CC", "Attack_SpiderSwamp_Cast_CC", "Attack_SpiderSwamp_Jump_CC", "Attack_SpiderSwamp_Pounce_CC", "Attack_SpiderHoarfrost_Close_CC", "Attack_SpiderHoarfrost_Cast_CC", "Attack_SpiderHoarfrost_Jump_CC", "Attack_SpiderHoarfrost_Pounce_CC", "Attack_SpiderLava_Close_CC", "Attack_SpiderLava_Cast_CC", "Attack_SpiderLava_Jump_CC", "Attack_SpiderLava_Pounce_CC", "Attack_SpiderCave_Close_CC", "Attack_SpiderCave_Cast_CC", "Attack_SpiderCave_Jump_CC", "Attack_SpiderCave_Pounce_CC", "Attack_CrabOcean_Jump_CC", "Attack_CrabOcean_Double_CC", "Attack_CrabOcean_Left_CC", "Attack_CrabOcean_Right_CC", "Attack_CrabForest_Jump_CC", "Attack_CrabForest_Double_CC", "Attack_CrabForest_Left_CC", "Attack_CrabForest_Right_CC", "Attack_CrabCave_Jump_CC", "Attack_CrabCave_Double_CC", "Attack_CrabCave_Left_CC", "Attack_CrabCave_Right_CC" }; public string[] monsterList = new string[17] { "Beetle_Gold_CC", "Beetle_Scarab_CC", "Beetle_Shrub_CC", "Beetle_Stink_CC", "Insect_Cave_CC", "Insect_Lava_CC", "Insect_Hoarfrost_CC", "Insect_Mist_CC", "Spider_Forest_CC", "Spider_Plains_CC", "Spider_Swamp_CC", "Spider_Hoarfrost_CC", "Spider_Lava_CC", "Spider_Cave_CC", "SpiderCrab_Ocean_CC", "SpiderCrab_Forest_CC", "SpiderCrab_Cave_CC" }; public void CreateConfigurationValues() { //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 //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown try { ((BaseUnityPlugin)this).Config.SaveOnConfigSet = true; ModEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("0 Creepy Crawlies", "Enable", true, new ConfigDescription("Admin only, Enables this mod", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true } })); SpawnsEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("1 Spawning", "Enable", true, new ConfigDescription("Enables default spawning of Spiders and Crabs. Set to false if you want to setup your own spawns via a 3rd party mod.", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true } })); LoggingEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("99 Logging", "Enable", true, new ConfigDescription("Admin only, Enables logging", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { IsAdminOnly = true } })); SynchronizationManager.OnConfigurationSynchronized += delegate(object obj, ConfigurationSynchronizationEventArgs attr) { if (attr.InitialSynchronization) { Logger.LogMessage((object)"Initial Config sync event received for Creepy Crawlies"); } else { Logger.LogMessage((object)"Config sync event received for Creepy Crawlies"); } }; } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding configuration values: {arg}"); } } private void Awake() { CreateConfigurationValues(); Log = ((BaseUnityPlugin)this).Logger; if (ModEnable.Value) { if (LoggingEnable.Value) { ((BaseUnityPlugin)this).Logger.LogWarning((object)"Logging is enabled in the config."); } AddLocalization(); AddModPrefabs(); PrefabManager.OnVanillaPrefabsAvailable += FixSFX; if (SpawnsEnable.Value) { SpawnerConfigurationManager.OnConfigure += ConfigureWorldSpawners; } } } private void AddModPrefabs() { try { GameObject prefab = Cache.GetPrefab<GameObject>("Beetle_Gold_RD_CC"); if ((Object)(object)prefab == (Object)null) { LoadBundle(); AddPrefabs(); AddSFX(); AddItems(); AddMonsters(); } } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding prefabs: {arg}"); } } private void LoadBundle() { try { creepyAssets = AssetUtils.LoadAssetBundleFromResources("creepy", Assembly.GetExecutingAssembly()); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while loading bundles: {arg}"); } } private void AddLocalization() { try { LocalCreepy = LocalizationManager.Instance.GetLocalization(); CustomLocalization localCreepy = LocalCreepy; string text = "English"; localCreepy.AddTranslation(ref text, new Dictionary<string, string> { { "item_shrubwings_cc", "Shrub Beetle Wings" }, { "item_shrubwings_desc_cc", "Wings from a beetle" }, { "item_goldbugwings_cc", "Goldbug Wings" }, { "item_goldbugwings_desc_cc", "Wings from a beetle" }, { "item_scarabwings_cc", "Scarab Wings" }, { "item_scarabwings_desc_cc", "Wings from a beetle" }, { "item_stinkwings_cc", "Stink Beetle Wings" }, { "item_stinkwings_desc_cc", "Wings from a beetle" }, { "item_crabmeat_cc", "Crab Meat" }, { "item_crabmeat_desc_cc", "A white meat" }, { "item_firegland_cc", "Fire Gland" }, { "item_firegland_desc_cc", "A gland full of liquid fire" }, { "item_frostgland_cc", "Frost Gland" }, { "item_frostgland_desc_cc", "A gland full of liquid frost" }, { "item_poisongland_cc", "Poison Gland" }, { "item_poisongland_desc_cc", "A gland full of liquid posion" }, { "trophy_shrubbeetle_cc", "Shrub Beetle" }, { "trophy_shrubbeetle_desc_cc", "A trophy from a Shrub Beetle" }, { "trophy_goldbeetle_cc", "Goldbug" }, { "trophy_goldbeetle_desc_cc", "A trophy from a Goldbug" }, { "trophy_stinkbeetle_cc", "Stink Beetle" }, { "trophy_stinkbeetle_desc_cc", "A trophy from a Stink Beetle" }, { "trophy_scarabbeetle_cc", "Scarab" }, { "trophy_scarabbeetle_desc_cc", "A trophy from a Scarab" }, { "trophy_caveinsect_cc", "Cave Crawler" }, { "trophy_caveinsect_desc_cc", "A trophy from a Cave Crawler" }, { "trophy_lavainsect_cc", "Lava Crawler" }, { "trophy_lavainsect_desc_cc", "A trophy from a Lava Crawler" }, { "trophy_mistinsect_cc", "Mist Crawler" }, { "trophy_mistinsect_desc_cc", "A trophy from a Mist Crawler" }, { "trophy_frostinsect_cc", "Snow Crawler" }, { "trophy_frostinsect_desc_cc", "A trophy from a Snow Crawler" }, { "trophy_forestspider_cc", "Blue Tarantula" }, { "trophy_forestspider_desc_cc", "A trophy from a Blue Tarantula" }, { "trophy_plainsspider_cc", "Camel Spider" }, { "trophy_plainsspider_desc_cc", "A trophy from a Camel Spider" }, { "trophy_swampspider_cc", "Marsh Spider" }, { "trophy_swampspider_desc_cc", "A trophy from a Marsh Spider" }, { "trophy_frostspider_cc", "Hoarfrost Spider" }, { "trophy_frostspider_desc_cc", "A trophy from a Hoarfrost Spider" }, { "trophy_lavaspider_cc", "Lava Tarantula" }, { "trophy_lavaspider_desc_cc", "A trophy from a Lava Tarantula" }, { "trophy_cavespider_cc", "Cave Tarantula" }, { "trophy_cavespider_desc_cc", "A trophy from a Cave Tarantula" }, { "trophy_cavecrab_cc", "Cave Crab" }, { "trophy_cavecrab_desc_cc", "A trophy from a Cave Crab" }, { "trophy_forestcrab_cc", "Forest Crab" }, { "trophy_forestcrab_desc_cc", "A trophy from a Forest Crab" }, { "trophy_oceancrab_cc", "Ocean Crab" }, { "trophy_oceancrab_desc_cc", "A trophy from a Ocean Crab" }, { "enemy_shrubbeetle_cc", "Shrub Beetle" }, { "enemy_goldbeetle_cc", "Goldbug" }, { "enemy_stinkbeetle_cc", "Stink Beetle" }, { "enemy_scarabbeetle_cc", "Scarab" }, { "enemy_caveinsect_cc", "Cave Crawler" }, { "enemy_lavainsect_cc", "Lava Crawler" }, { "enemy_mistinsect_cc", "Mist Crawler" }, { "enemy_frostinsect_cc", "Snow Crawler" }, { "enemy_forestspider_cc", "Blue Tarantula" }, { "enemy_camelspider_cc", "Camel Spider" }, { "enemy_swampspider_cc", "Marsh Spider" }, { "enemy_frostspider_cc", "Hoarfrost Spider" }, { "enemy_lavaspider_cc", "Lava Tarantula" }, { "enemy_cavespider_cc", "Cave Tarantula" }, { "enemy_crabforest_cc", "Forest Crab" }, { "enemy_crabocean_cc", "Ocean Crab" }, { "enemy_crabcave_cc", "Cave Crab" } }); if (LoggingEnable.Value) { ((BaseUnityPlugin)this).Logger.LogMessage((object)"English localization added."); } } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding Localication: {arg}"); } } private void AddPrefabs() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown try { string[] array = prefabList; foreach (string text in array) { GameObject val = creepyAssets.LoadAsset<GameObject>(text); if ((Object)(object)val != (Object)null) { GameObject prefab = Cache.GetPrefab<GameObject>(text); if ((Object)(object)prefab == (Object)null) { CustomPrefab val2 = new CustomPrefab(val, true); PrefabManager.Instance.AddPrefab(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 AddSFX() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown try { string[] array = sfxList; foreach (string text in array) { GameObject val = creepyAssets.LoadAsset<GameObject>(text); if ((Object)(object)val != (Object)null) { GameObject prefab = Cache.GetPrefab<GameObject>(text); if ((Object)(object)prefab == (Object)null) { CustomPrefab val2 = new CustomPrefab(val, false); PrefabManager.Instance.AddPrefab(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 sfx prefabs: {arg}"); } } private void AddItems() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown try { string[] array = itemList; foreach (string text in array) { GameObject val = creepyAssets.LoadAsset<GameObject>(text); if ((Object)(object)val != (Object)null) { GameObject prefab = Cache.GetPrefab<GameObject>(text); if ((Object)(object)prefab == (Object)null) { CustomItem val2 = new CustomItem(val, true); ItemManager.Instance.AddItem(val2); } if (LoggingEnable.Value) { ((BaseUnityPlugin)this).Logger.LogMessage((object)("Added: " + text + " to the item database")); } } else { ((BaseUnityPlugin)this).Logger.LogMessage((object)("Failed to add: " + text + " to the item database")); } } } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding item prefabs: {arg}"); } } private void AddMonsters() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown try { string[] array = monsterList; foreach (string text in array) { GameObject val = creepyAssets.LoadAsset<GameObject>(text); if ((Object)(object)val != (Object)null) { GameObject prefab = Cache.GetPrefab<GameObject>(text); if ((Object)(object)prefab == (Object)null) { CustomCreature val2 = new CustomCreature(val, true); CreatureManager.Instance.AddCreature(val2); if (LoggingEnable.Value) { ((BaseUnityPlugin)this).Logger.LogMessage((object)("Added monster: " + text)); } } } 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 monsters: {arg}"); } } private void FixSFX() { try { AudioSource prefab = Cache.GetPrefab<AudioSource>("sfx_arrow_hit"); string[] array = sfxList; foreach (string text in array) { GameObject prefab2 = Cache.GetPrefab<GameObject>(text); if ((Object)(object)prefab2 != (Object)null) { prefab2.GetComponentInChildren<AudioSource>().outputAudioMixerGroup = prefab.outputAudioMixerGroup; if (LoggingEnable.Value) { ((BaseUnityPlugin)this).Logger.LogMessage((object)("Audio Mixer: SFX, set on: " + text)); } } } } catch { ((BaseUnityPlugin)this).Logger.LogWarning((object)"SFX Fix Failed"); } } private static void ConfigureWorldSpawners(ISpawnerConfigurationCollection config) { try { IWorldSpawnBuilderConditionExtensions.SetConditionDistanceToCenter(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 21904u).SetPrefabName("Insect_Hoarfrost_CC").SetTemplateName("Hoarfrost Insect") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)64 }) .SetSpawnChance(12f) .SetSpawnInterval(TimeSpan.FromSeconds(360.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(1u) .SetSpawnAtDistanceToPlayerMin(45f) .SetSpawnAtDistanceToPlayerMax(60f), (double?)1000.0, (double?)null).SetConditionRequiredGlobalKey("defeated_queen").SetMinDistanceToOther(75f) .SetConditionAltitudeMin(0.1f); IWorldSpawnBuilderConditionExtensions.SetConditionDistanceToCenter(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 21903u).SetPrefabName("Insect_Lava_CC").SetTemplateName("Lava Insect") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)32 }) .SetSpawnChance(12f) .SetSpawnInterval(TimeSpan.FromSeconds(360.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(1u) .SetSpawnAtDistanceToPlayerMin(45f) .SetSpawnAtDistanceToPlayerMax(60f), (double?)1000.0, (double?)null).SetConditionRequiredGlobalKey("defeated_queen").SetMinDistanceToOther(75f) .SetConditionAltitudeMin(0.1f); IWorldSpawnBuilderConditionExtensions.SetConditionDistanceToCenter(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 21902u).SetPrefabName("Insect_Mist_CC").SetTemplateName("Mist Insect") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)512 }) .SetSpawnChance(12f) .SetSpawnInterval(TimeSpan.FromSeconds(360.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(1u) .SetSpawnAtDistanceToPlayerMin(45f) .SetSpawnAtDistanceToPlayerMax(60f), (double?)1000.0, (double?)null).SetConditionRequiredGlobalKey("defeated_queen").SetMinDistanceToOther(75f) .SetConditionAltitudeMin(0.1f); IWorldSpawnBuilderConditionExtensions.SetConditionDistanceToCenter(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 21901u).SetPrefabName("Insect_Cave_CC").SetTemplateName("Cave Insect") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)2 }) .SetSpawnChance(12f) .SetSpawnInterval(TimeSpan.FromSeconds(360.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(1u) .SetSpawnAtDistanceToPlayerMin(45f) .SetSpawnAtDistanceToPlayerMax(60f), (double?)1000.0, (double?)null).SetConditionRequiredGlobalKey("defeated_dragon").SetMinDistanceToOther(75f) .SetConditionAltitudeMin(0.1f); IWorldSpawnBuilderConditionExtensions.SetConditionDistanceToCenter(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 21900u).SetPrefabName("Beetle_Scarab_CC").SetTemplateName("Scarab Beetle") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)2 }) .SetSpawnChance(12f) .SetSpawnInterval(TimeSpan.FromSeconds(360.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(1u) .SetSpawnAtDistanceToPlayerMin(45f) .SetSpawnAtDistanceToPlayerMax(60f), (double?)1000.0, (double?)null).SetConditionRequiredGlobalKey("defeated_dragon").SetMinDistanceToOther(75f) .SetConditionAltitudeMin(0.1f); IWorldSpawnBuilderConditionExtensions.SetConditionDistanceToCenter(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 21899u).SetPrefabName("Beetle_Stink_CC").SetTemplateName("Stink Beetle") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)2 }) .SetSpawnChance(12f) .SetSpawnInterval(TimeSpan.FromSeconds(360.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(1u) .SetSpawnAtDistanceToPlayerMin(45f) .SetSpawnAtDistanceToPlayerMax(60f), (double?)1000.0, (double?)null).SetConditionRequiredGlobalKey("defeated_bonemass").SetMinDistanceToOther(75f) .SetConditionAltitudeMin(0.1f); IWorldSpawnBuilderConditionExtensions.SetConditionDistanceToCenter(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 21898u).SetPrefabName("Beetle_Gold_CC").SetTemplateName("Gold Beetle") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)8 }) .SetSpawnChance(12f) .SetSpawnInterval(TimeSpan.FromSeconds(360.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(1u) .SetSpawnAtDistanceToPlayerMin(45f) .SetSpawnAtDistanceToPlayerMax(60f), (double?)1000.0, (double?)null).SetConditionRequiredGlobalKey("defeated_gdking").SetMinDistanceToOther(75f) .SetConditionAltitudeMin(1f); IWorldSpawnBuilderConditionExtensions.SetConditionDistanceToCenter(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 21897u).SetPrefabName("Beetle_Shrub_CC").SetTemplateName("Shrub Beetle") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)1 }) .SetSpawnChance(12f) .SetSpawnInterval(TimeSpan.FromSeconds(360.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(1u) .SetSpawnAtDistanceToPlayerMin(45f) .SetSpawnAtDistanceToPlayerMax(60f), (double?)1000.0, (double?)null).SetConditionRequiredGlobalKey("defeated_eikthyr").SetMinDistanceToOther(75f) .SetConditionAltitudeMin(-5f) .SetConditionAltitudeMax(0.5f); IWorldSpawnBuilderConditionExtensions.SetConditionDistanceToCenter(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 21896u).SetPrefabName("Spider_Hoarfrost_CC").SetTemplateName("Hoarfrost Spider") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)64 }) .SetSpawnChance(12f) .SetSpawnInterval(TimeSpan.FromSeconds(360.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(1u) .SetSpawnAtDistanceToPlayerMin(45f) .SetSpawnAtDistanceToPlayerMax(60f), (double?)1000.0, (double?)null).SetConditionRequiredGlobalKey("defeated_queen").SetMinDistanceToOther(75f) .SetConditionAltitudeMin(1f); IWorldSpawnBuilderConditionExtensions.SetConditionDistanceToCenter(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 21895u).SetPrefabName("Spider_Lava_CC").SetTemplateName("Lava Spider") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)32 }) .SetSpawnChance(12f) .SetSpawnInterval(TimeSpan.FromSeconds(360.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(1u) .SetSpawnAtDistanceToPlayerMin(45f) .SetSpawnAtDistanceToPlayerMax(60f), (double?)1000.0, (double?)null).SetConditionRequiredGlobalKey("defeated_queen").SetMinDistanceToOther(75f) .SetConditionAltitudeMin(1f); IWorldSpawnBuilderConditionExtensions.SetConditionDistanceToCenter(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 21894u).SetPrefabName("Spider_Plains_CC").SetTemplateName("Plains Spider") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)16 }) .SetSpawnChance(12f) .SetSpawnInterval(TimeSpan.FromSeconds(360.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(1u) .SetSpawnAtDistanceToPlayerMin(45f) .SetSpawnAtDistanceToPlayerMax(60f), (double?)1000.0, (double?)null).SetConditionRequiredGlobalKey("defeated_goblinking").SetMinDistanceToOther(75f) .SetConditionAltitudeMin(1f); IWorldSpawnBuilderConditionExtensions.SetConditionDistanceToCenter(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 21893u).SetPrefabName("Spider_Cave_CC").SetTemplateName("Cave Spider") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)4 }) .SetSpawnChance(12f) .SetSpawnInterval(TimeSpan.FromSeconds(360.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(1u) .SetSpawnAtDistanceToPlayerMin(45f) .SetSpawnAtDistanceToPlayerMax(60f), (double?)1000.0, (double?)null).SetConditionRequiredGlobalKey("defeated_dragon").SetMinDistanceToOther(75f) .SetConditionAltitudeMin(1f); IWorldSpawnBuilderConditionExtensions.SetConditionDistanceToCenter(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 21892u).SetPrefabName("Spider_Swamp_CC").SetTemplateName("Swamp Spider") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)2 }) .SetSpawnChance(12f) .SetSpawnInterval(TimeSpan.FromSeconds(360.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(1u) .SetSpawnAtDistanceToPlayerMin(45f) .SetSpawnAtDistanceToPlayerMax(60f), (double?)1000.0, (double?)null).SetConditionRequiredGlobalKey("defeated_bonemass").SetMinDistanceToOther(75f) .SetConditionAltitudeMin(0.1f); IWorldSpawnBuilderConditionExtensions.SetConditionDistanceToCenter(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 21891u).SetPrefabName("Spider_Forest_CC").SetTemplateName("Forest Spider") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)8 }) .SetSpawnChance(12f) .SetSpawnInterval(TimeSpan.FromSeconds(360.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(1u) .SetSpawnAtDistanceToPlayerMin(45f) .SetSpawnAtDistanceToPlayerMax(60f), (double?)1000.0, (double?)null).SetConditionRequiredGlobalKey("defeated_gdking").SetMinDistanceToOther(75f) .SetConditionAltitudeMin(1f); IWorldSpawnBuilderConditionExtensions.SetConditionDistanceToCenter(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 21890u).SetPrefabName("SpiderCrab_Cave_CC").SetTemplateName("Cave Crab") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)4 }) .SetSpawnChance(12f) .SetSpawnInterval(TimeSpan.FromSeconds(360.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(1u) .SetSpawnAtDistanceToPlayerMin(45f) .SetSpawnAtDistanceToPlayerMax(60f), (double?)1000.0, (double?)null).SetConditionRequiredGlobalKey("defeated_dragon").SetMinDistanceToOther(75f) .SetConditionAltitudeMin(1f); IWorldSpawnBuilderConditionExtensions.SetConditionDistanceToCenter(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 21889u).SetPrefabName("SpiderCrab_Forest_CC").SetTemplateName("Forest Crab") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)8 }) .SetSpawnChance(12f) .SetSpawnInterval(TimeSpan.FromSeconds(360.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(1u) .SetSpawnAtDistanceToPlayerMin(45f) .SetSpawnAtDistanceToPlayerMax(60f), (double?)1000.0, (double?)null).SetConditionRequiredGlobalKey("defeated_gdking").SetMinDistanceToOther(75f) .SetConditionAltitudeMin(1f); IWorldSpawnBuilder obj = ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 21888u).SetPrefabName("SpiderCrab_Ocean_CC").SetTemplateName("Ocean Crab"); Biome[] array = new Biome[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); IWorldSpawnBuilderConditionExtensions.SetConditionDistanceToCenter(obj.SetConditionBiomes((Biome[])(object)array).SetSpawnChance(12f).SetSpawnInterval(TimeSpan.FromSeconds(360.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(1u) .SetSpawnAtDistanceToPlayerMin(45f) .SetSpawnAtDistanceToPlayerMax(60f), (double?)1000.0, (double?)null).SetConditionRequiredGlobalKey("defeated_eikthyr").SetMinDistanceToOther(75f) .SetConditionAltitudeMin(-5f) .SetConditionAltitudeMax(0.5f); } catch (Exception ex) { Log.LogError((object)ex); } } }