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 Googly Eyes v1.0.0
GooglyEyes.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("GooglyEyes")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("GooglyEyes")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("925b4772-9d1d-4ef0-8787-5200709aac52")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace GooglyEyes; [BepInPlugin("horemvore.GooglyEyes", "GooglyEyes", "1.0.0")] [BepInIncompatibility("Azumatt.AzuDevMod")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] internal class googlyEyesBundle : BaseUnityPlugin { public const string PluginGUID = "horemvore.GooglyEyes"; public const string PluginName = "GooglyEyes"; public const string PluginVersion = "1.0.0"; public static bool isModded = true; internal static ManualLogSource Log; public static GameObject Eye1; public static GameObject Eye2; public static GameObject Eye3; public static GameObject Eye4; public static GameObject Eye5; public static GameObject Eye6; public static GameObject Eye7; public AssetBundle GooglyEyesBundle; private CustomLocalization Localization; public string[] itemList = new string[35] { "Trophy_FlyingEye_GE", "Trophy_FlyingEyeBlack_GE", "Trophy_FlyingEyeBlue_GE", "Trophy_FlyingEyeGreen_GE", "Trophy_FlyingEyePink_GE", "Trophy_FlyingEyePurple_GE", "Trophy_FlyingEyeWhite_GE", "FlyingEyE_Attack1_GE", "FlyingEyE_Attack2_GE", "FlyingEyE_Attack3_GE", "FlyingEyE_Attack1Shadow_GE", "FlyingEyE_Attack2Shadow_GE", "FlyingEyE_Attack3Shadow_GE", "FlyingEyE_Attack1Lightning_GE", "FlyingEyE_Attack2Lightning_GE", "FlyingEyE_Attack3Lightning_GE", "FlyingEyE_Attack1Poison_GE", "FlyingEyE_Attack2Poison_GE", "FlyingEyE_Attack3Poison_GE", "FlyingEyE_Attack1Acid_GE", "FlyingEyE_Attack2Acid_GE", "FlyingEyE_Attack3Acid_GE", "FlyingEyE_Attack1Frost_GE", "FlyingEyE_Attack2Frost_GE", "FlyingEyE_Attack3Frost_GE", "FlyingEyE_Attack1Fire_GE", "FlyingEyE_Attack2Fire_GE", "FlyingEyE_Attack3Fire_GE", "FlyingEyE_AttackBeamAcid_GE", "FlyingEyE_AttackBeamFire_GE", "FlyingEyE_AttackBeamFrost_GE", "FlyingEyE_AttackBeamLightning_GE", "FlyingEyE_AttackBeamShadow_GE", "FlyingEyE_AttackBeamScorch_GE", "FlyingEyE_AttackBeamPoison_GE" }; public string[] prefabList = new string[17] { "VFX_EyeBeam_GE", "VFX_EyeBeamBlue_GE", "VFX_EyeBeamGreen_GE", "VFX_EyeBeamLightBlue_GE", "VFX_EyeBeamPurple_GE", "FlyingEye_RD_GE", "FlyingEyeBlack_RD_GE", "FlyingEyeBlue_RD_GE", "FlyingEyeGreen_RD_GE", "FlyingEyePink_RD_GE", "FlyingEyePurple_RD_GE", "FlyingEyeWhite_RD_GE", "Projectile_EyeBeamPurple_GE", "Projectile_EyeBeamGreen_GE", "Projectile_EyeBeamBlue_GE", "Projectile_EyeBeamTeal_GE", "Projectile_EyeBeam_GE" }; public string[] fxList = new string[11] { "FX_Crit_GE", "FX_Backstab_GE", "SFX_FlyingEyeTaunt_GE", "SFX_FlyingEyeIdle_GE", "SFX_FlyingEyeHit_GE", "SFX_FlyingEyeDeath_GE", "SFX_FlyingEyeCast_GE", "SFX_FlyingEyeAttack3_GE", "SFX_FlyingEyeAttack2_GE", "SFX_FlyingEyeAlert_GE", "SFX_FlyingEyeAttack1_GE" }; private void Awake() { Log = ((BaseUnityPlugin)this).Logger; AddLocalizations(); LoadBundle(); AddPrefabs(); AddSFX(); AddItems(); AddFlyingEye(); 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_flyingeye_ge", "Evil Eye" }, { "item_trophy_flyingeye_desc_ge", "Animated trophy of an Evil Eye" }, { "item_trophy_flyingeyeblack_ge", "Evil Eye" }, { "item_trophy_flyingeyeblack_desc_ge", "Animated trophy of an Evil Eye" }, { "item_trophy_flyingeyeblue_ge", "Evil Eye" }, { "item_trophy_flyingeyeblue_desc_ge", "Animated trophy of an Evil Eye" }, { "item_trophy_flyingeyegreen_ge", "Evil Eye" }, { "item_trophy_flyingeyegreen_desc_ge", "Animated trophy of an Evil Eye" }, { "item_trophy_flyingeyepink_ge", "Evil Eye" }, { "item_trophy_flyingeyepink_desc_ge", "Animated trophy of an Evil Eye" }, { "item_trophy_flyingeyepurple_ge", "Evil Eye" }, { "item_trophy_flyingeyepurple_desc_ge", "Animated trophy of an Evil Eye" }, { "item_trophy_flyingeyewhite_ge", "Evil Eye" }, { "item_trophy_flyingeyewhite_desc_ge", "Animated trophy of an Evil Eye" }, { "enemy_flyingeye_ge", "Evil Eye" }, { "enemy_flyingeyewhite_ge", "Evil Eye" }, { "enemy_flyingeyepurple_ge", "Evil Eye" }, { "enemy_flyingeyepink_ge", "Evil Eye" }, { "enemy_flyingeyeblack_ge", "Evil Eye" }, { "enemy_flyingeyeblue_ge", "Evil Eye" }, { "enemy_flyingeyegreen_ge", "Evil Eye" } }); CustomLocalization localization2 = Localization; text = "Russian"; localization2.AddTranslation(ref text, new Dictionary<string, string> { { "item_trophy_flyingeye_ge", "Сглаз" }, { "item_trophy_flyingeye_desc_ge", "Анимированный трофей сглаза" }, { "item_trophy_flyingeyeblack_ge", "Сглаз" }, { "item_trophy_flyingeyeblack_desc_ge", "Анимированный трофей сглаза" }, { "item_trophy_flyingeyeblue_ge", "Сглаз" }, { "item_trophy_flyingeyeblue_desc_ge", "Анимированный трофей сглаза" }, { "item_trophy_flyingeyegreen_ge", "Сглаз" }, { "item_trophy_flyingeyegreen_desc_ge", "Анимированный трофей сглаза" }, { "item_trophy_flyingeyepink_ge", "Сглаз" }, { "item_trophy_flyingeyepink_desc_ge", "Анимированный трофей сглаза" }, { "item_trophy_flyingeyepurple_ge", "Сглаз" }, { "item_trophy_flyingeyepurple_desc_ge", "Анимированный трофей сглаза" }, { "item_trophy_flyingeyewhite_ge", "EСглаз" }, { "item_trophy_flyingeyewhite_desc_ge", "Анимированный трофей сглаза" }, { "enemy_flyingeye_ge", "Сглаз" }, { "enemy_flyingeyewhite_ge", "Сглаз" }, { "enemy_flyingeyepurple_ge", "Сглаз" }, { "enemy_flyingeyepink_ge", "Сглаз" }, { "enemy_flyingeyeblack_ge", "Сглаз" }, { "enemy_flyingeyeblue_ge", "Сглаз" }, { "enemy_flyingeyegreen_ge", "Сглаз" } }); CustomLocalization localization3 = Localization; text = "German"; localization3.AddTranslation(ref text, new Dictionary<string, string> { { "item_trophy_flyingeye_ge", "Böser Blick" }, { "item_trophy_flyingeye_desc_ge", "Animierte Trophäe eines Bösen Blicks" }, { "item_trophy_flyingeyeblack_ge", "Böser Blick" }, { "item_trophy_flyingeyeblack_desc_ge", "Animierte Trophäe eines Bösen Blicks" }, { "item_trophy_flyingeyeblue_ge", "Böser Blick" }, { "item_trophy_flyingeyeblue_desc_ge", "Animierte Trophäe eines Bösen Blicks" }, { "item_trophy_flyingeyegreen_ge", "Böser Blick" }, { "item_trophy_flyingeyegreen_desc_ge", "Animierte Trophäe eines Bösen Blicks" }, { "item_trophy_flyingeyepink_ge", "Böser Blick" }, { "item_trophy_flyingeyepink_desc_ge", "Animierte Trophäe eines Bösen Blicks" }, { "item_trophy_flyingeyepurple_ge", "Böser Blick" }, { "item_trophy_flyingeyepurple_desc_ge", "Animierte Trophäe eines Bösen Blicks" }, { "item_trophy_flyingeyewhite_ge", "Böser Blick" }, { "item_trophy_flyingeyewhite_desc_ge", "Animierte Trophäe eines Bösen Blicks" }, { "enemy_flyingeye_ge", "Böser Blick" }, { "enemy_flyingeyewhite_ge", "Böser Blick" }, { "enemy_flyingeyepurple_ge", "Böser Blick" }, { "enemy_flyingeyepink_ge", "Böser Blick" }, { "enemy_flyingeyeblack_ge", "Böser Blick" }, { "enemy_flyingeyeblue_ge", "Böser Blick" }, { "enemy_flyingeyegreen_ge", "Böser Blick" } }); CustomLocalization localization4 = Localization; text = "Turkish"; localization4.AddTranslation(ref text, new Dictionary<string, string> { { "item_trophy_flyingeye_ge", "Kem göz" }, { "item_trophy_flyingeye_desc_ge", "Bir Nazarın animasyonlu kupası" }, { "item_trophy_flyingeyeblack_ge", "Kem göz" }, { "item_trophy_flyingeyeblack_desc_ge", "Bir Nazarın animasyonlu kupası" }, { "item_trophy_flyingeyeblue_ge", "Kem göz" }, { "item_trophy_flyingeyeblue_desc_ge", "Bir Nazarın animasyonlu kupası" }, { "item_trophy_flyingeyegreen_ge", "Kem göz" }, { "item_trophy_flyingeyegreen_desc_ge", "Bir Nazarın animasyonlu kupası" }, { "item_trophy_flyingeyepink_ge", "Kem göz" }, { "item_trophy_flyingeyepink_desc_ge", "Bir Nazarın animasyonlu kupası" }, { "item_trophy_flyingeyepurple_ge", "Kem göz" }, { "item_trophy_flyingeyepurple_desc_ge", "Bir Nazarın animasyonlu kupası" }, { "item_trophy_flyingeyewhite_ge", "Kem göz" }, { "item_trophy_flyingeyewhite_desc_ge", "Bir Nazarın animasyonlu kupası" }, { "enemy_flyingeye_ge", "Kem göz" }, { "enemy_flyingeyewhite_ge", "Kem göz" }, { "enemy_flyingeyepurple_ge", "Kem göz" }, { "enemy_flyingeyepink_ge", "Kem göz" }, { "enemy_flyingeyeblack_ge", "Kem göz" }, { "enemy_flyingeyeblue_ge", "Kem göz" }, { "enemy_flyingeyegreen_ge", "Kem göz" } }); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding Localication for Googly Eyes: {arg}"); } } public void LoadBundle() { GooglyEyesBundle = AssetUtils.LoadAssetBundleFromResources("flyingeye", Assembly.GetExecutingAssembly()); } public void AddPrefabs() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown try { string[] array = prefabList; foreach (string text in array) { GameObject val = GooglyEyesBundle.LoadAsset<GameObject>(text); if ((Object)(object)val != (Object)null) { CustomPrefab val2 = new CustomPrefab(val, false); PrefabManager.Instance.AddPrefab(val2); } 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 VFX: {arg}"); } } public void AddSFX() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown try { string[] array = fxList; foreach (string text in array) { GameObject val = GooglyEyesBundle.LoadAsset<GameObject>(text); if ((Object)(object)val != (Object)null) { CustomPrefab val2 = new CustomPrefab(val, false); PrefabManager.Instance.AddPrefab(val2); } 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 FX: {arg}"); } } public void AddItems() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown try { string[] array = itemList; foreach (string text in array) { GameObject val = GooglyEyesBundle.LoadAsset<GameObject>(text); if ((Object)(object)val != (Object)null) { CustomItem val2 = new CustomItem(val, true); ItemManager.Instance.AddItem(val2); } 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 Items: {arg}"); } } private void AddFlyingEye() { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: 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_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Expected O, but got Unknown //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_017e: 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_018e: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Expected O, but got Unknown //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Expected O, but got Unknown //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Expected O, but got Unknown //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Expected O, but got Unknown //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Expected O, but got Unknown //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0231: 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_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Expected O, but got Unknown //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Expected O, but got Unknown //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0291: 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_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Expected O, but got Unknown //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Expected O, but got Unknown //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Expected O, but got Unknown //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Expected O, but got Unknown //IL_031a: 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_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Expected O, but got Unknown //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Expected O, but got Unknown //IL_037b: 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_038c: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Expected O, but got Unknown //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Expected O, but got Unknown //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Expected O, but got Unknown //IL_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_03ff: Expected O, but got Unknown //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_040e: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Expected O, but got Unknown //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_044a: Unknown result type (might be due to invalid IL or missing references) //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Expected O, but got Unknown //IL_046a: 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_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Expected O, but got Unknown //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c8: Expected O, but got Unknown //IL_04ca: Unknown result type (might be due to invalid IL or missing references) //IL_04cf: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_04f8: Expected O, but got Unknown //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Expected O, but got Unknown //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Expected O, but got Unknown //IL_0528: Unknown result type (might be due to invalid IL or missing references) //IL_052d: Unknown result type (might be due to invalid IL or missing references) //IL_0539: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_0556: Expected O, but got Unknown //IL_0558: Unknown result type (might be due to invalid IL or missing references) //IL_055d: Unknown result type (might be due to invalid IL or missing references) //IL_0569: Unknown result type (might be due to invalid IL or missing references) //IL_0571: Unknown result type (might be due to invalid IL or missing references) //IL_057a: Unknown result type (might be due to invalid IL or missing references) //IL_0587: Expected O, but got Unknown //IL_0589: Unknown result type (might be due to invalid IL or missing references) //IL_058e: Unknown result type (might be due to invalid IL or missing references) //IL_059a: Unknown result type (might be due to invalid IL or missing references) //IL_05a2: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: Unknown result type (might be due to invalid IL or missing references) //IL_05b7: Expected O, but got Unknown //IL_05b9: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05ca: Unknown result type (might be due to invalid IL or missing references) //IL_05d2: Unknown result type (might be due to invalid IL or missing references) //IL_05da: Unknown result type (might be due to invalid IL or missing references) //IL_05e7: Expected O, but got Unknown //IL_05e9: Unknown result type (might be due to invalid IL or missing references) //IL_05ee: Unknown result type (might be due to invalid IL or missing references) //IL_05fa: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Unknown result type (might be due to invalid IL or missing references) //IL_0617: Expected O, but got Unknown //IL_061e: Unknown result type (might be due to invalid IL or missing references) //IL_0625: Expected O, but got Unknown //IL_0638: Unknown result type (might be due to invalid IL or missing references) //IL_063f: Expected O, but got Unknown //IL_0649: Unknown result type (might be due to invalid IL or missing references) //IL_064e: Unknown result type (might be due to invalid IL or missing references) //IL_065a: Unknown result type (might be due to invalid IL or missing references) //IL_0662: Unknown result type (might be due to invalid IL or missing references) //IL_066a: Unknown result type (might be due to invalid IL or missing references) //IL_0677: Expected O, but got Unknown //IL_0679: Unknown result type (might be due to invalid IL or missing references) //IL_067e: Unknown result type (might be due to invalid IL or missing references) //IL_068a: Unknown result type (might be due to invalid IL or missing references) //IL_0692: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_06a8: Expected O, but got Unknown //IL_06aa: Unknown result type (might be due to invalid IL or missing references) //IL_06af: Unknown result type (might be due to invalid IL or missing references) //IL_06bb: Unknown result type (might be due to invalid IL or missing references) //IL_06c3: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d8: Expected O, but got Unknown //IL_06da: Unknown result type (might be due to invalid IL or missing references) //IL_06df: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f3: Unknown result type (might be due to invalid IL or missing references) //IL_06fb: Unknown result type (might be due to invalid IL or missing references) //IL_0708: Expected O, but got Unknown //IL_070a: Unknown result type (might be due to invalid IL or missing references) //IL_070f: Unknown result type (might be due to invalid IL or missing references) //IL_071b: Unknown result type (might be due to invalid IL or missing references) //IL_0723: Unknown result type (might be due to invalid IL or missing references) //IL_072b: Unknown result type (might be due to invalid IL or missing references) //IL_0738: Expected O, but got Unknown //IL_073f: Unknown result type (might be due to invalid IL or missing references) //IL_0746: Expected O, but got Unknown //IL_0759: Unknown result type (might be due to invalid IL or missing references) //IL_0760: Expected O, but got Unknown //IL_076a: Unknown result type (might be due to invalid IL or missing references) //IL_076f: Unknown result type (might be due to invalid IL or missing references) //IL_077b: Unknown result type (might be due to invalid IL or missing references) //IL_0783: Unknown result type (might be due to invalid IL or missing references) //IL_078b: Unknown result type (might be due to invalid IL or missing references) //IL_0798: Expected O, but got Unknown //IL_079a: Unknown result type (might be due to invalid IL or missing references) //IL_079f: Unknown result type (might be due to invalid IL or missing references) //IL_07ab: Unknown result type (might be due to invalid IL or missing references) //IL_07b3: Unknown result type (might be due to invalid IL or missing references) //IL_07bc: Unknown result type (might be due to invalid IL or missing references) //IL_07c9: Expected O, but got Unknown //IL_07cb: Unknown result type (might be due to invalid IL or missing references) //IL_07d0: Unknown result type (might be due to invalid IL or missing references) //IL_07dc: Unknown result type (might be due to invalid IL or missing references) //IL_07e4: Unknown result type (might be due to invalid IL or missing references) //IL_07ec: Unknown result type (might be due to invalid IL or missing references) //IL_07f9: Expected O, but got Unknown //IL_07fb: Unknown result type (might be due to invalid IL or missing references) //IL_0800: Unknown result type (might be due to invalid IL or missing references) //IL_080c: Unknown result type (might be due to invalid IL or missing references) //IL_0814: Unknown result type (might be due to invalid IL or missing references) //IL_081c: Unknown result type (might be due to invalid IL or missing references) //IL_0829: Expected O, but got Unknown //IL_082b: Unknown result type (might be due to invalid IL or missing references) //IL_0830: Unknown result type (might be due to invalid IL or missing references) //IL_083c: Unknown result type (might be due to invalid IL or missing references) //IL_0844: Unknown result type (might be due to invalid IL or missing references) //IL_084c: Unknown result type (might be due to invalid IL or missing references) //IL_0859: Expected O, but got Unknown //IL_0860: Unknown result type (might be due to invalid IL or missing references) //IL_0867: Expected O, but got Unknown try { Eye1 = GooglyEyesBundle.LoadAsset<GameObject>("FlyingEye_GE"); Eye2 = GooglyEyesBundle.LoadAsset<GameObject>("FlyingEyeBlack_GE"); Eye3 = GooglyEyesBundle.LoadAsset<GameObject>("FlyingEyeBlue_GE"); Eye4 = GooglyEyesBundle.LoadAsset<GameObject>("FlyingEyeGreen_GE"); Eye5 = GooglyEyesBundle.LoadAsset<GameObject>("FlyingEyePink_GE"); Eye6 = GooglyEyesBundle.LoadAsset<GameObject>("FlyingEyePurple_GE"); Eye7 = GooglyEyesBundle.LoadAsset<GameObject>("FlyingEyeWhite_GE"); GameObject eye = Eye1; CreatureConfig val = new CreatureConfig(); val.DropConfigs = (DropConfig[])(object)new DropConfig[5] { new DropConfig { Item = "Trophy_FlyingEye_GE", MinAmount = 1, MaxAmount = 1, Chance = 2f }, 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 = "Entrails", MinAmount = 1, MaxAmount = 2, Chance = 5f } }; CustomCreature val2 = new CustomCreature(eye, true, val); CreatureManager.Instance.AddCreature(val2); GameObject eye2 = Eye2; val = new CreatureConfig(); val.DropConfigs = (DropConfig[])(object)new DropConfig[5] { new DropConfig { Item = "Trophy_FlyingEyeBlack_GE", MinAmount = 1, MaxAmount = 1, Chance = 2f }, 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 = "Entrails", MinAmount = 1, MaxAmount = 2, Chance = 5f } }; CustomCreature val3 = new CustomCreature(eye2, true, val); CreatureManager.Instance.AddCreature(val3); GameObject eye3 = Eye3; val = new CreatureConfig(); val.DropConfigs = (DropConfig[])(object)new DropConfig[5] { new DropConfig { Item = "Trophy_FlyingEyeBlue_GE", MinAmount = 1, MaxAmount = 1, Chance = 2f }, 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 = "Entrails", MinAmount = 1, MaxAmount = 2, Chance = 5f } }; CustomCreature val4 = new CustomCreature(eye3, true, val); CreatureManager.Instance.AddCreature(val4); GameObject eye4 = Eye4; val = new CreatureConfig(); val.DropConfigs = (DropConfig[])(object)new DropConfig[5] { new DropConfig { Item = "Trophy_FlyingEyeGreen_GE", MinAmount = 1, MaxAmount = 1, Chance = 2f }, 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 = "Entrails", MinAmount = 1, MaxAmount = 2, Chance = 5f } }; CustomCreature val5 = new CustomCreature(eye4, true, val); CreatureManager.Instance.AddCreature(val5); GameObject eye5 = Eye5; val = new CreatureConfig(); val.DropConfigs = (DropConfig[])(object)new DropConfig[5] { new DropConfig { Item = "Trophy_FlyingEyePink_GE", MinAmount = 1, MaxAmount = 1, Chance = 2f }, 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 = "Entrails", MinAmount = 1, MaxAmount = 2, Chance = 5f } }; CustomCreature val6 = new CustomCreature(eye5, true, val); CreatureManager.Instance.AddCreature(val6); GameObject eye6 = Eye6; val = new CreatureConfig(); val.DropConfigs = (DropConfig[])(object)new DropConfig[5] { new DropConfig { Item = "Trophy_FlyingEyePurple_GE", MinAmount = 1, MaxAmount = 1, Chance = 2f }, 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 = "Entrails", MinAmount = 1, MaxAmount = 2, Chance = 5f } }; CustomCreature val7 = new CustomCreature(eye6, true, val); CreatureManager.Instance.AddCreature(val7); GameObject eye7 = Eye7; val = new CreatureConfig(); val.DropConfigs = (DropConfig[])(object)new DropConfig[5] { new DropConfig { Item = "Trophy_FlyingEyeWhite_GE", MinAmount = 1, MaxAmount = 1, Chance = 2f }, 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 = "Entrails", MinAmount = 1, MaxAmount = 2, Chance = 5f } }; CustomCreature val8 = new CustomCreature(eye7, true, val); CreatureManager.Instance.AddCreature(val8); } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while adding custom creatures from Googly Eyes: {arg}"); } } private void FixSFX() { try { AudioSource prefab = Cache.GetPrefab<AudioSource>("sfx_arrow_hit"); string[] array = fxList; foreach (string text in array) { GameObject prefab2 = Cache.GetPrefab<GameObject>(text); prefab2.GetComponentInChildren<AudioSource>().outputAudioMixerGroup = prefab.outputAudioMixerGroup; } } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogWarning((object)$"Exception caught while fixing custom audio: {arg}"); } finally { PrefabManager.OnPrefabsRegistered -= FixSFX; } } 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, 26306u).SetPrefabName("FlyingEyeBlue_GE").SetTemplateName("Evil Eye") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)4 }) .SetSpawnChance(18f) .SetSpawnInterval(TimeSpan.FromSeconds(210.0)) .SetPackSizeMin(1u) .SetPackSizeMax(2u) .SetMaxSpawned(2u) .SetConditionAltitudeMin(90f) .SetConditionAltitudeMax(3000f), (Faction)5).SetSpawnAtDistanceToPlayerMin(75f).SetSpawnAtDistanceToPlayerMax(125f) .SetConditionRequiredGlobalKey("defeated_dragon"); IWorldSpawnBuilderModifierExtensions.SetModifierFaction(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26305u).SetPrefabName("FlyingEyePink_GE").SetTemplateName("Evil Eye") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)512 }) .SetSpawnChance(18f) .SetSpawnInterval(TimeSpan.FromSeconds(210.0)) .SetPackSizeMin(1u) .SetPackSizeMax(2u) .SetMaxSpawned(2u) .SetConditionAltitudeMin(1f), (Faction)7).SetSpawnAtDistanceToPlayerMin(75f).SetSpawnAtDistanceToPlayerMax(125f) .SetConditionRequiredGlobalKey("defeated_goblinking"); IWorldSpawnBuilderModifierExtensions.SetModifierFaction(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26304u).SetPrefabName("FlyingEyeWhite_GE").SetTemplateName("Evil Eye") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)16 }) .SetSpawnChance(18f) .SetSpawnInterval(TimeSpan.FromSeconds(210.0)) .SetPackSizeMin(1u) .SetPackSizeMax(2u) .SetMaxSpawned(2u) .SetConditionAltitudeMin(1f), (Faction)7).SetSpawnAtDistanceToPlayerMin(75f).SetSpawnAtDistanceToPlayerMax(125f) .SetConditionRequiredGlobalKey("defeated_goblinking"); ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26303u).SetPrefabName("FlyingEyePurple_GE").SetTemplateName("Evil Eye") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)8 }) .SetSpawnChance(18f) .SetSpawnInterval(TimeSpan.FromSeconds(210.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(2u) .SetConditionAltitudeMin(1f) .SetSpawnAtDistanceToPlayerMin(75f) .SetSpawnAtDistanceToPlayerMax(125f) .SetConditionRequiredGlobalKey("defeated_gdking"); IWorldSpawnBuilderModifierExtensions.SetModifierFaction(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26302u).SetPrefabName("FlyingEyeBlack_GE").SetTemplateName("Evil Eye") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)32 }) .SetSpawnChance(18f) .SetSpawnInterval(TimeSpan.FromSeconds(210.0)) .SetPackSizeMin(1u) .SetPackSizeMax(2u) .SetMaxSpawned(2u) .SetConditionAltitudeMin(1f), (Faction)4).SetSpawnAtDistanceToPlayerMin(75f).SetSpawnAtDistanceToPlayerMax(125f) .SetConditionRequiredGlobalKey("defeated_goblinking"); IWorldSpawnBuilderModifierExtensions.SetModifierFaction(ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26301u).SetPrefabName("FlyingEyeGreen_GE").SetTemplateName("Evil Eye") .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).SetSpawnAtDistanceToPlayerMin(75f).SetSpawnAtDistanceToPlayerMax(125f) .SetConditionRequiredGlobalKey("defeated_bonemass"); ISpawnerConfigurationCollectionWorldSpawnerExtensions.ConfigureWorldSpawner(config, 26300u).SetPrefabName("FlyingEye_GE").SetTemplateName("Evil Eye") .SetConditionBiomes((Biome[])(object)new Biome[1] { (Biome)1 }) .SetSpawnChance(18f) .SetSpawnInterval(TimeSpan.FromSeconds(210.0)) .SetPackSizeMin(1u) .SetPackSizeMax(1u) .SetMaxSpawned(2u) .SetConditionAltitudeMin(1f) .SetSpawnAtDistanceToPlayerMin(75f) .SetSpawnAtDistanceToPlayerMax(125f) .SetConditionRequiredGlobalKey("defeated_eikthyr"); } catch (Exception ex) { Log.LogError((object)ex); } } }