ESP.dll

Decompiled 3 weeks ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Service;
using TMPro;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.UI;
using Visualization;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyCompany("ESP")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ESP")]
[assembly: AssemblyTitle("ESP")]
[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 Visualization
{
	public class Draw : Component
	{
		public const string TriggerLayer = "character_trigger";

		private static Shader? lineShader;

		private static readonly Dictionary<string, Color> colors = new Dictionary<string, Color>();

		private static readonly Dictionary<string, int> lineWidths = new Dictionary<string, int>();

		private static Shader LineShader => lineShader ?? (lineShader = ((IEnumerable<Shader>)Resources.FindObjectsOfTypeAll<Shader>()).FirstOrDefault((Func<Shader, bool>)((Shader shader) => ((Object)shader).name == "Particles/Standard Unlit2")) ?? throw new Exception("Shader not found."));

		private static int GetSegments(float angle)
		{
			return (int)Math.Floor(32f * angle / 360f);
		}

		private static Vector3 GetArcSegmentX(float angle, float radius)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			return new Vector3(0f, Mathf.Sin((float)Math.PI / 180f * angle) * radius, Mathf.Cos((float)Math.PI / 180f * angle) * radius);
		}

		private static Vector3 GetArcSegmentY(float angle, float radius)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			return new Vector3(Mathf.Sin((float)Math.PI / 180f * angle) * radius, 0f, Mathf.Cos((float)Math.PI / 180f * angle) * radius);
		}

		private static Vector3 GetArcSegmentZ(float angle, float radius)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			return new Vector3(Mathf.Sin((float)Math.PI / 180f * angle) * radius, Mathf.Cos((float)Math.PI / 180f * angle) * radius, 0f);
		}

		private static Vector3[] GetArcSegmentsX(Vector3 position, float angle, float radius)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			float num = (0f - angle) / 2f;
			int segments = GetSegments(angle);
			Vector3[] array = (Vector3[])(object)new Vector3[segments + 1];
			for (int i = 0; i <= segments; i++)
			{
				array[i] = position + GetArcSegmentX(num, radius);
				num += angle / (float)segments;
			}
			return array;
		}

		private static Vector3[] GetArcSegmentsY(Vector3 position, float angle, float radius)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			float num = (0f - angle) / 2f;
			int segments = GetSegments(angle);
			Vector3[] array = (Vector3[])(object)new Vector3[segments + 1];
			for (int i = 0; i <= segments; i++)
			{
				array[i] = position + GetArcSegmentY(num, radius);
				num += angle / (float)segments;
			}
			return array;
		}

		private static Vector3[] GetArcSegmentsZ(Vector3 position, float angle, float radius)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			float num = (0f - angle) / 2f;
			int segments = GetSegments(angle);
			Vector3[] array = (Vector3[])(object)new Vector3[segments + 1];
			for (int i = 0; i <= segments; i++)
			{
				array[i] = position + GetArcSegmentZ(num, radius);
				num += angle / (float)segments;
			}
			return array;
		}

		private static void UpdateArcX(LineRenderer renderer, Vector3 position, float radius, float angle, float width)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			Vector3[] arcSegmentsX = GetArcSegmentsX(position, angle, radius - width / 2f);
			renderer.positionCount = arcSegmentsX.Length;
			renderer.SetPositions(arcSegmentsX);
		}

		public static void DrawArcX(GameObject obj, Vector3 position, float radius, float angle)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			UpdateArcX(CreateRenderer(obj), position, radius, angle, GetLineWidth(((Object)obj).name));
		}

		private static void UpdateArcY(LineRenderer renderer, Vector3 position, float radius, float angle, float width)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			Vector3[] arcSegmentsY = GetArcSegmentsY(position, angle, radius - width / 2f);
			renderer.positionCount = arcSegmentsY.Length;
			renderer.SetPositions(arcSegmentsY);
		}

		public static void DrawArcY(GameObject obj, Vector3 position, float radius, float angle)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			UpdateArcY(CreateRenderer(obj), position, radius, angle, GetLineWidth(((Object)obj).name));
		}

		private static void UpdateArcZ(LineRenderer renderer, Vector3 position, float radius, float angle, float width)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			Vector3[] arcSegmentsZ = GetArcSegmentsZ(position, angle, radius - width / 2f);
			renderer.positionCount = arcSegmentsZ.Length;
			renderer.SetPositions(arcSegmentsZ);
		}

		public static void DrawArcZ(GameObject obj, Vector3 position, float radius, float angle)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			UpdateArcZ(CreateRenderer(obj), position, radius, angle, GetLineWidth(((Object)obj).name));
		}

		public static GameObject DrawArc(string tag, MonoBehaviour parent, Vector3 position, float radius, float angle)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			GameObject obj = CreateObject(((Component)parent).gameObject, tag);
			DrawArcY(CreateObject(obj, tag), position, radius, angle);
			DrawArcX(CreateObject(obj, tag), position, radius, angle);
			AddMeshCollider(obj);
			return obj;
		}

		public static void DrawConeX(GameObject obj, Vector3 position, float radius, float angle)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			LineRenderer val = CreateRenderer(obj);
			float lineWidth = GetLineWidth(((Object)obj).name);
			Vector3[] arcSegmentsX = GetArcSegmentsX(position, angle, radius - lineWidth / 2f);
			val.positionCount = arcSegmentsX.Length + 2;
			val.SetPosition(0, position);
			for (int i = 0; i < arcSegmentsX.Length; i++)
			{
				val.SetPosition(i + 1, arcSegmentsX[i]);
			}
			val.SetPosition(arcSegmentsX.Length + 1, position);
		}

		public static void DrawConeY(GameObject obj, Vector3 position, float radius, float angle)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			LineRenderer val = CreateRenderer(obj);
			float lineWidth = GetLineWidth(((Object)obj).name);
			Vector3[] arcSegmentsY = GetArcSegmentsY(position, angle, radius - lineWidth / 2f);
			val.positionCount = arcSegmentsY.Length + 2;
			val.SetPosition(0, position);
			for (int i = 0; i < arcSegmentsY.Length; i++)
			{
				val.SetPosition(i + 1, arcSegmentsY[i]);
			}
			val.SetPosition(arcSegmentsY.Length + 1, position);
		}

		public static void DrawConeZ(GameObject obj, Vector3 position, float radius, float angle)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			LineRenderer val = CreateRenderer(obj);
			float lineWidth = GetLineWidth(((Object)obj).name);
			Vector3[] arcSegmentsZ = GetArcSegmentsZ(position, angle, radius - lineWidth / 2f);
			val.positionCount = arcSegmentsZ.Length + 2;
			val.SetPosition(0, position);
			for (int i = 0; i < arcSegmentsZ.Length; i++)
			{
				val.SetPosition(i + 1, arcSegmentsZ[i]);
			}
			val.SetPosition(arcSegmentsZ.Length + 1, position);
		}

		public static GameObject DrawCone(string tag, MonoBehaviour parent, Vector3 position, float radius, float angle)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			GameObject obj = CreateObject(((Component)parent).gameObject, tag);
			DrawConeY(CreateObject(obj, tag), position, radius, angle);
			DrawConeX(CreateObject(obj, tag), position, radius, angle);
			AddMeshCollider(obj);
			return obj;
		}

		private static GameObject CreateObject(GameObject parent, string tag, Quaternion? fixedRotation = null)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Expected O, but got Unknown
			//IL_002d: 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)
			GameObject val = new GameObject
			{
				layer = LayerMask.NameToLayer("character_trigger")
			};
			val.transform.parent = parent.transform;
			val.transform.localPosition = Vector3.zero;
			val.transform.localRotation = Quaternion.identity;
			if (tag != "")
			{
				((Object)val).name = tag;
				Visualization visualization = val.AddComponent<Visualization>();
				visualization.Tag = tag;
				visualization.FixedRotation = fixedRotation;
				val.SetActive(Visibility.IsTag(tag));
			}
			return val;
		}

		private static LineRenderer CreateRenderer(GameObject obj)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			LineRenderer obj2 = obj.AddComponent<LineRenderer>();
			obj2.useWorldSpace = false;
			Material val = new Material(LineShader);
			val.SetColor("_Color", GetColor(((Object)obj).name));
			val.SetFloat("_BlendOp", 1f);
			Texture2D val2 = new Texture2D(1, 1);
			val2.SetPixel(0, 0, Color.gray);
			val.SetTexture("_MainTex", (Texture)(object)val2);
			((Renderer)obj2).material = val;
			((Renderer)obj2).shadowCastingMode = (ShadowCastingMode)0;
			obj2.widthMultiplier = GetLineWidth(((Object)obj).name);
			return obj2;
		}

		private static void ChangeColor(GameObject obj)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			Color color = GetColor(((Object)obj).name);
			LineRenderer component = obj.GetComponent<LineRenderer>();
			if (Object.op_Implicit((Object)(object)component))
			{
				((Renderer)component).material.SetColor("_Color", color);
			}
		}

		private static void ChangeLineWidth(GameObject obj)
		{
			float lineWidth = GetLineWidth(((Object)obj).name);
			LineRenderer component = obj.GetComponent<LineRenderer>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.widthMultiplier = lineWidth;
			}
		}

		public static void AddMeshCollider(GameObject obj)
		{
			GameObject obj2 = obj;
			Array.ForEach(obj2.GetComponentsInChildren<LineRenderer>(), delegate(LineRenderer renderer)
			{
				//IL_0019: Unknown result type (might be due to invalid IL or missing references)
				//IL_001f: Expected O, but got Unknown
				MeshCollider obj3 = obj2.AddComponent<MeshCollider>();
				obj3.convex = true;
				((Collider)obj3).isTrigger = true;
				Mesh val = new Mesh();
				renderer.BakeMesh(val, false);
				obj3.sharedMesh = val;
			});
		}

		public static void AddText(GameObject obj, string title, string text)
		{
			StaticText staticText = obj.AddComponent<StaticText>();
			staticText.text = text;
			staticText.title = title;
		}

		public static LineRenderer[] GetRenderers(MonoBehaviour obj, string tag)
		{
			return GetRenderers(obj, new string[1] { tag });
		}

		public static LineRenderer[] GetRenderers(MonoBehaviour obj, string[] tags)
		{
			HashSet<string> set = tags.ToHashSet();
			return ((Component)obj).GetComponentsInChildren<LineRenderer>(true).Where(delegate(LineRenderer renderer)
			{
				Visualization component = ((Component)renderer).GetComponent<Visualization>();
				return Object.op_Implicit((Object)(object)component) && set.Contains(component.Tag);
			}).ToArray();
		}

		public static Color GetColor(string tag)
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			if (!colors.ContainsKey(tag))
			{
				return Color.white;
			}
			return colors[tag];
		}

		public static void SetColor(string tag, Color color)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			colors[tag] = color;
			Visualization[] visualizations = Utils.GetVisualizations();
			foreach (Visualization visualization in visualizations)
			{
				if (visualization.Tag == tag)
				{
					ChangeColor(((Component)visualization).gameObject);
				}
			}
		}

		public static float GetLineWidth(string tag)
		{
			return (float)Math.Max(1, lineWidths.ContainsKey(tag) ? lineWidths[tag] : 0) / 100f;
		}

		public static void SetLineWidth(string tag, int width)
		{
			lineWidths[tag] = width;
			Visualization[] visualizations = Utils.GetVisualizations();
			foreach (Visualization visualization in visualizations)
			{
				if (visualization.Tag == tag)
				{
					ChangeLineWidth(((Component)visualization).gameObject);
				}
			}
		}

		public static GameObject DrawCylinder(string tag, MonoBehaviour parent, float radius)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: 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_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: 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)
			GameObject obj = CreateObject(((Component)parent).gameObject, tag);
			DrawArcY(CreateObject(obj, tag), Vector3.zero, radius, 360f);
			float lineWidth = GetLineWidth(tag);
			AddSphereCollider(obj, radius - lineWidth / 2f);
			Vector3 start = default(Vector3);
			((Vector3)(ref start))..ctor(radius, -500f, 0f);
			Vector3 end = default(Vector3);
			((Vector3)(ref end))..ctor(radius, 500f, 0f);
			AddBoxCollider(DrawLineSub(CreateObject(obj, tag), start, end));
			((Vector3)(ref start))..ctor(0f - radius, -500f, 0f);
			((Vector3)(ref end))..ctor(0f - radius, 500f, 0f);
			AddBoxCollider(DrawLineSub(CreateObject(obj, tag), start, end));
			((Vector3)(ref start))..ctor(0f, -500f, radius);
			((Vector3)(ref end))..ctor(0f, 500f, radius);
			AddBoxCollider(DrawLineSub(CreateObject(obj, tag), start, end));
			((Vector3)(ref start))..ctor(0f, -500f, 0f - radius);
			((Vector3)(ref end))..ctor(0f, 500f, 0f - radius);
			AddBoxCollider(DrawLineSub(CreateObject(obj, tag), start, end));
			return obj;
		}

		private static void AddBoxCollider(GameObject obj)
		{
			GameObject obj2 = obj;
			Array.ForEach(obj2.GetComponentsInChildren<LineRenderer>(), delegate(LineRenderer renderer)
			{
				//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_0011: 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_0031: 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_0033: Unknown result type (might be due to invalid IL or missing references)
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_003e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0043: Unknown result type (might be due to invalid IL or missing references)
				//IL_004d: Unknown result type (might be due to invalid IL or missing references)
				//IL_004e: Unknown result type (might be due to invalid IL or missing references)
				//IL_004f: 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_0057: Unknown result type (might be due to invalid IL or missing references)
				//IL_0069: Unknown result type (might be due to invalid IL or missing references)
				//IL_007b: Unknown result type (might be due to invalid IL or missing references)
				//IL_008b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0094: Unknown result type (might be due to invalid IL or missing references)
				//IL_0099: 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)
				Vector3 position = renderer.GetPosition(0);
				Vector3 position2 = renderer.GetPosition(renderer.positionCount - 1);
				float widthMultiplier = renderer.widthMultiplier;
				BoxCollider obj3 = obj2.AddComponent<BoxCollider>();
				((Collider)obj3).isTrigger = true;
				obj3.center = position + (position2 - position) / 2f;
				Vector3 val = position2 - position;
				val.x = Math.Abs(val.x);
				val.y = Math.Abs(val.y);
				val.z = Math.Abs(val.z);
				obj3.size = val + 2f * new Vector3(widthMultiplier, widthMultiplier, widthMultiplier);
			});
		}

		private static void AddBoxCollider(GameObject obj, Vector3 center, Vector3 size)
		{
			//IL_000e: 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)
			BoxCollider obj2 = obj.AddComponent<BoxCollider>();
			((Collider)obj2).isTrigger = true;
			obj2.center = center;
			obj2.size = size;
		}

		private static GameObject DrawLineSub(GameObject obj, Vector3 start, Vector3 end)
		{
			//IL_0008: 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)
			LineRenderer obj2 = CreateRenderer(obj);
			obj2.SetPosition(0, start);
			obj2.SetPosition(1, end);
			return obj;
		}

		public static GameObject DrawLine(string tag, MonoBehaviour parent, Vector3 start, Vector3 end)
		{
			//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)
			GameObject obj = DrawLineSub(CreateObject(((Component)parent).gameObject, tag), start, end);
			AddBoxCollider(obj);
			return obj;
		}

		public static GameObject DrawLineWithFixedRotation(string tag, MonoBehaviour parent, Vector3 start, Vector3 end)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//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_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: 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_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			Quaternion val = Quaternion.FromToRotation(Vector3.forward, end - start);
			GameObject obj = CreateObject(((Component)parent).gameObject, tag, val);
			Vector3 start2 = Quaternion.Inverse(val) * start;
			Vector3 end2 = Quaternion.Inverse(val) * end;
			GameObject obj2 = DrawLineSub(obj, start2, end2);
			AddBoxCollider(obj2);
			return obj2;
		}

		public static GameObject DrawMarkerLine(string tag, MonoBehaviour parent)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return DrawMarkerLine(tag, parent, Vector3.zero);
		}

		public static GameObject DrawMarkerLine(string tag, MonoBehaviour parent, Vector3 start)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			Vector3 end = default(Vector3);
			((Vector3)(ref end))..ctor(start.x, 500f, start.z);
			GameObject obj = DrawLineSub(CreateObject(((Component)parent).gameObject, tag, Quaternion.identity), start, end);
			AddBoxCollider(obj);
			return obj;
		}

		public static GameObject DrawBox(string tag, MonoBehaviour parent, Vector3 size)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: 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_002a: 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_003a: 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_0051: 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_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: 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_00a7: 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)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: 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)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: 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_00e9: 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_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: 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_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: 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_0134: 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_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: 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_0159: 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_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: 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_019e: 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_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: 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_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: 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_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_0220: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = size / 2f;
			float num = GetLineWidth(tag) / 2f;
			if (num > val.x)
			{
				num = val.x;
			}
			if (num > val.y)
			{
				num = val.y;
			}
			if (num > val.z)
			{
				num = val.z;
			}
			Vector3[] array = (Vector3[])(object)new Vector3[8]
			{
				new Vector3(0f - val.x + num, 0f - val.y + num, 0f - val.z + num),
				new Vector3(0f - val.x + num, 0f - val.y + num, val.z - num),
				new Vector3(0f - val.x + num, val.y - num, 0f - val.z + num),
				new Vector3(0f - val.x + num, val.y - num, val.z - num),
				new Vector3(val.x - num, 0f - val.y + num, 0f - val.z + num),
				new Vector3(val.x - num, 0f - val.y + num, val.z - num),
				new Vector3(val.x - num, val.y - num, 0f - val.z + num),
				new Vector3(val.x - num, val.y - num, val.z - num)
			};
			GameObject val2 = CreateObject(((Component)parent).gameObject, tag);
			for (int i = 0; i < array.Length; i++)
			{
				Vector3 val3 = array[i];
				for (int j = i + 1; j < array.Length; j++)
				{
					Vector3 val4 = array[j];
					int num2 = 0;
					if (val3.x == val4.x)
					{
						num2++;
					}
					if (val3.y == val4.y)
					{
						num2++;
					}
					if (val3.z == val4.z)
					{
						num2++;
					}
					if (num2 == 2)
					{
						DrawLineSub(CreateObject(val2, tag), array[i], array[j]);
					}
				}
			}
			return val2;
		}

		public static void AddSphereCollider(GameObject obj, float radius)
		{
			GameObject obj2 = obj;
			Array.ForEach(obj2.GetComponentsInChildren<LineRenderer>(), delegate
			{
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				SphereCollider obj3 = obj2.AddComponent<SphereCollider>();
				((Collider)obj3).isTrigger = true;
				obj3.center = Vector3.zero;
				obj3.radius = radius;
			});
		}

		public static void UpdateSphereCollider(MonoBehaviour obj, float radius)
		{
			Array.ForEach(((Component)obj).GetComponentsInChildren<SphereCollider>(), delegate(SphereCollider collider)
			{
				collider.radius = radius;
			});
		}

		public static void UpdateSphere(MonoBehaviour parent, float radius)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: 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)
			LineRenderer[] componentsInChildren = ((Component)parent).GetComponentsInChildren<LineRenderer>();
			if (componentsInChildren.Length == 3)
			{
				float widthMultiplier = componentsInChildren[0].widthMultiplier;
				UpdateArcX(componentsInChildren[0], Vector3.zero, radius, 360f, widthMultiplier);
				UpdateArcY(componentsInChildren[1], Vector3.zero, radius, 360f, widthMultiplier);
				UpdateArcZ(componentsInChildren[2], Vector3.zero, radius, 360f, widthMultiplier);
				UpdateSphereCollider(parent, radius - widthMultiplier / 2f);
			}
		}

		public static GameObject DrawSphere(string tag, MonoBehaviour parent, float radius)
		{
			return DrawSphere(tag, ((Component)parent).gameObject, radius);
		}

		public static GameObject DrawSphere(string tag, GameObject parent, float radius)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			GameObject obj = CreateObject(parent, tag);
			DrawArcX(CreateObject(obj, tag), Vector3.zero, radius, 360f);
			float lineWidth = GetLineWidth(tag);
			AddSphereCollider(obj, radius - lineWidth / 2f);
			DrawArcY(CreateObject(obj, tag), Vector3.zero, radius, 360f);
			DrawArcZ(CreateObject(obj, tag), Vector3.zero, radius, 360f);
			return obj;
		}

		public static GameObject DrawCapsule(string tag, MonoBehaviour parent, float radius, float height)
		{
			return DrawCapsule(tag, ((Component)parent).gameObject, radius, height);
		}

		public static GameObject DrawCapsule(string tag, GameObject parent, float radius, float height)
		{
			//IL_0011: 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_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: 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_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: 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_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: 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_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: 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_015b: 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_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: 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_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: 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_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			GameObject obj = CreateObject(parent, tag);
			Vector3 val = Vector3.up * (height - radius);
			Vector3 val2 = Vector3.up * radius;
			float num = GetLineWidth(tag) / 2f;
			float num2 = Mathf.Max(0f, radius - num);
			DrawArcX(CreateObject(obj, tag), val, radius, 360f);
			DrawArcY(CreateObject(obj, tag), val, radius, 360f);
			DrawArcZ(CreateObject(obj, tag), val, radius, 360f);
			DrawArcX(CreateObject(obj, tag), val2, radius, 360f);
			DrawArcY(CreateObject(obj, tag), val2, radius, 360f);
			DrawArcZ(CreateObject(obj, tag), val2, radius, 360f);
			DrawLineSub(CreateObject(obj, tag), val + Vector3.left * num2, val2 + Vector3.left * num2);
			DrawLineSub(CreateObject(obj, tag), val + Vector3.right * num2, val2 + Vector3.right * num2);
			DrawLineSub(CreateObject(obj, tag), val + Vector3.forward * num2, val2 + Vector3.forward * num2);
			DrawLineSub(CreateObject(obj, tag), val + Vector3.back * num2, val2 + Vector3.back * num2);
			return obj;
		}
	}
	public class Utils
	{
		public static Visualization[] GetVisualizations()
		{
			return Resources.FindObjectsOfTypeAll<Visualization>();
		}
	}
	[HarmonyPatch(typeof(Player), "UpdateHover")]
	public class Player_AddHoverForVisuals
	{
		private static void Postfix(ref GameObject ___m_hovering, ref GameObject ___m_hoveringCreature)
		{
			//IL_0037: 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_005c: 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_0071: 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_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)___m_hovering) || Object.op_Implicit((Object)(object)___m_hoveringCreature))
			{
				return;
			}
			float num = 100f;
			int mask = LayerMask.GetMask(new string[1] { "character_trigger" });
			RaycastHit[] array = Physics.RaycastAll(((Component)GameCamera.instance).transform.position, ((Component)GameCamera.instance).transform.forward, num, mask);
			RaycastHit[] array2 = Physics.RaycastAll(((Component)GameCamera.instance).transform.position + ((Component)GameCamera.instance).transform.forward * num, -((Component)GameCamera.instance).transform.forward, num, mask);
			RaycastHit[] array3 = CollectionExtensions.AddRangeToArray<RaycastHit>(array, array2);
			Array.Sort(array3, (RaycastHit x, RaycastHit y) => ((RaycastHit)(ref x)).distance.CompareTo(((RaycastHit)(ref y)).distance));
			RaycastHit[] array4 = array3;
			for (int i = 0; i < array4.Length; i++)
			{
				RaycastHit val = array4[i];
				if ((Object)(object)((Component)((RaycastHit)(ref val)).collider).GetComponent<Visualization>() != (Object)null)
				{
					___m_hovering = ((Component)((RaycastHit)(ref val)).collider).gameObject;
					break;
				}
			}
		}
	}
	public class StaticText : MonoBehaviour, Hoverable
	{
		public string title = "";

		public string text = "";

		public string GetHoverText()
		{
			return Format.String(title) + "\n" + text;
		}

		public string GetHoverName()
		{
			return title;
		}
	}
	public class Visualization : MonoBehaviour
	{
		public string Tag = "";

		public Quaternion? FixedRotation;

		public void Update()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			if (FixedRotation.HasValue)
			{
				((Component)this).transform.rotation = FixedRotation.Value;
			}
		}
	}
	public class Visibility : Component
	{
		private static bool visible = false;

		private static readonly HashSet<string> visibleTags = new HashSet<string>();

		private static readonly HashSet<string> tags = new HashSet<string>();

		private static readonly Dictionary<string, string> tagToGroup = new Dictionary<string, string>();

		public static List<string> GetTags
		{
			get
			{
				List<string> list = new List<string>();
				foreach (string tag in tags)
				{
					list.Add(tag);
				}
				return list;
			}
		}

		public static bool IsTag(string name)
		{
			if (visible && visibleTags.Contains(name))
			{
				return !tagToGroup.ContainsKey(name);
			}
			return false;
		}

		public static void Set(bool visibility)
		{
			visible = visibility;
			UpdateVisibility();
		}

		public static void ToggleTag(string tag)
		{
			SetTag(tag, !visibleTags.Contains(tag));
		}

		public static void SetTag(string tag, bool visibility)
		{
			tags.Add(tag);
			if (visibility)
			{
				visibleTags.Add(tag);
			}
			else
			{
				visibleTags.Remove(tag);
			}
			UpdateTagVisibility(tag);
		}

		private static void UpdateTagVisibility(string name)
		{
			Visualization[] visualizations = Utils.GetVisualizations();
			foreach (Visualization visualization in visualizations)
			{
				if (!(visualization.Tag != name))
				{
					UpdateVisibility(visualization);
				}
			}
		}

		private static void UpdateVisibility()
		{
			Visualization[] visualizations = Utils.GetVisualizations();
			for (int i = 0; i < visualizations.Length; i++)
			{
				UpdateVisibility(visualizations[i]);
			}
		}

		private static void UpdateVisibility(Visualization obj)
		{
			GameObject gameObject = ((Component)obj).gameObject;
			bool flag = IsTag(obj.Tag);
			if (gameObject.activeSelf != flag)
			{
				gameObject.SetActive(flag);
			}
		}
	}
}
namespace Service
{
	public static class Admin
	{
		public static IAdmin Instance = new DefaultAdmin();

