Decompiled source of N1ktamap v3.2.0

BepInEx/plugins/N1ktamap.dll

Decompiled a day ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("N1ktamap")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("N1ktamap")]
[assembly: AssemblyTitle("N1ktamap")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[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 N1ktamap
{
	[BepInPlugin("com.n1kta.map", "N1ktamap", "3.2.0")]
	public class N1ktamapPlugin : BaseUnityPlugin
	{
		private class EchoPulse
		{
			public Vector2Int Origin;

			public float MaxRadius;

			public float Progress;

			public bool IsBark;
		}

		private class EchoRay
		{
			public Vector2Int Target;

			public float Alpha;
		}

		private class MapPin
		{
			public Vector2Int Pos;
		}

		public static ConfigEntry<bool> Enabled;

		public static ConfigEntry<bool> ShowMinimap;

		public static ConfigEntry<bool> FullMapXRay;

		public static ConfigEntry<bool> OpeningAnimation;

		public static ConfigEntry<string> Language;

		public static ConfigEntry<float> PlayerHue;

		public static ConfigEntry<KeyCode> BigMapKey;

		public static ConfigEntry<KeyCode> MinimapKey;

		private Texture2D _mapTex;

		private Color32[] _pixels;

		private bool[,] _explored;

		private int _w;

		private int _h;

		private WorldGeneration _lastWorldRef;

		private bool _bigMapOpen;

		private float _bigMapAnim;

		private float _minimapSlideAnim;

		private float _bigMapZoom = 2.5f;

		private Vector2 _bigMapOffset = Vector2.zero;

		private bool _isDragging;

		private Vector2 _lastMousePos;

		private float _thirdEyeAnim;

		private bool _thirdEyeOpeningMode = true;

		private float _scanTimer;

		private float _playersTimer;

		private float _layerSettleTimer;

		private Vector2Int _playerBlockPos;

		private Vector2Int _prevPlayerBlockPos;

		private bool _hasPlayer;

		private float _stepAccumDist;

		private float _barkCooldown;

		private Texture2D _dotTex;

		private Texture2D _btnNormalTex;

		private Texture2D _btnHoverTex;

		private Texture2D _btnActiveTex;

		private GUIStyle _mapBtnStyle;

		private Texture2D _hueWheelTex;

		private string _assetsDir;

		private Texture2D _texHand;

		private Texture2D _texEyeOpen;

		private Texture2D _texEyeClosed;

		private Texture2D _texHead;

		private List<Vector2Int> _otherPlayers = new List<Vector2Int>();

		private List<EchoPulse> _pulses = new List<EchoPulse>();

		private List<EchoRay> _echoRays = new List<EchoRay>();

		private List<MapPin> _pins = new List<MapPin>();

		private bool IsEn => string.Equals(Language.Value, "EN", StringComparison.OrdinalIgnoreCase);

		private Color CurrentSelfColor => Color.HSVToRGB(Mathf.Repeat(PlayerHue.Value, 1f), 0.9f, 1f);

		private Color CurrentOppositePinColor => Color.HSVToRGB(Mathf.Repeat(PlayerHue.Value + 0.5f, 1f), 0.95f, 1f);

		private string T(string ru, string en)
		{
			if (!IsEn)
			{
				return ru;
			}
			return en;
		}

		private Texture2D MakeSolidTex(Color c)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0011: 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)
			//IL_0019: 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_0021: 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_0029: 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)
			Texture2D val = new Texture2D(2, 2);
			val.SetPixels((Color[])(object)new Color[4] { c, c, c, c });
			val.Apply();
			return val;
		}

		private void Awake()
		{
			//IL_010c: 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_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			Enabled = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Enabled", true, "Enable/Disable N1ktamap");
			ShowMinimap = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "ShowMinimap", true, "Show minimap in corner");
			FullMapXRay = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "FullMapXRay", false, "Reveal entire map without chip echolocation");
			OpeningAnimation = ((BaseUnityPlugin)this).Config.Bind<bool>("Appearance", "OpeningAnimation", true, "Enable all map animations");
			Language = ((BaseUnityPlugin)this).Config.Bind<string>("Appearance", "Language", "RU", "Interface language (RU / EN)");
			PlayerHue = ((BaseUnityPlugin)this).Config.Bind<float>("Appearance", "PlayerHue", 0.35f, "Player marker Hue (0..1)");
			BigMapKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "BigMapKey", (KeyCode)109, "Toggle full map");
			MinimapKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "ToggleMinimapKey", (KeyCode)110, "Hide/Show minimap");
			_dotTex = MakeSolidTex(Color.white);
			_btnNormalTex = MakeSolidTex(new Color(0.11f, 0.12f, 0.16f, 1f));
			_btnHoverTex = MakeSolidTex(new Color(0.22f, 0.24f, 0.31f, 1f));
			_btnActiveTex = MakeSolidTex(new Color(0.32f, 0.28f, 0.14f, 1f));
			_hueWheelTex = GenerateHueWheelTexture(128);
			_assetsDir = Path.Combine(Paths.PluginPath, "N1ktamap_Assets");
			Directory.CreateDirectory(_assetsDir);
			_texHand = TryLoadPng(Path.Combine(_assetsDir, "hand.png"));
			_texEyeOpen = TryLoadPng(Path.Combine(_assetsDir, "eye_open.png"));
			_texEyeClosed = TryLoadPng(Path.Combine(_assetsDir, "eye_closed.png"));
			_texHead = TryLoadPng(Path.Combine(_assetsDir, "head.png"));
			((BaseUnityPlugin)this).Logger.LogInfo((object)"N1ktamap v3.2.0 loaded!");
		}

		private void EnsureStyles()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: 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_00d5: Expected O, but got Unknown
			if (_mapBtnStyle == null)
			{
				_mapBtnStyle = new GUIStyle(GUI.skin.button);
				_mapBtnStyle.normal.background = _btnNormalTex;
				_mapBtnStyle.hover.background = _btnHoverTex;
				_mapBtnStyle.active.background = _btnActiveTex;
				_mapBtnStyle.normal.textColor = new Color(0.92f, 0.92f, 0.95f);
				_mapBtnStyle.hover.textColor = new Color(1f, 0.86f, 0.25f);
				_mapBtnStyle.fontSize = 11;
				_mapBtnStyle.fontStyle = (FontStyle)1;
				_mapBtnStyle.padding = new RectOffset(6, 6, 3, 3);
			}
		}

		private Texture2D TryLoadPng(string path)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Expected O, but got Unknown
			if (!File.Exists(path))
			{
				return null;
			}
			try
			{
				Texture2D val = new Texture2D(2, 2, (TextureFormat)4, false);
				if (ImageConversion.LoadImage(val, File.ReadAllBytes(path)))
				{
					return val;
				}
			}
			catch
			{
			}
			return null;
		}

		private Texture2D GenerateHueWheelTexture(int size)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Expected O, but got Unknown
			//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_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: 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)
			Texture2D val = new Texture2D(size, size, (TextureFormat)4, false);
			Color32[] array = (Color32[])(object)new Color32[size * size];
			float num = (float)size * 0.5f;
			for (int i = 0; i < size; i++)
			{
				for (int j = 0; j < size; j++)
				{
					float num2 = (float)j - num;
					float num3 = (float)i - num;
					float num4 = Mathf.Sqrt(num2 * num2 + num3 * num3) / num;
					if (num4 > 0.98f || num4 < 0.52f)
					{
						array[i * size + j] = new Color32((byte)0, (byte)0, (byte)0, (byte)0);
						continue;
					}
					float num5 = Mathf.Repeat(Mathf.Atan2(num3, num2) / ((float)Math.PI * 2f), 1f);
					array[i * size + j] = Color32.op_Implicit(Color.HSVToRGB(num5, 0.92f, 1f));
				}
			}
			val.SetPixels32(array);
			val.Apply();
			return val;
		}

		private bool IsInActiveGame(out WorldGeneration world)
		{
			//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)
			world = WorldGeneration.world;
			Scene activeScene = SceneManager.GetActiveScene();
			if (((Scene)(ref activeScene)).name.IndexOf("Menu", StringComparison.OrdinalIgnoreCase) >= 0)
			{
				return false;
			}
			if ((Object)(object)world == (Object)null || !world.worldExists)
			{
				return false;
			}
			if ((Object)(object)PlayerCamera.main == (Object)null || (Object)(object)PlayerCamera.main.body == (Object)null)
			{
				return false;
			}
			return true;
		}

		private bool DetectPlayerBark()
		{
			if (_barkCooldown > 0f)
			{
				return false;
			}
			if ((Object)(object)ConsoleScript.instance != (Object)null && ConsoleScript.instance.active)
			{
				return false;
			}
			if (Input.GetKeyDown((KeyCode)98))
			{
				_barkCooldown = 0.65f;
				return true;
			}
			return false;
		}

		private void Update()
		{
			//IL_0095: 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_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_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_023b: Unknown result type (might be due to invalid IL or missing references)
			//IL_023d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0272: 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_02a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0299: Unknown result type (might be due to invalid IL or missing references)
			//IL_029a: 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_02a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02df: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0305: Unknown result type (might be due to invalid IL or missing references)
			//IL_030a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0346: Unknown result type (might be due to invalid IL or missing references)
			//IL_032a: Unknown result type (might be due to invalid IL or missing references)
			if (!Enabled.Value || !IsInActiveGame(out var world))
			{
				_lastWorldRef = null;
				_hasPlayer = false;
				_bigMapOpen = false;
				_bigMapAnim = 0f;
				_minimapSlideAnim = 0f;
				_thirdEyeAnim = 0f;
				_otherPlayers.Clear();
				return;
			}
			if (_barkCooldown > 0f)
			{
				_barkCooldown -= Time.deltaTime;
			}
			if ((Object)(object)ConsoleScript.instance == (Object)null || !ConsoleScript.instance.active)
			{
				if (Input.GetKeyDown(BigMapKey.Value))
				{
					_bigMapOpen = !_bigMapOpen;
					if (_bigMapOpen)
					{
						_bigMapOffset = Vector2.zero;
						Cursor.visible = true;
						Cursor.lockState = (CursorLockMode)0;
					}
				}
				if (Input.GetKeyDown(MinimapKey.Value))
				{
					ShowMinimap.Value = !ShowMinimap.Value;
				}
			}
			float num = (_bigMapOpen ? 1f : 0f);
			float num2 = ((ShowMinimap.Value && !_bigMapOpen && _bigMapAnim <= 0.05f && _hasPlayer) ? 1f : 0f);
			if (!OpeningAnimation.Value)
			{
				_bigMapAnim = num;
				_minimapSlideAnim = num2;
				_thirdEyeAnim = 0f;
			}
			else
			{
				_bigMapAnim = Mathf.MoveTowards(_bigMapAnim, num, Time.unscaledDeltaTime * (_bigMapOpen ? 0.9f : 1.25f));
				_minimapSlideAnim = Mathf.MoveTowards(_minimapSlideAnim, num2, Time.unscaledDeltaTime * 3.4f);
				if (_thirdEyeAnim > 0f)
				{
					_thirdEyeAnim = Mathf.MoveTowards(_thirdEyeAnim, 0f, Time.unscaledDeltaTime * 0.75f);
				}
			}
			Vector2Int val = world.WorldToBlockPos(Vector2.op_Implicit(((Component)PlayerCamera.main.body).transform.position));
			bool num3 = (Object)(object)_lastWorldRef != (Object)(object)world || _w != (int)world.width || _h != (int)world.height;
			bool flag = _hasPlayer && Vector2Int.Distance(val, _prevPlayerBlockPos) > 45f;
			if (num3 || flag)
			{
				InitMapForWorld(world);
				_layerSettleTimer = 0.75f;
				_hasPlayer = false;
				_prevPlayerBlockPos = val;
				return;
			}
			if (_layerSettleTimer > 0f)
			{
				_layerSettleTimer -= Time.deltaTime;
				_playerBlockPos = val;
				_prevPlayerBlockPos = val;
				return;
			}
			_playerBlockPos = val;
			if (!_hasPlayer)
			{
				_prevPlayerBlockPos = _playerBlockPos;
			}
			_hasPlayer = true;
			RevealDirectBox(world, _playerBlockPos, 5, 5);
			float num4 = Vector2Int.Distance(_playerBlockPos, _prevPlayerBlockPos);
			if (num4 > 0.1f)
			{
				_stepAccumDist += num4;
				_prevPlayerBlockPos = _playerBlockPos;
				if (_stepAccumDist >= 3f)
				{
					_stepAccumDist = 0f;
					TriggerEcholocation(world, _playerBlockPos, 25, 15, 26, isBark: false);
				}
			}
			if (DetectPlayerBark())
			{
				TriggerEcholocation(world, _playerBlockPos, 40, 22, 95, isBark: true);
			}
			for (int num5 = _pulses.Count - 1; num5 >= 0; num5--)
			{
				_pulses[num5].Progress += Time.unscaledDeltaTime * (_pulses[num5].IsBark ? 1.4f : 1.9f);
				if (_pulses[num5].Progress >= 1f)
				{
					_pulses.RemoveAt(num5);
				}
			}
			for (int num6 = _echoRays.Count - 1; num6 >= 0; num6--)
			{
				_echoRays[num6].Alpha -= Time.unscaledDeltaTime * 3.4f;
				if (_echoRays[num6].Alpha <= 0f)
				{
					_echoRays.RemoveAt(num6);
				}
			}
			_scanTimer += Time.deltaTime;
			if (_scanTimer >= 0.4f)
			{
				_scanTimer = 0f;
				RefreshVisibleArea(world);
			}
			_playersTimer += Time.deltaTime;
			if (_playersTimer >= 0.25f)
			{
				_playersTimer = 0f;
				ScanOtherPlayers(world);
			}
		}

		private bool IsBoundaryTile(WorldGeneration world, int x, int y)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: 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_0058: 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)
			if (x <= 0 || x >= _w - 1 || y <= 0 || y >= _h - 1)
			{
				return false;
			}
			if (world.GetBlock(new Vector2Int(x, y)) == 0)
			{
				return false;
			}
			if (world.GetBlock(new Vector2Int(x - 1, y)) != 0 && world.GetBlock(new Vector2Int(x + 1, y)) != 0 && world.GetBlock(new Vector2Int(x, y - 1)) != 0)
			{
				return world.GetBlock(new Vector2Int(x, y + 1)) == 0;
			}
			return true;
		}

		private void RevealDirectBox(WorldGeneration world, Vector2Int center, int halfW, int halfH)
		{
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: 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)
			if (_explored == null)
			{
				return;
			}
			int num = Mathf.Max(0, ((Vector2Int)(ref center)).x - halfW);
			int num2 = Mathf.Min(_w - 1, ((Vector2Int)(ref center)).x + halfW);
			int num3 = Mathf.Max(0, ((Vector2Int)(ref center)).y - halfH);
			int num4 = Mathf.Min(_h - 1, ((Vector2Int)(ref center)).y + halfH);
			bool flag = false;
			for (int i = num3; i <= num4; i++)
			{
				int num5 = i * _w;
				for (int j = num; j <= num2; j++)
				{
					if (!_explored[j, i])
					{
						_explored[j, i] = true;
						_pixels[num5 + j] = GetBlockColor(world.GetBlock(new Vector2Int(j, i)));
						flag = true;
					}
				}
			}
			if (flag)
			{
				_mapTex.SetPixels32(_pixels);
				_mapTex.Apply();
			}
		}

		private void TriggerEcholocation(WorldGeneration world, Vector2Int center, int halfW, int halfH, int sampleCount, bool isBark)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: 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)
			if (_explored == null)
			{
				return;
			}
			_pulses.Add(new EchoPulse
			{
				Origin = center,
				MaxRadius = halfW,
				Progress = 0f,
				IsBark = isBark
			});
			bool flag = false;
			int num = 0;
			int num2 = (isBark ? 26 : 10);
			for (int i = 0; i < sampleCount; i++)
			{
				int num3 = ((Vector2Int)(ref center)).x + Random.Range(-halfW, halfW + 1);
				int num4 = ((Vector2Int)(ref center)).y + Random.Range(-halfH, halfH + 1);
				if (num3 >= 1 && num3 < _w - 1 && num4 >= 1 && num4 < _h - 1 && IsBoundaryTile(world, num3, num4))
				{
					if (!_explored[num3, num4])
					{
						_explored[num3, num4] = true;
						_pixels[num4 * _w + num3] = GetBlockColor(world.GetBlock(new Vector2Int(num3, num4)));
						flag = true;
					}
					if (num < num2)
					{
						_echoRays.Add(new EchoRay
						{
							Target = new Vector2Int(num3, num4),
							Alpha = 1f
						});
						num++;
					}
				}
			}
			if (flag)
			{
				_mapTex.SetPixels32(_pixels);
				_mapTex.Apply();
			}
		}

		private void ScanOtherPlayers(WorldGeneration world)
		{
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: 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)
			_otherPlayers.Clear();
			Body val = (((Object)(object)PlayerCamera.main != (Object)null) ? PlayerCamera.main.body : null);
			if ((Object)(object)val == (Object)null)
			{
				return;
			}
			Body[] array = Object.FindObjectsOfType<Body>();
			foreach (Body val2 in array)
			{
				if ((Object)(object)val2 != (Object)null && (Object)(object)val2 != (Object)(object)val && ((Component)val2).gameObject.activeInHierarchy)
				{
					_otherPlayers.Add(world.WorldToBlockPos(Vector2.op_Implicit(((Component)val2).transform.position)));
				}
			}
		}

		private void InitMapForWorld(WorldGeneration world)
		{
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Expected O, but got Unknown
			_lastWorldRef = world;
			_w = (int)world.width;
			_h = (int)world.height;
			_pins.Clear();
			_pulses.Clear();
			_echoRays.Clear();
			_stepAccumDist = 0f;
			if ((Object)(object)_mapTex != (Object)null)
			{
				Object.Destroy((Object)(object)_mapTex);
			}
			_mapTex = new Texture2D(_w, _h, (TextureFormat)4, false);
			((Texture)_mapTex).filterMode = (FilterMode)0;
			_pixels = (Color32[])(object)new Color32[_w * _h];
			_explored = new bool[_w, _h];
			RebuildFullTexture(world);
		}

		private Color32 GetBlockColor(ushort id)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: 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)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			switch (id)
			{
			case 0:
				return new Color32((byte)18, (byte)20, (byte)26, byte.MaxValue);
			case 11:
			case 24:
				return new Color32((byte)158, (byte)107, (byte)59, byte.MaxValue);
			case 23:
			case 25:
			case 31:
			case 40:
				return new Color32((byte)62, (byte)135, (byte)68, byte.MaxValue);
			case 14:
			case 42:
				return new Color32((byte)85, (byte)30, (byte)35, byte.MaxValue);
			case 5:
			case 6:
			case 10:
			case 20:
			case 21:
				return new Color32((byte)110, (byte)145, (byte)175, byte.MaxValue);
			case 34:
			case 35:
				return new Color32((byte)235, (byte)190, (byte)50, byte.MaxValue);
			case 22:
			case 36:
			case 39:
				return new Color32((byte)180, (byte)220, (byte)55, byte.MaxValue);
			case 7:
			case 27:
			case 28:
				return new Color32((byte)145, (byte)220, (byte)245, byte.MaxValue);
			default:
				return new Color32((byte)88, (byte)92, (byte)102, byte.MaxValue);
			}
		}

		private void RebuildFullTexture(WorldGeneration world)
		{
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			if (_pixels == null)
			{
				return;
			}
			bool value = FullMapXRay.Value;
			Color32 val = default(Color32);
			((Color32)(ref val))..ctor((byte)8, (byte)9, (byte)12, byte.MaxValue);
			for (int i = 0; i < _h; i++)
			{
				int num = i * _w;
				for (int j = 0; j < _w; j++)
				{
					_pixels[num + j] = ((value || _explored[j, i]) ? GetBlockColor(world.GetBlock(new Vector2Int(j, i))) : val);
				}
			}
			_mapTex.SetPixels32(_pixels);
			_mapTex.Apply();
		}

		private void RefreshVisibleArea(WorldGeneration world)
		{
			//IL_00bc: 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_00cb: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)_mapTex == (Object)null || !_hasPlayer)
			{
				return;
			}
			int num = Mathf.Max(0, ((Vector2Int)(ref _playerBlockPos)).x - 10);
			int num2 = Mathf.Min(_w - 1, ((Vector2Int)(ref _playerBlockPos)).x + 10);
			int num3 = Mathf.Max(0, ((Vector2Int)(ref _playerBlockPos)).y - 10);
			int num4 = Mathf.Min(_h - 1, ((Vector2Int)(ref _playerBlockPos)).y + 10);
			bool value = FullMapXRay.Value;
			for (int i = num3; i <= num4; i++)
			{
				int num5 = i * _w;
				for (int j = num; j <= num2; j++)
				{
					if (value || _explored[j, i])
					{
						_pixels[num5 + j] = GetBlockColor(world.GetBlock(new Vector2Int(j, i)));
					}
				}
			}
			_mapTex.SetPixels32(_pixels);
			_mapTex.Apply();
		}

		private void DrawLine(Vector2 a, Vector2 b, Color col, float width)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//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)
			//IL_0019: 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_0030: 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_0036: 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_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: 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_006a: 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)
			Vector2 val = b - a;
			float magnitude = ((Vector2)(ref val)).magnitude;
			if (!(magnitude < 1f))
			{
				float num = Mathf.Atan2(val.y, val.x) * 57.29578f;
				Matrix4x4 matrix = GUI.matrix;
				GUI.color = col;
				GUIUtility.RotateAroundPivot(num, a);
				GUI.DrawTexture(new Rect(a.x, a.y - width * 0.5f, magnitude, width), (Texture)(object)_dotTex);
				GUI.color = Color.white;
				GUI.matrix = matrix;
			}
		}

		private void DrawCircleOutline(Vector2 center, float radius, Color col, float thickness)
		{
			//IL_0003: 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)
			//IL_000f: 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)
			//IL_002b: 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_0046: 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_004a: 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)
			//IL_0054: 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)
			int num = 28;
			Vector2 a = center + new Vector2(radius, 0f);
			for (int i = 1; i <= num; i++)
			{
				float num2 = (float)i / (float)num * (float)Math.PI * 2f;
				Vector2 val = center + new Vector2(Mathf.Cos(num2) * radius, Mathf.Sin(num2) * radius);
				DrawLine(a, val, col, thickness);
				a = val;
			}
		}

		private void DrawStylizedFrame(Rect r, bool isBigMap)
		{
			//IL_0014: 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_0076: 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_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_016c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: 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_0258: Unknown result type (might be due to invalid IL or missing references)
			//IL_028a: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
			GUI.color = new Color(0.04f, 0.04f, 0.06f, 0.96f);
			GUI.DrawTexture(new Rect(((Rect)(ref r)).x - 5f, ((Rect)(ref r)).y - 5f, ((Rect)(ref r)).width + 10f, ((Rect)(ref r)).height + 10f), (Texture)(object)_dotTex);
			GUI.color = new Color(0.92f, 0.92f, 0.95f, 0.92f);
			GUI.DrawTexture(new Rect(((Rect)(ref r)).x - 2f, ((Rect)(ref r)).y - 2f, ((Rect)(ref r)).width + 4f, 2f), (Texture)(object)_dotTex);
			GUI.DrawTexture(new Rect(((Rect)(ref r)).x - 2f, ((Rect)(ref r)).yMax, ((Rect)(ref r)).width + 4f, 2f), (Texture)(object)_dotTex);
			GUI.DrawTexture(new Rect(((Rect)(ref r)).x - 2f, ((Rect)(ref r)).y, 2f, ((Rect)(ref r)).height), (Texture)(object)_dotTex);
			GUI.DrawTexture(new Rect(((Rect)(ref r)).xMax, ((Rect)(ref r)).y, 2f, ((Rect)(ref r)).height), (Texture)(object)_dotTex);
			if (isBigMap)
			{
				float num = 28f;
				GUI.color = new Color(1f, 0.85f, 0.25f, 0.95f);
				GUI.DrawTexture(new Rect(((Rect)(ref r)).x - 6f, ((Rect)(ref r)).y - 6f, num, 4f), (Texture)(object)_dotTex);
				GUI.DrawTexture(new Rect(((Rect)(ref r)).x - 6f, ((Rect)(ref r)).y - 6f, 4f, num), (Texture)(object)_dotTex);
				GUI.DrawTexture(new Rect(((Rect)(ref r)).xMax - num + 6f, ((Rect)(ref r)).y - 6f, num, 4f), (Texture)(object)_dotTex);
				GUI.DrawTexture(new Rect(((Rect)(ref r)).xMax + 2f, ((Rect)(ref r)).y - 6f, 4f, num), (Texture)(object)_dotTex);
				GUI.DrawTexture(new Rect(((Rect)(ref r)).x - 6f, ((Rect)(ref r)).yMax + 2f, num, 4f), (Texture)(object)_dotTex);
				GUI.DrawTexture(new Rect(((Rect)(ref r)).x - 6f, ((Rect)(ref r)).yMax - num + 6f, 4f, num), (Texture)(object)_dotTex);
				GUI.DrawTexture(new Rect(((Rect)(ref r)).xMax - num + 6f, ((Rect)(ref r)).yMax + 2f, num, 4f), (Texture)(object)_dotTex);
				GUI.DrawTexture(new Rect(((Rect)(ref r)).xMax + 2f, ((Rect)(ref r)).yMax - num + 6f, 4f, num), (Texture)(object)_dotTex);
			}
			GUI.color = Color.white;
		}

		private bool StyledButton(string text, float width, bool highlighted = false)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Expected O, but got Unknown
			//IL_0028: 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)
			//IL_0060: 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_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			Rect rect = GUILayoutUtility.GetRect(new GUIContent(text), _mapBtnStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Width(width),
				GUILayout.Height(26f)
			});
			GUI.color = (highlighted ? new Color(1f, 0.85f, 0.25f, 0.95f) : new Color(0.55f, 0.58f, 0.65f, 0.75f));
			GUI.DrawTexture(new Rect(((Rect)(ref rect)).x - 1f, ((Rect)(ref rect)).y - 1f, ((Rect)(ref rect)).width + 2f, ((Rect)(ref rect)).height + 2f), (Texture)(object)_dotTex);
			GUI.color = Color.white;
			return GUI.Button(rect, text, _mapBtnStyle);
		}

		private void OnGUI()
		{
			if (Enabled.Value && !((Object)(object)_mapTex == (Object)null))
			{
				EnsureStyles();
				if (_minimapSlideAnim > 0.001f && _hasPlayer)
				{
					DrawMinimap();
				}
				if (_bigMapAnim > 0.001f && _hasPlayer)
				{
					DrawBigMapSequence();
				}
				if (OpeningAnimation.Value && _thirdEyeAnim > 0.001f)
				{
					DrawThirdEyeForeheadSequence();
				}
			}
		}

		private void DrawMinimap()
		{
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: 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_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: 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_019f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0254: 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_0258: Unknown result type (might be due to invalid IL or missing references)
			//IL_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_0286: Unknown result type (might be due to invalid IL or missing references)
			//IL_036c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_0312: Unknown result type (might be due to invalid IL or missing references)
			//IL_032c: Unknown result type (might be due to invalid IL or missing references)
			//IL_038a: Unknown result type (might be due to invalid IL or missing references)
			//IL_038f: Unknown result type (might be due to invalid IL or missing references)
			//IL_043b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0445: Unknown result type (might be due to invalid IL or missing references)
			//IL_0452: Unknown result type (might be due to invalid IL or missing references)
			//IL_0469: Unknown result type (might be due to invalid IL or missing references)
			//IL_0479: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_040e: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_049a: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0504: Unknown result type (might be due to invalid IL or missing references)
			float num = 190f;
			float num2 = 16f;
			float num3 = 45f;
			float num4 = Mathf.SmoothStep(0f, 1f, _minimapSlideAnim);
			float num5 = Mathf.Lerp(0f - num - 32f, num2, num4);
			Rect val = default(Rect);
			((Rect)(ref val))..ctor((float)Screen.width - num - num2, num5, num, num);
			if (_minimapSlideAnim > 0.85f && (int)Event.current.type == 0 && Event.current.button == 0 && ((Rect)(ref val)).Contains(Event.current.mousePosition))
			{
				_bigMapOpen = true;
				_bigMapOffset = Vector2.zero;
				Event.current.Use();
			}
			DrawStylizedFrame(val, isBigMap: false);
			float num6 = (float)((Vector2Int)(ref _playerBlockPos)).x / (float)_w;
			float num7 = (float)((Vector2Int)(ref _playerBlockPos)).y / (float)_h;
			float num8 = num3 / (float)_w;
			float num9 = num3 / (float)_h;
			GUI.DrawTextureWithTexCoords(val, (Texture)(object)_mapTex, new Rect(num6 - num8, num7 - num9, num8 * 2f, num9 * 2f));
			GUI.BeginGroup(val);
			Vector2 val2 = default(Vector2);
			((Vector2)(ref val2))..ctor(num * 0.5f, num * 0.5f);
			float num10 = num / (num3 * 2f);
			foreach (EchoPulse pulse in _pulses)
			{
				float radius = pulse.MaxRadius * pulse.Progress * num10;
				Color currentSelfColor = CurrentSelfColor;
				currentSelfColor.a = (1f - pulse.Progress) * (pulse.IsBark ? 0.85f : 0.45f);
				DrawCircleOutline(val2, radius, currentSelfColor, pulse.IsBark ? 2.2f : 1.2f);
			}
			foreach (EchoRay echoRay in _echoRays)
			{
				Vector2 b = val2 + new Vector2((float)(((Vector2Int)(ref echoRay.Target)).x - ((Vector2Int)(ref _playerBlockPos)).x) * num10, 0f - (float)(((Vector2Int)(ref echoRay.Target)).y - ((Vector2Int)(ref _playerBlockPos)).y) * num10);
				Color currentSelfColor2 = CurrentSelfColor;
				currentSelfColor2.a = echoRay.Alpha * 0.75f;
				DrawLine(val2, b, currentSelfColor2, 1f);
			}
			Color currentOppositePinColor = CurrentOppositePinColor;
			foreach (MapPin pin in _pins)
			{
				float num11 = (float)(((Vector2Int)(ref pin.Pos)).x - ((Vector2Int)(ref _playerBlockPos)).x) * num10;
				float num12 = 0f - (float)(((Vector2Int)(ref pin.Pos)).y - ((Vector2Int)(ref _playerBlockPos)).y) * num10;
				if (Mathf.Abs(num11) <= num * 0.5f && Mathf.Abs(num12) <= num * 0.5f)
				{
					GUI.color = currentOppositePinColor;
					GUI.DrawTexture(new Rect(val2.x + num11 - 3f, val2.y + num12 - 3f, 6f, 6f), (Texture)(object)_dotTex);
				}
			}
			GUI.color = new Color(0.2f, 0.85f, 1f, 1f);
			foreach (Vector2Int otherPlayer in _otherPlayers)
			{
				Vector2Int current4 = otherPlayer;
				float num13 = (float)(((Vector2Int)(ref current4)).x - ((Vector2Int)(ref _playerBlockPos)).x) * num10;
				float num14 = 0f - (float)(((Vector2Int)(ref current4)).y - ((Vector2Int)(ref _playerBlockPos)).y) * num10;
				if (Mathf.Abs(num13) <= num * 0.5f && Mathf.Abs(num14) <= num * 0.5f)
				{
					GUI.DrawTexture(new Rect(val2.x + num13 - 3f, val2.y + num14 - 3f, 6f, 6f), (Texture)(object)_dotTex);
				}
			}
			GUI.color = CurrentSelfColor;
			GUI.DrawTexture(new Rect(val2.x - 3f, val2.y - 3f, 6f, 6f), (Texture)(object)_dotTex);
			GUI.color = Color.white;
			GUI.EndGroup();
			string text = (IsEn ? $"{BigMapKey.Value}: Map | {MinimapKey.Value}: Hide" : $"{BigMapKey.Value}: Карта | {MinimapKey.Value}: Скрыть");
			GUI.Label(new Rect(((Rect)(ref val)).x, ((Rect)(ref val)).yMax + 5f, ((Rect)(ref val)).width, 20f), "<size=11><color=#DDDDDD>" + text + "</color></size>");
		}

		private void DrawThirdEyeForeheadSequence()
		{
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: 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_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Unknown result type (might be due to invalid IL or missing references)
			//IL_0272: Unknown result type (might be due to invalid IL or missing references)
			//IL_0286: Unknown result type (might be due to invalid IL or missing references)
			//IL_021b: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_0303: Unknown result type (might be due to invalid IL or missing references)
			//IL_032d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0349: Unknown result type (might be due to invalid IL or missing references)
			//IL_035f: Unknown result type (might be due to invalid IL or missing references)
			//IL_036b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0370: Unknown result type (might be due to invalid IL or missing references)
			//IL_0375: Unknown result type (might be due to invalid IL or missing references)
			//IL_0381: Unknown result type (might be due to invalid IL or missing references)
			//IL_0386: Unknown result type (might be due to invalid IL or missing references)
			//IL_038b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0398: Unknown result type (might be due to invalid IL or missing references)
			//IL_039a: Unknown result type (might be due to invalid IL or missing references)
			//IL_039c: Unknown result type (might be due to invalid IL or missing references)
			float num = Screen.width;
			float num2 = Screen.height;
			Vector2 val = default(Vector2);
			((Vector2)(ref val))..ctor(num * 0.5f, num2 * 0.5f);
			float num3 = 1f - _thirdEyeAnim;
			float num4 = Mathf.Sin(num3 * (float)Math.PI);
			GUI.color = new Color(0f, 0f, 0f, num4 * 0.86f);
			GUI.DrawTexture(new Rect(0f, 0f, num, num2), (Texture)(object)_dotTex);
			GUI.color = Color.white;
			if (!((Object)(object)_texHead != (Object)null))
			{
				return;
			}
			float num5 = Mathf.Min(num, num2) * 0.62f;
			Rect val2 = default(Rect);
			((Rect)(ref val2))..ctor(val.x - num5 * 0.5f, val.y - num5 * 0.5f, num5, num5);
			GUI.color = new Color(1f, 1f, 1f, num4);
			GUI.DrawTexture(val2, (Texture)(object)_texHead);
			Vector2 val3 = default(Vector2);
			((Vector2)(ref val3))..ctor(((Rect)(ref val2)).center.x, ((Rect)(ref val2)).y + ((Rect)(ref val2)).height * 0.29f);
			float num6 = num5 * 0.3f;
			float num7 = num6 * 0.72f;
			if (_thirdEyeOpeningMode)
			{
				if (num3 < 0.42f && (Object)(object)_texEyeClosed != (Object)null)
				{
					GUI.DrawTexture(new Rect(val3.x - num6 * 0.5f, val3.y - num7 * 0.5f, num6, num7), (Texture)(object)_texEyeClosed);
				}
				else if ((Object)(object)_texEyeOpen != (Object)null)
				{
					float num8 = Mathf.SmoothStep(0.6f, 1.05f, Mathf.Clamp01((num3 - 0.42f) / 0.25f));
					GUI.DrawTexture(new Rect(val3.x - num6 * 0.5f * num8, val3.y - num7 * 0.5f * num8, num6 * num8, num7 * num8), (Texture)(object)_texEyeOpen);
				}
			}
			else if (num3 < 0.35f && (Object)(object)_texEyeOpen != (Object)null)
			{
				GUI.DrawTexture(new Rect(val3.x - num6 * 0.5f, val3.y - num7 * 0.5f, num6, num7), (Texture)(object)_texEyeOpen);
			}
			else
			{
				if ((Object)(object)_texEyeClosed != (Object)null)
				{
					GUI.DrawTexture(new Rect(val3.x - num6 * 0.5f, val3.y - num7 * 0.5f, num6, num7), (Texture)(object)_texEyeClosed);
				}
				float num9 = Mathf.Clamp01((num3 - 0.38f) / 0.2f) * num4;
				Color col = default(Color);
				((Color)(ref col))..ctor(0.95f, 0.95f, 0.98f, num9);
				Color col2 = default(Color);
				((Color)(ref col2))..ctor(0.05f, 0.05f, 0.08f, num9);
				float num10 = num6 * 0.68f;
				int num11 = 5;
				Vector2 val4 = default(Vector2);
				Vector2 val5 = default(Vector2);
				for (int i = 0; i < num11; i++)
				{
					float num12 = (float)i / (float)(num11 - 1) - 0.5f;
					float num13 = val3.x + num12 * num10;
					float num14 = ((i % 2 == 0) ? 5f : (-5f));
					((Vector2)(ref val4))..ctor(num13 - num14, val3.y - num7 * 0.24f);
					((Vector2)(ref val5))..ctor(num13 + num14, val3.y + num7 * 0.24f);
					DrawLine(val4 + new Vector2(1.5f, 1.5f), val5 + new Vector2(1.5f, 1.5f), col2, 3.5f);
					DrawLine(val4, val5, col, 2f);
				}
			}
			GUI.color = Color.white;
		}

		private void DrawBigMapSequence()
		{
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			//IL_0265: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: 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)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_0311: Unknown result type (might be due to invalid IL or missing references)
			//IL_0324: Unknown result type (might be due to invalid IL or missing references)
			//IL_0334: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03de: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_047c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0502: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_05de: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_055f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0569: Unknown result type (might be due to invalid IL or missing references)
			//IL_0578: Unknown result type (might be due to invalid IL or missing references)
			//IL_058b: Unknown result type (might be due to invalid IL or missing references)
			//IL_059b: Unknown result type (might be due to invalid IL or missing references)
			float num = Screen.width;
			float num2 = Screen.height;
			Vector2 val = default(Vector2);
			((Vector2)(ref val))..ctor(num * 0.5f, num2 * 0.5f);
			float num3 = Mathf.Max(140f, num * 0.12f);
			float num4 = Mathf.Max(110f, num2 * 0.16f);
			Rect val2 = default(Rect);
			((Rect)(ref val2))..ctor(num3, num4, num - num3 * 2f, num2 - num4 * 2f);
			float num5 = Mathf.SmoothStep(0f, 1f, Mathf.Clamp01((_bigMapAnim - 0.64f) / 0.36f));
			float num6 = Mathf.SmoothStep(0f, 0.8f, Mathf.Clamp01((_bigMapAnim - 0.26f) / 0.22f));
			if (num6 > 0.01f)
			{
				GUI.color = new Color(0f, 0f, 0f, num6);
				if (num5 <= 0.01f)
				{
					GUI.DrawTexture(new Rect(0f, 0f, num, num2), (Texture)(object)_dotTex);
				}
				else
				{
					float num7 = ((Rect)(ref val2)).width * num5;
					float num8 = val.x - num7 * 0.5f;
					float y = ((Rect)(ref val2)).y;
					float height = ((Rect)(ref val2)).height;
					GUI.DrawTexture(new Rect(0f, 0f, num, y), (Texture)(object)_dotTex);
					GUI.DrawTexture(new Rect(0f, y + height, num, num2 - (y + height)), (Texture)(object)_dotTex);
					GUI.DrawTexture(new Rect(0f, y, num8, height), (Texture)(object)_dotTex);
					GUI.DrawTexture(new Rect(num8 + num7, y, num - (num8 + num7), height), (Texture)(object)_dotTex);
				}
				GUI.color = Color.white;
			}
			if (num5 > 0.01f)
			{
				float num9 = ((Rect)(ref val2)).width * num5;
				Rect val3 = default(Rect);
				((Rect)(ref val3))..ctor(val.x - num9 * 0.5f, ((Rect)(ref val2)).y, num9, ((Rect)(ref val2)).height);
				DrawStylizedFrame(val3, isBigMap: true);
				GUI.color = new Color(0.05f, 0.06f, 0.08f, 0.96f);
				GUI.DrawTexture(val3, (Texture)(object)_dotTex);
				GUI.color = Color.white;
				GUI.BeginGroup(val3);
				float num10 = (0f - (((Rect)(ref val2)).width - num9)) * 0.5f;
				DrawBigMapContents(new Rect(num10, 0f, ((Rect)(ref val2)).width, ((Rect)(ref val2)).height), num5 > 0.92f);
				GUI.EndGroup();
			}
			if (_bigMapAnim < 0.29f && (Object)(object)_texEyeOpen != (Object)null)
			{
				float num11 = Mathf.SmoothStep(0f, 1f, Mathf.Clamp01(_bigMapAnim / 0.14f));
				float num12 = Mathf.Lerp(0.7f, 1.12f, num11);
				float num13 = 460f * num12;
				float num14 = 332f * num12;
				GUI.color = new Color(1f, 1f, 1f, num11);
				GUI.DrawTexture(new Rect(val.x - num13 * 0.5f, val.y - num14 * 0.5f, num13, num14), (Texture)(object)_texEyeOpen);
				GUI.color = Color.white;
			}
			else if (_bigMapAnim >= 0.28f && _bigMapAnim < 0.48f && (Object)(object)_texEyeClosed != (Object)null)
			{
				float num15 = 1f - Mathf.Clamp01((_bigMapAnim - 0.4f) / 0.08f);
				float num16 = 535f;
				float num17 = 385f;
				GUI.color = new Color(1f, 1f, 1f, num15);
				GUI.DrawTexture(new Rect(val.x - num16 * 0.5f, val.y - num17 * 0.5f, num16, num17), (Texture)(object)_texEyeClosed);
				GUI.color = Color.white;
			}
			if (_bigMapAnim > 0.42f && _bigMapAnim < 0.995f && (Object)(object)_texHand != (Object)null)
			{
				float num18 = num2 * 0.94f;
				float num19 = num18 * 0.83664775f;
				float num20 = 0f;
				float num22;
				if (_bigMapAnim < 0.6f)
				{
					float num21 = Mathf.SmoothStep(0f, 1f, (_bigMapAnim - 0.42f) / 0.18f);
					num22 = Mathf.Lerp((0f - num19) * 0.4f, val.x - 16f, num21);
				}
				else if (_bigMapAnim < 0.66f)
				{
					float num23 = Mathf.Sin((_bigMapAnim - 0.6f) / 0.06f * (float)Math.PI);
					num22 = val.x - 6f + num23 * 18f;
					num20 = num23;
				}
				else
				{
					float num24 = Mathf.SmoothStep(0f, 1f, (_bigMapAnim - 0.66f) / 0.34f);
					num22 = Mathf.Lerp(val.x - 10f, 0f - num19 - 60f, num24);
				}
				float num25 = num2 - num18 + 18f - num20 * 20f;
				if (num20 > 0.05f)
				{
					float num26 = 240f * num20;
					GUI.color = new Color(1f, 0.95f, 0.75f, num20 * 0.55f);
					GUI.DrawTexture(new Rect(val.x - num26 * 0.5f, val.y - num26 * 0.5f, num26, num26), (Texture)(object)_dotTex);
					GUI.color = Color.white;
				}
				Rect val4 = default(Rect);
				((Rect)(ref val4))..ctor(num22 - num19 * 0.68f, num25, num19, num18);
				GUI.DrawTexture(val4, (Texture)(object)_texHand);
				Matrix4x4 matrix = GUI.matrix;
				GUIUtility.ScaleAroundPivot(new Vector2(-1f, 1f), val);
				GUI.DrawTexture(val4, (Texture)(object)_texHand);
				GUI.matrix = matrix;
			}
		}

		private void DrawCornerKnobs(Rect mapArea, bool interactive)
		{
			//IL_002d: 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_0047: 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_0089: 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_00b6: 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_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: 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_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: 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_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0296: Unknown result type (might be due to invalid IL or missing references)
			//IL_029b: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0311: Unknown result type (might be due to invalid IL or missing references)
			//IL_0350: Unknown result type (might be due to invalid IL or missing references)
			//IL_0370: Unknown result type (might be due to invalid IL or missing references)
			//IL_0375: Unknown result type (might be due to invalid IL or missing references)
			//IL_037a: Unknown result type (might be due to invalid IL or missing references)
			//IL_037d: Unknown result type (might be due to invalid IL or missing references)
			//IL_037f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0395: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_03be: Unknown result type (might be due to invalid IL or missing references)
			//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Invalid comparison between Unknown and I4
			//IL_03f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fa: Invalid comparison between Unknown and I4
			//IL_0210: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: Unknown result type (might be due to invalid IL or missing references)
			//IL_0413: Unknown result type (might be due to invalid IL or missing references)
			//IL_0418: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_022e: Unknown result type (might be due to invalid IL or missing references)
			//IL_022f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0234: Unknown result type (might be due to invalid IL or missing references)
			//IL_023b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0242: Unknown result type (might be due to invalid IL or missing references)
			//IL_0430: Unknown result type (might be due to invalid IL or missing references)
			//IL_0435: Unknown result type (might be due to invalid IL or missing references)
			//IL_0437: Unknown result type (might be due to invalid IL or missing references)
			//IL_043c: Unknown result type (might be due to invalid IL or missing references)
			//IL_043e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0445: Unknown result type (might be due to invalid IL or missing references)
			float num = 84f;
			Rect val = default(Rect);
			((Rect)(ref val))..ctor(((Rect)(ref mapArea)).x + 14f, ((Rect)(ref mapArea)).yMax - num - 14f, num, num);
			Vector2 center = ((Rect)(ref val)).center;
			GUI.color = new Color(0.05f, 0.05f, 0.08f, 0.88f);
			GUI.DrawTexture(new Rect(((Rect)(ref val)).x - 4f, ((Rect)(ref val)).y - 4f, num + 8f, num + 8f), (Texture)(object)_dotTex);
			GUI.color = Color.white;
			GUI.DrawTexture(val, (Texture)(object)_hueWheelTex);
			float num2 = PlayerHue.Value * (float)Math.PI * 2f;
			Vector2 val2 = center + new Vector2(Mathf.Cos(num2) * (num * 0.37f), Mathf.Sin(num2) * (num * 0.37f));
			GUI.color = Color.black;
			GUI.DrawTexture(new Rect(val2.x - 5f, val2.y - 5f, 10f, 10f), (Texture)(object)_dotTex);
			GUI.color = CurrentSelfColor;
			GUI.DrawTexture(new Rect(val2.x - 3.5f, val2.y - 3.5f, 7f, 7f), (Texture)(object)_dotTex);
			GUI.color = CurrentSelfColor;
			GUI.DrawTexture(new Rect(center.x - 10f, center.y - 6f, 9f, 12f), (Texture)(object)_dotTex);
			GUI.color = CurrentOppositePinColor;
			GUI.DrawTexture(new Rect(center.x + 1f, center.y - 6f, 9f, 12f), (Texture)(object)_dotTex);
			GUI.color = Color.white;
			if (interactive && ((int)Event.current.type == 0 || (int)Event.current.type == 3) && Event.current.button == 0 && Vector2.Distance(Event.current.mousePosition, center) <= num * 0.55f)
			{
				Vector2 val3 = Event.current.mousePosition - center;
				PlayerHue.Value = Mathf.Repeat(Mathf.Atan2(val3.y, val3.x) / ((float)Math.PI * 2f), 1f);
				Event.current.Use();
			}
			Rect val4 = default(Rect);
			((Rect)(ref val4))..ctor(((Rect)(ref mapArea)).xMax - num - 14f, ((Rect)(ref mapArea)).yMax - num - 14f, num, num);
			Vector2 center2 = ((Rect)(ref val4)).center;
			GUI.color = new Color(0.05f, 0.05f, 0.08f, 0.88f);
			GUI.DrawTexture(new Rect(((Rect)(ref val4)).x - 4f, ((Rect)(ref val4)).y - 4f, num + 8f, num + 8f), (Texture)(object)_dotTex);
			DrawCircleOutline(center2, num * 0.42f, new Color(0.85f, 0.85f, 0.9f, 0.9f), 2.5f);
			float num3 = Mathf.InverseLerp(0.6f, 12f, _bigMapZoom);
			float num4 = Mathf.Lerp(-2.3f, 2.3f, num3) - (float)Math.PI / 2f;
			Vector2 b = center2 + new Vector2(Mathf.Cos(num4) * (num * 0.36f), Mathf.Sin(num4) * (num * 0.36f));
			DrawLine(center2, b, new Color(1f, 0.85f, 0.25f, 1f), 3f);
			GUI.Label(new Rect(((Rect)(ref val4)).x, center2.y + 10f, num, 20f), $"<size=10><color=#FFD94A>   x{_bigMapZoom:F1}</color></size>");
			if (interactive && ((int)Event.current.type == 0 || (int)Event.current.type == 3) && Event.current.button == 0 && Vector2.Distance(Event.current.mousePosition, center2) <= num * 0.55f)
			{
				Vector2 val5 = Event.current.mousePosition - center2;
				float num5 = Mathf.Atan2(val5.y, val5.x) + (float)Math.PI / 2f;
				if (num5 > (float)Math.PI)
				{
					num5 -= (float)Math.PI * 2f;
				}
				float num6 = Mathf.InverseLerp(-2.3f, 2.3f, Mathf.Clamp(num5, -2.3f, 2.3f));
				_bigMapZoom = Mathf.Lerp(0.6f, 12f, num6);
				Event.current.Use();
			}
		}

		private void DrawBigMapContents(Rect localWinRect, bool interactive)
		{
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0236: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: Unknown result type (might be due to invalid IL or missing references)
			//IL_0361: Unknown result type (might be due to invalid IL or missing references)
			//IL_037a: Unknown result type (might be due to invalid IL or missing references)
			//IL_034b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0350: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0433: Unknown result type (might be due to invalid IL or missing references)
			//IL_0438: Unknown result type (might be due to invalid IL or missing references)
			//IL_0465: Unknown result type (might be due to invalid IL or missing references)
			//IL_0469: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_050f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0511: Unknown result type (might be due to invalid IL or missing references)
			//IL_0513: Unknown result type (might be due to invalid IL or missing references)
			//IL_0539: Unknown result type (might be due to invalid IL or missing references)
			//IL_053e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0592: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0624: Unknown result type (might be due to invalid IL or missing references)
			//IL_063f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0644: Unknown result type (might be due to invalid IL or missing references)
			//IL_068b: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_06cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0703: Unknown result type (might be due to invalid IL or missing references)
			//IL_071b: Unknown result type (might be due to invalid IL or missing references)
			//IL_072c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0732: Invalid comparison between Unknown and I4
			//IL_088a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0890: Invalid comparison between Unknown and I4
			//IL_0770: Unknown result type (might be due to invalid IL or missing references)
			//IL_073d: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_08da: Invalid comparison between Unknown and I4
			//IL_0894: Unknown result type (might be due to invalid IL or missing references)
			//IL_089b: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_08bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_078a: Unknown result type (might be due to invalid IL or missing references)
			//IL_078f: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_07cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0826: Unknown result type (might be due to invalid IL or missing references)
			//IL_082b: Unknown result type (might be due to invalid IL or missing references)
			//IL_086a: Unknown result type (might be due to invalid IL or missing references)
			//IL_086f: Unknown result type (might be due to invalid IL or missing references)
			Rect val = default(Rect);
			((Rect)(ref val))..ctor(((Rect)(ref localWinRect)).x + 12f, ((Rect)(ref localWinRect)).y + 44f, ((Rect)(ref localWinRect)).width - 24f, ((Rect)(ref localWinRect)).height - 56f);
			float num = (float)_w * _bigMapZoom;
			float num2 = (float)_h * _bigMapZoom;
			float num3 = (float)((Vector2Int)(ref _playerBlockPos)).x * _bigMapZoom;
			float num4 = (float)(_h - ((Vector2Int)(ref _playerBlockPos)).y) * _bigMapZoom;
			float num5 = ((Rect)(ref val)).width * 0.5f - num3 + _bigMapOffset.x;
			float num6 = ((Rect)(ref val)).height * 0.5f - num4 + _bigMapOffset.y;
			GUILayout.BeginArea(new Rect(((Rect)(ref localWinRect)).x + 12f, ((Rect)(ref localWinRect)).y + 10f, ((Rect)(ref localWinRect)).width - 24f, 30f));
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUILayout.Label(T("<b>N1ktamap</b> (ПКМ — метка)", "<b>N1ktamap</b> (RMB — pin)"), Array.Empty<GUILayoutOption>());
			if (StyledButton(T("Очист.", "Clear"), 62f))
			{
				_pins.Clear();
			}
			if (StyledButton(FullMapXRay.Value ? T("Режим: Вся карта", "Mode: Full Map") : T("Режим: Чип (Эхо)", "Mode: Chip Echo"), 142f, FullMapXRay.Value))
			{
				FullMapXRay.Value = !FullMapXRay.Value;
				RebuildFullTexture(WorldGeneration.world);
				if (OpeningAnimation.Value)
				{
					_thirdEyeOpeningMode = FullMapXRay.Value;
					_thirdEyeAnim = 1f;
				}
			}
			if (StyledButton(ShowMinimap.Value ? T($"Мини: ВКЛ [{MinimapKey.Value}]", $"Mini: ON [{MinimapKey.Value}]") : T($"Мини: ВЫКЛ [{MinimapKey.Value}]", $"Mini: OFF [{MinimapKey.Value}]"), 122f, ShowMinimap.Value))
			{
				ShowMinimap.Value = !ShowMinimap.Value;
			}
			if (StyledButton(OpeningAnimation.Value ? T("Аним: ВКЛ", "Anim: ON") : T("Аним: ВЫКЛ", "Anim: OFF"), 88f, OpeningAnimation.Value))
			{
				OpeningAnimation.Value = !OpeningAnimation.Value;
			}
			if (StyledButton(IsEn ? "EN" : "RU", 38f))
			{
				Language.Value = (IsEn ? "RU" : "EN");
			}
			if (StyledButton(T("Центр", "Center"), 60f))
			{
				_bigMapOffset = Vector2.zero;
			}
			if (StyledButton(T($"Закрыть [{BigMapKey.Value}]", $"Close [{BigMapKey.Value}]"), 96f))
			{
				_bigMapOpen = false;
			}
			GUILayout.EndHorizontal();
			GUILayout.EndArea();
			GUI.BeginGroup(val);
			GUI.DrawTexture(new Rect(num5, num6, num, num2), (Texture)(object)_mapTex);
			Vector2 val2 = default(Vector2);
			((Vector2)(ref val2))..ctor(num5 + (float)((Vector2Int)(ref _playerBlockPos)).x * _bigMapZoom, num6 + (float)(_h - ((Vector2Int)(ref _playerBlockPos)).y) * _bigMapZoom);
			foreach (EchoPulse pulse in _pulses)
			{
				float radius = pulse.MaxRadius * pulse.Progress * _bigMapZoom;
				Color currentSelfColor = CurrentSelfColor;
				currentSelfColor.a = (1f - pulse.Progress) * (pulse.IsBark ? 0.85f : 0.45f);
				DrawCircleOutline(val2, radius, currentSelfColor, pulse.IsBark ? 2.5f : 1.4f);
			}
			Vector2 b = default(Vector2);
			foreach (EchoRay echoRay in _echoRays)
			{
				((Vector2)(ref b))..ctor(num5 + (float)((Vector2Int)(ref echoRay.Target)).x * _bigMapZoom, num6 + (float)(_h - ((Vector2Int)(ref echoRay.Target)).y) * _bigMapZoom);
				Color currentSelfColor2 = CurrentSelfColor;
				currentSelfColor2.a = echoRay.Alpha * 0.8f;
				DrawLine(val2, b, currentSelfColor2, 1.3f);
			}
			Color currentOppositePinColor = CurrentOppositePinColor;
			foreach (MapPin pin in _pins)
			{
				float num7 = num5 + (float)((Vector2Int)(ref pin.Pos)).x * _bigMapZoom;
				float num8 = num6 + (float)(_h - ((Vector2Int)(ref pin.Pos)).y) * _bigMapZoom;
				GUI.color = Color.black;
				GUI.DrawTexture(new Rect(num7 - 5f, num8 - 5f, 10f, 10f), (Texture)(object)_dotTex);
				GUI.color = currentOppositePinColor;
				GUI.DrawTexture(new Rect(num7 - 4f, num8 - 4f, 8f, 8f), (Texture)(object)_dotTex);
			}
			GUI.color = new Color(0.2f, 0.85f, 1f, 1f);
			foreach (Vector2Int otherPlayer in _otherPlayers)
			{
				Vector2Int current4 = otherPlayer;
				float num9 = num5 + (float)((Vector2Int)(ref current4)).x * _bigMapZoom;
				float num10 = num6 + (float)(_h - ((Vector2Int)(ref current4)).y) * _bigMapZoom;
				GUI.DrawTexture(new Rect(num9 - 4f, num10 - 4f, 8f, 8f), (Texture)(object)_dotTex);
			}
			GUI.color = CurrentSelfColor;
			GUI.DrawTexture(new Rect(val2.x - 4f, val2.y - 4f, 8f, 8f), (Texture)(object)_dotTex);
			GUI.color = Color.white;
			GUI.EndGroup();
			DrawCornerKnobs(val, interactive);
			if (!interactive)
			{
				return;
			}
			Event current5 = Event.current;
			if (((Rect)(ref val)).Contains(current5.mousePosition))
			{
				if ((int)current5.type == 6)
				{
					_bigMapZoom = Mathf.Clamp(_bigMapZoom - current5.delta.y * 0.25f, 0.6f, 12f);
					current5.Use();
				}
				else if ((int)current5.type == 0 && current5.button == 0)
				{
					_isDragging = true;
					_lastMousePos = current5.mousePosition;
					current5.Use();
				}
				else if ((int)current5.type == 0 && current5.button == 1)
				{
					Vector2 val3 = current5.mousePosition - ((Rect)(ref val)).position;
					int num11 = Mathf.Clamp(Mathf.RoundToInt((val3.x - num5) / _bigMapZoom), 0, _w - 1);
					int num12 = Mathf.Clamp(_h - Mathf.RoundToInt((val3.y - num6) / _bigMapZoom), 0, _h - 1);
					Vector2Int clickBlock = new Vector2Int(num11, num12);
					int num13 = _pins.FindIndex((MapPin p) => Vector2Int.Distance(p.Pos, clickBlock) <= 12f / _bigMapZoom);
					if (num13 >= 0)
					{
						_pins.RemoveAt(num13);
					}
					else
					{
						_pins.Add(new MapPin
						{
							Pos = clickBlock
						});
					}
					current5.Use();
				}
			}
			if (_isDragging && (int)current5.type == 3)
			{
				_bigMapOffset += current5.mousePosition - _lastMousePos;
				_lastMousePos = current5.mousePosition;
				current5.Use();
			}
			else if (_isDragging && (int)current5.type == 1)
			{
				_isDragging = false;
			}
		}
	}
}