Please disclose if your mod was created primarily using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Pinnacle v1.16.0
Pinnacle.dll
Decompiled a month 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 GUIFramework; 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.16.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.16.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.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [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<float> PinListPanelScrollRectScrollSensitivity { get; private set; } public static ConfigEntry<bool> PinListPanelEditPinOnRowClick { get; private set; } public static ConfigEntry<Vector2> PinEditPanelDefaultPosition { 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 ConfigEntry<string> QuickMapPinDefaultName { get; private set; } public static ConfigEntry<PinType> QuickMapPinDefaultPinType { get; private set; } public static ConfigEntry<KeyboardShortcut> QuickMapPinShortcut { 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>(PinnacleUtils.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); BindQuickMapPinConfig(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); PinListPanelScrollRectScrollSensitivity = config.BindInOrder("PinListPanel.ScrollRect", "scrollSensitivity", 3600f, "PinListPanel scroll-sensitivity when using the mouse-wheel.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 7200f)); PinListPanelScrollRectScrollSensitivity.OnSettingChanged<float>(PinListPanelController.SetScrollRectScrollSensitivity); 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) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) PinEditPanelDefaultPosition = config.BindInOrder<Vector2>("PinEditPanel", "pinEditPanelDefaultPosition", new Vector2(0f, 25f), "PinEditPanel position, relative to the bottom-center of the Minimap."); PinEditPanelToggleLerpDuration = config.BindInOrder("PinEditPanel.Toggle", "pinEditPanelToggleLerpDuration", 0.25f, "Duration (in seconds) for the PinEditPanel.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."); } private static void BindQuickMapPinConfig(ConfigFile config) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) QuickMapPinDefaultName = config.BindInOrder("QuickMapPin", "quickMapPinDefaultName", "QuickPin", "Default pin-name to use for a quick-map-pin."); QuickMapPinDefaultPinType = config.BindInOrder<PinType>("QuickMapPin", "quickMapPinDefaultPinType", (PinType)3, "Default pin-type to use for a quick-map-pin."); QuickMapPinShortcut = config.BindInOrder<KeyboardShortcut>("QuickMapPin", "quickMapPinShortcut", new KeyboardShortcut((KeyCode)0, Array.Empty<KeyCode>()), "Shortcut to add a quick-map-pin at current position with the Minimap is open."); } } 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 AddMapPinCommand { [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("add-map-pin", "(Pinnacle) add-map-pin [--position=<x,y,z>] [--pin-name=<string>] [--pin-type=<enum>] [--log]", (ConsoleEventFailable)obj, false, false, false, false, false, (ConsoleOptionsFetcher)null, false, false, false); } public static object Run(ConsoleEventArgs args) { return Run(new ComfyArgs(args)); } public static bool Run(ComfyArgs args) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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_00ab: 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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00de: 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) Minimap instance = Minimap.m_instance; Player localPlayer = Player.m_localPlayer; if (!Object.op_Implicit((Object)(object)instance) || !Object.op_Implicit((Object)(object)localPlayer)) { return false; } Vector3 value = ((Component)localPlayer).transform.position; if (args.TryGetValue("position", "pos", out var argValue) && !argValue.TryParseVector3(out value)) { Pinnacle.LogWarning("Unable to parse --position: " + argValue); return false; } if (!args.TryGetValue("pin-name", "name", out var argValue2)) { argValue2 = string.Empty; } PinType value2 = (PinType)3; if (args.TryGetValue("pin-type", "type", out var argValue3) && !argValue3.TryParseValue<PinType>(out value2)) { Pinnacle.LogWarning("Unable to parse --pin-type: " + argValue3); return false; } PinData val = instance.AddPin(value, value2, argValue2, true, false, 0L, default(PlatformUserID)); if (args.TryGetValue("log", out bool argValue4) && argValue4) { Pinnacle.LogInfo($"Added new pin... Position: {val.m_pos:F0}, Type: {value2:F}, Name: {argValue2}"); } return true; } } 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) //IL_00c6: 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); return; } CenterMapHelper.CenterMapOnPosition(pinToEdit.m_pos); PinEditPanel.RectTransform.SetPosition(PluginConfig.PinEditPanelDefaultPosition.Value); 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.RectTransform.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.Background).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.RectTransform.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.RectTransform.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; } } public static void SetScrollRectScrollSensitivity(float scrollSensitivity) { if (IsPanelValid()) { PinListPanel.ScrollRect.scrollSensitivity = scrollSensitivity; } } 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 TogglePinnacle(bool toggleOn) { PinEditPanelController.TogglePanel(); PinListPanelController.TogglePanel(toggleOn: false); PinFilterPanelController.TogglePanel(toggleOn); ToggleVanillaIconPanels(!toggleOn); } public static void ToggleVanillaIconPanels(bool toggleOn) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)Minimap.m_instance) || !Object.op_Implicit((Object)(object)Minimap.m_instance.m_largeRoot)) { return; } foreach (Transform item in Minimap.m_instance.m_largeRoot.transform) { Transform val = item; if (((Object)val).name.StartsWith("IconPanel", StringComparison.InvariantCulture)) { ((Component)val).gameObject.SetActive(toggleOn); } } } 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 static PinData AddQuickMapPin(Minimap minimap, Vector3 targetPosition) { //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_001c: 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) return minimap.AddPin(targetPosition, PluginConfig.QuickMapPinDefaultPinType.Value, PluginConfig.QuickMapPinDefaultName.Value, true, false, 0L, default(PlatformUserID)); } } public sealed class LabelButton { public GameObject Container { get; private set; } public RectTransform RectTransform { get; private set; } public TextMeshProUGUI 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 TextMeshProUGUI 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)obj.SetFontSize<TextMeshProUGUI>(16f).SetAlignment<TextMeshProUGUI>((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 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 Container { get; private set; } public RectTransform RectTransform { get; private set; } public Image Background { get; private set; } public TextMeshProUGUI Label { get; private set; } public LabelCell(Transform parentTransform) { Container = CreateContainer(parentTransform); RectTransform = Container.GetComponent<RectTransform>(); Background = Container.GetComponent<Image>(); Label = CreateLabel(Container.transform); } 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_0080: 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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Expected O, but got Unknown GameObject val = new GameObject("Container", new Type[1] { typeof(RectTransform) }); val.transform.SetParent(parentTransform, false); 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(UISpriteBuilder.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 static TextMeshProUGUI CreateLabel(Transform parentTransform) { TextMeshProUGUI obj = UIBuilder.CreateTMPLabel(parentTransform); ((TMP_Text)obj.SetName<TextMeshProUGUI>("Label").SetAlignment<TextMeshProUGUI>((TextAlignmentOptions)513)).SetText("Label"); ((Component)obj).gameObject.AddComponent<LayoutElement>().SetFlexible(1f); return obj; } } public sealed class LabelRow { public GameObject Row { get; private set; } public RectTransform RectTransform { get; private set; } public TextMeshProUGUI Label { get; private set; } public LabelRow(Transform parentTransform) { Row = CreateRow(parentTransform); RectTransform = Row.GetComponent<RectTransform>(); Label = CreateLabel(Row.transform); } private static GameObject CreateRow(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_0081: Expected O, but got Unknown GameObject val = new GameObject("Row", new Type[1] { typeof(RectTransform) }); val.transform.SetParent(parentTransform, false); 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 static TextMeshProUGUI CreateLabel(Transform parentTransform) { TextMeshProUGUI obj = UIBuilder.CreateTMPLabel(parentTransform); ((TMP_Text)obj.SetName<TextMeshProUGUI>("Label").SetAlignment<TextMeshProUGUI>((TextAlignmentOptions)513)).SetText("Label"); ((Component)obj).gameObject.AddComponent<LayoutElement>(); return obj; } } public sealed class LabelValueRow { public GameObject Row { get; private set; } public RectTransform RectTransform { get; private set; } public TextMeshProUGUI Label { get; private set; } public ValueCell Value { get; private set; } public LabelValueRow(Transform parentTransform) { Row = CreateRow(parentTransform); RectTransform = Row.GetComponent<RectTransform>(); Label = CreateLabel(Row.transform); Value = new ValueCell(Row.transform); } private static GameObject CreateRow(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_0081: Expected O, but got Unknown GameObject val = new GameObject("Row", new Type[1] { typeof(RectTransform) }); val.transform.SetParent(parentTransform, false); 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 static TextMeshProUGUI CreateLabel(Transform parentTransform) { TextMeshProUGUI obj = UIBuilder.CreateTMPLabel(parentTransform); ((TMP_Text)obj.SetName<TextMeshProUGUI>("Label").SetAlignment<TextMeshProUGUI>((TextAlignmentOptions)513)).SetText("Label"); ((Component)obj).gameObject.AddComponent<LayoutElement>().SetPreferred(75f, null); return 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 Container { get; private set; } public RectTransform RectTransform { get; private set; } public TextMeshProUGUI 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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) Container = CreateContainer(parentTransform); RectTransform = Container.GetComponent<RectTransform>(); Label = CreateLabel(Container.transform); Checkbox = CreateCheckbox(Container.transform).Image(); Checkmark = CreateCheckmark(((Component)Checkbox).transform).Image(); Toggle = Container.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 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_0080: 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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown GameObject val = new GameObject("Toggle", new Type[1] { typeof(RectTransform) }); val.transform.SetParent(parentTransform, false); 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(UISpriteBuilder.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 static GameObject CreateCheckbox(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("Checkbox", new Type[1] { typeof(RectTransform) }); GameObjectExtensions.SetParent(val, parentTransform); val.AddComponent<Image>().SetType((Type)3).SetSprite(UISpriteBuilder.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 static GameObject CreateCheckmark(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("Checkmark", new Type[1] { typeof(RectTransform) }); GameObjectExtensions.SetParent(val, parentTransform); val.AddComponent<Image>().SetType((Type)3).SetSprite(UISpriteBuilder.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 static TextMeshProUGUI CreateLabel(Transform parentTransform) { TextMeshProUGUI obj = UIBuilder.CreateTMPLabel(parentTransform); ((TMP_Text)obj.SetName<TextMeshProUGUI>("Label").SetAlignment<TextMeshProUGUI>((TextAlignmentOptions)514)).SetText("Toggle"); return 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 Container { get; private set; } public RectTransform RectTransform { get; private set; } public LayoutElement LayoutElement { get; private set; } public Image Background { get; private set; } public TMP_InputField InputField { get; private set; } public ValueCell(Transform parentTransform) { Container = CreateContainer(parentTransform); RectTransform = Container.GetComponent<RectTransform>(); LayoutElement = Container.GetComponent<LayoutElement>(); Background = Container.GetComponent<Image>(); InputField = CreateValueInputField(Container.transform); InputField.SetTargetGraphic<TMP_InputField>((Graphic)(object)Background); } 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_005a: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown GameObject val = new GameObject("Value", new Type[1] { typeof(RectTransform) }); val.transform.SetParent(parentTransform, false); val.AddComponent<Image>().SetType((Type)1).SetSprite(UISpriteBuilder.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 CreateValueInputField(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_00c1: 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.GetComponent<RectTransform>().SetAnchorMin(Vector2.zero).SetAnchorMax(Vector2.one) .SetSizeDelta(Vector2.zero) .SetPosition(Vector2.zero); TextMeshProUGUI val2 = UIBuilder.CreateTMPLabel(val.transform); ((TMP_Text)val2.SetName<TextMeshProUGUI>("Label").SetRichText<TextMeshProUGUI>(richText: false).SetAlignment<TextMeshProUGUI>((TextAlignmentOptions)513)).SetText("Label"); TMP_InputField obj = ((Component)parentTransform).gameObject.AddComponent<TMP_InputField>(); obj.SetTextComponent<TMP_InputField>((TMP_Text)(object)val2).SetTextViewport<TMP_InputField>(val.GetComponent<RectTransform>()).SetOnFocusSelectAll<TMP_InputField>(onFocusSelectAll: false) .SetDoubleClickDelay<TMP_InputField>(0.2f); obj.SetTransition<TMP_InputField>((Transition)1).SetColors<TMP_InputField>(InputFieldColorBlock.Value).SetNavigationMode<TMP_InputField>((Mode)0); return obj; } } public sealed class VectorCell { public GameObject Container { get; private set; } public RectTransform RectTransform { get; private set; } public TextMeshProUGUI XLabel { get; private set; } public ValueCell XValue { get; private set; } public TextMeshProUGUI YLabel { get; private set; } public ValueCell YValue { get; private set; } public TextMeshProUGUI ZLabel { get; private set; } public ValueCell ZValue { get; private set; } public VectorCell(Transform parentTransform) { //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: 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_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) Container = CreateContainer(parentTransform); RectTransform = Container.GetComponent<RectTransform>(); XValue = new ValueCell(Container.transform); XLabel = UIBuilder.CreateTMPLabel(XValue.Container.transform); ((TMP_Text)XLabel).transform.SetAsFirstSibling(); ((TMP_Text)XLabel).alignment = (TextAlignmentOptions)513; ((TMP_Text)XLabel).SetText("X"); XValue.InputField.textComponent.alignment = (TextAlignmentOptions)516; XValue.Container.GetComponent<LayoutElement>().SetFlexible(1f).SetPreferred(((TMP_Text)XLabel).GetPreferredValues("-99999") + new Vector2(0f, 8f)); YValue = new ValueCell(Container.transform); YLabel = UIBuilder.CreateTMPLabel(YValue.Container.transform); ((TMP_Text)YLabel).transform.SetAsFirstSibling(); ((TMP_Text)YLabel).alignment = (TextAlignmentOptions)513; ((TMP_Text)YLabel).SetText("Y"); YValue.InputField.textComponent.alignment = (TextAlignmentOptions)516; YValue.Container.GetComponent<LayoutElement>().SetFlexible(1f).SetPreferred(((TMP_Text)YLabel).GetPreferredValues("-99999") + new Vector2(0f, 8f)); ZValue = new ValueCell(Container.transform); ZLabel = UIBuilder.CreateTMPLabel(ZValue.Container.transform); ((TMP_Text)ZLabel).transform.SetAsFirstSibling(); ((TMP_Text)ZLabel).alignment = (TextAlignmentOptions)513; ((TMP_Text)ZLabel).SetText("Z"); ZValue.InputField.textComponent.alignment = (TextAlignmentOptions)516; ZValue.Container.GetComponent<LayoutElement>().SetFlexible(1f).SetPreferred(((TMP_Text)ZLabel).GetPreferredValues("-99999") + new Vector2(0f, 8f)); } 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_0064: Expected O, but got Unknown GameObject val = new GameObject("Vector3", new Type[1] { typeof(RectTransform) }); val.transform.SetParent(parentTransform, false); 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__56 : 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__56(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<TextMeshProUGUI> _rowLabels = new List<TextMeshProUGUI>(); private readonly HashSet<GameObject> _selectables = new HashSet<GameObject>(); private Coroutine _setActiveCoroutine; public GameObject Panel { get; private set; } public RectTransform RectTransform { get; private set; } public CanvasGroup CanvasGroup { get; private set; } public LabelValueRow PinNameRow { get; private set; } public LabelRow PinIconSelectorRow { get; private set; } public PinIconSelector PinIconSelector { get; private set; } public LabelValueRow PinTypeRow { get; private set; } public LabelRow PinModifierRow { get; private set; } public ToggleCell PinCheckedToggle { get; private set; } public ToggleCell PinSharedToggle { get; private set; } public LabelRow PinPositionRow { get; private set; } public VectorCell PinPosition { get; private set; } public PinData TargetPin { get; private set; } public PinEditPanel(Transform parentTransform) { Panel = CreatePanel(parentTransform); RectTransform = Panel.GetComponent<RectTransform>(); CanvasGroup = Panel.GetComponent<CanvasGroup>(); PinNameRow = CreatePinNameRow(Panel.transform); PinIconSelectorRow = CreatePinIconSelectorRow(Panel.transform); PinIconSelector = CreatePinIconSelector(PinIconSelectorRow.Row.transform); PinTypeRow = CreatePinTypeRow(Panel.transform); PinModifierRow = CreatePinModifierRow(Panel.transform); PinCheckedToggle = CreatePinCheckedToggle(PinModifierRow.Row.transform); PinSharedToggle = CreatePinSharedToggle(PinModifierRow.Row.transform); PinPositionRow = CreatePinPositionRow(Panel.transform); PinPosition = CreatePinPosition(PinPositionRow.Row.transform); CacheSelectables(); CacheRowLabels(); SetupPanelStyle(); } private void CacheSelectables() { Selectable[] componentsInChildren = Panel.GetComponentsInChildren<Selectable>(); foreach (Selectable val in componentsInChildren) { _selectables.Add(((Component)val).gameObject); } } private void CacheRowLabels() { _rowLabels.Add(PinNameRow.Label); _rowLabels.Add(PinIconSelectorRow.Label); _rowLabels.Add(PinTypeRow.Label); _rowLabels.Add(PinModifierRow.Label); _rowLabels.Add(PinPositionRow.Label); } public void SetActive(bool toggle) { if (_setActiveCoroutine != null) { ((MonoBehaviour)Minimap.m_instance).StopCoroutine(_setActiveCoroutine); } _setActiveCoroutine = ((MonoBehaviour)Minimap.m_instance).StartCoroutine(LerpCanvasGroupAlpha(CanvasGroup, toggle ? 1f : 0f, PluginConfig.PinEditPanelToggleLerpDuration.Value)); } [IteratorStateMachine(typeof(<LerpCanvasGroupAlpha>d__56))] private static IEnumerator LerpCanvasGroupAlpha(CanvasGroup canvasGroup, float targetAlpha, float lerpDuration) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <LerpCanvasGroupAlpha>d__56(0) { canvasGroup = canvasGroup, targetAlpha = targetAlpha, lerpDuration = lerpDuration }; } public void SetupPanelStyle() { float num = 0f; foreach (TextMeshProUGUI rowLabel in _rowLabels) { if (((TMP_Text)rowLabel).preferredWidth > num) { num = ((TMP_Text)rowLabel).preferredWidth; } } foreach (TextMeshProUGUI rowLabel2 in _rowLabels) { ((TMP_Text)rowLabel2).layoutElement.SetPreferred(num, null); } PinNameRow.Value.LayoutElement.SetPreferred(200f, null); PinTypeRow.Value.LayoutElement.SetPreferred(200f, null); } public bool HasFocus() { GameObject currentSelectedGameObject = EventSystem.current.currentSelectedGameObject; if (Object.op_Implicit((Object)(object)currentSelectedGameObject) && _selectables.Contains(currentSelectedGameObject)) { InputField val = default(InputField); if (currentSelectedGameObject.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) { PinNameRow.Value.InputField.SetTextWithoutNotify(pin.m_name); PinIconSelector.UpdateIcons(pin.m_type); PinTypeRow.Value.InputField.text = ((object)(PinType)(ref pin.m_type)).ToString(); PinCheckedToggle.Toggle.SetIsOnWithoutNotify(pin.m_checked); PinSharedToggle.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() { PinNameRow.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); PinTypeRow.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(string value) { //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 resu