		public static bool Enabled
		{
			get
			{
				return Instance.Enabled;
			}
			set
			{
				Instance.Enabled = value;
			}
		}

		public static bool Checking
		{
			get
			{
				return Instance.Checking;
			}
			set
			{
				Instance.Checking = value;
			}
		}

		public static void Check()
		{
			Instance.Check();
		}

		public static void Verify(string text)
		{
			Instance.Verify(text);
		}
	}
	public interface IAdmin
	{
		bool Enabled { get; set; }

		bool Checking { get; set; }

		void Check();

		void Verify(string text);
	}
	public class DefaultAdmin : IAdmin
	{
		public virtual bool Enabled { get; set; }

		public virtual bool Checking { get; set; }

		public void Check()
		{
			if (Object.op_Implicit((Object)(object)ZNet.instance))
			{
				Checking = true;
				if (ZNet.instance.IsServer())
				{
					OnSuccess();
				}
				else
				{
					ZNet.instance.Unban("admintest");
				}
			}
		}

		public void Verify(string text)
		{
			if (text == "Unbanning user admintest")
			{
				OnSuccess();
			}
			else
			{
				OnFail();
			}
		}

		protected virtual void OnSuccess()
		{
			Checking = false;
			Enabled = true;
		}

		protected virtual void OnFail()
		{
			Checking = false;
			Enabled = false;
		}
	}
	[HarmonyPatch(typeof(ZNet), "RPC_RemotePrint")]
	public class ZNet_RPC_RemotePrint
	{
		private static bool Prefix(string text)
		{
			if (!Admin.Checking)
			{
				return true;
			}
			Admin.Verify(text);
			return false;
		}
	}
	[HarmonyPatch(typeof(Game), "UpdateRespawn")]
	public class CheckAdmin
	{
		private static void Prefix(bool ___m_firstSpawn, ref bool __state)
		{
			if (___m_firstSpawn)
			{
				Admin.Enabled = false;
			}
			__state = ___m_firstSpawn;
		}

