Decompiled source of Pinnacle v1.13.0
Pinnacle.dll
Decompiled 2 weeks 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.Linq; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using ComfyLib; using HarmonyLib; using Microsoft.CodeAnalysis; using Splatform; using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("Pinnacle")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Pinnacle")] [assembly: AssemblyCopyright("Copyright © 2022")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("8d534f00-8286-4b0e-b2bc-a7669730bbca")] [assembly: AssemblyFileVersion("1.13.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.13.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace Pinnacle { public static class PluginConfig { public static ConfigFile CurrentConfig { get; private set; } public static ConfigEntry<bool> IsModEnabled { get; private set; } public static ConfigEntry<float> CenterMapLerpDuration { get; private set; } public static ConfigEntry<KeyboardShortcut> PinListPanelToggleShortcut { get; private set; } public static ConfigEntry<bool> PinListPanelShowPinPosition { get; private set; } public static ConfigEntry<Vector2> PinListPanelPosition { get; private set; } public static ConfigEntry<Vector2> PinListPanelSizeDelta { get; private set; } public static ConfigEntry<Color> PinListPanelBackgroundColor { get; private set; } public static ConfigEntry<MovementType> PinListPanelScrollRectMovementType { get; private set; } public static ConfigEntry<bool> PinListPanelEditPinOnRowClick { get; private set; } public static ConfigEntry<float> PinEditPanelToggleLerpDuration { get; private set; } public static ConfigEntry<Vector2> PinFilterPanelPosition { get; private set; } public static ConfigEntry<float> PinFilterPanelGridIconSize { get; private set; } public static ConfigEntry<string> PinFont { get; private set; } public static ConfigEntry<int> PinFontSize { get; private set; } public static ConfigEntry<KeyboardShortcut> AddPinAtMouseShortcut { get; private set; } public static ConfigEntry<bool> ProcessPinIconColorTags { get; private set; } public static ConfigEntry<bool> ProcessPinIconSpriteTags { get; private set; } public static ConfigEntry<bool> ProcessPinIconScaleTags { get; private set; } public static ConfigEntry<bool> StripPinIconColorTagText { get; private set; } public static ConfigEntry<bool> StripPinIconSpriteTagText { get; private set; } public static ConfigEntry<bool> StripPinIconScaleTagText { get; private set; } public static void BindConfig(ConfigFile config) { CurrentConfig = config; IsModEnabled = config.BindInOrder("_Global", "isModEnabled", defaultValue: true, "Globally enable or disable this mod."); IsModEnabled.OnSettingChanged<bool>(Pinnacle.TogglePinnacle); IsModEnabled.OnSettingChanged<bool>(ComfyCommandUtils.ToggleCommands); CenterMapLerpDuration = config.BindInOrder("CenterMap", "lerpDuration", 1f, "Duration (in seconds) for the CenterMap lerp.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 3f)); BindPinListPanelConfig(config); BindPinEditPanelConfig(config); BindPinFilterPanelConfig(config); BindPinIconConfig(config); LateBindConfigQueue.Reset(config); LateBindConfigQueue.Enqueue(BindMinimapConfig); } public static void BindPinListPanelConfig(ConfigFile config) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) PinListPanelToggleShortcut = config.BindInOrder<KeyboardShortcut>("PinListPanel", "pinListPanelToggleShortcut", new KeyboardShortcut((KeyCode)9, Array.Empty<KeyCode>()), "Keyboard shortcut to toggle the PinListPanel on/off."); PinListPanelShowPinPosition = config.BindInOrder("PinListPanel.Columns", "pinListPanelShowPinPosition", defaultValue: true, "Show the Pin.Position columns in the PinListPanel."); PinListPanelPosition = config.BindInOrder<Vector2>("PinListPanel.Panel", "pinListPanelPosition", new Vector2(25f, 0f), "The value for the PinListPanel.Panel position (relative to pivot/anchors)."); PinListPanelPosition.OnSettingChanged((Action<Vector2>)PinListPanelController.SetPanelPosition); PinListPanelSizeDelta = config.BindInOrder<Vector2>("PinListPanel.Panel", "pinListPanelSizeDelta", new Vector2(400f, 400f), "The value for the PinListPanel.Panel sizeDelta (width/height in pixels)."); PinListPanelSizeDelta.OnSettingChanged((Action<Vector2>)PinListPanelController.SetPanelSize); PinListPanelBackgroundColor = config.BindInOrder<Color>("PinListPanel.Panel", "pinListPanelBackgroundColor", new Color(0f, 0f, 0f, 0.9f), "The value for the PinListPanel.Panel background color."); PinListPanelBackgroundColor.OnSettingChanged((Action<Color>)PinListPanelController.SetBackgroundColor); PinListPanelScrollRectMovementType = config.BindInOrder<MovementType>("PinListPanel.ScrollRect", "movementType", (MovementType)2, "Determines how the PinListPanel scrolling should behave.", (AcceptableValueBase)(object)new AcceptableValueEnumList<MovementType>((MovementType)2, (MovementType)1)); PinListPanelScrollRectMovementType.OnSettingChanged((Action<MovementType>)PinListPanelController.SetScrollRectMovementType); PinListPanelEditPinOnRowClick = config.BindInOrder("PinListPanel.Behaviour", "pinListPanelEditPinOnRowClick", defaultValue: true, "If set, will show the PinEditPanel when a row is selected in the PinListPanel."); } public static void BindPinEditPanelConfig(ConfigFile config) { PinEditPanelToggleLerpDuration = config.BindInOrder("PinEditPanel.Toggle", "pinEditPanelToggleLerpDuration", 0.25f, "Duration (in seconds) for the PinEdiPanl.Toggle on/off lerp.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 3f)); } public static void BindPinFilterPanelConfig(ConfigFile config) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) PinFilterPanelPosition = config.BindInOrder<Vector2>("PinFilterPanel.Panel", "pinFilterPanelPanelPosition", new Vector2(-25f, 0f), "The value for the PinFilterPanel.Panel position (relative to pivot/anchors)."); PinFilterPanelGridIconSize = config.BindInOrder("PinFilterPanel.Grid", "pinFilterPanelGridIconSize", 30f, "The size of the PinFilterPanel.Grid icons.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(10f, 100f)); PinFilterPanelGridIconSize.OnSettingChanged<float>(PinFilterPanelController.UpdateStyle); } public static void BindMinimapConfig(ConfigFile config) { //IL_00f9: Unknown result type (might be due to invalid IL or missing references) PinFont = config.BindInOrder("Minimap", "Pin.Font", UIResources.ValheimNorseFont, "The font for the Pin text on the Minimap.", (AcceptableValueBase)(object)new AcceptableValueList<string>((from f in Resources.FindObjectsOfTypeAll<TMP_FontAsset>() select ((Object)f).name into f orderby f select f).ToArray())); PinFontSize = config.BindInOrder("Minimap", "Pin.FontSize", 18, "The font size for the Pin text on the Minimap.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(2, 26)); PinFont.OnSettingChanged<string>(PinMarkerUtils.SetPinNameFont); PinFontSize.OnSettingChanged<int>(PinMarkerUtils.SetPinNameFontSize); AddPinAtMouseShortcut = config.BindInOrder<KeyboardShortcut>("Minimap.Actions", "addPinAtMouseShortcut", KeyboardShortcut.Empty, "Keyboard shortcut to add a Minimap.Pin at the mouse position."); } private static void BindPinIconConfig(ConfigFile config) { ProcessPinIconColorTags = config.BindInOrder("PinIcon.Tags", "processPinIconColorTags", defaultValue: true, "If set, will process pin-icon-color tags: [#ff00ff]"); ProcessPinIconSpriteTags = config.BindInOrder("PinIcon.Tags", "processPinIconSpriteTags", defaultValue: true, "If set, will process pin-icon-sprite tags: [:sprite_name]"); ProcessPinIconScaleTags = config.BindInOrder("PinIcon.Tags", "processPinIconScaleTags", defaultValue: true, "If set, will process pin-icon-scale tags: [150%]"); StripPinIconColorTagText = config.BindInOrder("PinIcon.Tags", "stripPinIconColorTagText", defaultValue: true, "If set, will strip pin-icon-color tags from the pin-text."); StripPinIconSpriteTagText = config.BindInOrder("PinIcon.Tags", "stripPinIconSpriteTagText", defaultValue: true, "If set, will strip pin-icon-sprite tags from the pin-text."); StripPinIconScaleTagText = config.BindInOrder("PinIcon.Tags", "stripPinIconScaleTagText", defaultValue: true, "If set, will strip pin-icon-scale tags from the pin-text."); } } public static class LateBindConfigQueue { [HarmonyPatch(typeof(FejdStartup))] private static class FejdStartupPatch { [HarmonyPostfix] [HarmonyPatch("Awake")] private static void AwakePostfix() { while (_queue.Count > 0) { _queue.Dequeue()(_currentConfig); } } } private static ConfigFile _currentConfig = null; private static readonly Queue<Action<ConfigFile>> _queue = new Queue<Action<ConfigFile>>(); public static void Reset(ConfigFile currentConfig) { _currentConfig = currentConfig; _queue.Clear(); } public static void Enqueue(Action<ConfigFile> bindConfigAction) { _queue.Enqueue(bindConfigAction); } } public static class CenterMapHelper { [CompilerGenerated] private sealed class <CenterMapCoroutine>d__2 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public float lerpDuration; public Vector3 targetPosition; private float <timeElapsed>5__2; private Vector3 <startPosition>5__3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <CenterMapCoroutine>d__2(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <timeElapsed>5__2 = 0f; <startPosition>5__3 = Minimap.m_instance.m_mapOffset; break; case 1: <>1__state = -1; break; } if (<timeElapsed>5__2 < lerpDuration) { float num = <timeElapsed>5__2 / lerpDuration; num = num * num * (3f - 2f * num); Minimap.m_instance.m_mapOffset = Vector3.Lerp(<startPosition>5__3, targetPosition, num); <timeElapsed>5__2 += Time.deltaTime; <>2__current = null; <>1__state = 1; return true; } Minimap.m_instance.m_mapOffset = targetPosition; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private static Coroutine _centerMapCoroutine; public static void CenterMapOnPosition(Vector3 targetPosition) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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) if (Object.op_Implicit((Object)(object)Minimap.m_instance) && Object.op_Implicit((Object)(object)Player.m_localPlayer)) { if (_centerMapCoroutine != null) { ((MonoBehaviour)Minimap.m_instance).StopCoroutine(_centerMapCoroutine); } _centerMapCoroutine = ((MonoBehaviour)Minimap.m_instance).StartCoroutine(CenterMapCoroutine(targetPosition - ((Component)Player.m_localPlayer).transform.position, PluginConfig.CenterMapLerpDuration.Value)); } } [IteratorStateMachine(typeof(<CenterMapCoroutine>d__2))] private static IEnumerator CenterMapCoroutine(Vector3 targetPosition, float lerpDuration) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <CenterMapCoroutine>d__2(0) { targetPosition = targetPosition, lerpDuration = lerpDuration }; } } public static class ExportPinsCommand { [CompilerGenerated] private static class <>O { public static ConsoleEventFailable <0>__ExportPinsToBinaryFile; public static ConsoleEventFailable <1>__ExportPinsToTextFile; } [ComfyCommand] public static IEnumerable<ConsoleCommand> Register() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown ConsoleCommand[] array = new ConsoleCommand[2]; object obj = <>O.<0>__ExportPinsToBinaryFile; if (obj == null) { ConsoleEventFailable val = ExportPinsToBinaryFile; <>O.<0>__ExportPinsToBinaryFile = val; obj = (object)val; } array[0] = new ConsoleCommand("pinnacle-exportpins-binary", "<filename> [name-filter-regex] -- export pins to a file in binary format.", (ConsoleEventFailable)obj, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); object obj2 = <>O.<1>__ExportPinsToTextFile; if (obj2 == null) { ConsoleEventFailable val2 = ExportPinsToTextFile; <>O.<1>__ExportPinsToTextFile = val2; obj2 = (object)val2; } array[1] = new ConsoleCommand("pinnacle-exportpins-text", "<filename> [name-filter-regex] -- export pins to a file in plain text format.", (ConsoleEventFailable)obj2, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); return new <>z__ReadOnlyArray<ConsoleCommand>((ConsoleCommand[])(object)array); } public static object ExportPinsToBinaryFile(ConsoleEventArgs args) { PinImportExport.ExportPinsToFile(args, PinImportExport.PinFileFormat.Binary); return true; } public static object ExportPinsToTextFile(ConsoleEventArgs args) { PinImportExport.ExportPinsToFile(args, PinImportExport.PinFileFormat.PlainText); return true; } } public static class ImportPinsCommand { [CompilerGenerated] private static class <>O { public static ConsoleEvent <0>__ImportPinsFromBinaryFile; } [ComfyCommand] public static ConsoleCommand Register() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown object obj = <>O.<0>__ImportPinsFromBinaryFile; if (obj == null) { ConsoleEvent val = PinImportExport.ImportPinsFromBinaryFile; <>O.<0>__ImportPinsFromBinaryFile = val; obj = (object)val; } return new ConsoleCommand("pinnacle-importpins-binary", "<filename> [name-filter-regex] -- import pins in binary format from file.", (ConsoleEvent)obj, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); } } public static class RemoveAllPinsCommand { [CompilerGenerated] private static class <>O { public static ConsoleEventFailable <0>__Run; } [ComfyCommand] public static ConsoleCommand Register() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown object obj = <>O.<0>__Run; if (obj == null) { ConsoleEventFailable val = Run; <>O.<0>__Run = val; obj = (object)val; } return new ConsoleCommand("pinnacle-remove-all-pins", "(Pinnacle) Removes ALL pins.", (ConsoleEventFailable)obj, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); } public static object Run(ConsoleEventArgs args) { if (Object.op_Implicit((Object)(object)Minimap.m_instance)) { return false; } int num = Minimap.m_instance.m_pins.RemoveAll((PinData pin) => pin.m_save); args.Context.AddString($"Removed {num} pins."); return true; } } public static class PinEditPanelController { public static PinEditPanel PinEditPanel { get; private set; } public static void TogglePanel(PinData pinToEdit = null) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) if (!IsValid()) { PinEditPanel = new PinEditPanel(Minimap.m_instance.m_largeRoot.transform); PinEditPanel.RectTransform.SetAnchorMin(new Vector2(0.5f, 0f)).SetAnchorMax(new Vector2(0.5f, 0f)).SetPivot(new Vector2(0.5f, 0f)) .SetPosition(new Vector2(0f, 25f)) .SetSizeDelta(new Vector2(200f, 200f)); } if (pinToEdit == null) { PinEditPanel.SetTargetPin(null); PinEditPanel.SetActive(toggle: false); } else { CenterMapHelper.CenterMapOnPosition(pinToEdit.m_pos); PinEditPanel.SetTargetPin(pinToEdit); PinEditPanel.SetActive(toggle: true); } } public static bool IsValid() { if (PinEditPanel != null) { return Object.op_Implicit((Object)(object)PinEditPanel.Panel); } return false; } public static bool HasFocus() { if (PinEditPanel != null && Object.op_Implicit((Object)(object)PinEditPanel.Panel) && PinEditPanel.Panel.activeSelf) { return PinEditPanel.HasFocus(); } return false; } } public static class PinFilterPanelController { private static PinFilterPanel _currentPanel; public static void TogglePanel(bool toggleOn) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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) if (!IsValid()) { _currentPanel = new PinFilterPanel(Minimap.m_instance.m_largeRoot.transform); _currentPanel.RectTransform.SetAnchorMin(new Vector2(1f, 0.5f)).SetAnchorMax(new Vector2(1f, 0.5f)).SetPivot(new Vector2(1f, 0.5f)) .SetPosition(PluginConfig.PinFilterPanelPosition.Value); _currentPanel.PanelDragger.OnPanelEndDrag += SavePanelPosition; } _currentPanel.Panel.SetActive(toggleOn); } private static void SavePanelPosition(object sender, Vector3 position) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) PluginConfig.PinFilterPanelPosition.Value = Vector2.op_Implicit(position); } public static bool IsValid() { if (_currentPanel != null) { return Object.op_Implicit((Object)(object)_currentPanel.Panel); } return false; } public static void UpdateIconFilters() { if (IsValid()) { _currentPanel.UpdatePinIconFilters(); } } public static void UpdateStyle() { if (IsValid()) { _currentPanel.SetPanelStyle(); } } } public static class PinListPanelController { public static PinListPanel PinListPanel { get; private set; } public static void TogglePanel() { PinListPanel pinListPanel = PinListPanel; bool? obj; if (pinListPanel == null) { obj = null; } else { GameObject obj2 = pinListPanel.Panel.Ref<GameObject>(); obj = ((obj2 != null) ? new bool?(!obj2.activeSelf) : null); } bool? flag = obj; TogglePanel(flag.GetValueOrDefault()); } public static void TogglePanel(bool toggleOn) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_005c: 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) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)PinListPanel?.Panel)) { PinListPanel = new PinListPanel(Minimap.m_instance.m_largeRoot.transform); PinListPanel.PanelRectTransform.SetAnchorMin(new Vector2(0f, 0.5f)).SetAnchorMax(new Vector2(0f, 0.5f)).SetPivot(new Vector2(0f, 0.5f)) .SetPosition(PluginConfig.PinListPanelPosition.Value) .SetSizeDelta(PluginConfig.PinListPanelSizeDelta.Value); PinListPanel.PanelDragger.OnPanelEndDrag += OnPanelDragEnd; PinListPanel.PanelResizer.OnPanelEndResize += OnPanelResizeEnd; } if (toggleOn) { PinListPanel.Panel.SetActive(true); PinListPanel.SetTargetPins(); } else { PinListPanel.PinNameFilter.InputField.DeactivateInputField(false); PinListPanel.Panel.SetActive(false); } } public static bool IsPanelValid() { return Object.op_Implicit((Object)(object)PinListPanel?.Panel); } public static bool HasFocus() { if (PinListPanel != null) { return PinListPanel.HasFocus(); } return false; } public static void SetBackgroundColor(Color color) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) if (IsPanelValid()) { ((Graphic)PinListPanel.PanelBackground).color = color; } } public static void SetPanelPosition(Vector2 position) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) if (IsPanelValid()) { PinListPanel.PanelRectTransform.anchoredPosition = position; } } public static void SetPanelSize(Vector2 sizeDelta) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) if (IsPanelValid()) { PinListPanel.PanelRectTransform.sizeDelta = sizeDelta; PinListPanel.SetTargetPins(); } } public static void SetScrollRectMovementType(MovementType movementType) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) if (IsPanelValid()) { PinListPanel.ScrollRect.movementType = movementType; } } private static void OnPanelDragEnd(object sender, Vector3 position) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) PluginConfig.PinListPanelPosition.Value = Vector2.op_Implicit(position); } private static void OnPanelResizeEnd(object sender, Vector2 sizeDelta) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) PluginConfig.PinListPanelSizeDelta.Value = sizeDelta; } } public static class PinIconManager { public static Regex IconColorTagRegex = new Regex(".*\\[(#[0-9a-fA-F]{6})\\].*", RegexOptions.Compiled | RegexOptions.CultureInvariant, TimeSpan.FromMilliseconds(100.0)); public static Regex IconSpriteTagRegex = new Regex(".*\\[:(\\w{3,})\\].*", RegexOptions.Compiled | RegexOptions.CultureInvariant, TimeSpan.FromMilliseconds(100.0)); public static Regex IconScaleTagRegex = new Regex(".*\\[(\\d{2,3})%\\]", RegexOptions.Compiled | RegexOptions.CultureInvariant, TimeSpan.FromMilliseconds(100.0)); public static void ProcessIconTagsCreated(PinData pinData) { if (false | (PluginConfig.ProcessPinIconColorTags.Value && TryProcessIconColorTag(pinData)) | (PluginConfig.ProcessPinIconSpriteTags.Value && TryProcessIconSpriteTag(pinData)) | (PluginConfig.ProcessPinIconScaleTags.Value && TryProcessIconScaleTag(pinData))) { pinData.m_worldSize = 0f; } } public static void ProcessIconTagsModified(PinData pinData) { bool flag = HasIconTagFlag(pinData); bool flag2 = false; if (PluginConfig.ProcessPinIconColorTags.Value && TryProcessIconColorTag(pinData)) { flag2 = true; } else if (flag) { ResetIconColor(pinData); } if (PluginConfig.ProcessPinIconSpriteTags.Value && TryProcessIconSpriteTag(pinData)) { flag2 = true; } else if (flag) { ResetIconSprite(pinData); } if (PluginConfig.ProcessPinIconScaleTags.Value && TryProcessIconScaleTag(pinData)) { flag2 = true; } else if (flag) { ResetIconScale(pinData); } if (flag2) { RemoveIconTagText(pinData.m_NamePinData); pinData.m_worldSize = 0f; } else if (flag) { pinData.m_worldSize = 0f; } } public static bool IsValidIconTagName(string pinName) { if (pinName != null && pinName.Length > 0) { return pinName[pinName.Length - 1] == ']'; } return false; } public static bool HasIconTagFlag(PinData pinData) { return pinData.m_worldSize == 0f; } public static void RemoveIconTagText(PinNameData pinNameData) { string text = pinNameData.PinNameText.text; if (IsValidIconTagName(text)) { if (PluginConfig.StripPinIconColorTagText.Value) { text = RemoveIconColorTagText(text); } if (PluginConfig.StripPinIconSpriteTagText.Value) { text = RemoveIconSpriteTagText(text); } if (PluginConfig.StripPinIconScaleTagText.Value) { text = RemoveIconScaleTagText(text); } pinNameData.PinNameText.text = text; } } public static bool TryProcessIconColorTag(PinData pinData) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) string name = pinData.m_name; if (name.Length >= 9) { Match match = IconColorTagRegex.Match(name); Color color = default(Color); if (match.Success && ColorUtility.TryParseHtmlString(match.Groups[1].Value, ref color)) { ((Graphic)pinData.m_iconElement).color = color; return true; } } return false; } public static void ResetIconColor(PinData pinData) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) ((Graphic)pinData.m_iconElement).color = ((pinData.m_ownerID == 0L) ? Color.white : GetIconFadeColor(Minimap.m_instance)); } public static Color GetIconFadeColor(Minimap minimap) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) return new Color(0.7f, 0.7f, 0.7f, 0.8f * minimap.m_sharedMapDataFade); } public static string RemoveIconColorTagText(string nameText) { if (nameText.Length >= 9) { Match match = IconColorTagRegex.Match(nameText); if (match.Success) { Group group = match.Groups[1]; return nameText.Remove(group.Index - 1, group.Length + 2); } } return nameText; } public static bool TryProcessIconSpriteTag(PinData pinData) { string name = pinData.m_name; if (name.Length >= 6) { Match match = IconSpriteTagRegex.Match(name); if (match.Success && UIResources.SpriteCache.TryGetResource(match.Groups[1].Value, out var cachedResource)) { pinData.m_iconElement.sprite = cachedResource; return true; } } return false; } public static void ResetIconSprite(PinData pinData) { pinData.m_iconElement.sprite = pinData.m_icon; } public static string RemoveIconSpriteTagText(string nameText) { if (nameText.Length >= 6) { Match match = IconSpriteTagRegex.Match(nameText); if (match.Success) { Group group = match.Groups[1]; return nameText.Remove(group.Index - 2, group.Length + 3); } } return nameText; } public static bool TryProcessIconScaleTag(PinData pinData) { string name = pinData.m_name; if (name.Length >= 4) { Match match = IconScaleTagRegex.Match(name); if (match.Success && int.TryParse(match.Groups[1].Value, out var result)) { float num = (float)Mathf.Clamp(result, 50, 200) * 0.01f * GetIconDefaultSize(Minimap.m_instance); pinData.m_uiElement.SetSizeWithCurrentAnchors((Axis)0, num); pinData.m_uiElement.SetSizeWithCurrentAnchors((Axis)1, num); return true; } } return false; } public static void ResetIconScale(PinData pinData) { RectTransform uiElement = pinData.m_uiElement; float iconDefaultSize = GetIconDefaultSize(Minimap.m_instance); uiElement.SetSizeWithCurrentAnchors((Axis)0, iconDefaultSize); uiElement.SetSizeWithCurrentAnchors((Axis)1, iconDefaultSize); } public static string RemoveIconScaleTagText(string nameText) { if (nameText.Length >= 4) { Match match = IconScaleTagRegex.Match(nameText); if (match.Success) { Group group = match.Groups[1]; return nameText.Remove(group.Index - 1, group.Length + 3); } } return nameText; } public static float GetIconDefaultSize(Minimap minimap) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I4 if ((int)minimap.m_mode != 2) { return minimap.m_pinSizeSmall; } return minimap.m_pinSizeLarge; } } public static class PinImportExport { public enum PinFileFormat { Binary, PlainText } public static void ExportPinsToFile(ConsoleEventArgs args, PinFileFormat exportFormat) { if (Object.op_Implicit((Object)(object)Minimap.m_instance)) { object arg = ((args.Length >= 2) ? args[1] : DateTimeOffset.UtcNow.ToUnixTimeSeconds().ToString()); object arg2 = Minimap.MAPVERSION; string text = string.Format("Pinnacle/{0}.v{1}.{2}", arg, arg2, exportFormat switch { PinFileFormat.Binary => "pins", PinFileFormat.PlainText => "pins.txt", _ => string.Empty, }); Directory.CreateDirectory(Path.GetDirectoryName(text)); IReadOnlyCollection<PinData> readOnlyCollection = FilterPins(Minimap.m_instance.m_pins, (args.Length >= 3) ? args[2] : string.Empty); Pinnacle.LogInfo($"Exporting {readOnlyCollection.Count} pins to file: {text}"); Pinnacle.LogInfo($"Exported {exportFormat switch { PinFileFormat.Binary => ExportPinsToBinaryFile(readOnlyCollection, text), PinFileFormat.PlainText => ExportPinsToTextFile(readOnlyCollection, text), _ => 0, }} pins to file: {text} "); } } private static int ExportPinsToBinaryFile(IReadOnlyCollection<PinData> pins, string filename) { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected I4, but got Unknown using FileStream output = new FileStream(filename, FileMode.CreateNew); using BinaryWriter binaryWriter = new BinaryWriter(output); int num = 0; binaryWriter.Write(pins.Count); foreach (PinData pin in pins) { if (pin.m_save) { binaryWriter.Write(pin.m_name); binaryWriter.Write(pin.m_pos.x); binaryWriter.Write(pin.m_pos.y); binaryWriter.Write(pin.m_pos.z); binaryWriter.Write((int)pin.m_type); binaryWriter.Write(pin.m_checked); binaryWriter.Write(pin.m_ownerID); binaryWriter.Write(((object)(PlatformUserID)(ref pin.m_author)).ToString()); num++; } } return num; } private static int ExportPinsToTextFile(IReadOnlyCollection<PinData> pins, string filename) { //IL_0091: 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) using StreamWriter streamWriter = File.CreateText(filename); int num = 0; foreach (PinData pin in pins) { if (pin.m_save) { streamWriter.Write("\"" + pin.m_name + "\","); streamWriter.Write($"{pin.m_pos.x},{pin.m_pos.y},{pin.m_pos.z},"); streamWriter.Write($"{pin.m_type},{pin.m_checked},{pin.m_ownerID},{pin.m_author}"); streamWriter.WriteLine(); num++; } } return num; } public static void ImportPinsFromBinaryFile(ConsoleEventArgs args) { //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_00e5: 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_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: 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_0140: 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_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)Minimap.m_instance) || args.Length < 2) { return; } string text = "Pinnacle/" + args[1]; if (!File.Exists(text)) { args.Context.AddString("Could not find file: " + text); return; } Dictionary<PinType, Sprite> dictionary = Minimap.m_instance.m_icons.ToDictionary((SpriteData data) => data.m_name, (SpriteData data) => data.m_icon); using FileStream input = new FileStream(text, FileMode.Open); using BinaryReader binaryReader = new BinaryReader(input); int num = binaryReader.ReadInt32(); List<PinData> list = new List<PinData>(num); Pinnacle.LogInfo($"Reading {num} pins from file: {text}"); for (int i = 0; i < num; i++) { PinData val = new PinData { m_name = binaryReader.ReadString(), m_pos = new Vector3 { x = binaryReader.ReadSingle(), y = binaryReader.ReadSingle(), z = binaryReader.ReadSingle() }, m_type = (PinType)binaryReader.ReadInt32(), m_checked = binaryReader.ReadBoolean(), m_ownerID = binaryReader.ReadInt64(), m_author = new PlatformUserID(binaryReader.ReadString()), m_save = true }; dictionary.TryGetValue(val.m_type, out val.m_icon); list.Add(val); } if (args.Length >= 3) { list = FilterPins(list, args[2]); } Pinnacle.LogInfo($"Imported {list.Count} pins from file: {text}"); Minimap.m_instance.m_pins.AddRange(list); } private static List<PinData> FilterPins(IReadOnlyCollection<PinData> pins, string nameRegexPattern) { if (nameRegexPattern.Length > 0) { Pinnacle.LogInfo($"Filtering {pins.Count} pins by pin.name with regex: {nameRegexPattern}"); Regex regex = new Regex(nameRegexPattern, RegexOptions.CultureInvariant, TimeSpan.FromSeconds(1.0)); return pins.Where((PinData pin) => pin.m_save && regex.Match(pin.m_name).Success).ToList(); } return pins.Where((PinData pin) => pin.m_save).ToList(); } } public static class PinMarkerUtils { [CompilerGenerated] private sealed class <GetPinNameLabels>d__3 : IEnumerable<TMP_Text>, IEnumerable, IEnumerator<TMP_Text>, IDisposable, IEnumerator { private int <>1__state; private TMP_Text <>2__current; private int <>l__initialThreadId; private Minimap minimap; public Minimap <>3__minimap; private TMP_Text[] <>7__wrap1; private int <>7__wrap2; TMP_Text IEnumerator<TMP_Text>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GetPinNameLabels>d__3(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>7__wrap1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>7__wrap1 = minimap.m_pinNamePrefab.GetComponentsInChildren<TMP_Text>(true); <>7__wrap2 = 0; goto IL_0075; case 1: <>1__state = -1; <>7__wrap2++; goto IL_0075; case 2: { <>1__state = -1; <>7__wrap2++; break; } IL_0075: if (<>7__wrap2 < <>7__wrap1.Length) { TMP_Text val = <>7__wrap1[<>7__wrap2]; <>2__current = val; <>1__state = 1; return true; } <>7__wrap1 = null; <>7__wrap1 = ((Component)minimap.m_pinNameRootLarge).GetComponentsInChildren<TMP_Text>(true); <>7__wrap2 = 0; break; } if (<>7__wrap2 < <>7__wrap1.Length) { TMP_Text val2 = <>7__wrap1[<>7__wrap2]; <>2__current = val2; <>1__state = 2; return true; } <>7__wrap1 = null; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<TMP_Text> IEnumerable<TMP_Text>.GetEnumerator() { <GetPinNameLabels>d__3 <GetPinNameLabels>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <GetPinNameLabels>d__ = this; } else { <GetPinNameLabels>d__ = new <GetPinNameLabels>d__3(0); } <GetPinNameLabels>d__.minimap = <>3__minimap; return <GetPinNameLabels>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<TMP_Text>)this).GetEnumerator(); } } public static void SetupPinNamePrefab(Minimap minimap) { TMP_Text componentInChildren = minimap.m_pinNamePrefab.GetComponentInChildren<TMP_Text>(); componentInChildren.enableAutoSizing = false; componentInChildren.richText = true; SetPinNameFont(); SetPinNameFontSize(); } public static void SetPinNameFont() { if (!Object.op_Implicit((Object)(object)Minimap.m_instance)) { return; } TMP_FontAsset fontAssetByName = UIResources.GetFontAssetByName(PluginConfig.PinFont.Value); foreach (TMP_Text pinNameLabel in GetPinNameLabels(Minimap.m_instance)) { pinNameLabel.font = fontAssetByName; } } public static void SetPinNameFontSize() { if (!Object.op_Implicit((Object)(object)Minimap.m_instance)) { return; } float fontSize = PluginConfig.PinFontSize.Value; foreach (TMP_Text pinNameLabel in GetPinNameLabels(Minimap.m_instance)) { pinNameLabel.fontSize = fontSize; } } [IteratorStateMachine(typeof(<GetPinNameLabels>d__3))] private static IEnumerable<TMP_Text> GetPinNameLabels(Minimap minimap) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <GetPinNameLabels>d__3(-2) { <>3__minimap = minimap }; } } public static class PinnacleUtils { public static void CenterMapOnOrTeleportTo(PinData targetPin) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) if (PluginConfig.IsModEnabled.Value && ((Terminal)Console.m_instance).IsCheatsEnabled() && Object.op_Implicit((Object)(object)Player.m_localPlayer) && ZInput.GetKey((KeyCode)304, true)) { TeleportTo(targetPin); return; } PinEditPanelController.TogglePanel(PluginConfig.PinListPanelEditPinOnRowClick.Value ? targetPin : null); CenterMapHelper.CenterMapOnPosition(targetPin.m_pos); } public static void TeleportTo(PinData targetPin) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Invalid comparison between Unknown and I4 //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) Vector3 targetPosition = targetPin.m_pos; if ((int)targetPin.m_type == 10 && !targetPin.m_save && !targetPin.m_checked) { targetPosition = GetPlayerInfoPosition(targetPin); } TeleportTo(targetPosition); } public static Vector3 GetPlayerInfoPosition(PinData targetPin) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) string name = targetPin.m_name; foreach (PlayerInfo player in ZNet.m_instance.m_players) { if (player.m_name == name && player.m_publicPosition) { Pinnacle.LogInfo($"Found PlayerInfo for {player.m_name}: {targetPin.m_pos:F0} -> {player.m_position:F0}"); return player.m_position; } } return targetPin.m_pos; } public static void TeleportTo(Vector3 targetPosition) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: 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_002d: Unknown result type (might be due to invalid IL or missing references) Player localPlayer = Player.m_localPlayer; if (!Object.op_Implicit((Object)(object)localPlayer)) { Pinnacle.LogWarning("No local Player found."); return; } if (Mathf.Approximately(targetPosition.y, 0f)) { targetPosition.y = GetHeight(targetPosition); } Pinnacle.LogInfo($"Teleporting player from {((Component)localPlayer).transform.position:F0} to {targetPosition:F0}."); ((Character)localPlayer).TeleportTo(targetPosition, ((Component)localPlayer).transform.rotation, true); Minimap.m_instance.SetMapMode((MapMode)1); } public static float GetHeight(Vector3 targetPosition) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) float num = default(float); if (!Heightmap.GetHeight(targetPosition, ref num)) { num = GetHeightmapData(targetPosition).m_baseHeights[0]; } return Mathf.Max(0f, num); } public static HMBuildData GetHeightmapData(Vector3 targetPosition) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown HMBuildData val = new HMBuildData(targetPosition, 1, 1f, false, WorldGenerator.m_instance); HeightmapBuilder.m_instance.Build(val); return val; } public static PinData AddNewPin(Minimap minimap, Vector3 targetPosition) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) if (Mathf.Approximately(targetPosition.y, 0f)) { targetPosition.y = GetHeight(targetPosition); } return minimap.AddPin(targetPosition, minimap.m_selectedType, string.Empty, true, false, 0L, default(PlatformUserID)); } } public sealed class LabelButton { public GameObject Container { get; private set; } public RectTransform RectTransform { get; private set; } public TMP_Text Label { get; private set; } public Button Button { get; private set; } public LabelButton(Transform parentTransform) { Container = CreateContainer(parentTransform); RectTransform = Container.GetComponent<RectTransform>(); Label = CreateLabel(Container.transform); Button = CreateButton(Container); } private static GameObject CreateContainer(Transform parentTransform) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown GameObject val = new GameObject("Button", new Type[1] { typeof(RectTransform) }); val.transform.SetParent(parentTransform, false); val.AddComponent<Image>().SetType((Type)1).SetSprite(UIResources.GetSprite("button")) .SetColor(Color.white); val.GetComponent<RectTransform>().SetAnchorMin(new Vector2(0.5f, 0.5f)).SetAnchorMax(new Vector2(0.5f, 0.5f)) .SetPivot(new Vector2(0.5f, 0.5f)) .SetPosition(Vector2.zero) .SetSizeDelta(new Vector2(120f, 45f)); return val; } private static TMP_Text CreateLabel(Transform parentTransform) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) TextMeshProUGUI obj = UIBuilder.CreateTMPLabel(parentTransform); ((TMP_Text)(object)obj).SetFontSize<TMP_Text>(16f).SetAlignment<TMP_Text>((TextAlignmentOptions)514).SetText("Button"); ((TMP_Text)obj).rectTransform.SetAnchorMin(Vector2.zero).SetAnchorMax(Vector2.one).SetPivot(new Vector2(0.5f, 0.5f)) .SetPosition(Vector2.zero) .SetSizeDelta(Vector2.zero); return (TMP_Text)(object)obj; } private static Button CreateButton(GameObject container) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) Button obj = container.AddComponent<Button>(); Button selectable = obj.SetTransition<Button>((Transition)2); SpriteState spriteState = default(SpriteState); ((SpriteState)(ref spriteState)).disabledSprite = UIResources.GetSprite("button_disabled"); ((SpriteState)(ref spriteState)).highlightedSprite = UIResources.GetSprite("button_highlight"); ((SpriteState)(ref spriteState)).pressedSprite = UIResources.GetSprite("button_pressed"); ((SpriteState)(ref spriteState)).selectedSprite = UIResources.GetSprite("button_highlight"); selectable.SetSpriteState<Button>(spriteState); return obj; } } public sealed class LabelCell { public GameObject Cell { get; private set; } public Image Background { get; private set; } public TMP_Text Label { get; private set; } public LabelCell(Transform parentTransform) { Cell = CreateChildCell(parentTransform); Background = Cell.Image(); Label = CreateChildLabel(Cell.transform); } private GameObject CreateChildCell(Transform parentTransform) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Expected O, but got Unknown GameObject val = new GameObject("Cell", new Type[1] { typeof(RectTransform) }); GameObjectExtensions.SetParent(val, parentTransform); val.AddComponent<HorizontalLayoutGroup>().SetChildControl<HorizontalLayoutGroup>((bool?)true, (bool?)true).SetChildForceExpand<HorizontalLayoutGroup>((bool?)false, (bool?)false) .SetPadding<HorizontalLayoutGroup>((int?)4, (int?)4, (int?)4, (int?)4) .SetSpacing<HorizontalLayoutGroup>(4f) .SetChildAlignment<HorizontalLayoutGroup>((TextAnchor)4); val.AddComponent<Image>().SetType((Type)1).SetSprite(UIBuilder.CreateRoundedCornerSprite(64, 64, 8, (FilterMode)1)) .SetColor(new Color(0.2f, 0.2f, 0.2f, 0.5f)); val.AddComponent<ContentSizeFitter>().SetHorizontalFit((FitMode)0).SetVerticalFit((FitMode)2); val.AddComponent<LayoutElement>().SetPreferred(150f, null).SetFlexible(1f); return val; } private TMP_Text CreateChildLabel(Transform parentTransform) { TextMeshProUGUI obj = UIBuilder.CreateTMPLabel(parentTransform); ((TMP_Text)(object)obj).SetName<TMP_Text>("Label"); ((TMP_Text)obj).alignment = (TextAlignmentOptions)513; ((TMP_Text)obj).text = "Label"; ((Component)obj).gameObject.AddComponent<LayoutElement>().SetFlexible(1f); return (TMP_Text)(object)obj; } } public sealed class LabelRow { public GameObject Row { get; private set; } public TMP_Text Label { get; private set; } public LabelRow(Transform parentTransform) { Row = CreateChildRow(parentTransform); Label = CreateChildLabel(Row.transform); } private GameObject CreateChildRow(Transform parentTransform) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown GameObject val = new GameObject("Row", new Type[1] { typeof(RectTransform) }); GameObjectExtensions.SetParent(val, parentTransform); val.AddComponent<HorizontalLayoutGroup>().SetChildControl<HorizontalLayoutGroup>((bool?)true, (bool?)true).SetChildForceExpand<HorizontalLayoutGroup>((bool?)false, (bool?)false) .SetPadding<HorizontalLayoutGroup>((int?)8, (int?)8, (int?)2, (int?)2) .SetSpacing<HorizontalLayoutGroup>(12f) .SetChildAlignment<HorizontalLayoutGroup>((TextAnchor)4); return val; } private TMP_Text CreateChildLabel(Transform parentTransform) { TextMeshProUGUI obj = UIBuilder.CreateTMPLabel(parentTransform); ((TMP_Text)(object)obj).SetName<TMP_Text>("Label"); ((TMP_Text)obj).alignment = (TextAlignmentOptions)513; ((TMP_Text)obj).text = "Label"; ((Component)obj).gameObject.AddComponent<LayoutElement>(); return (TMP_Text)(object)obj; } } public sealed class LabelValueRow { public GameObject Row { get; private set; } public TMP_Text Label { get; private set; } public ValueCell Value { get; private set; } public LabelValueRow(Transform parentTransform) { Row = CreateChildRow(parentTransform); Label = CreateChildLabel(Row.transform); Value = new ValueCell(Row.transform); } private GameObject CreateChildRow(Transform parentTransform) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown GameObject val = new GameObject("Row", new Type[1] { typeof(RectTransform) }); GameObjectExtensions.SetParent(val, parentTransform); val.AddComponent<HorizontalLayoutGroup>().SetChildControl<HorizontalLayoutGroup>((bool?)true, (bool?)true).SetChildForceExpand<HorizontalLayoutGroup>((bool?)false, (bool?)false) .SetPadding<HorizontalLayoutGroup>((int?)8, (int?)8, (int?)2, (int?)2) .SetSpacing<HorizontalLayoutGroup>(12f) .SetChildAlignment<HorizontalLayoutGroup>((TextAnchor)4); return val; } private TMP_Text CreateChildLabel(Transform parentTransform) { TextMeshProUGUI obj = UIBuilder.CreateTMPLabel(parentTransform); ((TMP_Text)(object)obj).SetName<TMP_Text>("Label"); ((TMP_Text)obj).alignment = (TextAlignmentOptions)513; ((TMP_Text)obj).text = "Name"; ((Component)obj).gameObject.AddComponent<LayoutElement>().SetPreferred(75f, null); return (TMP_Text)(object)obj; } } public sealed class ToggleCell { private static readonly Lazy<ColorBlock> ToggleColorBlock = new Lazy<ColorBlock>((Func<ColorBlock>)delegate { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) ColorBlock result = default(ColorBlock); ((ColorBlock)(ref result)).normalColor = new Color(1f, 1f, 1f, 0.9f); ((ColorBlock)(ref result)).highlightedColor = new Color(0.565f, 0.792f, 0.976f); ((ColorBlock)(ref result)).disabledColor = new Color(0.2f, 0.2f, 0.2f, 0.8f); ((ColorBlock)(ref result)).pressedColor = new Color(0.647f, 0.839f, 0.655f); ((ColorBlock)(ref result)).selectedColor = new Color(1f, 0.878f, 0.51f); ((ColorBlock)(ref result)).colorMultiplier = 1f; ((ColorBlock)(ref result)).fadeDuration = 0.25f; return result; }); public GameObject Cell { get; private set; } public TMP_Text Label { get; private set; } public Image Checkbox { get; private set; } public Image Checkmark { get; private set; } public Toggle Toggle { get; private set; } public ToggleCell(Transform parentTransform) { //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) Cell = CreateChildCell(parentTransform); Label = CreateChildLabel(Cell.transform); Checkbox = CreateChildCheckbox(Cell.transform).Image(); Checkmark = CreateChildCheckmark(((Component)Checkbox).transform).Image(); Toggle = Cell.AddComponent<Toggle>(); Toggle.SetTransition<Toggle>((Transition)1).SetNavigationMode<Toggle>((Mode)0).SetTargetGraphic<Toggle>((Graphic)(object)Checkbox) .SetColors<Toggle>(ToggleColorBlock.Value); Toggle.graphic = (Graphic)(object)Checkmark; Toggle.toggleTransition = (ToggleTransition)1; } private GameObject CreateChildCell(Transform parentTransform) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown GameObject val = new GameObject("Cell", new Type[1] { typeof(RectTransform) }); GameObjectExtensions.SetParent(val, parentTransform); val.AddComponent<HorizontalLayoutGroup>().SetChildControl<HorizontalLayoutGroup>((bool?)true, (bool?)true).SetChildForceExpand<HorizontalLayoutGroup>((bool?)false, (bool?)false) .SetPadding<HorizontalLayoutGroup>((int?)8, (int?)8, (int?)4, (int?)4) .SetSpacing<HorizontalLayoutGroup>(8f) .SetChildAlignment<HorizontalLayoutGroup>((TextAnchor)4); val.AddComponent<Image>().SetType((Type)1).SetSprite(UIBuilder.CreateRoundedCornerSprite(64, 64, 8, (FilterMode)1)) .SetColor(new Color(0.5f, 0.5f, 0.5f, 0.5f)); val.AddComponent<Shadow>().SetEffectDistance(new Vector2(2f, -2f)); val.AddComponent<ContentSizeFitter>().SetHorizontalFit((FitMode)2).SetVerticalFit((FitMode)2); return val; } private GameObject CreateChildCheckbox(Transform parentTransform) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown GameObject val = new GameObject("Toggle.Checkbox", new Type[1] { typeof(RectTransform) }); GameObjectExtensions.SetParent(val, parentTransform); val.AddComponent<Image>().SetType((Type)3).SetSprite(UIBuilder.CreateRoundedCornerSprite(64, 64, 10, (FilterMode)1)) .SetColor(new Color(0.5f, 0.5f, 0.5f, 0.9f)) .SetPreserveAspect(preserveAspect: true); val.AddComponent<Shadow>().SetEffectDistance(new Vector2(1f, -1f)); val.AddComponent<GridLayoutGroup>().SetCellSize(new Vector2(12f, 12f)).SetPadding<GridLayoutGroup>((int?)4, (int?)4, (int?)4, (int?)4) .SetConstraint((Constraint)1) .SetConstraintCount(1) .SetStartAxis((Axis)0) .SetStartCorner((Corner)0); val.AddComponent<LayoutElement>().SetPreferred(16f, 16f); return val; } private GameObject CreateChildCheckmark(Transform parentTransform) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown GameObject val = new GameObject("Toggle.Checkmark", new Type[1] { typeof(RectTransform) }); GameObjectExtensions.SetParent(val, parentTransform); val.AddComponent<Image>().SetType((Type)3).SetSprite(UIBuilder.CreateRoundedCornerSprite(64, 64, 6, (FilterMode)1)) .SetColor(new Color(0.565f, 0.792f, 0.976f, 0.9f)) .SetPreserveAspect(preserveAspect: true); val.AddComponent<Shadow>().SetEffectDistance(new Vector2(1f, -1f)); val.AddComponent<LayoutElement>().SetFlexible(1f, 1f); return val; } private TMP_Text CreateChildLabel(Transform parentTransform) { TextMeshProUGUI obj = UIBuilder.CreateTMPLabel(parentTransform); ((TMP_Text)(object)obj).SetName<TMP_Text>("Toggle.Label"); ((TMP_Text)obj).alignment = (TextAlignmentOptions)514; ((TMP_Text)obj).text = "Toggle"; return (TMP_Text)(object)obj; } } public sealed class ValueCell { private static readonly Lazy<ColorBlock> InputFieldColorBlock = new Lazy<ColorBlock>((Func<ColorBlock>)delegate { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) ColorBlock result = default(ColorBlock); ((ColorBlock)(ref result)).normalColor = new Color(1f, 1f, 1f, 0.9f); ((ColorBlock)(ref result)).highlightedColor = new Color(0.565f, 0.792f, 0.976f); ((ColorBlock)(ref result)).disabledColor = new Color(0.2f, 0.2f, 0.2f, 0.8f); ((ColorBlock)(ref result)).pressedColor = new Color(0.647f, 0.839f, 0.655f); ((ColorBlock)(ref result)).selectedColor = new Color(1f, 0.878f, 0.51f); ((ColorBlock)(ref result)).colorMultiplier = 1f; ((ColorBlock)(ref result)).fadeDuration = 0.25f; return result; }); public GameObject Cell { get; private set; } public Image Background { get; private set; } public TMP_InputField InputField { get; private set; } public ValueCell(Transform parentTransform) { Cell = CreateChildCell(parentTransform); Background = Cell.Image(); InputField = CreateChildInputField(Cell.transform); InputField.SetTargetGraphic<TMP_InputField>((Graphic)(object)Background); } private GameObject CreateChildCell(Transform parentTransform) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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_0070: Expected O, but got Unknown GameObject val = new GameObject("Cell", new Type[1] { typeof(RectTransform) }); GameObjectExtensions.SetParent(val, parentTransform); val.AddComponent<Image>().SetType((Type)1).SetSprite(UIBuilder.CreateRoundedCornerSprite(64, 64, 8, (FilterMode)1)) .SetColor(new Color(0.5f, 0.5f, 0.5f, 0.5f)); val.AddComponent<RectMask2D>(); val.AddComponent<LayoutElement>(); return val; } private TMP_InputField CreateChildInputField(Transform parentTransform) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("InputField", new Type[1] { typeof(RectTransform) }); val.SetParent(parentTransform); val.RectTransform().SetAnchorMin(Vector2.zero).SetAnchorMax(Vector2.one) .SetSizeDelta(Vector2.zero) .SetPosition(Vector2.zero); TMP_Text val2 = (TMP_Text)(object)UIBuilder.CreateTMPLabel(val.transform); val2.SetName<TMP_Text>("InputField.Text"); val2.richText = false; val2.alignment = (TextAlignmentOptions)513; val2.text = "InputField.Text"; TMP_InputField obj = ((Component)parentTransform).gameObject.AddComponent<TMP_InputField>(); obj.textComponent = val2; obj.textViewport = val.GetComponent<RectTransform>(); ((Selectable)obj).transition = (Transition)1; ((Selectable)obj).colors = InputFieldColorBlock.Value; obj.onFocusSelectAll = false; obj.SetNavigationMode<TMP_InputField>((Mode)0); return obj; } } public sealed class VectorCell { public GameObject Cell { get; private set; } public TMP_Text XLabel { get; private set; } public ValueCell XValue { get; private set; } public TMP_Text YLabel { get; private set; } public ValueCell YValue { get; private set; } public TMP_Text ZLabel { get; private set; } public ValueCell ZValue { get; private set; } public VectorCell(Transform parentTransform) { //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: 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_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) Cell = CreateChildCell(parentTransform); XValue = new ValueCell(Cell.transform); XLabel = (TMP_Text)(object)UIBuilder.CreateTMPLabel(XValue.Cell.transform); XLabel.transform.SetAsFirstSibling(); XLabel.alignment = (TextAlignmentOptions)513; XLabel.SetText("X"); XValue.InputField.textComponent.alignment = (TextAlignmentOptions)516; XValue.Cell.GetComponent<LayoutElement>().SetFlexible(1f).SetPreferred(XLabel.GetPreferredValues("-99999") + new Vector2(0f, 8f)); YValue = new ValueCell(Cell.transform); YLabel = (TMP_Text)(object)UIBuilder.CreateTMPLabel(YValue.Cell.transform); YLabel.transform.SetAsFirstSibling(); YLabel.alignment = (TextAlignmentOptions)513; YLabel.SetText("Y"); YValue.InputField.textComponent.alignment = (TextAlignmentOptions)516; YValue.Cell.GetComponent<LayoutElement>().SetFlexible(1f).SetPreferred(YLabel.GetPreferredValues("-99999") + new Vector2(0f, 8f)); ZValue = new ValueCell(Cell.transform); ZLabel = (TMP_Text)(object)UIBuilder.CreateTMPLabel(ZValue.Cell.transform); ZLabel.transform.SetAsFirstSibling(); ZLabel.alignment = (TextAlignmentOptions)513; ZLabel.SetText("Z"); ZValue.InputField.textComponent.alignment = (TextAlignmentOptions)516; ZValue.Cell.GetComponent<LayoutElement>().SetFlexible(1f).SetPreferred(ZLabel.GetPreferredValues("-99999") + new Vector2(0f, 8f)); } private GameObject CreateChildCell(Transform parentTransform) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown GameObject val = new GameObject("Cell", new Type[1] { typeof(RectTransform) }); GameObjectExtensions.SetParent(val, parentTransform); val.AddComponent<HorizontalLayoutGroup>().SetChildControl<HorizontalLayoutGroup>((bool?)true, (bool?)true).SetChildForceExpand<HorizontalLayoutGroup>((bool?)false, (bool?)false) .SetSpacing<HorizontalLayoutGroup>(8f) .SetChildAlignment<HorizontalLayoutGroup>((TextAnchor)4); return val; } } public sealed class DisableHighlightOnSelect : MonoBehaviour, ISelectHandler, IEventSystemHandler { [CompilerGenerated] private sealed class <DisableHighlight>d__3 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public DisableHighlightOnSelect <>4__this; private Color <original>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <DisableHighlight>d__3(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; DisableHighlightOnSelect disableHighlightOnSelect = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <original>5__2 = disableHighlightOnSelect._inputField.selectionColor; disableHighlightOnSelect._inputField.selectionColor = Color.clear; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; disableHighlightOnSelect._inputField.MoveTextEnd(false); disableHighlightOnSelect._inputField.selectionColor = <original>5__2; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private InputField _inputField; private void Start() { _inputField = ((Component)this).GetComponent<InputField>(); } public void OnSelect(BaseEventData eventData) { ((MonoBehaviour)this).StartCoroutine(DisableHighlight()); } [IteratorStateMachine(typeof(<DisableHighlight>d__3))] private IEnumerator DisableHighlight() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <DisableHighlight>d__3(0) { <>4__this = this }; } } public sealed class PanelDragger : MonoBehaviour, IBeginDragHandler, IEventSystemHandler, IDragHandler, IEndDragHandler { private Vector2 _lastMousePosition; public RectTransform TargetRectTransform; public event EventHandler<Vector3> OnPanelEndDrag; public void OnBeginDrag(PointerEventData eventData) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) _lastMousePosition = eventData.position; } public void OnDrag(PointerEventData eventData) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) Vector2 val = eventData.position - _lastMousePosition; if (Object.op_Implicit((Object)(object)TargetRectTransform)) { RectTransform targetRectTransform = TargetRectTransform; ((Transform)targetRectTransform).position = ((Transform)targetRectTransform).position + new Vector3(val.x, val.y, ((Transform)TargetRectTransform).position.z); } _lastMousePosition = eventData.position; } public void OnEndDrag(PointerEventData eventData) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)TargetRectTransform)) { this.OnPanelEndDrag?.Invoke(this, Vector2.op_Implicit(TargetRectTransform.anchoredPosition)); } } } public sealed class PanelResizer : MonoBehaviour, IPointerEnterHandler, IEventSystemHandler, IPointerExitHandler, IBeginDragHandler, IDragHandler, IEndDragHandler { [CompilerGenerated] private sealed class <LerpCanvasGroupAlpha>d__10 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public PanelResizer <>4__this; public float lerpDuration; public float targetAlpha; private float <timeElapsed>5__2; private float <sourceAlpha>5__3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <LerpCanvasGroupAlpha>d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { int num = <>1__state; PanelResizer panelResizer = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <timeElapsed>5__2 = 0f; <sourceAlpha>5__3 = panelResizer._canvasGroup.alpha; break; case 1: <>1__state = -1; break; } if (<timeElapsed>5__2 < lerpDuration) { float num2 = <timeElapsed>5__2 / lerpDuration; num2 = num2 * num2 * (3f - 2f * num2); panelResizer._canvasGroup.SetAlpha(Mathf.Lerp(<sourceAlpha>5__3, targetAlpha, num2)); <timeElapsed>5__2 += Time.deltaTime; <>2__current = null; <>1__state = 1; return true; } panelResizer._canvasGroup.SetAlpha(targetAlpha); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private CanvasGroup _canvasGroup; private float _targetAlpha; private Vector2 _lastMousePosition; private Coroutine _lerpAlphaCoroutine; public RectTransform TargetRectTransform; public event EventHandler<Vector2> OnPanelEndResize; private void Awake() { _canvasGroup = ((Component)this).GetComponent<CanvasGroup>(); } private void SetCanvasGroupAlpha(float alpha) { if (_lerpAlphaCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(_lerpAlphaCoroutine); _lerpAlphaCoroutine = null; } if (_canvasGroup.alpha != alpha) { _lerpAlphaCoroutine = ((MonoBehaviour)this).StartCoroutine(LerpCanvasGroupAlpha(alpha, 0.25f)); } } [IteratorStateMachine(typeof(<LerpCanvasGroupAlpha>d__10))] private IEnumerator LerpCanvasGroupAlpha(float targetAlpha, float lerpDuration) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <LerpCanvasGroupAlpha>d__10(0) { <>4__this = this, targetAlpha = targetAlpha, lerpDuration = lerpDuration }; } public void OnPointerEnter(PointerEventData eventData) { _targetAlpha = 1f; SetCanvasGroupAlpha(_targetAlpha); } public void OnPointerExit(PointerEventData eventData) { _targetAlpha = 0f; if (!eventData.dragging) { SetCanvasGroupAlpha(_targetAlpha); } } public void OnBeginDrag(PointerEventData eventData) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) SetCanvasGroupAlpha(1f); _lastMousePosition = eventData.position; } public void OnDrag(PointerEventData eventData) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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) Vector2 val = _lastMousePosition - eventData.position; if (Object.op_Implicit((Object)(object)TargetRectTransform)) { RectTransform targetRectTransform = TargetRectTransform; targetRectTransform.anchoredPosition += new Vector2(0f, -0.5f * val.y); RectTransform targetRectTransform2 = TargetRectTransform; targetRectTransform2.sizeDelta += new Vector2(-1f * val.x, val.y); } SetCanvasGroupAlpha(1f); _lastMousePosition = eventData.position; } public void OnEndDrag(PointerEventData eventData) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) SetCanvasGroupAlpha(_targetAlpha); this.OnPanelEndResize?.Invoke(this, TargetRectTransform.sizeDelta); } } public sealed class ParentSizeFitter : MonoBehaviour { private RectTransform _parentRectTransform; private RectTransform _rectTransform; private void Awake() { _parentRectTransform = ((Component)((Component)this).transform.parent).GetComponent<RectTransform>(); _rectTransform = ((Component)this).GetComponent<RectTransform>(); } private void OnRectTransformDimensionsChange() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)_parentRectTransform)) { _parentRectTransform = ((Component)((Component)this).transform.parent).GetComponent<RectTransform>(); } if (!Object.op_Implicit((Object)(object)_rectTransform)) { _rectTransform = ((Component)this).GetComponent<RectTransform>(); } if (Object.op_Implicit((Object)(object)_rectTransform) && Object.op_Implicit((Object)(object)_parentRectTransform)) { _rectTransform.SetSizeWithCurrentAnchors((Axis)0, _parentRectTransform.sizeDelta.x); } } } public sealed class PointerState : MonoBehaviour, IPointerEnterHandler, IEventSystemHandler, IPointerExitHandler { public bool IsPointerHovered { get; private set; } public void OnPointerEnter(PointerEventData eventData) { IsPointerHovered = true; } public void OnPointerExit(PointerEventData eventData) { IsPointerHovered = false; } } public sealed class PinEditPanel { [CompilerGenerated] private sealed class <LerpCanvasGroupAlpha>d__51 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public CanvasGroup canvasGroup; public float targetAlpha; public float lerpDuration; private float <timeElapsed>5__2; private float <sourceAlpha>5__3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <LerpCanvasGroupAlpha>d__51(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <timeElapsed>5__2 = 0f; <sourceAlpha>5__3 = canvasGroup.alpha; canvasGroup.SetBlocksRaycasts(targetAlpha > 0f); break; case 1: <>1__state = -1; break; } if (<timeElapsed>5__2 < lerpDuration) { float num = <timeElapsed>5__2 / lerpDuration; num = num * num * (3f - 2f * num); canvasGroup.SetAlpha(Mathf.Lerp(<sourceAlpha>5__3, targetAlpha, num)); <timeElapsed>5__2 += Time.deltaTime; <>2__current = null; <>1__state = 1; return true; } canvasGroup.SetAlpha(targetAlpha); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public const long DefaultSharedPinOwnerId = long.MaxValue; private readonly List<TMP_Text> Labels = new List<TMP_Text>(); private readonly List<GameObject> ValueCells = new List<GameObject>(); private readonly List<GameObject> Selectables = new List<GameObject>(); private Coroutine _setActiveCoroutine; public GameObject Panel { get; private set; } public RectTransform RectTransform { get; private set; } public LabelValueRow PinName { get; private set; } public LabelRow PinIconSelectorLabelRow { get; private set; } public PinIconSelector PinIconSelector { get; private set; } public LabelValueRow PinType { get; private set; } public LabelRow PinModifierRow { get; private set; } public ToggleCell PinChecked { get; private set; } public ToggleCell PinShared { get; private set; } public LabelRow PinPositionLabelRow { get; private set; } public VectorCell PinPosition { get; private set; } public PinData TargetPin { get; private set; } public PinEditPanel(Transform parentTransform) { //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) Panel = CreatePanel(parentTransform); RectTransform = Panel.GetComponent<RectTransform>(); PinName = new LabelValueRow(Panel.transform); PinName.Label.SetText("Name"); LayoutElement layoutElement = PinName.Value.Cell.LayoutElement().SetFlexible(1f); float? height = PinName.Value.InputField.preferredHeight + 8f; layoutElement.SetPreferred(null, height); ((UnityEvent<string>)(object)PinName.Value.InputField.onEndEdit).AddListener((UnityAction<string>)OnPinNameValueChange); PinIconSelectorLabelRow = new LabelRow(Panel.transform); PinIconSelectorLabelRow.Label.alignment = (TextAlignmentOptions)257; PinIconSelectorLabelRow.Label.text = "Icon"; PinIconSelector = new PinIconSelector(PinIconSelectorLabelRow.Row.transform); PinIconSelector.OnPinIconClicked += delegate(object _, PinType pinType) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) OnPinTypeValueChange(pinType); }; PinType = new LabelValueRow(Panel.transform); PinType.Label.SetText("Type"); PinType.Value.InputField.SetInteractable<TMP_InputField>(interactable: false); PinModifierRow = new LabelRow(Panel.transform); PinModifierRow.Label.SetText("Modifier"); PinChecked = new ToggleCell(PinModifierRow.Row.transform); PinChecked.Label.SetText("Checked"); ((UnityEvent<bool>)(object)PinChecked.Toggle.onValueChanged).AddListener((UnityAction<bool>)OnPinCheckedChange); PinShared = new ToggleCell(PinModifierRow.Row.transform); PinShared.Label.SetText("Shared"); ((UnityEvent<bool>)(object)PinShared.Toggle.onValueChanged).AddListener((UnityAction<bool>)OnPinSharedChange); PinPositionLabelRow = new LabelRow(Panel.transform); PinPositionLabelRow.Label.SetText("Position"); PinPosition = new VectorCell(PinPositionLabelRow.Row.transform); ((Graphic)PinPosition.XValue.InputField.textComponent).color = new Color(1f, 0.878f, 0.51f); PinPosition.XValue.InputField.contentType = (ContentType)3; PinPosition.XValue.InputField.characterValidation = (CharacterValidation)3; ((UnityEvent<string>)(object)PinPosition.XValue.InputField.onEndEdit).AddListener((UnityAction<string>)delegate { OnPinPositionValueChange(); }); ((Graphic)PinPosition.YValue.InputField.textComponent).color = new Color(0.565f, 0.792f, 0.976f); PinPosition.YValue.InputField.contentType = (ContentType)3; PinPosition.YValue.InputField.characterValidation = (CharacterValidation)3; ((UnityEvent<string>)(object)PinPosition.YValue.InputField.onEndEdit).AddListener((UnityAction<string>)delegate { OnPinPositionValueChange(); }); ((Graphic)PinPosition.ZValue.InputField.textComponent).color = new Color(0.647f, 0.839f, 0.655f); PinPosition.ZValue.InputField.contentType = (ContentType)3; PinPosition.ZValue.InputField.characterValidation = (CharacterValidation)3; ((UnityEvent<string>)(object)PinPosition.ZValue.InputField.onEndEdit).AddListener((UnityAction<string>)delegate { OnPinPositionValueChange(); }); Selectables.AddRange(from s in Panel.GetComponentsInChildren<Selectable>() select ((Component)s).gameObject); Labels.Add(PinName.Label); Labels.Add(PinIconSelectorLabelRow.Label); Labels.Add(PinType.Label); Labels.Add(PinModifierRow.Label); Labels.Add(PinPositionLabelRow.Label); ValueCells.Add(PinName.Value.Cell); ValueCells.Add(PinType.Value.Cell); SetPanelStyle(); } public void SetActive(bool toggle) { if (_setActiveCoroutine != null) { ((MonoBehaviour)Minimap.m_instance).StopCoroutine(_setActiveCoroutine); } _setActiveCoroutine = ((MonoBehaviour)Minimap.m_instance).StartCoroutine(LerpCanvasGroupAlpha(Panel.GetComponent<CanvasGroup>(), toggle ? 1f : 0f, PluginConfig.PinEditPanelToggleLerpDuration.Value)); } [IteratorStateMachine(typeof(<LerpCanvasGroupAlpha>d__51))] private static IEnumerator LerpCanvasGroupAlpha(CanvasGroup canvasGroup, float targetAlpha, float lerpDuration) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <LerpCanvasGroupAlpha>d__51(0) { canvasGroup = canvasGroup, targetAlpha = targetAlpha, lerpDuration = lerpDuration }; } public void SetPanelStyle() { float labelWidth = Labels.Select((TMP_Text label) => label.preferredWidth).Max(); Labels.ForEach(delegate(TMP_Text l) { ((Component)l).GetComponent<LayoutElement>().SetPreferred(labelWidth, null); }); ValueCells.ForEach(delegate(GameObject cell) { cell.GetComponent<LayoutElement>().SetPreferred(200f, null); }); } public bool HasFocus() { GameObject selected = EventSystem.current.currentSelectedGameObject; if (Object.op_Implicit((Object)(object)selected) && Selectables.Any((GameObject s) => (Object)(object)s == (Object)(object)selected)) { InputField val = default(InputField); if (selected.TryGetComponent<InputField>(ref val) && !val.isFocused) { return ZInput.GetKeyDown((KeyCode)13, true); } return true; } return false; } public void SetTargetPin(PinData pin) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) TargetPin = pin; if (pin != null) { PinName.Value.InputField.SetTextWithoutNotify(pin.m_name); PinIconSelector.UpdateIcons(pin.m_type); PinType.Value.InputField.text = ((object)(PinType)(ref pin.m_type)).ToString(); PinChecked.Toggle.SetIsOnWithoutNotify(pin.m_checked); PinShared.Toggle.SetIsOnWithoutNotify(pin.m_ownerID != 0); PinPosition.XValue.InputField.text = $"{pin.m_pos.x:F0}"; PinPosition.YValue.InputField.text = $"{pin.m_pos.y:F0}"; PinPosition.ZValue.InputField.text = $"{pin.m_pos.z:F0}"; } } public void ActivatePinNameInputField() { PinName.Value.InputField.ActivateInputField(); } private void OnPinNameValueChange(string name) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown if (TargetPin != null) { TargetPin.m_name = name; if (TargetPin.m_NamePinData == null) { TargetPin.m_NamePinData = new PinNameData(TargetPin); Minimap.m_instance.CreateMapNamePin(TargetPin, Minimap.m_instance.m_pinNameRootLarge); } TargetPin.m_NamePinData.PinNameText.SetText(name); PinIconManager.ProcessIconTagsModified(TargetPin); } } private void OnPinTypeValueChange(PinType pinType) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) Minimap.m_instance.m_selectedType = pinType; if (TargetPin != null) { TargetPin.m_type = pinType; TargetPin.m_icon = Minimap.m_instance.GetSprite(pinType); TargetPin.m_iconElement.SetSprite(TargetPin.m_icon); PinIconSelector.UpdateIcons(pinType); PinType.Value.InputField.text = ((object)(PinType)(ref pinType)).ToString(); } } private void OnPinCheckedChange(bool pinChecked) { if (TargetPin != null) { TargetPin.m_checked = pinChecked; TargetPin.m_checkedElement.SetActive(pinChecked); } } private void OnPinSharedChange(bool pinShared) { if (TargetPin != null) { TargetPin.m_ownerID = ((TargetPin.m_ownerID == 0L) ? long.MaxValue : 0); } } private void OnPinPositionValueChange() { //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_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) if (TargetPin == null) { return; } if (!float.TryParse(PinPosition.XValue.InputField.text, out var result) || !float.TryParse(PinPosition.YValue.InputField.text, out var result2) || !float.TryParse(PinPosition.ZValue.InputField.text, out var result3)) { PinPosition.XValue.InputField.text = $"{TargetPin.m_pos.x:F0}"; PinPosition.YValue.InputField.text = $"{TargetPin.m_pos.y:F0}"; PinPosition.ZValue.InputField.text = $"{TargetPin.m_pos.z:F0}"; return; } TargetPin.m_pos = new Vector3(result, result2, result3); Vector2 mapImagePosition = GetMapImagePosition(TargetPin.m_pos); TargetPin.m_uiElement.SetPosition(mapImagePosition); PinNameData namePinData = TargetPin.m_NamePinData; if (namePinData != null) { namePinData.PinNameRectTransform.SetPosition(mapImagePosition); } CenterMapHelper.CenterMapOnPosition(TargetPin.m_pos); } private static Vector2 GetMapImagePosition(Vector3 mapPosition) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) float num = default(float); float num2 = default(float); Minimap.m_instance.WorldToMapPoint(mapPosition, ref num, ref num2); return Minimap.m_instance.MapPointToLocalGuiPos(num, num2, Minimap.m_instance.m_mapImageLarge); } private GameObject CreatePanel(Transform parentTransform) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown GameObject val = new GameObject("Panel", new Type[1] { typeof(RectTransform) }); GameObjectExtensions.SetParent(val, parentTransform); val.AddComponent<VerticalLayoutGroup>().SetChildControl<VerticalLayoutGroup>((bool?)true, (bool?)true).SetChildForceExpand<VerticalLayoutGroup>((bool?)false, (bool?)false) .SetPadding<VerticalLayoutGroup>((int?)2, (int?)2, (int?)8, (int?)8) .SetSpacing<VerticalLayoutGroup>(4f); val.AddComponent<ContentSizeFitter>().SetHorizontalFit((FitMode)2).SetVerticalFit((FitMode)2); val.AddComponent<Image>().SetType((Type)1).SetSprite(UIBuilder.CreateSuperellipse(200, 200, 10f)) .SetColor(new Color(0f, 0f, 0f, 0.9f)); val.AddComponent<CanvasGroup>().SetBlocksRaycasts(blocksRaycasts: true); return val; } } public sealed class PinFilterPanel { public GameObject Panel { get; private set; } public RectTransform RectTransform { get; private set; } public PanelDragger PanelDragger { get; private set; } public PinIconSelector PinIconSelector { get; private set; } public PinFilterPanel(Transform parentTransform) { Panel = CreateChildPanel(parentTransform); RectTransform = Panel.GetComponent<RectTransform>(); PanelDragger = CreateChildPanelDragger(Panel.transform).AddComponent<PanelDragger>(); PanelDragger.TargetRectTransform = RectTransform; PinIconSelector = new PinIconSelector(Panel.transform); PinIconSelector.GridLayoutGroup.SetConstraint((Constraint)1).SetConstraintCount(2).SetStartAxis((Axis)1); PinIconSelector.OnPinIconClicked += ProcessOnPinIconClicked; SetPanelStyle(); } private void ProcessOnPinIconClicked(object sender, PinType pinType) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) Minimap obj = Minimap.m_instance.Ref<Minimap>(); if (obj != null) { obj.ToggleIconFilter(pinType); } } public void SetPanelStyle() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) PinIconSelector.GridLayoutGroup.SetCellSize(new Vector2(PluginConfig.PinFilterPanelGridIconSize.Value, PluginConfig.PinFilterPanelGridIconSize.Value)); } public void UpdatePinIconFilters() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) foreach (PinType key in PinIconSelector.IconsByType.Keys) { PinIconSelector.IconsByType[key].Image().Ref<Image>()?.SetColor(Minimap.m_instance.m_visibleIconTypes[key] ? Color.white : Color.gray); } } private GameObject CreateChildPanel(Transform parentTransform) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown GameObject val = new GameObject("PinFilter.Panel", new Type[1] { typeof(RectTransform) }); GameObjectExtensions.SetParent(val, parentTransform); val.AddComponent<Vert