using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using HarmonyLib; using MenuLib; using MenuLib.MonoBehaviors; using Microsoft.CodeAnalysis; using Photon.Pun; using TMPro; using TheEverythingMap.Helpers; using TheEverythingMap.Settings; using Unity.VisualScripting; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("")] [assembly: AssemblyCompany("Nubez")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+377ffa5c63e5d0428cd03a80e4f1803ad5d7a5a0")] [assembly: AssemblyProduct("TheEverythingMap")] [assembly: AssemblyTitle("TheEverythingMap")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.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.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = 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 TheEverythingMap.Settings { public static class ConfigValues { public const string DEFAULT_TEAMMATE_COLOR = "white"; public const string DEFAULT_ENEMY_COLOR = "red"; internal static ConfigEntry Zoom; internal static ConfigEntry Opacity; internal static ConfigEntry Preset; internal static ConfigEntry WidthHeight; internal static ConfigEntry Buffer; internal static ConfigEntry SettingsKey; internal static ConfigEntry ZoomInKey; internal static ConfigEntry ZoomOutKey; internal static ConfigEntry TeammateColor; internal static ConfigEntry ShowEnemies; internal static ConfigEntry EnemyColor; internal static ConfigEntry ExploreMap; internal static void Configure(BaseUnityPlugin plugin) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Expected O, but got Unknown //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Expected O, but got Unknown //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Expected O, but got Unknown //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Expected O, but got Unknown TeammateColor = plugin.Config.Bind("General", "Teammate Color", "white", new ConfigDescription("The color of teammates on the minimap. (Recommended value = white)", (AcceptableValueBase)null, Array.Empty())); EnemyColor = plugin.Config.Bind("General", "Enemy Color", "red", new ConfigDescription("The color of enemies on the minimap. (Recommended value = red)", (AcceptableValueBase)null, Array.Empty())); ShowEnemies = plugin.Config.Bind("General", "Show Enemies", false, new ConfigDescription("Whether to show enemies on the minimap. (Recommended value = false)", (AcceptableValueBase)null, Array.Empty())); ExploreMap = plugin.Config.Bind("General", "Explore Map", false, new ConfigDescription("Whether to explore the map automatically. (Recommended value = false)", (AcceptableValueBase)null, Array.Empty())); Zoom = plugin.Config.Bind("General", "Zoom", 2.25f, new ConfigDescription("The minimap zoom level. (Recommended value = 2.25)", (AcceptableValueBase)null, Array.Empty())); Opacity = plugin.Config.Bind("General", "Opacity", 0.85f, new ConfigDescription("The minimap opacity. (Recommended value = 0.85)", (AcceptableValueBase)null, Array.Empty())); Preset = plugin.Config.Bind("Position", "Preset", MinimapPosition.BottomLeft, new ConfigDescription("The minimap position preset. (Recommended value = BottomLeft)", (AcceptableValueBase)null, Array.Empty())); WidthHeight = plugin.Config.Bind("Dimensions", "WidthHeight", 500, new ConfigDescription("The width of the minimap. (Recommended value = 375)", (AcceptableValueBase)null, Array.Empty())); Buffer = plugin.Config.Bind("Dimensions", "Buffer", 12, new ConfigDescription("The buffer between edge of screen added to presets. (Recommended value = 12)", (AcceptableValueBase)null, Array.Empty())); SettingsKey = plugin.Config.Bind("Key Bindings", "Settings", (KeyCode)109, new ConfigDescription("The key to open the minimap settings. (Recommended value = M)", (AcceptableValueBase)null, Array.Empty())); ZoomInKey = plugin.Config.Bind("Key Bindings", "Zoom In", (KeyCode)61, new ConfigDescription("The key to zoom in on the minimap. (Recommended value = Equals)", (AcceptableValueBase)null, Array.Empty())); ZoomOutKey = plugin.Config.Bind("Key Bindings", "Zoom Out", (KeyCode)45, new ConfigDescription("The key to zoom out on the minimap. (Recommended value = Minus)", (AcceptableValueBase)null, Array.Empty())); } internal static void ResetDefaultValues() { //IL_0092: 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_00c6: Unknown result type (might be due to invalid IL or missing references) Zoom.Value = (float)((ConfigEntryBase)Zoom).DefaultValue; Opacity.Value = (float)((ConfigEntryBase)Opacity).DefaultValue; Preset.Value = (MinimapPosition)((ConfigEntryBase)Preset).DefaultValue; Buffer.Value = (int)((ConfigEntryBase)Buffer).DefaultValue; WidthHeight.Value = (int)((ConfigEntryBase)WidthHeight).DefaultValue; SettingsKey.Value = (KeyCode)((ConfigEntryBase)SettingsKey).DefaultValue; ZoomInKey.Value = (KeyCode)((ConfigEntryBase)ZoomInKey).DefaultValue; ZoomOutKey.Value = (KeyCode)((ConfigEntryBase)ZoomOutKey).DefaultValue; TeammateColor.Value = (string)((ConfigEntryBase)TeammateColor).DefaultValue; EnemyColor.Value = (string)((ConfigEntryBase)EnemyColor).DefaultValue; ShowEnemies.Value = (bool)((ConfigEntryBase)ShowEnemies).DefaultValue; ExploreMap.Value = (bool)((ConfigEntryBase)ExploreMap).DefaultValue; } } internal enum MinimapPosition { TopRight, TopLeft, MiddleRight, MiddleLeft, BottomRight, BottomLeft } internal class SettingsMenu { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static BuilderDelegate <>9__8_0; public static BuilderDelegate <>9__11_0; public static ScrollViewBuilderDelegate <>9__11_1; public static Action <>9__11_12; public static ScrollViewBuilderDelegate <>9__11_2; public static Action <>9__11_13; public static Action <>9__11_14; public static Action <>9__11_15; public static ScrollViewBuilderDelegate <>9__11_5; public static Action <>9__11_16; public static Action <>9__11_17; public static ScrollViewBuilderDelegate <>9__11_7; public static Action <>9__11_18; public static ScrollViewBuilderDelegate <>9__11_8; public static Action <>9__11_19; public static ScrollViewBuilderDelegate <>9__11_9; public static Action <>9__11_20; public static ScrollViewBuilderDelegate <>9__11_10; public static ScrollViewBuilderDelegate <>9__11_11; public static Action <>9__11_22; internal void b__8_0(Transform parent) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) MenuAPI.CreateREPOButton("Nubez Minimap", (Action)View, parent, new Vector2(225f, 252f)); } internal void b__11_0(Transform parent) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) MenuAPI.CreateREPOButton("Back", (Action)Close, parent, new Vector2(66f, 18f)); } internal RectTransform b__11_1(Transform parent) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) REPOLabel val = MenuAPI.CreateREPOLabel("General", parent, new Vector2(0f, 90f)); return ((REPOElement)val).rectTransform; } internal RectTransform b__11_2(Transform parent) { //IL_0030: 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_004e: 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_0079: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) REPOButton val = MenuAPI.CreateREPOButton("Reset to Default Settings", (Action)delegate { ConfigValues.ResetDefaultValues(); View(); }, parent, new Vector2(38f, 190f)); val.overrideButtonSize = new Vector2(val.GetLabelSize().x * 0.8f, val.GetLabelSize().y * 0.8f); ((Transform)((REPOElement)val).rectTransform).localScale = new Vector3(((Transform)((REPOElement)val).rectTransform).localScale.x * 0.8f, ((Transform)((REPOElement)val).rectTransform).localScale.y * 0.8f, ((Transform)((REPOElement)val).rectTransform).localScale.z); return ((REPOElement)val).rectTransform; } internal void b__11_12() { ConfigValues.ResetDefaultValues(); View(); } internal void b__11_13(string str) { ConfigValues.Preset.Value = OPTION_TO_PRESET[str]; } internal void b__11_14(int str) { ConfigValues.TeammateColor.Value = VALID_COLORS[str]; } internal RectTransform b__11_5(Transform parent) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) REPOToggle val = MenuAPI.CreateREPOToggle("Show Enemies (Work in Progress)...", (Action)delegate(bool toggle) { ConfigValues.ShowEnemies.Value = toggle; }, parent, Vector2.zero, "Enabled", "Disabled", ConfigValues.ShowEnemies.Value); return ((REPOElement)val).rectTransform; } internal void b__11_15(bool toggle) { ConfigValues.ShowEnemies.Value = toggle; } internal void b__11_16(int str) { ConfigValues.EnemyColor.Value = VALID_COLORS[str]; } internal RectTransform b__11_7(Transform parent) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) REPOToggle val = MenuAPI.CreateREPOToggle("Auto Explore Map (Work in Progress)...", (Action)delegate(bool toggle) { ConfigValues.ExploreMap.Value = toggle; }, parent, Vector2.zero, "Enabled", "Disabled", ConfigValues.ExploreMap.Value); return ((REPOElement)val).rectTransform; } internal void b__11_17(bool toggle) { ConfigValues.ExploreMap.Value = toggle; } internal RectTransform b__11_8(Transform parent) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = MenuAPI.CreateREPOSlider("Size", "Minimap Size Height / Width", (Action)delegate(float flt) { ConfigValues.WidthHeight.Value = (int)flt; }, parent, new Vector2(0f, 150f), 100f, 800f, 0, (float)Mathf.Max(ConfigValues.WidthHeight.Value, ConfigValues.WidthHeight.Value), "", "", (BarBehavior)0); return ((REPOElement)val).rectTransform; } internal void b__11_18(float flt) { ConfigValues.WidthHeight.Value = (int)flt; } internal RectTransform b__11_9(Transform parent) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = MenuAPI.CreateREPOSlider("Zoom Level", "Minimap Zoom Level", (Action)delegate(float flt) { ConfigValues.Zoom.Value = flt; }, parent, new Vector2(0f, 150f), 1.5f, 10f, 2, ConfigValues.Zoom.Value, "", "", (BarBehavior)0); return ((REPOElement)val).rectTransform; } internal void b__11_19(float flt) { ConfigValues.Zoom.Value = flt; } internal RectTransform b__11_10(Transform parent) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) REPOSlider val = MenuAPI.CreateREPOSlider("Opacity", "Minimap Opacity", (Action)delegate(float flt) { ConfigValues.Opacity.Value = flt; }, parent, new Vector2(0f, 150f), 0f, 1f, 2, ConfigValues.Opacity.Value, "", "", (BarBehavior)0); return ((REPOElement)val).rectTransform; } internal void b__11_20(float flt) { ConfigValues.Opacity.Value = flt; } internal RectTransform b__11_11(Transform parent) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) REPOLabel val = MenuAPI.CreateREPOLabel("Controls", parent, new Vector2(0f, 90f)); return ((REPOElement)val).rectTransform; } internal void b__11_22() { } } private static readonly Dictionary OPTION_TO_PRESET = new Dictionary { { "TopRight", MinimapPosition.TopRight }, { "TopLeft", MinimapPosition.TopLeft }, { "MiddleRight", MinimapPosition.MiddleRight }, { "MiddleLeft", MinimapPosition.MiddleLeft }, { "BottomRight", MinimapPosition.BottomRight }, { "BottomLeft", MinimapPosition.BottomLeft } }; private static readonly string[] VALID_COLORS = new string[8] { "white", "red", "green", "blue", "yellow", "cyan", "magenta", "black" }; private static List> BINDABLE_KEYS = new List>(3) { ConfigValues.SettingsKey, ConfigValues.ZoomInKey, ConfigValues.ZoomOutKey }; private static List DISALLOWED_BINDINGS = new List(3) { (KeyCode)323, (KeyCode)324, (KeyCode)27 }; private static REPOPopupPage? pageInstance; private static bool isSelectingKey = false; private static REPOButton? activatedButton; private static ConfigEntry? keyToSet; internal static void Initialize() { //IL_0015: 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_0020: Expected O, but got Unknown object obj = <>c.<>9__8_0; if (obj == null) { BuilderDelegate val = delegate(Transform parent) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) MenuAPI.CreateREPOButton("Nubez Minimap", (Action)View, parent, new Vector2(225f, 252f)); }; <>c.<>9__8_0 = val; obj = (object)val; } MenuAPI.AddElementToSettingsMenu((BuilderDelegate)obj); } internal static void Update() { //IL_001b: 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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) if (StateUtils.IsInLevel() && !StateUtils.IsChatActive() && !StateUtils.HasLocalMapToolActive() && Input.GetKeyDown(ConfigValues.SettingsKey.Value)) { if ((Object)(object)pageInstance == (Object)null) { View(); } else { Close(); } } if (StateUtils.IsInLevel() && StateUtils.HasLocalMapToolActive() && (Object)(object)pageInstance != (Object)null) { Close(); } if (!isSelectingKey || !Input.anyKeyDown) { return; } foreach (KeyCode value2 in Enum.GetValues(typeof(KeyCode))) { if (Input.GetKeyDown(value2)) { if (!DISALLOWED_BINDINGS.Contains(value2)) { keyToSet.Value = value2; } TextMeshProUGUI labelTMP = activatedButton.labelTMP; string key = ((ConfigEntryBase)keyToSet).Definition.Key; KeyCode value = keyToSet.Value; ((TMP_Text)labelTMP).text = key + ": " + ((object)(KeyCode)(ref value)).ToString(); isSelectingKey = false; keyToSet = null; activatedButton = null; break; } } } private static void Close() { if (!((Object)(object)pageInstance == (Object)null)) { MenuManager.instance.PageRemove(pageInstance.menuPage); Object.Destroy((Object)(object)((Component)pageInstance.menuPage).gameObject); pageInstance.ClosePage(true); pageInstance = null; isSelectingKey = false; keyToSet = null; activatedButton = null; } } private static void View() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Expected O, but got Unknown //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Expected O, but got Unknown //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Expected O, but got Unknown //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Expected O, but got Unknown //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Expected O, but got Unknown //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Expected O, but got Unknown //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Expected O, but got Unknown //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Expected O, but got Unknown //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Expected O, but got Unknown Close(); REPOPopupPage val = MenuAPI.CreateREPOPopupPage("Nubezz Minimap", (PresetSide)0, false, true, 0f); object obj = <>c.<>9__11_0; if (obj == null) { BuilderDelegate val2 = delegate(Transform parent) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) MenuAPI.CreateREPOButton("Back", (Action)Close, parent, new Vector2(66f, 18f)); }; <>c.<>9__11_0 = val2; obj = (object)val2; } val.AddElement((BuilderDelegate)obj); object obj2 = <>c.<>9__11_1; if (obj2 == null) { ScrollViewBuilderDelegate val3 = delegate(Transform parent) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) REPOLabel val21 = MenuAPI.CreateREPOLabel("General", parent, new Vector2(0f, 90f)); return ((REPOElement)val21).rectTransform; }; <>c.<>9__11_1 = val3; obj2 = (object)val3; } val.AddElementToScrollView((ScrollViewBuilderDelegate)obj2, 0f, 0f); object obj3 = <>c.<>9__11_2; if (obj3 == null) { ScrollViewBuilderDelegate val4 = delegate(Transform parent) { //IL_0030: 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_004e: 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_0079: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) REPOButton val20 = MenuAPI.CreateREPOButton("Reset to Default Settings", (Action)delegate { ConfigValues.ResetDefaultValues(); View(); }, parent, new Vector2(38f, 190f)); val20.overrideButtonSize = new Vector2(val20.GetLabelSize().x * 0.8f, val20.GetLabelSize().y * 0.8f); ((Transform)((REPOElement)val20).rectTransform).localScale = new Vector3(((Transform)((REPOElement)val20).rectTransform).localScale.x * 0.8f, ((Transform)((REPOElement)val20).rectTransform).localScale.y * 0.8f, ((Transform)((REPOElement)val20).rectTransform).localScale.z); return ((REPOElement)val20).rectTransform; }; <>c.<>9__11_2 = val4; obj3 = (object)val4; } val.AddElementToScrollView((ScrollViewBuilderDelegate)obj3, 0f, 0f); string defaultMinimapOption = "BottomLeft"; foreach (KeyValuePair item2 in OPTION_TO_PRESET) { if (item2.Value == ConfigValues.Preset.Value) { defaultMinimapOption = item2.Key; break; } } val.AddElementToScrollView((ScrollViewBuilderDelegate)delegate(Transform parent) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) REPOSlider val19 = MenuAPI.CreateREPOSlider("Position Preset", "Built-in preset positions", (Action)delegate(string str) { ConfigValues.Preset.Value = OPTION_TO_PRESET[str]; }, parent, OPTION_TO_PRESET.Keys.ToArray(), defaultMinimapOption, new Vector2(0f, 270f), "", "", (BarBehavior)0); return ((REPOElement)val19).rectTransform; }, 0f, 0f); string defaultTeammateColor = "white"; string[] vALID_COLORS = VALID_COLORS; foreach (string text in vALID_COLORS) { if (text == ConfigValues.TeammateColor.Value) { defaultTeammateColor = ConfigValues.TeammateColor.Value; break; } } val.AddElementToScrollView((ScrollViewBuilderDelegate)delegate(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val18 = MenuAPI.CreateREPOSlider("Teammate Colors", "Color of teammates on map", (Action)delegate(int str) { ConfigValues.TeammateColor.Value = VALID_COLORS[str]; }, parent, VALID_COLORS, defaultTeammateColor, new Vector2(0f, 270f), "", "", (BarBehavior)0); return ((REPOElement)val18).rectTransform; }, 0f, 0f); object obj4 = <>c.<>9__11_5; if (obj4 == null) { ScrollViewBuilderDelegate val5 = delegate(Transform parent) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) REPOToggle val17 = MenuAPI.CreateREPOToggle("Show Enemies (Work in Progress)...", (Action)delegate(bool toggle) { ConfigValues.ShowEnemies.Value = toggle; }, parent, Vector2.zero, "Enabled", "Disabled", ConfigValues.ShowEnemies.Value); return ((REPOElement)val17).rectTransform; }; <>c.<>9__11_5 = val5; obj4 = (object)val5; } val.AddElementToScrollView((ScrollViewBuilderDelegate)obj4, 0f, 0f); string defaultEnemyColor = "red"; string[] vALID_COLORS2 = VALID_COLORS; foreach (string text2 in vALID_COLORS2) { if (text2 == ConfigValues.EnemyColor.Value) { defaultEnemyColor = ConfigValues.EnemyColor.Value; break; } } val.AddElementToScrollView((ScrollViewBuilderDelegate)delegate(Transform parent) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) REPOSlider val16 = MenuAPI.CreateREPOSlider("Enemy Colors", "Color of enemies on map", (Action)delegate(int str) { ConfigValues.EnemyColor.Value = VALID_COLORS[str]; }, parent, VALID_COLORS, defaultEnemyColor, new Vector2(0f, 270f), "", "", (BarBehavior)0); return ((REPOElement)val16).rectTransform; }, 0f, 0f); object obj5 = <>c.<>9__11_7; if (obj5 == null) { ScrollViewBuilderDelegate val6 = delegate(Transform parent) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) REPOToggle val15 = MenuAPI.CreateREPOToggle("Auto Explore Map (Work in Progress)...", (Action)delegate(bool toggle) { ConfigValues.ExploreMap.Value = toggle; }, parent, Vector2.zero, "Enabled", "Disabled", ConfigValues.ExploreMap.Value); return ((REPOElement)val15).rectTransform; }; <>c.<>9__11_7 = val6; obj5 = (object)val6; } val.AddElementToScrollView((ScrollViewBuilderDelegate)obj5, 0f, 0f); object obj6 = <>c.<>9__11_8; if (obj6 == null) { ScrollViewBuilderDelegate val7 = delegate(Transform parent) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) REPOSlider val14 = MenuAPI.CreateREPOSlider("Size", "Minimap Size Height / Width", (Action)delegate(float flt) { ConfigValues.WidthHeight.Value = (int)flt; }, parent, new Vector2(0f, 150f), 100f, 800f, 0, (float)Mathf.Max(ConfigValues.WidthHeight.Value, ConfigValues.WidthHeight.Value), "", "", (BarBehavior)0); return ((REPOElement)val14).rectTransform; }; <>c.<>9__11_8 = val7; obj6 = (object)val7; } val.AddElementToScrollView((ScrollViewBuilderDelegate)obj6, 0f, 0f); object obj7 = <>c.<>9__11_9; if (obj7 == null) { ScrollViewBuilderDelegate val8 = delegate(Transform parent) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) REPOSlider val13 = MenuAPI.CreateREPOSlider("Zoom Level", "Minimap Zoom Level", (Action)delegate(float flt) { ConfigValues.Zoom.Value = flt; }, parent, new Vector2(0f, 150f), 1.5f, 10f, 2, ConfigValues.Zoom.Value, "", "", (BarBehavior)0); return ((REPOElement)val13).rectTransform; }; <>c.<>9__11_9 = val8; obj7 = (object)val8; } val.AddElementToScrollView((ScrollViewBuilderDelegate)obj7, 15f, 0f); object obj8 = <>c.<>9__11_10; if (obj8 == null) { ScrollViewBuilderDelegate val9 = delegate(Transform parent) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) REPOSlider val12 = MenuAPI.CreateREPOSlider("Opacity", "Minimap Opacity", (Action)delegate(float flt) { ConfigValues.Opacity.Value = flt; }, parent, new Vector2(0f, 150f), 0f, 1f, 2, ConfigValues.Opacity.Value, "", "", (BarBehavior)0); return ((REPOElement)val12).rectTransform; }; <>c.<>9__11_10 = val9; obj8 = (object)val9; } val.AddElementToScrollView((ScrollViewBuilderDelegate)obj8, 15f, 0f); object obj9 = <>c.<>9__11_11; if (obj9 == null) { ScrollViewBuilderDelegate val10 = delegate(Transform parent) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) REPOLabel val11 = MenuAPI.CreateREPOLabel("Controls", parent, new Vector2(0f, 90f)); return ((REPOElement)val11).rectTransform; }; <>c.<>9__11_11 = val10; obj9 = (object)val10; } val.AddElementToScrollView((ScrollViewBuilderDelegate)obj9, 15f, 0f); foreach (ConfigEntry item in BINDABLE_KEYS) { val.AddElementToScrollView((ScrollViewBuilderDelegate)delegate(Transform parent) { //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_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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_012b: Unknown result type (might be due to invalid IL or missing references) string key = ((ConfigEntryBase)item).Definition.Key; KeyCode value = item.Value; REPOButton element = MenuAPI.CreateREPOButton(key + ": " + ((object)(KeyCode)(ref value)).ToString(), (Action)delegate { }, parent, new Vector2(0f, 190f)); element.onClick = delegate { //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) if (!isSelectingKey) { ((TMP_Text)element.labelTMP).text = ((ConfigEntryBase)item).Definition.Key + ": "; keyToSet = item; activatedButton = element; isSelectingKey = true; } else { isSelectingKey = false; TextMeshProUGUI labelTMP = element.labelTMP; string key2 = ((ConfigEntryBase)item).Definition.Key; KeyCode value2 = item.Value; ((TMP_Text)labelTMP).text = key2 + ": " + ((object)(KeyCode)(ref value2)).ToString(); } }; element.overrideButtonSize = new Vector2(element.GetLabelSize().x * 0.8f, element.GetLabelSize().y * 0.8f); ((Transform)((REPOElement)element).rectTransform).localScale = new Vector3(((Transform)((REPOElement)element).rectTransform).localScale.x * 0.8f, ((Transform)((REPOElement)element).rectTransform).localScale.y * 0.8f, ((Transform)((REPOElement)element).rectTransform).localScale.z); return ((REPOElement)element).rectTransform; }, 0f, 0f); } pageInstance = val; val.OpenPage(false); } } } namespace TheEverythingMap.Mod { [BepInPlugin("Nubez.TheEverythingMap", "TheEverythingMap", "1.0.2")] public class TheEverythingMap : BaseUnityPlugin { [HarmonyPatch(typeof(PlayerAvatar))] public static class PlayerAvatarRPCPatch { [HarmonyPatch("ReviveRPC")] [HarmonyPostfix] public static void ReviveRPC(bool _revivedByTruck, PhotonMessageInfo _info = default(PhotonMessageInfo)) { ShowActivePlayersOnMap(); } [HarmonyPatch("PlayerDeathRPC")] [HarmonyPostfix] public static void PlayerDeathRPC(int enemyIndex, PhotonMessageInfo _info = default(PhotonMessageInfo)) { ShowActivePlayersOnMap(); } } [HarmonyPatch(typeof(LevelGenerator), "GenerateDone")] public static class LevelGeneratorGenerateDoneHookPatch { private static void Postfix(PhotonMessageInfo _info = default(PhotonMessageInfo)) { ShowActivePlayersOnMap(); } } [HarmonyPatch(typeof(EnemyParent), "SpawnRPC")] public static class EnemySpawnRPCHookPatch { private static void Postfix(EnemyParent __instance, PhotonMessageInfo _info = default(PhotonMessageInfo)) { //IL_007d: 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_008d: 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_009d: Unknown result type (might be due to invalid IL or missing references) if (ConfigValues.ShowEnemies.Value && !((Object)(object)__instance.Enemy == (Object)null) && !((Object)(object)((Component)__instance.Enemy).gameObject == (Object)null)) { MapCustom component = ((Component)__instance.Enemy).GetComponent(); if ((Object)(object)component == (Object)null) { ComponentHolderProtocol.AddComponent((Object)(object)__instance.Enemy); component = ((Component)__instance.Enemy).GetComponent(); } component.sprite = spriteCircle; component.color = ConfigValues.EnemyColor.Value.ToColor(); ((Component)component).transform.localScale = Vector3.one * __instance.difficulty.ToScale(); } } } [HarmonyPatch(typeof(EnemyParent), "DespawnRPC")] public static class EnemyDeSpawnRPCHookPatch { private static void Postfix(EnemyParent __instance, PhotonMessageInfo _info = default(PhotonMessageInfo)) { if ((Object)(object)__instance.Enemy != (Object)null && (Object)(object)((Component)__instance.Enemy).gameObject != (Object)null && (Object)(object)((Component)__instance.Enemy).GetComponent() != (Object)null) { Object.Destroy((Object)(object)((Component)__instance.Enemy).GetComponent()); } } } private const string MOD_GUID = "Nubez.TheEverythingMap"; private const string VERSION_NUMBER = "1.0.2"; internal const float GOAL_AND_HAUL_Y_OFFSET = -95f; private Camera? _camera; private RenderTexture? _renderTexture; private float defaultCameraZoom = -1f; private Vector2 _initialHaulShowPosition = Vector2.zero; private Vector2 targetHaulShowPosition = Vector2.zero; private Vector2 _initialGoalShowPosition = Vector2.zero; private Vector2 targetGoalShowPosition = Vector2.zero; private float targetSetHeight = -1f; private static Sprite? spriteCircle = CreateCircleSprite(); internal static TheEverythingMap Instance { get; private set; } = null; internal Harmony? Harmony { get; set; } private void Start() { SettingsMenu.Initialize(); } private void Awake() { Instance = this; Patch(); ((Component)this).gameObject.transform.parent = null; ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; ConfigValues.Configure((BaseUnityPlugin)(object)this); ((BaseUnityPlugin)this).Logger.LogInfo((object)$"{((BaseUnityPlugin)this).Info.Metadata.GUID} v{((BaseUnityPlugin)this).Info.Metadata.Version} has loaded!"); } internal void Patch() { //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_0021: Expected O, but got Unknown //IL_0026: Expected O, but got Unknown if (Harmony == null) { Harmony val = new Harmony(((BaseUnityPlugin)this).Info.Metadata.GUID); Harmony val2 = val; Harmony = val; } Harmony.PatchAll(); } internal void Unpatch() { Harmony? harmony = Harmony; if (harmony != null) { harmony.UnpatchSelf(); } } private void Update() { //IL_00a7: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f1: Invalid comparison between Unknown and I4 //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_0491: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04e9: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_0500: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_0512: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Unknown result type (might be due to invalid IL or missing references) Bindings.Update(); SettingsMenu.Update(); if (!StateUtils.IsInLevel()) { if ((Object)(object)_camera != (Object)null || (Object)(object)_renderTexture != (Object)null) { _camera = null; _renderTexture = null; } return; } if ((Object)(object)_camera == (Object)null) { Camera[] array = Object.FindObjectsOfType(true); foreach (Camera val in array) { if (((Object)val).name == "Dirt Finder Map Camera") { _camera = val; break; } } } if (targetHaulShowPosition == Vector2.zero || targetGoalShowPosition == Vector2.zero) { _initialHaulShowPosition = ((SemiUI)HaulUI.instance).showPosition; _initialGoalShowPosition = ((SemiUI)GoalUI.instance).showPosition; float num = (float)ConfigValues.WidthHeight.Value / 300f; targetHaulShowPosition = new Vector2(_initialHaulShowPosition.x, _initialHaulShowPosition.y + -95f * num); targetGoalShowPosition = new Vector2(_initialGoalShowPosition.x, _initialGoalShowPosition.y + -95f * num); } if (targetSetHeight != (float)ConfigValues.WidthHeight.Value) { float num2 = (float)ConfigValues.WidthHeight.Value / 300f; targetHaulShowPosition.y = _initialHaulShowPosition.y + -95f * num2; targetGoalShowPosition.y = _initialGoalShowPosition.y + -95f * num2; targetSetHeight = ConfigValues.WidthHeight.Value; } if (ConfigValues.Preset.Value == MinimapPosition.TopRight && (((SemiUI)HaulUI.instance).showPosition != targetHaulShowPosition || ((SemiUI)GoalUI.instance).showPosition != targetGoalShowPosition)) { ((SemiUI)HaulUI.instance).showPosition = targetHaulShowPosition; ((SemiUI)GoalUI.instance).showPosition = targetGoalShowPosition; } else if (ConfigValues.Preset.Value != 0 && (((SemiUI)HaulUI.instance).showPosition != _initialHaulShowPosition || ((SemiUI)GoalUI.instance).showPosition != _initialGoalShowPosition)) { ((SemiUI)HaulUI.instance).showPosition = _initialHaulShowPosition; ((SemiUI)GoalUI.instance).showPosition = _initialGoalShowPosition; } if ((Object)(object)Map.Instance != (Object)null && !Map.Instance.Active) { Map.Instance.ActiveSet(true); } if ((Object)(object)_camera != (Object)null && ((Object)(object)_renderTexture == (Object)null || ((Object)(object)_camera.activeTexture != (Object)null && (Object)(object)_camera.activeTexture != (Object)(object)_renderTexture))) { _renderTexture = _camera.activeTexture; } if ((Object)(object)_camera != (Object)null) { if (defaultCameraZoom == -1f) { defaultCameraZoom = _camera.orthographicSize; } float num3 = ((!StateUtils.HasLocalMapToolActive()) ? ConfigValues.Zoom.Value : defaultCameraZoom); if (_camera.orthographicSize != num3) { _camera.orthographicSize = num3; } } if ((Object)(object)PlayerAvatar.instance != (Object)null && PlayerAvatar.instance.spectating && (Object)(object)SpectateCamera.instance != (Object)null && (int)SpectateCamera.instance.currentState == 1) { Transform transform = ((Component)SpectateCamera.instance).transform; PlayerAvatar player = SpectateCamera.instance.player; Quaternion rotation; if ((Object)(object)player != (Object)null) { DirtFinderMapPlayer.Instance.PlayerTransform.position = ((Component)player).transform.position; Transform playerTransform = DirtFinderMapPlayer.Instance.PlayerTransform; rotation = ((Component)player).transform.rotation; float y = ((Quaternion)(ref rotation)).eulerAngles.y; rotation = ((Component)player).transform.rotation; playerTransform.rotation = Quaternion.Euler(0f, y, ((Quaternion)(ref rotation)).eulerAngles.z); PlayerController.instance.playerAvatarScript.LastNavmeshPosition = player.LastNavmeshPosition; } else if ((Object)(object)transform != (Object)null) { DirtFinderMapPlayer.Instance.PlayerTransform.position = transform.position; Transform playerTransform2 = DirtFinderMapPlayer.Instance.PlayerTransform; rotation = transform.rotation; float y2 = ((Quaternion)(ref rotation)).eulerAngles.y; rotation = transform.rotation; playerTransform2.rotation = Quaternion.Euler(0f, y2, ((Quaternion)(ref rotation)).eulerAngles.z); } } } private void OnGUI() { //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) if (StateUtils.IsInLevel() && !((Object)(object)_renderTexture == (Object)null) && !StateUtils.HasLocalMapToolActive()) { int num; int num2; switch (ConfigValues.Preset.Value) { case MinimapPosition.TopLeft: num = ConfigValues.Buffer.Value; num2 = ConfigValues.Buffer.Value * 2; break; case MinimapPosition.MiddleRight: num = Screen.width - ConfigValues.WidthHeight.Value - ConfigValues.Buffer.Value; num2 = (Screen.height - ConfigValues.WidthHeight.Value) / 2; break; case MinimapPosition.TopRight: num = Screen.width - ConfigValues.WidthHeight.Value - ConfigValues.Buffer.Value; num2 = ConfigValues.Buffer.Value * 2; break; case MinimapPosition.BottomRight: num = Screen.width - ConfigValues.WidthHeight.Value - ConfigValues.Buffer.Value; num2 = Screen.height - ConfigValues.WidthHeight.Value - ConfigValues.Buffer.Value; break; case MinimapPosition.MiddleLeft: num = ConfigValues.Buffer.Value; num2 = (Screen.height - ConfigValues.WidthHeight.Value) / 2; break; default: num = ConfigValues.Buffer.Value; num2 = Screen.height - ConfigValues.WidthHeight.Value - ConfigValues.Buffer.Value; break; } Color color = GUI.color; if (ConfigValues.Opacity.Value != 1f) { GUI.color = new Color(1f, 1f, 1f, ConfigValues.Opacity.Value); } GUI.DrawTexture(new Rect((float)num, (float)num2, (float)ConfigValues.WidthHeight.Value, (float)ConfigValues.WidthHeight.Value), (Texture)(object)_renderTexture, (ScaleMode)0, false); if (ConfigValues.Opacity.Value != 1f) { GUI.color = color; } } } public static void ShowActivePlayersOnMap() { //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)GameDirector.instance != (Object)null) || GameDirector.instance.PlayerList == null || !GameDirector.instance.PlayerList.Any()) { return; } foreach (PlayerAvatar player in GameDirector.instance.PlayerList) { if ((Object)(object)player != (Object)null && (Object)(object)((Component)player).gameObject != (Object)null) { MapCustom component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)((Component)player).GetComponent()); } ComponentHolderProtocol.AddComponent((Object)(object)player); component = ((Component)player).GetComponent(); component.sprite = spriteCircle; Color color = ConfigValues.TeammateColor.Value.ToColor(); component.color = color; component.Add(); } } } private static Sprite CreateCircleSprite() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00df: 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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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) int num = 10; Texture2D val = new Texture2D(num, num, (TextureFormat)5, false); Color[] array = (Color[])(object)new Color[num * num]; float num2 = (float)num / 2f; float num3 = (float)num / 2f - 1f; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { int num4 = i * num + j; float num5 = (float)j - num2; float num6 = (float)i - num2; if (num5 * num5 + num6 * num6 <= num3 * num3) { array[num4] = Color.white; } else { array[num4] = Color.clear; } } } val.SetPixels(array); val.Apply(); return Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f)); } } } namespace TheEverythingMap.Helpers { internal class Bindings { internal static void Update() { //IL_001d: 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) if (StateUtils.IsInLevel() && !StateUtils.IsChatActive()) { if (Input.GetKeyDown(ConfigValues.ZoomInKey.Value)) { ConfigValues.Zoom.Value = Mathf.Max(ConfigValues.Zoom.Value - 0.5f, 1.5f); } if (Input.GetKeyDown(ConfigValues.ZoomOutKey.Value)) { ConfigValues.Zoom.Value = Mathf.Min(ConfigValues.Zoom.Value + 0.5f, 10f); } } } } internal static class Extensions { public static Color ToColor(this string color) { //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: 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_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_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0161: 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) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) string text = color.ToLower(); if (1 == 0) { } Color result = (Color)(text switch { "white" => Color.white, "red" => Color.red, "green" => Color.green, "blue" => Color.blue, "yellow" => Color.yellow, "cyan" => Color.cyan, "magenta" => Color.magenta, "black" => Color.black, _ => Color.white, }); if (1 == 0) { } return result; } public static float ToScale(this Difficulty difficulty) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected I4, but got Unknown if (1 == 0) { } float result = (int)difficulty switch { 0 => 0.65f, 1 => 0.85f, 2 => 1f, _ => 1f, }; if (1 == 0) { } return result; } } internal static class StateUtils { internal static bool HasLocalMapToolActive() { PlayerAvatar instance = PlayerAvatar.instance; return instance != null && (Object)(object)instance.playerAvatarVisuals.playerAvatarRightArm.mapToolController != (Object)null && instance.playerAvatarVisuals.playerAvatarRightArm.mapToolController.Active; } internal static bool IsInLevel() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Invalid comparison between Unknown and I4 return SemiFunc.RunIsLevel() && GameDirector.instance != null && (int)GameDirector.instance.currentState == 2; } internal static bool IsChatActive() { return ChatManager.instance != null && ChatManager.instance.chatActive; } } }