Decompiled source of Locater v1.3.5
Locater.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using HarmonyLib; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.UI; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyCompany("Locater")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("Locater")] [assembly: AssemblyTitle("Locater")] [assembly: AssemblyVersion("1.0.0.0")] namespace Locater; [BepInPlugin("com.Hyru.Locater", "Locater", "1.3.5")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Locater : BaseUnityPlugin { private ConfigEntry<bool> showNewtAltar; private ConfigEntry<bool> showCombatShrine; private ConfigEntry<bool> showMountainShrine; private ConfigEntry<bool> showBloodShrine; private ConfigEntry<bool> showChanceShrine; private ConfigEntry<bool> showOrderShrine; private ConfigEntry<bool> showShapingShrine; private ConfigEntry<bool> showHalcyoniteShrine; private ConfigEntry<bool> showVoidCradle; private ConfigEntry<bool> showTeleporter; private ConfigEntry<bool> showScrapper; private ConfigEntry<bool> show3DPrinter; private ConfigEntry<bool> showCategoryChests; private ConfigEntry<KeyboardShortcut> toggleMarkersHotkey; internal ConfigEntry<float> markerYOffset; private ConfigEntry<float> markerScale; private ConfigEntry<Color> newtAltarColor; private ConfigEntry<Color> combatShrineColor; private ConfigEntry<Color> mountainShrineColor; private ConfigEntry<Color> bloodShrineColor; private ConfigEntry<Color> chanceShrineColor; private ConfigEntry<Color> orderShrineColor; private ConfigEntry<Color> shapingShrineColor; private ConfigEntry<Color> halcyoniteShrineColor; private ConfigEntry<Color> voidCradleColor; private ConfigEntry<Color> teleporterColor; private ConfigEntry<Color> scrapperColor; private ConfigEntry<Color> threeDPrinterColor; private ConfigEntry<Color> whiteChestColor; private ConfigEntry<Color> greenChestColor; private ConfigEntry<Color> redChestColor; private ConfigEntry<Color> categoryChestColor; private ConfigEntry<Color> tripleShopColor; private ConfigEntry<Color> stealthChestColor; private ConfigEntry<Color> equipmentBarrelColor; private ConfigEntry<Color> lunarChestColor; private ConfigEntry<Color> lockboxColor; private ConfigEntry<Color> casinoChestColor; internal Dictionary<GameObject, GameObject> shrineIndicators = new Dictionary<GameObject, GameObject>(); public bool markersHidden; private Harmony _harmony; private void Awake() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown ((BaseUnityPlugin)this).Logger.LogInfo((object)"Locater loaded!"); InitializeConfig(); SetupRiskOfOptions(); Stage.onStageStartGlobal += OnStageStart; RoR2Application.onUpdate += OnUpdate; _harmony = new Harmony("com.Hyru.Locater"); _harmony.PatchAll(); MethodInfo method = typeof(SceneDirector).GetMethod("PopulateScene", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (method != null) { _harmony.Patch((MethodBase)method, (HarmonyMethod)null, new HarmonyMethod(typeof(Locater), "OnPopulateScenePostfix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Successfully patched SceneDirector.PopulateScene"); } else { ((BaseUnityPlugin)this).Logger.LogWarning((object)"Could not find SceneDirector.PopulateScene method"); } } private void InitializeConfig() { //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_0309: 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_035d: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0459: 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_04ad: 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_0501: Unknown result type (might be due to invalid IL or missing references) //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_0555: Unknown result type (might be due to invalid IL or missing references) //IL_057f: Unknown result type (might be due to invalid IL or missing references) //IL_0907: Unknown result type (might be due to invalid IL or missing references) showNewtAltar = ((BaseUnityPlugin)this).Config.Bind<bool>("Interactables", "Show Newt Altar", true, "Whether to show indicators for Newt Altars"); showCombatShrine = ((BaseUnityPlugin)this).Config.Bind<bool>("Interactables", "Show Shrine of Combat", true, "Whether to show indicators for Shrines of Combat"); showMountainShrine = ((BaseUnityPlugin)this).Config.Bind<bool>("Interactables", "Show Shrine of the Mountain", true, "Whether to show indicators for Shrines of the Mountain"); showBloodShrine = ((BaseUnityPlugin)this).Config.Bind<bool>("Interactables", "Show Shrine of Blood", true, "Whether to show indicators for Shrines of Blood"); showChanceShrine = ((BaseUnityPlugin)this).Config.Bind<bool>("Interactables", "Show Shrine of Chance", true, "Whether to show indicators for Shrines of Chance"); showOrderShrine = ((BaseUnityPlugin)this).Config.Bind<bool>("Interactables", "Show Shrine of Order", true, "Whether to show indicators for Shrines of Order"); showShapingShrine = ((BaseUnityPlugin)this).Config.Bind<bool>("Interactables", "Show Shrine of Shaping", true, "Whether to show indicators for Shrines of Shaping"); showHalcyoniteShrine = ((BaseUnityPlugin)this).Config.Bind<bool>("Interactables", "Show Halcyonite Shrine", true, "Whether to show indicators for Halcyonite Shrines"); showVoidCradle = ((BaseUnityPlugin)this).Config.Bind<bool>("Interactables", "Show Void Cradles", true, "Whether to show indicators for Void Cradles"); showTeleporter = ((BaseUnityPlugin)this).Config.Bind<bool>("Interactables", "Show Teleporters", true, "Whether to show indicators for Teleporters"); showCategoryChests = ((BaseUnityPlugin)this).Config.Bind<bool>("Interactables", "Show Chests", true, "Whether to show indicators for Chests"); showScrapper = ((BaseUnityPlugin)this).Config.Bind<bool>("Interactables", "Show Scrappers", true, "Whether to show indicators for Scrappers"); show3DPrinter = ((BaseUnityPlugin)this).Config.Bind<bool>("Interactables", "Show 3D Printers", true, "Whether to show indicators for 3D Printers"); markerYOffset = ((BaseUnityPlugin)this).Config.Bind<float>("Positioning", "Marker Y Offset", 0f, "Y-axis offset for markers (-100 to 100). Default: 0)"); markerScale = ((BaseUnityPlugin)this).Config.Bind<float>("Positioning", "Marker Scale", -3f, "Scale for markers (-10 to 10). Default: -3"); newtAltarColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Newt Altar Color", HexToColor("7A92C7"), "Color for Newt Altar marker. Default: #7A92C7"); combatShrineColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Combat Shrine Color", HexToColor("F980EE"), "Color for Combat Shrine marker. Default: #F980EE"); mountainShrineColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Mountain Shrine Color", HexToColor("47DBF7"), "Color for Mountain Shrine marker. Default: #47DBF7"); bloodShrineColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Blood Shrine Color", HexToColor("FF7274"), "Color for Blood Shrine marker. Default: #FF7274"); chanceShrineColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Chance Shrine Color", HexToColor("E0E69B"), "Color for Chance Shrine marker. Default: #E0E69B"); orderShrineColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Order Shrine Color", HexToColor("EACCE8"), "Color for Order Shrine marker. Default: #EACCE8"); shapingShrineColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Shaping Shrine Color", HexToColor("C8C7B2"), "Color for Shaping Shrine marker. Default: #C8C7B2"); halcyoniteShrineColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Halcyonite Shrine Color", HexToColor("44C668"), "Color for Halcyonite Shrine marker. Default: #44C668"); voidCradleColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Void Cradle Color", HexToColor("E709D2"), "Color for Void Cradle marker. Default: #E709D2"); teleporterColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Teleporter Color", HexToColor("FDFF00"), "Color for Teleporter marker. Default: #FDFF00"); whiteChestColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "White Chest Color", HexToColor("FFFFFF"), "Color for White Chest marker. Default: #FFFFFF"); greenChestColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Green Chest Color", HexToColor("00FF00"), "Color for Green Chest marker. Default: #00FF00"); redChestColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Red Chest Color", HexToColor("FF0000"), "Color for Red Chest marker. Default: #FF0000"); categoryChestColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Category Chest Color", HexToColor("A020F0"), "Color for Category Chest marker. Default: #A020F0"); tripleShopColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Triple Shop Color", HexToColor("C4A825"), "Color for Triple Shop marker. Default: #C4A825"); stealthChestColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Stealth Chest Color", HexToColor("960006"), "Color for Stealth Chest marker. Default: #960006"); equipmentBarrelColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Equipment Barrel Color", HexToColor("FFA500"), "Color for Equipment Barrel marker. Default: #FFA500"); lockboxColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Lockbox Color", HexToColor("FEF90A"), "Color for Key Lockbox marker. Default: #FEF90A"); casinoChestColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Casino Chest Color", HexToColor("FFFFFF"), "Color for Casino Chest marker. Default: #FFFFFF"); lunarChestColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Lunar Pod Color", HexToColor("0000FF"), "Color for Lunar Pod marker. Default: #0000FF"); scrapperColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "Scrapper Color", HexToColor("009900"), "Color for Scrapper marker. Default: #009900"); threeDPrinterColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Colors", "3D Printer Color", HexToColor("964B00"), "Color for 3D Printer marker. Default: #964B00"); showNewtAltar.SettingChanged += OnConfigChanged; showCombatShrine.SettingChanged += OnConfigChanged; showMountainShrine.SettingChanged += OnConfigChanged; showBloodShrine.SettingChanged += OnConfigChanged; showChanceShrine.SettingChanged += OnConfigChanged; showOrderShrine.SettingChanged += OnConfigChanged; showShapingShrine.SettingChanged += OnConfigChanged; showHalcyoniteShrine.SettingChanged += OnConfigChanged; showVoidCradle.SettingChanged += OnConfigChanged; showTeleporter.SettingChanged += OnConfigChanged; showScrapper.SettingChanged += OnConfigChanged; showCategoryChests.SettingChanged += OnConfigChanged; show3DPrinter.SettingChanged += OnConfigChanged; markerYOffset.SettingChanged += OnPositioningChanged; markerScale.SettingChanged += OnPositioningChanged; newtAltarColor.SettingChanged += OnColorChanged; combatShrineColor.SettingChanged += OnColorChanged; mountainShrineColor.SettingChanged += OnColorChanged; bloodShrineColor.SettingChanged += OnColorChanged; chanceShrineColor.SettingChanged += OnColorChanged; orderShrineColor.SettingChanged += OnColorChanged; shapingShrineColor.SettingChanged += OnColorChanged; halcyoniteShrineColor.SettingChanged += OnColorChanged; voidCradleColor.SettingChanged += OnColorChanged; teleporterColor.SettingChanged += OnColorChanged; whiteChestColor.SettingChanged += OnColorChanged; greenChestColor.SettingChanged += OnColorChanged; redChestColor.SettingChanged += OnColorChanged; categoryChestColor.SettingChanged += OnColorChanged; tripleShopColor.SettingChanged += OnColorChanged; stealthChestColor.SettingChanged += OnColorChanged; equipmentBarrelColor.SettingChanged += OnColorChanged; lockboxColor.SettingChanged += OnColorChanged; casinoChestColor.SettingChanged += OnColorChanged; lunarChestColor.SettingChanged += OnColorChanged; scrapperColor.SettingChanged += OnColorChanged; threeDPrinterColor.SettingChanged += OnColorChanged; toggleMarkersHotkey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Controls", "Toggle Markers Hotkey", new KeyboardShortcut((KeyCode)104, (KeyCode[])(object)new KeyCode[1] { (KeyCode)306 }), "Hotkey to toggle all markers on/off. Default: Ctrl+H"); } private void SetupRiskOfOptions() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Expected O, but got Unknown //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Expected O, but got Unknown //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Expected O, but got Unknown //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Expected O, but got Unknown //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Expected O, but got Unknown //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Expected O, but got Unknown //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Expected O, but got Unknown //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Expected O, but got Unknown //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Expected O, but got Unknown //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Expected O, but got Unknown //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Expected O, but got Unknown //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Expected O, but got Unknown //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Expected O, but got Unknown //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Expected O, but got Unknown //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Expected O, but got Unknown //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Expected O, but got Unknown //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Expected O, but got Unknown //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Expected O, but got Unknown //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Expected O, but got Unknown //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Expected O, but got Unknown //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Expected O, but got Unknown //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Expected O, but got Unknown //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Expected O, but got Unknown //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Expected O, but got Unknown //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Expected O, but got Unknown //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Expected O, but got Unknown //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Expected O, but got Unknown ModSettingsManager.SetModDescription("Locater adds globally visible indicators to most interactables in the game. Use these options to customize those indicators."); string filePath = Path.Combine(Paths.PluginPath, "Hyru-Locater", "iconmm.png"); Sprite val = LoadCustomSprite(filePath); if ((Object)(object)val != (Object)null) { ModSettingsManager.SetModIcon(val); } ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showNewtAltar)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showCombatShrine)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showMountainShrine)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showBloodShrine)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showChanceShrine)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showOrderShrine)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showShapingShrine)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showHalcyoniteShrine)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showVoidCradle)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showTeleporter)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showCategoryChests)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showScrapper)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(show3DPrinter)); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(markerYOffset, new StepSliderConfig { min = -100f, max = 100f, increment = 1f })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(markerScale, new StepSliderConfig { min = -10f, max = 10f, increment = 0.1f })); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(toggleMarkersHotkey)); ModSettingsManager.AddOption((BaseOption)new ColorOption(newtAltarColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(combatShrineColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(mountainShrineColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(bloodShrineColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(chanceShrineColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(orderShrineColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(shapingShrineColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(halcyoniteShrineColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(voidCradleColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(teleporterColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(whiteChestColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(greenChestColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(redChestColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(categoryChestColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(tripleShopColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(stealthChestColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(equipmentBarrelColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(lockboxColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(casinoChestColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(lunarChestColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(scrapperColor)); ModSettingsManager.AddOption((BaseOption)new ColorOption(threeDPrinterColor)); } private void OnUpdate() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) KeyboardShortcut value = toggleMarkersHotkey.Value; if (((KeyboardShortcut)(ref value)).IsDown()) { markersHidden = !markersHidden; ToggleAllMarkers(markersHidden); ((BaseUnityPlugin)this).Logger.LogInfo((object)("Markers " + (markersHidden ? "hidden" : "shown"))); } } private void ToggleAllMarkers(bool hidden) { markersHidden = hidden; foreach (KeyValuePair<GameObject, GameObject> shrineIndicator in shrineIndicators) { GameObject value = shrineIndicator.Value; _ = shrineIndicator.Key; if ((Object)(object)value != (Object)null) { if (hidden) { value.SetActive(false); } else { value.SetActive(true); } } } ((BaseUnityPlugin)this).Logger.LogInfo((object)("Markers " + (hidden ? "hidden" : "shown"))); } private static void OnPopulateScenePostfix(SceneDirector __instance) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: 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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: 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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) try { Locater locater = Object.FindObjectOfType<Locater>(); if ((Object)(object)locater != (Object)null) { ((BaseUnityPlugin)locater).Logger.LogInfo((object)"TESTING: PopulateScene postfix called, spawning test chests"); InteractableSpawnCard val = Resources.Load<InteractableSpawnCard>("SpawnCards/InteractableSpawnCard/iscChest1Stealthed"); if ((Object)(object)val != (Object)null) { ((BaseUnityPlugin)locater).Logger.LogInfo((object)"TESTING: Spawning stealth chest in PopulateScene postfix"); Vector3 val2 = ((Component)__instance).transform.position + Vector3.up * 5f; bool success = ((SpawnCard)val).DoSpawn(val2, Quaternion.identity, (DirectorSpawnRequest)null).success; ((BaseUnityPlugin)locater).Logger.LogInfo((object)$"TESTING: Stealth chest spawn success: {success}"); } InteractableSpawnCard val3 = Resources.Load<InteractableSpawnCard>("SpawnCards/InteractableSpawnCard/iscCasinoChest"); if ((Object)(object)val3 != (Object)null) { ((BaseUnityPlugin)locater).Logger.LogInfo((object)"TESTING: Spawning casino chest in PopulateScene postfix"); Vector3 val4 = ((Component)__instance).transform.position + Vector3.up * 5f + Vector3.right * 3f; bool success2 = ((SpawnCard)val3).DoSpawn(val4, Quaternion.identity, (DirectorSpawnRequest)null).success; ((BaseUnityPlugin)locater).Logger.LogInfo((object)$"TESTING: Casino chest spawn success: {success2}"); } } } catch (Exception arg) { Locater locater2 = Object.FindObjectOfType<Locater>(); if ((Object)(object)locater2 != (Object)null) { ((BaseUnityPlugin)locater2).Logger.LogError((object)$"TESTING: Error in PopulateScene postfix: {arg}"); } } } private void OnStageStart(Stage stage) { SceneDef sceneDef = stage.sceneDef; string text = ((sceneDef != null) ? sceneDef.cachedName : null) ?? "Unknown"; ((BaseUnityPlugin)this).Logger.LogInfo((object)("Stage started: " + text)); if (text.ToLower().Contains("bazaar")) { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Bazaar stage detected, skipping Newt altar indicator."); return; } RoR2Application.onNextUpdate += delegate { ((MonoBehaviour)this).StartCoroutine(DelayedInteractableScan()); }; } private void CreateAltarIndicator(Vector3 position, GameObject shrine) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0199: 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) if (shrineIndicators.ContainsKey(shrine)) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("Skipping duplicate indicator for shrine " + ((Object)shrine).name + " - already exists")); return; } ((BaseUnityPlugin)this).Logger.LogInfo((object)$"Creating Newt Altar indicator at position {position} for shrine {((Object)shrine).name}"); PositionIndicator component = Object.Instantiate<GameObject>(Resources.Load<GameObject>("Prefabs/PositionIndicators/TeleporterChargingPositionIndicator"), position, Quaternion.identity).GetComponent<PositionIndicator>(); ChargeIndicatorController component2 = ((Component)component).GetComponent<ChargeIndicatorController>(); ((Component)component).transform.localScale = Vector3.one * (0.375f + markerScale.Value * 0.0375f); Canvas component3 = ((Component)component).GetComponent<Canvas>(); if ((Object)(object)component3 != (Object)null) { component3.renderMode = (RenderMode)2; component3.worldCamera = Camera.main; } FieldInfo field = ((object)component2).GetType().GetField("backgroundSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object? value = field.GetValue(component2); SpriteRenderer val = (SpriteRenderer)((value is SpriteRenderer) ? value : null); if ((Object)(object)val != (Object)null) { ((Renderer)val).enabled = false; } } FieldInfo field2 = ((object)component2).GetType().GetField("pulseSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 != null) { object? value2 = field2.GetValue(component2); SpriteRenderer val2 = (SpriteRenderer)((value2 is SpriteRenderer) ? value2 : null); if ((Object)(object)val2 != (Object)null) { ((Renderer)val2).enabled = false; } } if ((Object)(object)component2.chargingText != (Object)null) { ((Component)component2.chargingText.transform).gameObject.SetActive(false); } component2.spriteBaseColor = newtAltarColor.Value; component2.spriteFlashColor = newtAltarColor.Value; component2.spriteChargedColor = newtAltarColor.Value; component2.spriteChargingColor = newtAltarColor.Value; string filePath = Path.Combine(Paths.PluginPath, "Hyru-Locater", "coin.png"); Sprite val3 = LoadCustomSprite(filePath); if ((Object)(object)val3 != (Object)null && component2.iconSprites != null) { SpriteRenderer[] iconSprites = component2.iconSprites; foreach (SpriteRenderer val4 in iconSprites) { if ((Object)(object)val4 != (Object)null) { val4.sprite = val3; } } } shrineIndicators[shrine] = ((Component)component).gameObject; ((BaseUnityPlugin)this).Logger.LogInfo((object)$"Stored indicator for shrine {((Object)shrine).name} with ID {((Object)shrine).GetInstanceID()}"); SetupShrineActivationListener(shrine, ((Component)component).gameObject); ((Component)component).gameObject.SetActive(true); ((Component)component).gameObject.AddComponent<KeepUpright>(); RemoveEdgeComponents(((Component)component).gameObject); } private Sprite LoadCustomSprite(string filePath) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) if (!File.Exists(filePath)) { ((BaseUnityPlugin)this).Logger.LogError((object)("PNG file not found: " + filePath)); return null; } byte[] array = File.ReadAllBytes(filePath); Texture2D val = new Texture2D(2, 2, (TextureFormat)5, false); if (ImageConversion.LoadImage(val, array)) { ((Texture)val).filterMode = (FilterMode)1; ((Texture)val).wrapMode = (TextureWrapMode)1; return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f), 100f); } ((BaseUnityPlugin)this).Logger.LogError((object)"Failed to load PNG into texture"); return null; } private void SetupShrineActivationListener(GameObject shrine, GameObject indicator) { ((MonoBehaviour)this).StartCoroutine(CheckShrineActivation(shrine, indicator)); } private IEnumerator CheckShrineActivation(GameObject shrine, GameObject indicator) { PurchaseInteraction purchase = (((Object)(object)shrine != (Object)null) ? shrine.GetComponent<PurchaseInteraction>() : null); ShrineBossBehavior bossBehavior = (((Object)(object)shrine != (Object)null) ? shrine.GetComponent<ShrineBossBehavior>() : null); ShrineCombatBehavior combatBehavior = (((Object)(object)shrine != (Object)null) ? shrine.GetComponent<ShrineCombatBehavior>() : null); ChestBehavior chestBehavior = (((Object)(object)shrine != (Object)null) ? shrine.GetComponent<ChestBehavior>() : null); ShrineChanceBehavior chanceBehavior = (((Object)(object)shrine != (Object)null) ? shrine.GetComponent<ShrineChanceBehavior>() : null); ShrineBloodBehavior bloodBehavior = (((Object)(object)shrine != (Object)null) ? shrine.GetComponent<ShrineBloodBehavior>() : null); while ((Object)(object)shrine != (Object)null && (Object)(object)indicator != (Object)null) { if ((Object)(object)purchase != (Object)null && !purchase.available && (Object)(object)chanceBehavior == (Object)null && (Object)(object)bloodBehavior == (Object)null) { RemoveIndicator(shrine, indicator); break; } if ((Object)(object)bossBehavior != (Object)null) { FieldInfo field = ((object)bossBehavior).GetType().GetField("purchaseCount", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field2 = ((object)bossBehavior).GetType().GetField("maxPurchaseCount", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null && field2 != null) { int num = (int)field.GetValue(bossBehavior); int num2 = (int)field2.GetValue(bossBehavior); if (num >= num2) { RemoveIndicator(shrine, indicator); break; } } } if ((Object)(object)combatBehavior != (Object)null) { FieldInfo field3 = ((object)combatBehavior).GetType().GetField("purchaseCount", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field4 = ((object)combatBehavior).GetType().GetField("maxPurchaseCount", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field3 != null && field4 != null) { int num3 = (int)field3.GetValue(combatBehavior); int num4 = (int)field4.GetValue(combatBehavior); if (num3 >= num4) { RemoveIndicator(shrine, indicator); break; } } } if ((Object)(object)chestBehavior != (Object)null) { FieldInfo field5 = ((object)chestBehavior).GetType().GetField("isChestOpened", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field5 != null && (bool)field5.GetValue(chestBehavior)) { RemoveIndicator(shrine, indicator); break; } } if ((Object)(object)shrine != (Object)null && ((Object)shrine).name.StartsWith("TripleShop")) { MultiShopController component = shrine.GetComponent<MultiShopController>(); if ((Object)(object)component != (Object)null) { FieldInfo field6 = ((object)component).GetType().GetField("available", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field6 != null && !(bool)field6.GetValue(component)) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("DEBUG: MultiShopController unavailable for " + ((Object)shrine).name + ", removing marker.")); RemoveIndicator(shrine, indicator); break; } } } if ((Object)(object)bloodBehavior != (Object)null) { FieldInfo field7 = ((object)bloodBehavior).GetType().GetField("purchaseCount", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field8 = ((object)bloodBehavior).GetType().GetField("maxPurchaseCount", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field7 != null && field8 != null) { int num5 = (int)field7.GetValue(bloodBehavior); int num6 = (int)field8.GetValue(bloodBehavior); ((BaseUnityPlugin)this).Logger.LogInfo((object)$"DEBUG: Blood Shrine purchaseCount={num5}, maxPurchaseCount={num6}"); if (num5 >= num6) { ((BaseUnityPlugin)this).Logger.LogInfo((object)$"DEBUG: Blood Shrine exhausted (purchaseCount {num5} >= max {num6}), removing marker."); RemoveIndicator(shrine, indicator); break; } } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"DEBUG: Could not find purchaseCount or maxPurchaseCount field via reflection for Blood Shrine!"); } } if ((Object)(object)chanceBehavior != (Object)null) { ((BaseUnityPlugin)this).Logger.LogInfo((object)$"DEBUG: Entered ShrineChanceBehavior check for {((Object)shrine).name} (ID: {((Object)shrine).GetInstanceID()})"); FieldInfo field9 = ((object)chanceBehavior).GetType().GetField("successfulPurchaseCount", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field10 = ((object)chanceBehavior).GetType().GetField("maxPurchaseCount", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field9 != null && field10 != null) { int num7 = (int)field9.GetValue(chanceBehavior); int num8 = (int)field10.GetValue(chanceBehavior); ((BaseUnityPlugin)this).Logger.LogInfo((object)$"DEBUG: ShrineChanceBehavior successfulPurchaseCount={num7}, maxPurchaseCount={num8}"); if (num7 >= num8) { ((BaseUnityPlugin)this).Logger.LogInfo((object)$"DEBUG: Shrine of Chance exhausted (success {num7} >= max {num8}), removing marker."); RemoveIndicator(shrine, indicator); break; } } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"DEBUG: Could not find successfulPurchaseCount or maxPurchaseCount field via reflection!"); } } if ((Object)(object)shrine != (Object)null && ((Object)shrine).name.StartsWith("FreeChestMultiShop")) { MultiShopController component2 = shrine.GetComponent<MultiShopController>(); if ((Object)(object)component2 != (Object)null) { FieldInfo field11 = ((object)component2).GetType().GetField("available", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field11 != null && !(bool)field11.GetValue(component2)) { RemoveIndicator(shrine, indicator); break; } } } if ((Object)(object)shrine == (Object)null || !shrine.activeInHierarchy) { RemoveIndicator(shrine, indicator); break; } yield return (object)new WaitForSeconds(0.5f); } } private void RemoveIndicator(GameObject shrine, GameObject indicator, bool permanent = true) { ((BaseUnityPlugin)this).Logger.LogInfo((object)$"DEBUG: RemoveIndicator called for {((shrine != null) ? ((Object)shrine).name : null)} (indicator: {((indicator != null) ? ((Object)indicator).name : null)}) - Permanent: {permanent}"); if (!((Object)(object)indicator != (Object)null)) { return; } if (permanent) { Object.Destroy((Object)(object)indicator); if ((Object)(object)shrine != (Object)null && shrineIndicators.ContainsKey(shrine)) { shrineIndicators.Remove(shrine); } return; } indicator.SetActive(false); ChargeIndicatorController component = indicator.GetComponent<ChargeIndicatorController>(); if ((Object)(object)component != (Object)null && component.iconSprites != null) { SpriteRenderer[] iconSprites = component.iconSprites; foreach (SpriteRenderer val in iconSprites) { if ((Object)(object)val != (Object)null) { ((Renderer)val).enabled = false; } } } Canvas component2 = indicator.GetComponent<Canvas>(); if ((Object)(object)component2 != (Object)null) { ((Behaviour)component2).enabled = false; } } private void CreateCombatShrineIndicator(Vector3 position, GameObject shrine) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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) PositionIndicator component = Object.Instantiate<GameObject>(Resources.Load<GameObject>("Prefabs/PositionIndicators/TeleporterChargingPositionIndicator"), position, Quaternion.identity).GetComponent<PositionIndicator>(); ChargeIndicatorController component2 = ((Component)component).GetComponent<ChargeIndicatorController>(); ((Component)component).transform.localScale = Vector3.one * (0.375f + markerScale.Value * 0.0375f); Canvas component3 = ((Component)component).GetComponent<Canvas>(); if ((Object)(object)component3 != (Object)null) { component3.renderMode = (RenderMode)2; component3.worldCamera = Camera.main; } FieldInfo field = ((object)component2).GetType().GetField("backgroundSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object? value = field.GetValue(component2); SpriteRenderer val = (SpriteRenderer)((value is SpriteRenderer) ? value : null); if ((Object)(object)val != (Object)null) { ((Renderer)val).enabled = false; } } FieldInfo field2 = ((object)component2).GetType().GetField("pulseSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 != null) { object? value2 = field2.GetValue(component2); SpriteRenderer val2 = (SpriteRenderer)((value2 is SpriteRenderer) ? value2 : null); if ((Object)(object)val2 != (Object)null) { ((Renderer)val2).enabled = false; } } if ((Object)(object)component2.chargingText != (Object)null) { ((Component)component2.chargingText.transform).gameObject.SetActive(false); } component2.spriteBaseColor = combatShrineColor.Value; component2.spriteFlashColor = combatShrineColor.Value; component2.spriteChargedColor = combatShrineColor.Value; component2.spriteChargingColor = combatShrineColor.Value; string filePath = Path.Combine(Paths.PluginPath, "Hyru-Locater", "combat.png"); Sprite val3 = LoadCustomSprite(filePath); if ((Object)(object)val3 != (Object)null && component2.iconSprites != null) { SpriteRenderer[] iconSprites = component2.iconSprites; foreach (SpriteRenderer val4 in iconSprites) { if ((Object)(object)val4 != (Object)null) { val4.sprite = val3; } } } shrineIndicators[shrine] = ((Component)component).gameObject; SetupShrineActivationListener(shrine, ((Component)component).gameObject); ((Component)component).gameObject.SetActive(true); ((Component)component).gameObject.AddComponent<KeepUpright>(); RemoveEdgeComponents(((Component)component).gameObject); } private void CreateMountainShrineIndicator(Vector3 position, GameObject shrine) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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) PositionIndicator component = Object.Instantiate<GameObject>(Resources.Load<GameObject>("Prefabs/PositionIndicators/TeleporterChargingPositionIndicator"), position, Quaternion.identity).GetComponent<PositionIndicator>(); ChargeIndicatorController component2 = ((Component)component).GetComponent<ChargeIndicatorController>(); ((Component)component).transform.localScale = Vector3.one * (0.375f + markerScale.Value * 0.0375f); Canvas component3 = ((Component)component).GetComponent<Canvas>(); if ((Object)(object)component3 != (Object)null) { component3.renderMode = (RenderMode)2; component3.worldCamera = Camera.main; } FieldInfo field = ((object)component2).GetType().GetField("backgroundSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object? value = field.GetValue(component2); SpriteRenderer val = (SpriteRenderer)((value is SpriteRenderer) ? value : null); if ((Object)(object)val != (Object)null) { ((Renderer)val).enabled = false; } } FieldInfo field2 = ((object)component2).GetType().GetField("pulseSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 != null) { object? value2 = field2.GetValue(component2); SpriteRenderer val2 = (SpriteRenderer)((value2 is SpriteRenderer) ? value2 : null); if ((Object)(object)val2 != (Object)null) { ((Renderer)val2).enabled = false; } } if ((Object)(object)component2.chargingText != (Object)null) { ((Component)component2.chargingText.transform).gameObject.SetActive(false); } component2.spriteBaseColor = mountainShrineColor.Value; component2.spriteFlashColor = mountainShrineColor.Value; component2.spriteChargedColor = mountainShrineColor.Value; component2.spriteChargingColor = mountainShrineColor.Value; string filePath = Path.Combine(Paths.PluginPath, "Hyru-Locater", "mountain.png"); Sprite val3 = LoadCustomSprite(filePath); if ((Object)(object)val3 != (Object)null && component2.iconSprites != null) { SpriteRenderer[] iconSprites = component2.iconSprites; foreach (SpriteRenderer val4 in iconSprites) { if ((Object)(object)val4 != (Object)null) { val4.sprite = val3; } } } shrineIndicators[shrine] = ((Component)component).gameObject; SetupShrineActivationListener(shrine, ((Component)component).gameObject); ((Component)component).gameObject.SetActive(true); ((Component)component).gameObject.AddComponent<KeepUpright>(); RemoveEdgeComponents(((Component)component).gameObject); } private void CreateBloodShrineIndicator(Vector3 position, GameObject shrine) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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) PositionIndicator component = Object.Instantiate<GameObject>(Resources.Load<GameObject>("Prefabs/PositionIndicators/TeleporterChargingPositionIndicator"), position, Quaternion.identity).GetComponent<PositionIndicator>(); ChargeIndicatorController component2 = ((Component)component).GetComponent<ChargeIndicatorController>(); ((Component)component).transform.localScale = Vector3.one * (0.375f + markerScale.Value * 0.0375f); Canvas component3 = ((Component)component).GetComponent<Canvas>(); if ((Object)(object)component3 != (Object)null) { component3.renderMode = (RenderMode)2; component3.worldCamera = Camera.main; } FieldInfo field = ((object)component2).GetType().GetField("backgroundSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object? value = field.GetValue(component2); SpriteRenderer val = (SpriteRenderer)((value is SpriteRenderer) ? value : null); if ((Object)(object)val != (Object)null) { ((Renderer)val).enabled = false; } } FieldInfo field2 = ((object)component2).GetType().GetField("pulseSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 != null) { object? value2 = field2.GetValue(component2); SpriteRenderer val2 = (SpriteRenderer)((value2 is SpriteRenderer) ? value2 : null); if ((Object)(object)val2 != (Object)null) { ((Renderer)val2).enabled = false; } } if ((Object)(object)component2.chargingText != (Object)null) { ((Component)component2.chargingText.transform).gameObject.SetActive(false); } component2.spriteBaseColor = bloodShrineColor.Value; component2.spriteFlashColor = bloodShrineColor.Value; component2.spriteChargedColor = bloodShrineColor.Value; component2.spriteChargingColor = bloodShrineColor.Value; string filePath = Path.Combine(Paths.PluginPath, "Hyru-Locater", "blood.png"); Sprite val3 = LoadCustomSprite(filePath); if ((Object)(object)val3 != (Object)null && component2.iconSprites != null) { SpriteRenderer[] iconSprites = component2.iconSprites; foreach (SpriteRenderer val4 in iconSprites) { if ((Object)(object)val4 != (Object)null) { val4.sprite = val3; } } } shrineIndicators[shrine] = ((Component)component).gameObject; SetupShrineActivationListener(shrine, ((Component)component).gameObject); ((Component)component).gameObject.SetActive(true); ((Component)component).gameObject.AddComponent<KeepUpright>(); RemoveEdgeComponents(((Component)component).gameObject); } private void CreateChanceShrineIndicator(Vector3 position, GameObject shrine) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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) PositionIndicator component = Object.Instantiate<GameObject>(Resources.Load<GameObject>("Prefabs/PositionIndicators/TeleporterChargingPositionIndicator"), position, Quaternion.identity).GetComponent<PositionIndicator>(); ChargeIndicatorController component2 = ((Component)component).GetComponent<ChargeIndicatorController>(); ((Component)component).transform.localScale = Vector3.one * (0.375f + markerScale.Value * 0.0375f); Canvas component3 = ((Component)component).GetComponent<Canvas>(); if ((Object)(object)component3 != (Object)null) { component3.renderMode = (RenderMode)2; component3.worldCamera = Camera.main; } FieldInfo field = ((object)component2).GetType().GetField("backgroundSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object? value = field.GetValue(component2); SpriteRenderer val = (SpriteRenderer)((value is SpriteRenderer) ? value : null); if ((Object)(object)val != (Object)null) { ((Renderer)val).enabled = false; } } FieldInfo field2 = ((object)component2).GetType().GetField("pulseSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 != null) { object? value2 = field2.GetValue(component2); SpriteRenderer val2 = (SpriteRenderer)((value2 is SpriteRenderer) ? value2 : null); if ((Object)(object)val2 != (Object)null) { ((Renderer)val2).enabled = false; } } if ((Object)(object)component2.chargingText != (Object)null) { ((Component)component2.chargingText.transform).gameObject.SetActive(false); } component2.spriteBaseColor = chanceShrineColor.Value; component2.spriteFlashColor = chanceShrineColor.Value; component2.spriteChargedColor = chanceShrineColor.Value; component2.spriteChargingColor = chanceShrineColor.Value; string filePath = Path.Combine(Paths.PluginPath, "Hyru-Locater", "chance.png"); Sprite val3 = LoadCustomSprite(filePath); if ((Object)(object)val3 != (Object)null && component2.iconSprites != null) { SpriteRenderer[] iconSprites = component2.iconSprites; foreach (SpriteRenderer val4 in iconSprites) { if ((Object)(object)val4 != (Object)null) { val4.sprite = val3; } } } shrineIndicators[shrine] = ((Component)component).gameObject; SetupShrineActivationListener(shrine, ((Component)component).gameObject); ((Component)component).gameObject.SetActive(true); ((Component)component).gameObject.AddComponent<KeepUpright>(); RemoveEdgeComponents(((Component)component).gameObject); } private void CreateOrderShrineIndicator(Vector3 position, GameObject shrine) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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) PositionIndicator component = Object.Instantiate<GameObject>(Resources.Load<GameObject>("Prefabs/PositionIndicators/TeleporterChargingPositionIndicator"), position, Quaternion.identity).GetComponent<PositionIndicator>(); ChargeIndicatorController component2 = ((Component)component).GetComponent<ChargeIndicatorController>(); ((Component)component).transform.localScale = Vector3.one * (0.375f + markerScale.Value * 0.0375f); Canvas component3 = ((Component)component).GetComponent<Canvas>(); if ((Object)(object)component3 != (Object)null) { component3.renderMode = (RenderMode)2; component3.worldCamera = Camera.main; } FieldInfo field = ((object)component2).GetType().GetField("backgroundSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object? value = field.GetValue(component2); SpriteRenderer val = (SpriteRenderer)((value is SpriteRenderer) ? value : null); if ((Object)(object)val != (Object)null) { ((Renderer)val).enabled = false; } } FieldInfo field2 = ((object)component2).GetType().GetField("pulseSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 != null) { object? value2 = field2.GetValue(component2); SpriteRenderer val2 = (SpriteRenderer)((value2 is SpriteRenderer) ? value2 : null); if ((Object)(object)val2 != (Object)null) { ((Renderer)val2).enabled = false; } } if ((Object)(object)component2.chargingText != (Object)null) { ((Component)component2.chargingText.transform).gameObject.SetActive(false); } component2.spriteBaseColor = orderShrineColor.Value; component2.spriteFlashColor = orderShrineColor.Value; component2.spriteChargedColor = orderShrineColor.Value; component2.spriteChargingColor = orderShrineColor.Value; string filePath = Path.Combine(Paths.PluginPath, "Hyru-Locater", "order.png"); Sprite val3 = LoadCustomSprite(filePath); if ((Object)(object)val3 != (Object)null && component2.iconSprites != null) { SpriteRenderer[] iconSprites = component2.iconSprites; foreach (SpriteRenderer val4 in iconSprites) { if ((Object)(object)val4 != (Object)null) { val4.sprite = val3; } } } shrineIndicators[shrine] = ((Component)component).gameObject; SetupShrineActivationListener(shrine, ((Component)component).gameObject); ((Component)component).gameObject.SetActive(true); ((Component)component).gameObject.AddComponent<KeepUpright>(); RemoveEdgeComponents(((Component)component).gameObject); } private void CreateShapingShrineIndicator(Vector3 position, GameObject shrine) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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) PositionIndicator component = Object.Instantiate<GameObject>(Resources.Load<GameObject>("Prefabs/PositionIndicators/TeleporterChargingPositionIndicator"), position, Quaternion.identity).GetComponent<PositionIndicator>(); ChargeIndicatorController component2 = ((Component)component).GetComponent<ChargeIndicatorController>(); ((Component)component).transform.localScale = Vector3.one * (0.375f + markerScale.Value * 0.0375f); Canvas component3 = ((Component)component).GetComponent<Canvas>(); if ((Object)(object)component3 != (Object)null) { component3.renderMode = (RenderMode)2; component3.worldCamera = Camera.main; } FieldInfo field = ((object)component2).GetType().GetField("backgroundSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object? value = field.GetValue(component2); SpriteRenderer val = (SpriteRenderer)((value is SpriteRenderer) ? value : null); if ((Object)(object)val != (Object)null) { ((Renderer)val).enabled = false; } } FieldInfo field2 = ((object)component2).GetType().GetField("pulseSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 != null) { object? value2 = field2.GetValue(component2); SpriteRenderer val2 = (SpriteRenderer)((value2 is SpriteRenderer) ? value2 : null); if ((Object)(object)val2 != (Object)null) { ((Renderer)val2).enabled = false; } } if ((Object)(object)component2.chargingText != (Object)null) { ((Component)component2.chargingText.transform).gameObject.SetActive(false); } component2.spriteBaseColor = shapingShrineColor.Value; component2.spriteFlashColor = shapingShrineColor.Value; component2.spriteChargedColor = shapingShrineColor.Value; component2.spriteChargingColor = shapingShrineColor.Value; string filePath = Path.Combine(Paths.PluginPath, "Hyru-Locater", "shaping.png"); Sprite val3 = LoadCustomSprite(filePath); if ((Object)(object)val3 != (Object)null && component2.iconSprites != null) { SpriteRenderer[] iconSprites = component2.iconSprites; foreach (SpriteRenderer val4 in iconSprites) { if ((Object)(object)val4 != (Object)null) { val4.sprite = val3; } } } shrineIndicators[shrine] = ((Component)component).gameObject; SetupShrineActivationListener(shrine, ((Component)component).gameObject); ((Component)component).gameObject.SetActive(true); ((Component)component).gameObject.AddComponent<KeepUpright>(); RemoveEdgeComponents(((Component)component).gameObject); } private void CreateHalcyoniteShrineIndicator(Vector3 position, GameObject shrine) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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) PositionIndicator component = Object.Instantiate<GameObject>(Resources.Load<GameObject>("Prefabs/PositionIndicators/TeleporterChargingPositionIndicator"), position, Quaternion.identity).GetComponent<PositionIndicator>(); ChargeIndicatorController component2 = ((Component)component).GetComponent<ChargeIndicatorController>(); ((Component)component).transform.localScale = Vector3.one * (0.375f + markerScale.Value * 0.0375f); Canvas component3 = ((Component)component).GetComponent<Canvas>(); if ((Object)(object)component3 != (Object)null) { component3.renderMode = (RenderMode)2; component3.worldCamera = Camera.main; } FieldInfo field = ((object)component2).GetType().GetField("backgroundSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object? value = field.GetValue(component2); SpriteRenderer val = (SpriteRenderer)((value is SpriteRenderer) ? value : null); if ((Object)(object)val != (Object)null) { ((Renderer)val).enabled = false; } } FieldInfo field2 = ((object)component2).GetType().GetField("pulseSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 != null) { object? value2 = field2.GetValue(component2); SpriteRenderer val2 = (SpriteRenderer)((value2 is SpriteRenderer) ? value2 : null); if ((Object)(object)val2 != (Object)null) { ((Renderer)val2).enabled = false; } } if ((Object)(object)component2.chargingText != (Object)null) { ((Component)component2.chargingText.transform).gameObject.SetActive(false); } component2.spriteBaseColor = halcyoniteShrineColor.Value; component2.spriteFlashColor = halcyoniteShrineColor.Value; component2.spriteChargedColor = halcyoniteShrineColor.Value; component2.spriteChargingColor = halcyoniteShrineColor.Value; string filePath = Path.Combine(Paths.PluginPath, "Hyru-Locater", "halcyon.png"); Sprite val3 = LoadCustomSprite(filePath); if ((Object)(object)val3 != (Object)null && component2.iconSprites != null) { SpriteRenderer[] iconSprites = component2.iconSprites; foreach (SpriteRenderer val4 in iconSprites) { if ((Object)(object)val4 != (Object)null) { val4.sprite = val3; } } } shrineIndicators[shrine] = ((Component)component).gameObject; SetupShrineActivationListener(shrine, ((Component)component).gameObject); ((Component)component).gameObject.SetActive(true); ((Component)component).gameObject.AddComponent<KeepUpright>(); RemoveEdgeComponents(((Component)component).gameObject); } private void CreateVoidCradleIndicator(Vector3 position, GameObject shrine) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_017d: 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_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) PositionIndicator component = Object.Instantiate<GameObject>(Resources.Load<GameObject>("Prefabs/PositionIndicators/TeleporterChargingPositionIndicator"), position, Quaternion.identity).GetComponent<PositionIndicator>(); ChargeIndicatorController component2 = ((Component)component).GetComponent<ChargeIndicatorController>(); ((Component)component).transform.localScale = Vector3.one * (0.375f + markerScale.Value * 0.0375f); Canvas component3 = ((Component)component).GetComponent<Canvas>(); if ((Object)(object)component3 != (Object)null) { component3.renderMode = (RenderMode)2; component3.worldCamera = Camera.main; } FieldInfo field = ((object)component2).GetType().GetField("backgroundSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object? value = field.GetValue(component2); SpriteRenderer val = (SpriteRenderer)((value is SpriteRenderer) ? value : null); if ((Object)(object)val != (Object)null) { ((Renderer)val).enabled = false; } } FieldInfo field2 = ((object)component2).GetType().GetField("pulseSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 != null) { object? value2 = field2.GetValue(component2); SpriteRenderer val2 = (SpriteRenderer)((value2 is SpriteRenderer) ? value2 : null); if ((Object)(object)val2 != (Object)null) { ((Renderer)val2).enabled = false; } } if ((Object)(object)component2.chargingText != (Object)null) { ((Component)component2.chargingText.transform).gameObject.SetActive(false); } string filePath = Path.Combine(Paths.PluginPath, "Hyru-Locater", "voidchest.png"); Sprite val3 = LoadCustomSprite(filePath); if ((Object)(object)val3 != (Object)null && component2.iconSprites != null) { SpriteRenderer[] iconSprites = component2.iconSprites; foreach (SpriteRenderer val4 in iconSprites) { if ((Object)(object)val4 != (Object)null) { val4.sprite = val3; } } } component2.spriteBaseColor = voidCradleColor.Value; component2.spriteFlashColor = voidCradleColor.Value; component2.spriteChargedColor = voidCradleColor.Value; component2.spriteChargingColor = voidCradleColor.Value; shrineIndicators[shrine] = ((Component)component).gameObject; SetupShrineActivationListener(shrine, ((Component)component).gameObject); ((Component)component).gameObject.SetActive(true); ((Component)component).gameObject.AddComponent<KeepUpright>(); RemoveEdgeComponents(((Component)component).gameObject); } private void CreateTeleporterIndicator(Vector3 position, GameObject shrine) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: 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_0205: Unknown result type (might be due to invalid IL or missing references) if (shrineIndicators.ContainsKey(shrine)) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("Skipping duplicate indicator for shrine " + ((Object)shrine).name + " - already exists")); return; } ((BaseUnityPlugin)this).Logger.LogInfo((object)$"Creating Teleporter indicator at position {position} for shrine {((Object)shrine).name}"); PositionIndicator component = Object.Instantiate<GameObject>(Resources.Load<GameObject>("Prefabs/PositionIndicators/TeleporterChargingPositionIndicator"), position, Quaternion.identity).GetComponent<PositionIndicator>(); ChargeIndicatorController component2 = ((Component)component).GetComponent<ChargeIndicatorController>(); ((Component)component).transform.localScale = Vector3.one * (0.375f + markerScale.Value * 0.0375f); Canvas component3 = ((Component)component).GetComponent<Canvas>(); if ((Object)(object)component3 != (Object)null) { component3.renderMode = (RenderMode)2; component3.worldCamera = Camera.main; } FieldInfo field = ((object)component2).GetType().GetField("backgroundSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object? value = field.GetValue(component2); SpriteRenderer val = (SpriteRenderer)((value is SpriteRenderer) ? value : null); if ((Object)(object)val != (Object)null) { ((Renderer)val).enabled = false; } } FieldInfo field2 = ((object)component2).GetType().GetField("pulseSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 != null) { object? value2 = field2.GetValue(component2); SpriteRenderer val2 = (SpriteRenderer)((value2 is SpriteRenderer) ? value2 : null); if ((Object)(object)val2 != (Object)null) { ((Renderer)val2).enabled = false; } } if ((Object)(object)component2.chargingText != (Object)null) { ((Component)component2.chargingText.transform).gameObject.SetActive(false); } string filePath = Path.Combine(Paths.PluginPath, "Hyru-Locater", "tp.png"); Sprite val3 = LoadCustomSprite(filePath); if ((Object)(object)val3 != (Object)null && component2.iconSprites != null) { SpriteRenderer[] iconSprites = component2.iconSprites; foreach (SpriteRenderer val4 in iconSprites) { if ((Object)(object)val4 != (Object)null) { val4.sprite = val3; } } } component2.spriteBaseColor = teleporterColor.Value; component2.spriteFlashColor = teleporterColor.Value; component2.spriteChargedColor = teleporterColor.Value; component2.spriteChargingColor = teleporterColor.Value; shrineIndicators[shrine] = ((Component)component).gameObject; ((BaseUnityPlugin)this).Logger.LogInfo((object)$"Stored indicator for shrine {((Object)shrine).name} with ID {((Object)shrine).GetInstanceID()}"); SetupShrineActivationListener(shrine, ((Component)component).gameObject); ((Component)component).gameObject.SetActive(true); ((Component)component).gameObject.AddComponent<KeepUpright>(); RemoveEdgeComponents(((Component)component).gameObject); } private void CreateScrapperIndicator(Vector3 position, GameObject scrapper) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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) PositionIndicator component = Object.Instantiate<GameObject>(Resources.Load<GameObject>("Prefabs/PositionIndicators/TeleporterChargingPositionIndicator"), position, Quaternion.identity).GetComponent<PositionIndicator>(); ChargeIndicatorController component2 = ((Component)component).GetComponent<ChargeIndicatorController>(); ((Component)component).transform.localScale = Vector3.one * (0.375f + markerScale.Value * 0.0375f); Canvas component3 = ((Component)component).GetComponent<Canvas>(); if ((Object)(object)component3 != (Object)null) { component3.renderMode = (RenderMode)2; component3.worldCamera = Camera.main; } FieldInfo field = ((object)component2).GetType().GetField("backgroundSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object? value = field.GetValue(component2); SpriteRenderer val = (SpriteRenderer)((value is SpriteRenderer) ? value : null); if ((Object)(object)val != (Object)null) { ((Renderer)val).enabled = false; } } FieldInfo field2 = ((object)component2).GetType().GetField("pulseSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 != null) { object? value2 = field2.GetValue(component2); SpriteRenderer val2 = (SpriteRenderer)((value2 is SpriteRenderer) ? value2 : null); if ((Object)(object)val2 != (Object)null) { ((Renderer)val2).enabled = false; } } if ((Object)(object)component2.chargingText != (Object)null) { ((Component)component2.chargingText.transform).gameObject.SetActive(false); } component2.spriteBaseColor = scrapperColor.Value; component2.spriteFlashColor = scrapperColor.Value; component2.spriteChargedColor = scrapperColor.Value; component2.spriteChargingColor = scrapperColor.Value; string filePath = Path.Combine(Paths.PluginPath, "Hyru-Locater", "scrapper.png"); Sprite val3 = LoadCustomSprite(filePath); if ((Object)(object)val3 != (Object)null && component2.iconSprites != null) { SpriteRenderer[] iconSprites = component2.iconSprites; foreach (SpriteRenderer val4 in iconSprites) { if ((Object)(object)val4 != (Object)null) { val4.sprite = val3; } } } shrineIndicators[scrapper] = ((Component)component).gameObject; SetupShrineActivationListener(scrapper, ((Component)component).gameObject); ((Component)component).gameObject.SetActive(true); ((Component)component).gameObject.AddComponent<KeepUpright>(); RemoveEdgeComponents(((Component)component).gameObject); } internal void CreateChestIndicator(Vector3 position, GameObject chest, string chestType) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: 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_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022b: 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_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023b: 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_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_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: 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_02b4: Expected O, but got Unknown //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Expected O, but got Unknown //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) PositionIndicator component = Object.Instantiate<GameObject>(Resources.Load<GameObject>("Prefabs/PositionIndicators/TeleporterChargingPositionIndicator"), position, Quaternion.identity).GetComponent<PositionIndicator>(); ChargeIndicatorController component2 = ((Component)component).GetComponent<ChargeIndicatorController>(); ((Component)component).transform.localScale = Vector3.one * (0.375f + markerScale.Value * 0.0375f); Canvas component3 = ((Component)component).GetComponent<Canvas>(); if ((Object)(object)component3 != (Object)null) { component3.renderMode = (RenderMode)2; component3.worldCamera = Camera.main; } FieldInfo field = ((object)component2).GetType().GetField("backgroundSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object? value = field.GetValue(component2); SpriteRenderer val = (SpriteRenderer)((value is SpriteRenderer) ? value : null); if ((Object)(object)val != (Object)null) { ((Renderer)val).enabled = false; } } FieldInfo field2 = ((object)component2).GetType().GetField("pulseSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 != null) { object? value2 = field2.GetValue(component2); SpriteRenderer val2 = (SpriteRenderer)((value2 is SpriteRenderer) ? value2 : null); if ((Object)(object)val2 != (Object)null) { ((Renderer)val2).enabled = false; } } if ((Object)(object)component2.chargingText != (Object)null) { ((Component)component2.chargingText.transform).gameObject.SetActive(false); } Color value3 = categoryChestColor.Value; switch (chestType) { case "Chest1": value3 = whiteChestColor.Value; break; case "Chest2": value3 = greenChestColor.Value; break; case "GoldChest": value3 = redChestColor.Value; break; case "CategoryChest": value3 = categoryChestColor.Value; break; case "StealthChest": value3 = stealthChestColor.Value; break; case "EquipmentBarrel": value3 = equipmentBarrelColor.Value; break; case "LunarChest": value3 = lunarChestColor.Value; break; case "TripleShop": value3 = tripleShopColor.Value; break; case "CasinoChest": value3 = casinoChestColor.Value; break; } component2.spriteBaseColor = value3; component2.spriteFlashColor = value3; component2.spriteChargedColor = value3; component2.spriteChargingColor = value3; string text = Path.Combine(Paths.PluginPath, "Hyru-Locater", (chestType == "TripleShop") ? "triplechest.png" : ((chestType == "CasinoChest") ? "casino.png" : "chest.png")); ((BaseUnityPlugin)this).Logger.LogInfo((object)("DEBUG: Loading sprite for " + chestType + " from " + text)); Sprite val3 = LoadCustomSprite(text); if ((Object)val3 != (Object)null && component2.iconSprites != null) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("DEBUG: Successfully loaded sprite for " + chestType)); SpriteRenderer[] iconSprites = component2.iconSprites; foreach (SpriteRenderer val4 in iconSprites) { if ((Object)val4 != (Object)null) { val4.sprite = val3; ((BaseUnityPlugin)this).Logger.LogInfo((object)("DEBUG: Applied sprite to SpriteRenderer " + ((Object)((Component)val4).gameObject).name)); } } } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)("DEBUG: Failed to load or apply sprite for " + chestType)); } shrineIndicators[chest] = ((Component)component).gameObject; SetupShrineActivationListener(chest, ((Component)component).gameObject); ((Component)component).gameObject.SetActive(true); ((Component)component).gameObject.AddComponent<KeepUpright>(); RemoveEdgeComponents(((Component)component).gameObject); } private void OnConfigChanged(object sender, EventArgs e) { RefreshAllMarkers(); } private void OnPositioningChanged(object sender, EventArgs e) { ((BaseUnityPlugin)this).Logger.LogInfo((object)$"Positioning changed - Y Offset: {markerYOffset.Value}, Scale: {markerScale.Value}"); RefreshAllMarkers(); } private void RefreshAllMarkers() { foreach (GameObject value in shrineIndicators.Values) { if ((Object)(object)value != (Object)null) { Object.Destroy((Object)(object)value); } } shrineIndicators.Clear(); Stage instance = Stage.instance; if ((Object)(object)instance != (Object)null) { OnStageStart(instance); } } private void UpdateMarkerPositionsAndScale() { ((BaseUnityPlugin)this).Logger.LogInfo((object)"UpdateMarkerPositionsAndScale called - redirecting to RefreshAllMarkers"); RefreshAllMarkers(); } private void RemoveEdgeComponents(GameObject indicator) { Transform val = indicator.transform.Find("OutsideFrameArrow"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)((Component)val).gameObject); } Transform val2 = indicator.transform.Find("InsideFrame"); if ((Object)(object)val2 != (Object)null) { Object.Destroy((Object)(object)((Component)val2).gameObject); } Transform val3 = indicator.transform.Find("BoingyScaler/TeleporterSprite"); SpriteRenderer[] componentsInChildren = indicator.GetComponentsInChildren<SpriteRenderer>(true); foreach (SpriteRenderer val4 in componentsInChildren) { if ((Object)(object)val3 == (Object)null || (Object)(object)((Component)val4).gameObject != (Object)(object)((Component)val3).gameObject) { Object.Destroy((Object)(object)((Component)val4).gameObject); } } PositionIndicator component = indicator.GetComponent<PositionIndicator>(); if ((Object)(object)component != (Object)null && (Object)(object)val3 != (Object)null) { component.shouldRotateOutsideViewObject = false; component.outsideViewObject = ((Component)val3).gameObject; component.insideViewObject = ((Component)val3).gameObject; } } private void OnColorChanged(object sender, EventArgs e) { RefreshAllMarkers(); } private static Color HexToColor(string hex) { //IL_005e: 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) if (hex.StartsWith("#")) { hex = hex.Substring(1); } if (hex.Length == 6) { byte num = byte.Parse(hex.Substring(0, 2), NumberStyles.HexNumber); byte b = byte.Parse(hex.Substring(2, 2), NumberStyles.HexNumber); byte b2 = byte.Parse(hex.Substring(4, 2), NumberStyles.HexNumber); return Color32.op_Implicit(new Color32(num, b, b2, byte.MaxValue)); } throw new Exception("Invalid hex color: " + hex); } private void Create3DPrinterIndicator(Vector3 position, GameObject printer) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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) PositionIndicator component = Object.Instantiate<GameObject>(Resources.Load<GameObject>("Prefabs/PositionIndicators/TeleporterChargingPositionIndicator"), position, Quaternion.identity).GetComponent<PositionIndicator>(); ChargeIndicatorController component2 = ((Component)component).GetComponent<ChargeIndicatorController>(); ((Component)component).transform.localScale = Vector3.one * (0.375f + markerScale.Value * 0.0375f); Canvas component3 = ((Component)component).GetComponent<Canvas>(); if ((Object)(object)component3 != (Object)null) { component3.renderMode = (RenderMode)2; component3.worldCamera = Camera.main; } FieldInfo field = ((object)component2).GetType().GetField("backgroundSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object? value = field.GetValue(component2); SpriteRenderer val = (SpriteRenderer)((value is SpriteRenderer) ? value : null); if ((Object)(object)val != (Object)null) { ((Renderer)val).enabled = false; } } FieldInfo field2 = ((object)component2).GetType().GetField("pulseSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 != null) { object? value2 = field2.GetValue(component2); SpriteRenderer val2 = (SpriteRenderer)((value2 is SpriteRenderer) ? value2 : null); if ((Object)(object)val2 != (Object)null) { ((Renderer)val2).enabled = false; } } if ((Object)(object)component2.chargingText != (Object)null) { ((Component)component2.chargingText.transform).gameObject.SetActive(false); } component2.spriteBaseColor = threeDPrinterColor.Value; component2.spriteFlashColor = threeDPrinterColor.Value; component2.spriteChargedColor = threeDPrinterColor.Value; component2.spriteChargingColor = threeDPrinterColor.Value; string filePath = Path.Combine(Paths.PluginPath, "Hyru-Locater", "printer.png"); Sprite val3 = LoadCustomSprite(filePath); if ((Object)(object)val3 != (Object)null && component2.iconSprites != null) { SpriteRenderer[] iconSprites = component2.iconSprites; foreach (SpriteRenderer val4 in iconSprites) { if ((Object)(object)val4 != (Object)null) { val4.sprite = val3; } } } shrineIndicators[printer] = ((Component)component).gameObject; ((Component)component).gameObject.SetActive(true); ((Component)component).gameObject.AddComponent<KeepUpright>(); RemoveEdgeComponents(((Component)component).gameObject); } private void CreateLockboxIndicator(Vector3 position, GameObject lockbox) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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) PositionIndicator component = Object.Instantiate<GameObject>(Resources.Load<GameObject>("Prefabs/PositionIndicators/TeleporterChargingPositionIndicator"), position, Quaternion.identity).GetComponent<PositionIndicator>(); ChargeIndicatorController component2 = ((Component)component).GetComponent<ChargeIndicatorController>(); ((Component)component).transform.localScale = Vector3.one * (0.375f + markerScale.Value * 0.0375f); Canvas component3 = ((Component)component).GetComponent<Canvas>(); if ((Object)(object)component3 != (Object)null) { component3.renderMode = (RenderMode)2; component3.worldCamera = Camera.main; } FieldInfo field = ((object)component2).GetType().GetField("backgroundSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object? value = field.GetValue(component2); SpriteRenderer val = (SpriteRenderer)((value is SpriteRenderer) ? value : null); if ((Object)(object)val != (Object)null) { ((Renderer)val).enabled = false; } } FieldInfo field2 = ((object)component2).GetType().GetField("pulseSprite", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 != null) { object? value2 = field2.GetValue(component2); SpriteRenderer val2 = (SpriteRenderer)((value2 is SpriteRenderer) ? value2 : null); if ((Object)(object)val2 != (Object)null) { ((Renderer)val2).enabled = false; } } if ((Object)(object)component2.chargingText != (Object)null) { ((Component)component2.chargingText.transform).gameObject.SetActive(false); } component2.spriteBaseColor = lockboxColor.Value; component2.spriteFlashColor = lockboxColor.Value; component2.spriteChargedColor = lockboxColor.Value; component2.spriteChargingColor = lockboxColor.Value; string filePath = Path.Combine(Paths.PluginPath, "Hyru-Locater", "chest.png"); Sprite val3 = LoadCustomSprite(filePath); if ((Object)(object)val3 != (Object)null && component2.iconSprites != null) { SpriteRenderer[] iconSprites = component2.iconSprites; foreach (SpriteRenderer val4 in iconSprites) { if ((Object)(object)val4 != (Object)null) { val4.sprite = val3; } } } shrineIndicators[lockbox] = ((Component)component).gameObject; SetupShrineActivationListener(lockbox, ((Component)component).gameObject); ((Component)component).gameObject.SetActive(true); ((Component)component).gameObject.AddComponent<KeepUpright>(); RemoveEdgeComponents(((Component)component).gameObject); } private IEnumerator DelayedInteractableScan() { yield return (object)new WaitForSeconds(0.5f); ScanAndCreateMarkers(); } private void ScanAndCreateMarkers() { //IL_008f: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_05c1: Unknown result type (might be due to invalid IL or missing references) //IL_05c6: Unknown result type (might be due to invalid IL or missing references) //IL_05dc: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: 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_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_069d: Unknown result type (might be due to invalid IL or missing references) //IL_06c9: Unknown result type (might be due to invalid IL or missing references) //IL_06ce: Unknown result type (might be due to invalid IL or missing references) //IL_06e4: Unknown result type (might be due to invalid IL or missing references) //IL_06e9: Unknown result type (might be due to invalid IL or missing references) //IL_07a5: Unknown result type (might be due to invalid IL or missing references) //IL_07d1: Unknown result type (might be due to invalid IL or missing references) //IL_07d6: 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_07f1: Unknown result type (might be due to invalid IL or missing references) //IL_0f5c: Unknown result type (might be due to invalid IL or missing references) //IL_0f88: Unknown result type (might be due to invalid IL or missing references) //IL_0f8d: Unknown result type (might be due to invalid IL or missing references) //IL_0fa3: Unknown result type (might be due to invalid IL or missing references) //IL_0fa8: Unknown result type (might be due to invalid IL or missing references) //IL_1056: Unknown result type (might be due to invalid IL or missing references) //IL_1082: Unknown result type (might be due to invalid IL or missing references) //IL_1087: Unknown result type (might be due to invalid IL or missing references) //IL_109d: Unknown result type (might be due to invalid IL or missing references) //IL_10a2: Unknown result type (might be due to invalid IL or missing references) //IL_0bf7: Unknown result type (might be due to invalid IL or missing references) //IL_0bfc: Unknown result type (might be due to invalid IL or missing references) //IL_0c12: Unknown result type (might be due to invalid IL or missing references) //IL_0c17: Unknown result type (might be due to invalid IL or missing references) //IL_0c33: Unknown result type (might be due to invalid IL or missing references) //IL_0c38: Unknown result type (might be due to invalid IL or missing references) //IL_0c4e: Unknown result type (might be due to invalid IL or missing references) //IL_0c53: Unknown result type (might be due to invalid IL or missing references) //IL_1165: Unknown result type (might be due to invalid IL or missing references) //IL_1191: Unknown result type (might be due to invalid IL or missing references) //IL_1196: Unknown result type (might be due to invalid IL or missing references) //IL_11ac: Unknown result type (might be due to invalid IL or missing references) //IL_11b1: Unknown result type (might be due to invalid IL or missing references) //IL_0e16: Unknown result type (might be due to invalid IL or missing references) //IL_0e42: Unknown result type (might be due to invalid IL or missing references) //IL_0e47: Unknown result type (might be due to invalid IL or missing references) //IL_0e5d: Unknown result type (might be due to invalid IL or missing references) //IL_0e62: Unknown result type (might be due to invalid IL or missing references) //IL_1293: Unknown result type (might be due to invalid IL or missing references) //IL_12bf: Unknown result type (might be due to invalid IL or missing references) //IL_12c4: Unknown result type (might be due to invalid IL or missing references) //IL_12da: Unknown result type (might be due to invalid IL or missing references) //IL_12df: Unknown result type (might be due to invalid IL or missing references) //IL_13af: Unknown result type (might be due to invalid IL or missing references) //IL_13db: Unknown result type (might be due to invalid IL or missing references) //IL_13e0: Unknown result type (might be due to invalid IL or missing references) //IL_13f6: Unknown result type (might be due to invalid IL or missing references) //IL_13fb: Unknown result type (might be due to invalid IL or missing references) //I