		private static void Postfix(bool ___m_firstSpawn, bool __state)
		{
			if (__state && !___m_firstSpawn && !Admin.Checking)
			{
				Admin.Check();
			}
		}
	}
	public class Format
	{
		public const string FORMAT = "0.##";

		public static string GetValidColor(bool valid)
		{
			if (!valid)
			{
				return "grey";
			}
			return "yellow";
		}

		public static string String(string value, string color = "yellow")
		{
			return "<color=" + color + ">" + value + "</color>";
		}

		public static string String(string value, bool valid)
		{
			return "<color=" + GetValidColor(valid) + ">" + value + "</color>";
		}

		public static string Float(double value, string format = "0.##", string color = "yellow")
		{
			return String(value.ToString(format, CultureInfo.InvariantCulture), color);
		}

		public static string Multiplier(double value, string color = "yellow")
		{
			return String(value.ToString("0.##", CultureInfo.InvariantCulture) + "x", color);
		}

		public static string Meters(double value, string color = "yellow")
		{
			return String(value.ToString("0.##", CultureInfo.InvariantCulture) + " meters", color);
		}

		public static string Degrees(double value, string color = "yellow")
		{
			return String(value.ToString("0.##", CultureInfo.InvariantCulture) + " degrees", color);
		}

		public static string Fixed(double value)
		{
			return String(value.ToString("N2", CultureInfo.InvariantCulture).PadLeft(5, '0'));
		}

		public static string Percent(double value, string color = "yellow")
		{
			return String((100.0 * value).ToString("0.##", CultureInfo.InvariantCulture) + " %", color);
		}

		public static string PercentInt(double value, string color = "yellow")
		{
			return String(value.ToString("P0", CultureInfo.InvariantCulture), color);
		}

		public static string Range(double min, double max, string color = "yellow")
		{
			if (min == max)
			{
				return String(max.ToString("0.##", CultureInfo.InvariantCulture), color);
			}
			return String(min.ToString("0.##", CultureInfo.InvariantCulture), color) + "-" + String(max.ToString("0.##", CultureInfo.InvariantCulture), color);
		}

		public static string PercentRange(double min, double max)
		{
			if (min == max)
			{
				return max.ToString("P0", CultureInfo.InvariantCulture);
			}
			return min.ToString("P0", CultureInfo.InvariantCulture) + "-" + max.ToString("P0", CultureInfo.InvariantCulture);
		}

		public static string Progress(double value, double limit, bool percent = false)
		{
			return String(value.ToString("N0")) + "/" + String(limit.ToString("N0")) + (percent ? (" (" + PercentInt(value / limit) + ")") : "");
		}

		public static string Int(double value, string color = "yellow")
		{
			return String(value.ToString("N0"), color);
		}

		public static string ProgressPercent(string header, double value, double limit)
		{
			return header + ": " + Progress(value, limit) + " seconds (" + Percent(value / limit) + ")";
		}

		public static string Coordinates(Vector3 coordinates, string format = "F0", string color = "yellow")
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			string color2 = color;
			Vector3 val = default(Vector3);
			((Vector3)(ref val))..ctor(coordinates.x, coordinates.z, coordinates.y);
			return JoinRow(from value in ((Vector3)(ref val)).ToString(format).Replace("(", "").Replace(")", "")
					.Split(new char[1] { ',' })
				select String(value.Trim(), color2));
		}

		public static string JoinLines(IEnumerable<string> lines)
		{
			return string.Join("\n", lines.Where((string line) => line != ""));
		}

		public static string JoinRow(IEnumerable<string> lines)
		{
			return string.Join(", ", lines.Where((string line) => line != ""));
		}
	}
	public class Helper
	{
		private static T Get<T>(object obj, string field)
		{
			return Traverse.Create(obj).Field<T>(field).Value;
		}

		public static ZNetView Nview(MonoBehaviour obj)
		{
			return Get<ZNetView>(obj, "m_nview");
		}

		public static double GetElapsed(MonoBehaviour obj, string key, long defaultValue = 0L)
		{
			DateTime time = ZNet.instance.GetTime();
			DateTime dateTime = GetDateTime(obj, key, defaultValue);
			return (time - dateTime).TotalSeconds;
		}

		public static double GetElapsed(MonoBehaviour obj, int key, long defaultValue = 0L)
		{
			DateTime time = ZNet.instance.GetTime();
			DateTime dateTime = GetDateTime(obj, key, defaultValue);
			return (time - dateTime).TotalSeconds;
		}

		public static DateTime GetDateTime(MonoBehaviour obj, string key, long defaultValue = 0L)
		{
			return new DateTime(GetLong(obj, key, defaultValue));
		}

		public static DateTime GetDateTime(MonoBehaviour obj, int key, long defaultValue = 0L)
		{
			return new DateTime(GetLong(obj, key, defaultValue));
		}

		public static float GetFloat(MonoBehaviour obj, string key, float defaultValue = 0f)
		{
			return Nview(obj).GetZDO().GetFloat(key, defaultValue);
		}

		public static long GetLong(MonoBehaviour obj, string key, long defaultValue = 0L)
		{
			return Nview(obj).GetZDO().GetLong(key, defaultValue);
		}

		public static long GetLong(MonoBehaviour obj, int key, long defaultValue = 0L)
		{
			return Nview(obj).GetZDO().GetLong(key, defaultValue);
		}

		public static int GetInt(MonoBehaviour obj, string key, int defaultValue = 0)
		{
			return Nview(obj).GetZDO().GetInt(key, defaultValue);
		}

		public static bool GetBool(MonoBehaviour obj, string key, bool defaultValue = false)
		{
			return Nview(obj).GetZDO().GetBool(key, defaultValue);
		}

		public static string GetString(MonoBehaviour obj, string key, string defaultValue = "")
		{
			return Nview(obj).GetZDO().GetString(key, defaultValue);
		}

		public static GameObject GetPrefab(MonoBehaviour obj)
		{
			return ZNetScene.instance.GetPrefab(Nview(obj).GetZDO().GetPrefab());
		}

		public static bool IsValid(MonoBehaviour obj)
		{
			if (!Object.op_Implicit((Object)(object)obj))
			{
				return false;
			}
			ZNetView val = Nview(obj);
			if (!Object.op_Implicit((Object)(object)val))
			{
				return false;
			}
			return val.IsValid();
		}
	}
	[HarmonyPatch(typeof(MessageHud), "Update")]
	[HarmonyPriority(200)]
	public class MessageHud_UpdateMessage : MonoBehaviour
	{
		public static Func<List<string>> GetMessage = () => new List<string> { "Default message. Replace with your own function." };

		private static void Postfix(MessageHud __instance)
		{
			if ((Object)(object)Player.m_localPlayer == (Object)null || Hud.IsUserHidden())
			{
				return;
			}
			__instance.m_messageText.alignment = (TextAlignmentOptions)257;
			string text = __instance.m_messageText.text;
			List<string> list = GetMessage();
			if (list.Count != 0)
			{
				if (text != "")
				{
					list.Add(" ");
					list.Add(text);
				}
				__instance.m_messageText.text = Format.JoinLines(list);
				((Graphic)__instance.m_messageText).CrossFadeAlpha(1f, 0f, true);
				((Graphic)__instance.m_messageIcon).canvasRenderer.SetAlpha(0f);
				((Graphic)__instance.m_messageIcon).CrossFadeAlpha(0f, 0f, true);
			}
		}
	}
	[HarmonyPatch(typeof(MessageHud), "UpdateMessage")]
	public class MessageHud_GetBaseMessage : MonoBehaviour
	{
		private static string BaseMessage = "";

		private static void Prefix(out string __state)
		{
			__state = MessageHud.instance.m_messageText.text;
		}

		private static void Postfix(MessageHud __instance, float ___m_msgQueueTimer, string __state)
		{
			if (__instance.m_messageText.text != __state)
			{
				BaseMessage = __instance.m_messageText.text;
			}
			if (___m_msgQueueTimer >= 4f)
			{
				BaseMessage = "";
			}
			__instance.m_messageText.text = BaseMessage;
		}
	}
	public class Translate
	{
		public static string Name(string name, string color = "yellow")
		{
			return Format.String(Localization.instance.Localize(name).Replace("(Clone)", ""), color);
		}

		public static string Name(Biome obj, string color = "yellow")
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			return Name(Enum.GetName(typeof(Biome), obj), color);
		}

		private static string Name(Character obj)
		{
			if (!Object.op_Implicit((Object)(object)obj))
			{
				return "";
			}
			return obj.m_name;
		}

		public static string Name(ItemData obj, string color = "yellow")
		{
			if (!Object.op_Implicit((Object)(object)obj?.m_dropPrefab))
			{
				return Name(obj?.m_shared?.m_name ?? "");
			}
			return Name(Utils.GetPrefabName(obj?.m_dropPrefab), color);
		}

		private static string Name(Pickable obj)
		{
			if (!Object.op_Implicit((Object)(object)obj))
			{
				return "";
			}
			if (!string.IsNullOrEmpty(obj.m_overrideName))
			{
				return obj.m_overrideName;
			}
			GameObject itemPrefab = obj.m_itemPrefab;
			return ((itemPrefab != null) ? ((Object)itemPrefab).name : null) ?? "";
		}

		public static string Name(CreatureSpawner obj)
		{
			if (!Object.op_Implicit((Object)(object)obj))
			{
				return "";
			}
			return Utils.GetPrefabName(obj.m_creaturePrefab);
		}

		public static string Name(IEnumerable<GameObject> objs, string color = "yellow")
		{
			string color2 = color;
			return Format.JoinRow(objs.Select((GameObject prefab) => Id(prefab, color2)));
		}

		public static string Name(IEnumerable<ItemDrop> objs, string color = "yellow")
		{
			string color2 = color;
			return Format.JoinRow(objs.Select((ItemDrop prefab) => Name((MonoBehaviour)(object)prefab, color2)));
		}

		private static string Name(Bed obj)
		{
			if (!Object.op_Implicit((Object)(object)obj))
			{
				return "";
			}
			return obj.GetHoverName();
		}

		private static string Name(Piece obj)
		{
			if (!Object.op_Implicit((Object)(object)obj))
			{
				return "";
			}
			return obj.m_name;
		}

		private static string Name(TreeLog obj)
		{
			if (!Object.op_Implicit((Object)(object)obj))
			{
				return "";
			}
			return ((Object)obj).name;
		}

		private static string Name(Location obj)
		{
			if (!Object.op_Implicit((Object)(object)obj))
			{
				return "";
			}
			return ((Object)obj).name;
		}

		private static string Name(MineRock obj)
		{
			if (!Object.op_Implicit((Object)(object)obj))
			{
				return "";
			}
			return obj.m_name;
		}

		private static string Name(MineRock5 obj)
		{
			if (!Object.op_Implicit((Object)(object)obj))
			{
				return "";
			}
			return obj.m_name;
		}

		private static string Name(TreeBase obj)
		{
			if (!Object.op_Implicit((Object)(object)obj))
			{
				return "";
			}
			return ((Object)obj).name;
		}

		private static string Name(Destructible obj)
		{
			if (!Object.op_Implicit((Object)(object)obj))
			{
				return "";
			}
			return ((Object)obj).name;
		}

		private static string Name(Smoke obj)
		{
			if (!Object.op_Implicit((Object)(object)obj))
			{
				return "";
			}
			return "Smoke";
		}

		private static string Name(HoverText obj)
		{
			if (!Object.op_Implicit((Object)(object)obj))
			{
				return "";
			}
			return obj.m_text;
		}

		public static string Name(MonoBehaviour obj, string color = "yellow")
		{
			string text = "";
			if (text == "")
			{
				text = Name(((Component)obj).GetComponentInParent<HoverText>());
			}
			if (text == "")
			{
				text = Name(((Component)obj).GetComponentInParent<Smoke>());
			}
			if (text == "")
			{
				text = Name(((Component)obj).GetComponentInParent<CreatureSpawner>());
			}
			if (text == "")
			{
				text = Name(((Component)obj).GetComponentInParent<Pickable>());
			}
			if (text == "")
			{
				text = Name(((Component)obj).GetComponentInParent<Bed>());
			}
			if (text == "")
			{
				text = Name(((Component)obj).GetComponentInParent<TreeLog>());
			}
			if (text == "")
			{
				text = Name(((Component)obj).GetComponentInParent<Location>());
			}
			if (text == "")
			{
				text = Name(((Component)obj).GetComponentInParent<MineRock>());
			}
			if (text == "")
			{
				text = Name(((Component)obj).GetComponentInParent<MineRock5>());
			}
			if (text == "")
			{
				text = Name(((Component)obj).GetComponentInParent<TreeBase>());
			}
			if (text == "")
			{
				text = Name(((Component)obj).GetComponentInParent<Destructible>());
			}
			if (text == "")
			{
				text = Name(((Component)obj).GetComponentInParent<Character>());
			}
			if (text == "")
			{
				text = Name(((Component)obj).GetComponentInParent<Piece>());
			}
			if (text == "")
			{
				text = Id(((Component)obj).gameObject, color);
			}
			return Name(text, color);
		}

		public static string Id(GameObject obj, string color = "yellow")
		{
			if (!Object.op_Implicit((Object)(object)obj))
			{
				return "";
			}
			ZNetView componentInParent = obj.GetComponentInParent<ZNetView>();
			if (Object.op_Implicit((Object)(object)componentInParent))
			{
				ZDO zDO = componentInParent.GetZDO();
				int key = ((zDO != null) ? zDO.GetPrefab() : 0);
				if (ZNetScene.instance.m_namedPrefabs.TryGetValue(key, out var value))
				{
					return Format.String(((Object)value).name, color);
				}
			}
			return Format.String(Utils.GetPrefabName(obj), color);
		}
	}
}
namespace ESP
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("esp", "ESP", "1.24")]
	public class ESP : BaseUnityPlugin
	{
		private const string GUID = "esp";

		private const string NAME = "ESP";

		private const string VERSION = "1.24";

		private static ManualLogSource? Logs;

		public static ManualLogSource Log => Logs;

		public void Awake()
		{
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			Logs = ((BaseUnityPlugin)this).Logger;
			Settings.Init(((BaseUnityPlugin)this).Config);
			MessageHud_UpdateMessage.GetMessage = Hud.GetMessage;
			new Harmony("esp").PatchAll();
			Admin.Instance = new EspAdmin();
		}

		public void Start()
		{
			if (Chainloader.PluginInfos.TryGetValue("org.bepinex.plugins.jewelcrafting", out var value))
			{
				JewelcraftingPatcher.DoPatching(((object)value.Instance).GetType().Assembly);
			}
		}

		public void LateUpdate()
		{
			if (Object.op_Implicit((Object)(object)Player.m_localPlayer))
			{
				Texts.UpdateAverageSpeed(Ship.GetLocalShip());
			}
		}
	}
	public class CustomHoverText : MonoBehaviour, Hoverable
	{
		private string title = "";

		public string GetHoverText()
		{
			string __result = "";
			Text.AddTexts(((Component)this).gameObject, ref __result);
			if (__result == "")
			{
				return "";
			}
			return GetHoverName() + __result;
		}

		public string GetHoverName()
		{
			if (title == "")
			{
				title = Translate.Name((MonoBehaviour)(object)this);
			}
			return title;
		}
	}
	public class Text
	{
		public static bool ExtraInfo
		{
			get
			{
				if (Settings.ExtraInfo)
				{
					return Admin.Enabled;
				}
				return false;
			}
			set
			{
				if (value)
				{
					Admin.Check();
				}
				Settings.configExtraInfo.Value = value;
			}
		}

		public static void AddText(GameObject obj)
		{
			obj.AddComponent<CustomHoverText>();
		}

		public static void AddText(GameObject obj, string text)
		{
			obj.AddComponent<HoverText>().m_text = text;
		}

		public static void AddHoverText(MonoBehaviour obj)
		{
			if (((Component)obj).gameObject.GetComponent<Hoverable>() == null)
			{
				((Component)obj).gameObject.AddComponent<CustomHoverText>();
			}
		}

		public static void AddTexts(GameObject obj, ref string __result)
		{
			//IL_02c6: Unknown result type (might be due to invalid IL or missing references)
			if (ExtraInfo)
			{
				List<string> list = new List<string>();
				Character componentInParent = obj.GetComponentInParent<Character>();
				BaseAI componentInParent2 = obj.GetComponentInParent<BaseAI>();
				list.Add("Id: " + Translate.Id(obj));
				list.Add(Texts.Get(obj.GetComponentInParent<TreeLog>()));
				list.Add(Texts.Get(obj.GetComponentInParent<TreeBase>()));
				list.Add(Texts.Get(obj.GetComponentInParent<Destructible>()));
				list.Add(Texts.Get(obj.GetComponentInParent<Pickable>()));
				list.Add(Texts.Get(obj.GetComponentInParent<CreatureSpawner>()));
				list.Add(Texts.Get(obj.GetComponentInParent<CraftingStation>()));
				list.Add(Texts.Get(obj.GetComponentInParent<Beehive>()));
				list.Add(Texts.Get(obj.GetComponentInParent<Bed>()));
				list.Add(Texts.Get(obj.GetComponentInParent<CookingStation>()));
				list.Add(Texts.Get(obj.GetComponentInParent<Fermenter>()));
				list.Add(Texts.Get(obj.GetComponentInParent<Fireplace>()));
				list.Add(Texts.Get(obj.GetComponentInParent<Smelter>()));
				list.Add(Texts.Get(obj.GetComponentInParent<WearNTear>()));
				list.Add(Texts.Get(obj.GetComponentInParent<Piece>()));
				list.Add(Texts.Get(obj.GetComponentInParent<Plant>()));
				list.Add(Texts.Get(obj.GetComponentInParent<PrivateArea>()));
				list.Add(Texts.Get(obj.GetComponentInParent<MineRock>()));
				list.Add(Texts.Get(obj.GetComponentInParent<MineRock5>()));
				list.Add(Texts.Get(obj.GetComponentInParent<DropOnDestroyed>()));
				list.Add(Texts.Get(obj.GetComponentInParent<ItemDrop>()));
				list.Add(Texts.Get(obj.GetComponentInParent<SmokeSpawner>()));
				list.Add(Texts.Get(obj.GetComponentInChildren<SmokeSpawner>()));
				list.Add(Texts.Get(obj.GetComponentInParent<Smoke>()));
				list.Add(Texts.Get(obj.GetComponentInParent<Container>()));
				list.Add(Texts.Get(obj.GetComponentInParent<LocationProxy>()));
				list.Add(Texts.Get(obj.GetComponentInParent<RandomSpawn>()));
				list.Add(Texts.Get(obj.GetComponentInParent<SpawnArea>()));
				list.Add(Texts.Get(obj.GetComponentInParent<OfferingBowl>()));
				list.Add(Texts.GetVegetation(obj));
				if (Settings.ShowShipStats)
				{
					list.Add(Texts.Get(obj.GetComponentInParent<Ship>()));
				}
				list.Add(Texts.Get(obj.GetComponentInParent<EffectArea>()));
				list.Add(Texts.Get(componentInParent, componentInParent2, obj.GetComponentInParent<MonsterAI>()));
				list.Add(Texts.GetStatusStats(componentInParent));
				list.Add(Texts.Get(obj.GetComponentInParent<Tameable>()));
				list.Add(Texts.Get(obj.GetComponentInParent<CharacterDrop>(), componentInParent));
				list.Add(Texts.Get(componentInParent2, obj.GetComponentInParent<Growup>()));
				if (Object.op_Implicit((Object)(object)obj.GetComponentInParent<BaseAI>()))
				{
					list.Add(Texts.GetAttack(obj.GetComponentInParent<Humanoid>()));
				}
				list.Add("Coordinates: " + Format.Coordinates(obj.transform.position));
				__result = __result + "\n" + Format.JoinLines(list);
			}
		}

		public static string GetLevel(int min, int max, double chance, double limit = 0.0)
		{
			min--;
			max--;
			string text = Format.Range(min, max);
			string text2 = (text.Contains("-") ? (" (" + Format.Percent(chance / 100.0) + " per star)") : "");
			string text3 = ((limit > 0.0) ? (" after " + Format.Int(limit) + " meters") : "");
			return "Stars: " + text + text2 + text3;
		}

		public static string GetAttempt(double time, double limit, double chance)
		{
			return Format.ProgressPercent("Attempt", time, limit) + ", " + Format.Percent(chance / 100.0) + " chance";
		}

		public static string GetGlobalKeys(List<string> required, List<string> notRequired)
		{
			required = required.Select((string key) => Format.String(key, ZoneSystem.instance.GetGlobalKey(key))).ToList();
			notRequired = notRequired.Select((string key) => Format.String("not " + key, !ZoneSystem.instance.GetGlobalKey(key))).ToList();
			return Format.JoinRow(required.Concat(notRequired));
		}

		public static string GetHealth(double health, double limit)
		{
			if (health > 10000000000.0)
			{
				return "Health: Infinite/" + Format.Int(limit);
			}
			return "Health: " + Format.Progress(health, limit) + " (" + Format.Percent(health / limit) + ")";
		}

		public static string Radius(float radius)
		{
			return "Radius: " + Format.Float(radius);
		}
	}
	[HarmonyPatch(typeof(HoverText), "GetHoverText")]
	public class HoverText_GetHoverText
	{
		private static void Postfix(HoverText __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(SpawnArea), "Awake")]
	[HarmonyPriority(0)]
	public class SpawnArea_Awake_AddHover
	{
		private static void Postfix(SpawnArea __instance)
		{
			Text.AddHoverText((MonoBehaviour)(object)__instance);
		}
	}
	[HarmonyPatch(typeof(Destructible), "Awake")]
	[HarmonyPriority(0)]
	public class Destructible_Awake_AddHover
	{
		private static void Postfix(Destructible __instance)
		{
			Text.AddHoverText((MonoBehaviour)(object)__instance);
		}
	}
	[HarmonyPatch(typeof(WearNTear), "Awake")]
	[HarmonyPriority(0)]
	public class WearNTear_Awake_AddHover
	{
		private static void Postfix(WearNTear __instance)
		{
			Text.AddHoverText((MonoBehaviour)(object)__instance);
		}
	}
	[HarmonyPatch(typeof(Beehive), "GetHoverText")]
	public class Beehive_GetHoverText
	{
		private static void Postfix(Beehive __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(ItemDrop), "GetHoverText")]
	public class ItemDrop_GetHoverText
	{
		private static void Postfix(Beehive __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(OfferingBowl), "GetHoverText")]
	public class OfferingBowl_GetHoverText
	{
		private static void Postfix(OfferingBowl __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(Chair), "GetHoverText")]
	public class Chair_GetHoverText
	{
		private static void Postfix(Chair __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(Container), "GetHoverText")]
	public class Container_GetHoverText
	{
		private static void Postfix(Container __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(CookingStation), "GetHoverText")]
	public class CookingStation_GetHoverText
	{
		private static void Postfix(CookingStation __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(CraftingStation), "GetHoverText")]
	public class CraftingStation_GetHoverText
	{
		private static void Postfix(CraftingStation __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(Bed), "GetHoverText")]
	public class Bed_GetHoverText
	{
		private static void Postfix(Bed __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(Door), "GetHoverText")]
	public class Door_GetHoverText
	{
		private static void Postfix(Door __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(Fermenter), "GetHoverText")]
	public class Fermenter_GetHoverText
	{
		private static void Postfix(Fermenter __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(Fireplace), "GetHoverText")]
	public class Fireplace_GetHoverText
	{
		private static void Postfix(Fireplace __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(MineRock), "GetHoverText")]
	public class MineRock_GetHoverText
	{
		private static void Postfix(MineRock __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(MineRock5), "GetHoverText")]
	public class MineRock5_GetHoverText
	{
		private static void Postfix(MineRock5 __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(Pickable), "GetHoverText")]
	public class Pickable_GetHoverText
	{
		private static void Postfix(Pickable __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(Plant), "GetHoverText")]
	public class Plant_GetHoverText
	{
		private static void Postfix(Plant __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(PrivateArea), "GetHoverText")]
	public class PrivateArea_GetHoverText
	{
		private static void Postfix(PrivateArea __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(Sign), "GetHoverText")]
	public class Sign_GetHoverText
	{
		private static void Postfix(Sign __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(ItemStand), "GetHoverText")]
	public class ItemStand_GetHoverText
	{
		private static void Postfix(ItemStand __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(StationExtension), "GetHoverText")]
	public class StationExtension_GetHoverText
	{
		private static void Postfix(StationExtension __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(Vagon), "GetHoverText")]
	public class Vagon_GetHoverText
	{
		private static void Postfix(Vagon __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(TeleportWorld), "GetHoverText")]
	public class TeleportWorld_GetHoverText
	{
		private static void Postfix(TeleportWorld __instance, ref string __result)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref __result);
		}
	}
	[HarmonyPatch(typeof(Smelter), "OnHoverAddOre")]
	public class OnHoverAddOre
	{
		private static string Postfix(string result, Smelter __instance)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref result);
			return result;
		}
	}
	[HarmonyPatch(typeof(Smelter), "OnHoverAddFuel")]
	public class OnHoverAddFuel
	{
		private static string Postfix(string result, Smelter __instance)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref result);
			return result;
		}
	}
	[HarmonyPatch(typeof(Smelter), "OnHoverEmptyOre")]
	public class OnHoverEmptyOre
	{
		private static string Postfix(string result, Smelter __instance)
		{
			Text.AddTexts(((Component)__instance).gameObject, ref result);
			return result;
		}
	}
	public class Settings
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static ConsoleOptionsFetcher <0>__OptionsFetcher;
		}

		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static ConsoleEvent <>9__94_0;

			public static ConsoleEvent <>9__94_1;

			public static ConsoleEvent <>9__94_2;

			public static ConsoleEvent <>9__94_3;

			public static Func<string, bool> <>9__95_0;

			public static EventHandler <>9__206_0;

			internal void <InitCommands>b__94_0(ConsoleEventArgs args)
			{
				if (args.Length < 2)
				{
					args.Context.AddString("Missing name.");
					return;
				}
				List<string> list = args[1].Split(new char[1] { ' ' }).ToList();
				if (args[1] == "*")
				{
					list = OptionsFetcher();
				}
				foreach (string item in list)
				{
					SetEntry(item, 1);
				}
			}

			internal void <InitCommands>b__94_1(ConsoleEventArgs args)
			{
				if (args.Length < 2)
				{
					args.Context.AddString("Missing name.");
					return;
				}
				List<string> list = args[1].Split(new char[1] { ' ' }).ToList();
				if (args[1] == "*")
				{
					list = OptionsFetcher();
				}
				foreach (string item in list)
				{
					ToggleEntry(item);
				}
			}

			internal void <InitCommands>b__94_2(ConsoleEventArgs args)
			{
				if (args.Length < 2)
				{
					args.Context.AddString("Missing name.");
					return;
				}
				List<string> list = args[1].Split(new char[1] { ' ' }).ToList();
				if (args[1] == "*")
				{
					list = OptionsFetcher();
				}
				foreach (string item in list)
				{
					SetEntry(item, -1);
				}
			}

			internal void <InitCommands>b__94_3(ConsoleEventArgs args)
			{
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				if (Object.op_Implicit((Object)(object)Player.m_localPlayer))
				{
					Vector3 position = ((Component)Player.m_localPlayer).transform.position;
					float radius = args.TryParameterFloat(1, 10f);
					Visual.DrawHeightmap(position, radius);
				}
			}

			internal bool <OptionsFetcher>b__95_0(string tag)
			{
				if (!tag.StartsWith("ZoneCorner"))
				{
					return !tag.StartsWith("SpawnZone");
				}
				return false;
			}

			internal void <InitVisuals>b__206_0(object s, EventArgs e)
			{
				SupportUtils.UpdateVisibility();
			}
		}

		public static ConfigEntry<string> configCreatureCollidersColor;

		public static ConfigEntry<string> configStructureCollidersColor;

		public static ConfigEntry<string> configDestructibleCollidersColor;

		public static ConfigEntry<string> configAttackRayColor;

		public static ConfigEntry<string> configCreatureRayColor;

		public static ConfigEntry<string> configPickableOneTimeColor;

		public static ConfigEntry<string> configPickableRespawningColor;

		public static ConfigEntry<string> configLocationRayColor;

		public static ConfigEntry<string> configEventZoneRayColor;

		public static ConfigEntry<string> configChestRayColor;

		public static ConfigEntry<string> configOreRayColor;

		public static ConfigEntry<string> configTreeRayColor;

		public static ConfigEntry<string> configTrophySpeakColor;

		public static ConfigEntry<string> configDestructibleRayColor;

		public static ConfigEntry<string> configSpawnPointOneTimeColor;

		public static ConfigEntry<string> configSpawnPointRespawningColor;

		public static ConfigEntry<string> configNoiseColor;

		public static ConfigEntry<string> configCoverRayColor;

		public static ConfigEntry<string> configCoverRayBlockedColor;

		public static ConfigEntry<string> configCreatureHearColor;

		public static ConfigEntry<string> configCreatureViewColor;

		public static ConfigEntry<string> configCreatureAlertViewColor;

		public static ConfigEntry<string> configCreatureFireLimitColor;

		public static ConfigEntry<string> configCreatureTotalLimitColor;

		public static ConfigEntry<string> configCreaturePartnerCheckColor;

		public static ConfigEntry<string> configCreatureFoodCheckColor;

		public static ConfigEntry<string> configCreatureEatRangeColor;

		public static ConfigEntry<string> configSpawnerRayColor;

		public static ConfigEntry<string> configSpawnerTriggerColor;

		public static ConfigEntry<string> configSpawnerNearColor;

		public static ConfigEntry<string> configSpawnerSpawnColor;

		public static ConfigEntry<string> configAltarRayColor;

		public static ConfigEntry<string> configAltarItemStandRangeColor;

		public static ConfigEntry<string> configAltarSpawnRadiusColor;

		public static ConfigEntry<string> configEffectAreaPrivateAreaColor;

		public static ConfigEntry<string> configEffectAreaComfortColor;

		public static ConfigEntry<string> configEffectAreaBurningColor;

		public static ConfigEntry<string> configEffectAreaHeatColor;

		public static ConfigEntry<string> configEffectAreaFireColor;

		public static ConfigEntry<string> configEffectAreaNoMonstersColor;

		public static ConfigEntry<string> configEffectAreaTeleportColor;

		public static ConfigEntry<string> configEffectAreaPlayerBaseColor;

		public static ConfigEntry<string> configEffectAreaOtherColor;

		public static ConfigEntry<string> configEffectAreaWarmCozyColor;

		public static ConfigEntry<string> configEffectAreaCustomContainerColor;

		public static ConfigEntry<string> configEffectAreaCustomCraftingColor;

		public static ConfigEntry<string> configSmokeColor;

		public static ConfigEntry<string> configRandomEventSystemRayColor;

		public static ConfigEntry<string> configBiomeAshlandsColor;

		public static ConfigEntry<string> configBiomeBlackForestColor;

		public static ConfigEntry<string> configBiomeDeepNorthColor;

		public static ConfigEntry<string> configBiomeMeadowsColor;

		public static ConfigEntry<string> configBiomeMistlandsColor;

		public static ConfigEntry<string> configBiomeMountainColor;

		public static ConfigEntry<string> configBiomeOceanColor;

		public static ConfigEntry<string> configBiomePlainsColor;

		public static ConfigEntry<string> configBiomeSwampColor;

		public static ConfigEntry<string> configBiomeOtherColor;

		public static ConfigEntry<string> configExcludedCreatures;

		public static ConfigEntry<string> configExcludedCreatureSpawners;

		public static ConfigEntry<string> configExcludedSpawnSystems;

		public static ConfigEntry<string> configExcludedResources;

		public static ConfigEntry<bool> configShowShipStatsOnHud;

		public static ConfigEntry<bool> configShowHud;

		public static ConfigEntry<bool> configShowTimeAndWeather;

		public static ConfigEntry<bool> configShowPosition;

		public static ConfigEntry<string> configTrackedObjects;

		public static ConfigEntry<float> configTrackRadius;

		public static ConfigEntry<bool> configDrops;

		public static ConfigEntry<bool> configBreeding;

		public static ConfigEntry<bool> configStatus;

		public static ConfigEntry<bool> configAttacks;

		public static ConfigEntry<bool> configResistances;

		public static ConfigEntry<bool> configExtraInfo;

		public static ConfigEntry<bool> configWeaponInfo;

		public static ConfigEntry<bool> configShowProgress;

		public static ConfigEntry<bool> configSupport;

		public static ConfigEntry<bool> configStructures;

		public static ConfigEntry<bool> configCreatures;

		public static ConfigEntry<bool> configDestructibles;

		public static ConfigEntry<bool> configPickables;

		public static ConfigEntry<bool> configItemDrops;

		public static ConfigEntry<bool> configShowShipStats;

		public static ConfigEntry<bool> configLocations;

		public static ConfigEntry<bool> configVegetation;

		public static ConfigEntry<int> configShowCreatureColliders;

		public static ConfigEntry<int> configShowStructureColliders;

		public static ConfigEntry<int> configShowDestructibleColliders;

		public static ConfigEntry<int> configShowAttackRange;

		public static ConfigEntry<int> configShowCreatureFireRange;

		public static ConfigEntry<int> configShowTrackedObjects;

		public static ConfigEntry<int> configShowCreatureBreedingTotalRange;

		public static ConfigEntry<int> configShowCreatureBreedingPartnerRange;

		public static ConfigEntry<int> configShowCreatureFoodSearchRange;

		public static ConfigEntry<int> configShowCreatureEatingRange;

		public static ConfigEntry<int> configShowStructureCover;

		public static ConfigEntry<int> configShowPlayerCover;

		public static ConfigEntry<int> configShowSmoke;

		public static ConfigEntry<int> configShowCreatureAlertRange;

		public static ConfigEntry<int> configShowCreatureNoise;

		public static ConfigEntry<int> configShowCreatureHearRange;

		public static ConfigEntry<int> configShowCreatureViewRange;

		public static ConfigEntry<int> configShowSpawnZones;

		public static ConfigEntry<int> configShowRandomEventSystem;

		public static ConfigEntry<int> configShowSpawnerRays;

		public static ConfigEntry<int> configShowSpawnerTriggerRanges;

		public static ConfigEntry<int> configShowSpawnerLimitRanges;

		public static ConfigEntry<int> configShowSpawnerSpawnRanges;

		public static ConfigEntry<int> configShowAltarRays;

		public static ConfigEntry<int> configShowAltarItemStandRange;

		public static ConfigEntry<int> configShowAltarSpawnRadius;

		public static ConfigEntry<int> configShowSpawnPointsOneTime;

		public static ConfigEntry<int> configShowSpawnPointsRespawning;

		public static ConfigEntry<int> configShowZoneCorners;

		public static ConfigEntry<int> configShowPickablesOneTime;

		public static ConfigEntry<int> configShowPickablesRespawning;

		public static ConfigEntry<int> configShowEffectAreasPrivateArea;

		public static ConfigEntry<int> configShowEffectAreasComfort;

		public static ConfigEntry<int> configShowEffectAreasBurning;

		public static ConfigEntry<int> configShowEffectAreasHeat;

		public static ConfigEntry<int> configShowEffectAreasFire;

		public static ConfigEntry<int> configShowEffectAreasNoMonsters;

		public static ConfigEntry<int> configShowEffectAreasTeleport;

		public static ConfigEntry<int> configShowEffectAreasPlayerBase;

		public static ConfigEntry<int> configShowEffectAreasWarmCozy;

		public static ConfigEntry<int> configShowEffectAreasOther;

		public static ConfigEntry<int> configShowEffectAreasCustomContainer;

		public static ConfigEntry<int> configShowEffectAreasCustomCrafting;

		public static ConfigEntry<int> configShowChests;

		public static ConfigEntry<int> configShowOres;

		public static ConfigEntry<int> configShowTrees;

		public static ConfigEntry<int> configShowDestructibles;

		public static ConfigEntry<int> configShowTrophySpeaks;

		public static ConfigEntry<int> configShowLocations;

		public static ConfigEntry<int> configShowEventZones;

		public static ConfigEntry<int> configShowStructureSupport;

		public static ConfigEntry<int> configCreatureCollidersLineWidth;

		public static ConfigEntry<int> configStructureCollidersLineWidth;

		public static ConfigEntry<int> configDestructibleCollidersLineWidth;

		public static ConfigEntry<int> configCreatureFireLineWidth;

		public static ConfigEntry<int> configTrackedObjectRayWidth;

		public static ConfigEntry<int> configBreedingLineWidth;

		public static ConfigEntry<int> configCoverRayWidth;

		public static ConfigEntry<int> configPlayerCoverRayWidth;

		public static ConfigEntry<int> configSmokeLineWidth;

		public static ConfigEntry<int> configSenseLineWidth;

		public static ConfigEntry<int> configNoiseLineWidth;

		public static ConfigEntry<int> configSpawnZoneRayWidth;

		public static ConfigEntry<int> configRandEventSystemRayWidth;

		public static ConfigEntry<int> configSpawnerRayWidth;

		public static ConfigEntry<int> configSpawnerTriggerRangeLineWidth;

		public static ConfigEntry<int> configSpawnerLimitRangeLineWidth;

		public static ConfigEntry<int> configSpawnerSpawnRangeLineWidth;

		public static ConfigEntry<int> configAltarRayWidth;

		public static ConfigEntry<int> configAltarItemStandRangeLineWidth;

		public static ConfigEntry<int> configAltarSpawnRadiusLineWidth;

		public static ConfigEntry<int> configSpawntPointOneTimeRayWidth;

		public static ConfigEntry<int> configSpawntPointRespawningRayWidth;

		public static ConfigEntry<int> configZoneCornerRayWidth;

		public static ConfigEntry<int> configPickableOneTimeRayWidth;

		public static ConfigEntry<int> configPickableRespawningRayWidth;

		public static ConfigEntry<int> configEffectAreaLineWidth;

		public static ConfigEntry<float> configCustomContainerEffectAreaRadius;

		public static ConfigEntry<float> configCustomCraftingEffectAreaRadius;

		public static ConfigEntry<int> configChestRayWidth;

		public static ConfigEntry<int> configOreRayWidth;

		public static ConfigEntry<int> configTreeRayWidth;

		public static ConfigEntry<int> configDestructibleRayWidth;

		public static ConfigEntry<int> configTrophySpeakSphereWidth;

		public static ConfigEntry<int> configLocationRayWidth;

		public static ConfigEntry<int> configEventZoneRayWidth;

		public static ConfigEntry<int> configTerrainRayWidth;

		public static string ExcludedCreatures => configExcludedCreatures.Value;

		public static string ExcludedCreatureSpawners => configExcludedCreatureSpawners.Value;

		public static string ExcludedSpawnZones => configExcludedSpawnSystems.Value;

		public static string ExcludedResources => configExcludedResources.Value;

		public static bool ShowShipStatsOnHud => configShowShipStatsOnHud.Value;

		public static bool ShowHud => configShowHud.Value;

		public static bool ShowTimeAndWeather => configShowTimeAndWeather.Value;

		public static bool ShowPosition => configShowPosition.Value;

		public static string TrackedObjects => configTrackedObjects.Value;

		public static float TrackRadius => configTrackRadius.Value;

		public static bool Drops => configDrops.Value;

		public static bool Breeding => configBreeding.Value;

		public static bool Status => configStatus.Value;

		public static bool Attacks => configAttacks.Value;

		public static bool Resistances => configResistances.Value;

		public static bool ExtraInfo => configExtraInfo.Value;

		public static bool WeaponInfo => configWeaponInfo.Value;

		public static bool Progress => configShowProgress.Value;

		public static bool Support => configSupport.Value;

		public static bool Structures => configStructures.Value;

		public static bool Creatures => configCreatures.Value;

		public static bool Destructibles => configDestructibles.Value;

		public static bool Pickables => configPickables.Value;

		public static bool ItemDrops => configItemDrops.Value;

		public static bool ShowShipStats => configShowShipStats.Value;

		public static bool Locations => configLocations.Value;

		public static bool Vegetation => configVegetation.Value;

		public static float CustomContainerEffectAreaRadius => configCustomContainerEffectAreaRadius.Value;

		public static float CustomCraftingEffectAreaRadius => configCustomCraftingEffectAreaRadius.Value;

		public static Color ParseColor(string color)
		{
			//IL_000c: 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)
			Color result = default(Color);
			if (ColorUtility.TryParseHtmlString(color, ref result))
			{
				return result;
			}
			return Color.white;
		}

		private static void OnColorChanged(ConfigEntry<string> entry, string tag)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			entry.SettingChanged += delegate
			{
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				Draw.SetColor(tag, ParseColor(entry.Value));
			};
			Draw.SetColor(tag, ParseColor(entry.Value));
		}

		private static void InitColors(ConfigFile config)
		{
			string text = "5. Colors (predefined, #RRGGBB, #RRGGBBAA)";
			configCreatureCollidersColor = config.Bind<string>(text, "Creature colliders", "magenta", "");
			OnColorChanged(configCreatureCollidersColor, "CreatureCollider");
			configStructureCollidersColor = config.Bind<string>(text, "Structure colliders", "magenta", "");
			OnColorChanged(configStructureCollidersColor, "StructureCollider");
			configDestructibleCollidersColor = config.Bind<string>(text, "Destructible colliders", "magenta", "");
			OnColorChanged(configDestructibleCollidersColor, "DestructibleCollider");
			configAttackRayColor = config.Bind<string>(text, "Attack ray", "magenta", "");
			OnColorChanged(configAttackRayColor, "Attack");
			configCreatureRayColor = config.Bind<string>(text, "Creature ray", "magenta", "");
			OnColorChanged(configCreatureRayColor, "TrackedObject");
			configPickableOneTimeColor = config.Bind<string>(text, "Pickable ray (one time)", "green", "");
			OnColorChanged(configPickableOneTimeColor, "PickableOneTime");
			configPickableRespawningColor = config.Bind<string>(text, "Pickable ray (respawning)", "blue", "");
			OnColorChanged(configPickableRespawningColor, "PickableRespawning");
			configLocationRayColor = config.Bind<string>(text, "Location ray", "black", "");
			OnColorChanged(configLocationRayColor, "Location");
			configEventZoneRayColor = config.Bind<string>(text, "Event zone ray", "black", "");
			OnColorChanged(configEventZoneRayColor, "EventZone");
			configChestRayColor = config.Bind<string>(text, "Chest ray", "white", "");
			OnColorChanged(configChestRayColor, "Chest");
			configOreRayColor = config.Bind<string>(text, "Ore ray", "gray", "");
			OnColorChanged(configOreRayColor, "Ore");
			configTreeRayColor = config.Bind<string>(text, "Tree ray", "white", "");
			OnColorChanged(configTreeRayColor, "Tree");
			configTrophySpeakColor = config.Bind<string>(text, "Trophy speak sphere", "magenta", "");
			OnColorChanged(configTrophySpeakColor, "TrophySpeak");
			configDestructibleRayColor = config.Bind<string>(text, "Destructible ray", "white", "");
			OnColorChanged(configDestructibleRayColor, "Destructible");
			configSpawnPointOneTimeColor = config.Bind<string>(text, "Spawn point ray (one time)", "red", "");
			OnColorChanged(configSpawnPointOneTimeColor, "SpawnPointOneTime");
			configSpawnPointRespawningColor = config.Bind<string>(text, "Spawn point ray (respawning)", "yellow", "");
			OnColorChanged(configSpawnPointRespawningColor, "SpawnPointRespawning");
			configNoiseColor = config.Bind<string>(text, "Noise sphere", "cyan", "");
			OnColorChanged(configNoiseColor, "CreatureNoise");
			configCoverRayColor = config.Bind<string>(text, "Cover ray", "green", "");
			OnColorChanged(configCoverRayColor, "StructureCover");
			OnColorChanged(configCoverRayColor, "PlayerCover");
			configCoverRayBlockedColor = config.Bind<string>(text, "Cover ray (blocked)", "red", "");
			OnColorChanged(configCoverRayBlockedColor, "StructureCoverBlocked");
			OnColorChanged(configCoverRayBlockedColor, "PlayerCoverBlocked");
			configCreatureHearColor = config.Bind<string>(text, "Creature hearing sphere", "green", "");
			OnColorChanged(configCreatureHearColor, "CreatureHearRange");
			configCreatureViewColor = config.Bind<string>(text, "Creature sight cone", "white", "");
			OnColorChanged(configCreatureViewColor, "CreatureViewRange");
			configCreatureAlertViewColor = config.Bind<string>(text, "Creature alert sight cone", "red", "");
			OnColorChanged(configCreatureAlertViewColor, "CreatureAlertRange");
			configCreatureFireLimitColor = config.Bind<string>(text, "Creature fire limit sphere", "magenta", "");
			OnColorChanged(configCreatureFireLimitColor, "CreatureFireRange");
			configCreatureTotalLimitColor = config.Bind<string>(text, "Creature total limit sphere", "cyan", "");
			OnColorChanged(configCreatureTotalLimitColor, "CreatureBreedingTotalRange");
			configCreaturePartnerCheckColor = config.Bind<string>(text, "Creature partner check sphere", "magenta", "");
			OnColorChanged(configCreaturePartnerCheckColor, "CreatureBreedingPartnerRange");
			configCreatureFoodCheckColor = config.Bind<string>(text, "Creature food check sphere", "gray", "");
			OnColorChanged(configCreatureFoodCheckColor, "CreatureFoodSearchRange");
			configCreatureEatRangeColor = config.Bind<string>(text, "Creature eat range sphere", "black", "");
			OnColorChanged(configCreatureEatRangeColor, "CreatureEatingRange");
			configSpawnerRayColor = config.Bind<string>(text, "Spawner ray", "red", "");
			OnColorChanged(configSpawnerRayColor, "SpawnerRay");
			configSpawnerTriggerColor = config.Bind<string>(text, "Spawner trigger sphere", "red", "");
			OnColorChanged(configSpawnerTriggerColor, "SpawnerTriggerRange");
			configSpawnerNearColor = config.Bind<string>(text, "Spawner near limit sphere", "white", "");
			OnColorChanged(configSpawnerNearColor, "SpawnerNearRange");
			configSpawnerSpawnColor = config.Bind<string>(text, "Spawner spawn sphere", "cyan", "");
			OnColorChanged(configSpawnerSpawnColor, "SpawnerSpawnRange");
			configAltarRayColor = config.Bind<string>(text, "Altar ray", "red", "");
			OnColorChanged(configAltarRayColor, "AltarRay");
			configAltarItemStandRangeColor = config.Bind<string>(text, "Altar item stand range sphere", "red", "");
			OnColorChanged(configAltarItemStandRangeColor, "AltarItemStandRange");
			configAltarSpawnRadiusColor = config.Bind<string>(text, "Altar spawn radius sphere", "red", "");
			OnColorChanged(configAltarSpawnRadiusColor, "AltarSpawnRadius");
			configEffectAreaPrivateAreaColor = config.Bind<string>(text, "Ward effect sphere", "gray", "");
			OnColorChanged(configEffectAreaPrivateAreaColor, "EffectAreaPlayerBase");
			configEffectAreaComfortColor = config.Bind<string>(text, "Comfort effect sphere", "cyan", "");
			OnColorChanged(configEffectAreaComfortColor, "EffectAreaComfort");
			configEffectAreaBurningColor = config.Bind<string>(text, "Burning effect sphere", "yellow", "");
			OnColorChanged(configEffectAreaBurningColor, "EffectAreaBurning");
			configEffectAreaHeatColor = config.Bind<string>(text, "Heat effect sphere", "magenta", "");
			OnColorChanged(configEffectAreaHeatColor, "EffectAreaHeat");
			configEffectAreaFireColor = config.Bind<string>(text, "Fire effect sphere", "red", "");
			OnColorChanged(configEffectAreaFireColor, "EffectAreaFire");
			configEffectAreaNoMonstersColor = config.Bind<string>(text, "No monsters effect sphere", "green", "");
			OnColorChanged(configEffectAreaNoMonstersColor, "EffectAreaNoMonsters");
			configEffectAreaTeleportColor = config.Bind<string>(text, "Teleport effect sphere", "blue", "");
			OnColorChanged(configEffectAreaTeleportColor, "EffectAreaTeleport");
			configEffectAreaPlayerBaseColor = config.Bind<string>(text, "Player base effect sphere", "white", "");
			OnColorChanged(configEffectAreaPlayerBaseColor, "EffectAreaPlayerBase");
			configEffectAreaOtherColor = config.Bind<string>(text, "Unknown effect spheres", "black", "");
			OnColorChanged(configEffectAreaOtherColor, "EffectAreaOther");
			configEffectAreaWarmCozyColor = config.Bind<string>(text, "Warm and cozy effect sphere", "magenta", "");
			OnColorChanged(configEffectAreaWarmCozyColor, "EffectAreaWarmCozy");
			configEffectAreaCustomContainerColor = config.Bind<string>(text, "Custom container sphere", "yellow", "");
			OnColorChanged(configEffectAreaCustomContainerColor, "EffectAreaCustomContainer");
			configEffectAreaCustomCraftingColor = config.Bind<string>(text, "Custom crafting station sphere", "yellow", "");
			OnColorChanged(configEffectAreaCustomCraftingColor, "EffectAreaCustomCrafting");
			configSmokeColor = config.Bind<string>(text, "Smoke sphere", "black", "");
			OnColorChanged(configSmokeColor, "Smoke");
			configRandomEventSystemRayColor = config.Bind<string>(text, "Random even system ray", "black", "");
			OnColorChanged(configRandomEventSystemRayColor, "RandomEventSystem");
			configBiomeAshlandsColor = config.Bind<string>(text, "Ashlands color", "red", "");
			OnColorChanged(configBiomeAshlandsColor, "ZoneCornerAshlands");
			OnColorChanged(configBiomeAshlandsColor, "SpawnZoneAshlands");
			configBiomeBlackForestColor = config.Bind<string>(text, "Black Forest color", "magenta", "");
			OnColorChanged(configBiomeBlackForestColor, "ZoneCornerBlackForest");
			OnColorChanged(configBiomeBlackForestColor, "SpawnZoneBlackForest");
			configBiomeDeepNorthColor = config.Bind<string>(text, "Deep North color", "gray", "");
			OnColorChanged(configBiomeDeepNorthColor, "ZoneCornerDeepNorth");
			OnColorChanged(configBiomeDeepNorthColor, "SpawnZoneDeepNorth");
			configBiomeMeadowsColor = config.Bind<string>(text, "Meadows color", "green", "");
			OnColorChanged(configBiomeMeadowsColor, "ZoneCornerMeadows");
			OnColorChanged(configBiomeMeadowsColor, "SpawnZoneMeadows");
			configBiomeMistlandsColor = config.Bind<string>(text, "Mistlands color", "gray", "");
			OnColorChanged(configBiomeMistlandsColor, "ZoneCornerMistlands");
			OnColorChanged(configBiomeMistlandsColor, "SpawnZoneMistlands");
			configBiomeMountainColor = config.Bind<string>(text, "Mountain color", "white", "");
			OnColorChanged(configBiomeMountainColor, "ZoneCornerMountain");
			OnColorChanged(configBiomeMountainColor, "SpawnZoneMountain");
			configBiomeOceanColor = config.Bind<string>(text, "Ocean color", "blue", "");
			OnColorChanged(configBiomeOceanColor, "ZoneCornerOcean");
			OnColorChanged(configBiomeOceanColor, "SpawnZoneOcean");
			configBiomePlainsColor = config.Bind<string>(text, "Plains color", "yellow", "");
			OnColorChanged(configBiomePlainsColor, "ZoneCornerPlains");
			OnColorChanged(configBiomePlainsColor, "SpawnZonePlains");
			configBiomeSwampColor = config.Bind<string>(text, "Swamp color", "cyan", "");
			OnColorChanged(configBiomeSwampColor, "ZoneCornerSwamp");
			OnColorChanged(configBiomeSwampColor, "SpawnZoneSwamp");
			configBiomeOtherColor = config.Bind<string>(text, "Unknown biome color", "black", "");
			OnColorChanged(configBiomeOtherColor, "ZoneCornerUnknown");
			OnColorChanged(configBiomeOtherColor, "SpawnZoneUnknown");
		}

		public static void InitExcluded(ConfigFile config)
		{
			string text = "4. Excluded";
			configExcludedCreatures = config.Bind<string>(text, "Creatures", "", "List of creatures separated by ,");
			configExcludedSpawnSystems = config.Bind<string>(text, "Spawn systems", "Seagal,FireFlies", "List of creatures separated by , that are not visualized");
			configExcludedCreatureSpawners = config.Bind<string>(text, "Spawn points", "", "List of creatures separated by , that are not visualized");
			configExcludedResources = config.Bind<string>(text, "Resources", "Wood,Stone,Rock*,*RockPillar", "List of resources separated by , that are not visualized");
		}

		public static void InitHUD(ConfigFile config)
		{
			string text = "1. HUD";
			configShowHud = config.Bind<bool>(text, "Show HUD", false, "Show info and stats on HUD");
			configShowTimeAndWeather = config.Bind<bool>(text, "Show current time and weather", true, "Show current time and weather on the hud");
			configShowPosition = config.Bind<bool>(text, "Show current position", true, "Show current position on the hud");
			configShowShipStatsOnHud = config.Bind<bool>(text, "Show ship stats", true, "Show ship stats on the hud");
			configTrackedObjects = config.Bind<string>(text, "Tracked objects", "Serpent", "List of objects to track (separated by ,)");
			configTrackRadius = config.Bind<float>(text, "Track radius", 500f, "Radius to find objects.");
		}

		public static void Init(ConfigFile config)
		{
			InitHUD(config);
			InitTooltips(config);
			InitVisuals(config);
			InitExcluded(config);
			InitColors(config);
			InitVisualWidth(config);
			InitCommands();
		}

		private static void InitCommands()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Expected O, but got Unknown
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Expected O, but got Unknown
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Expected O, but got Unknown
			//IL_009e: 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_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Expected O, but got Unknown
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Expected O, but got Unknown
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invali