Decompiled source of Untamo Boats v1.0.11

BepInEx/plugins/Untamo.Boats.dll

Decompiled a month ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Text;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using FishNet;
using FishNet.Connection;
using FishNet.Object;
using FishNet.Serializing;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Unity.Mathematics;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Untamo.Boats")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Untamo.Boats")]
[assembly: AssemblyTitle("Untamo.Boats")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace Untamo.Boats
{
	[BepInPlugin("Untamo.Boats", "Untamo.Boats", "1.0.11")]
	public sealed class Plugin : BaseUnityPlugin
	{
		private sealed class BoatNativeEditorUi
		{
			private sealed class NativeControl
			{
				public GameObject Object;

				public Component Text;

				public Component Slider;

				public int Pass;

				public Rect ScreenRect;

				public bool IsBackdrop;
			}

			private const BindingFlags Flags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;

			private readonly GameObject _root;

			private readonly Component _buttonTemplate;

			private readonly Component _textTemplate;

			private readonly Component _sliderTemplate;

			private readonly Component _panelTemplate;

			private readonly Dictionary<string, NativeControl> _controls = new Dictionary<string, NativeControl>();

			private readonly List<Rect> _buttonRects = new List<Rect>();

			private readonly Type _textType;

			private int _sequence;

			private int _pass;

			public Font LegacyFont => TryExtractUnityFont(_textTemplate);

			public bool HasSlider => (Object)(object)_sliderTemplate != (Object)null;

			private static object Read(object obj, string name)
			{
				if (obj == null)
				{
					return null;
				}
				PropertyInfo property = obj.GetType().GetProperty(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
				if (property != null && property.CanRead)
				{
					return property.GetValue(obj, null);
				}
				return obj.GetType().GetField(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)?.GetValue(obj);
			}

			private static void Write(object obj, string name, object value)
			{
				if (obj != null)
				{
					PropertyInfo property = obj.GetType().GetProperty(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
					if (property != null && property.CanWrite)
					{
						property.SetValue(obj, value, null);
					}
				}
			}

			private static Component FindSceneComponent(Type type)
			{
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				if (type == null)
				{
					return null;
				}
				Object[] array = Resources.FindObjectsOfTypeAll(type);
				foreach (Object val in array)
				{
					Component val2 = (Component)(object)((val is Component) ? val : null);
					if ((Object)(object)val2 != (Object)null)
					{
						Scene scene = val2.gameObject.scene;
						if (((Scene)(ref scene)).IsValid())
						{
							return val2;
						}
					}
				}
				return null;
			}

			public static BoatNativeEditorUi TryCreate()
			{
				Component obj = FindSceneComponent(FindRuntimeType("ColorPicker"));
				object obj2 = Read(obj, "_skinButton");
				Component val = (Component)((obj2 is Component) ? obj2 : null);
				if ((Object)(object)val == (Object)null)
				{
					return null;
				}
				Type type = FindRuntimeType("TMPro.TMP_Text") ?? FindRuntimeType("UnityEngine.UI.Text");
				Component val2 = ((type == null) ? null : val.GetComponentInChildren(type, true));
				if ((Object)(object)val2 == (Object)null)
				{
					return null;
				}
				Component obj3 = FindSceneComponent(FindRuntimeType("ButtonManager"));
				object obj4 = Read(obj3, "_sensitivitySlider");
				Component slider = (Component)((obj4 is Component) ? obj4 : null);
				return new BoatNativeEditorUi(val, val2, slider, type);
			}

			private BoatNativeEditorUi(Component tab, Component text, Component slider, Type textType)
			{
				//IL_0060: Unknown result type (might be due to invalid IL or missing references)
				//IL_006a: Expected O, but got Unknown
				_buttonTemplate = tab;
				_textTemplate = text;
				_sliderTemplate = slider;
				_textType = textType;
				_panelTemplate = FindPanelTemplate(tab);
				_root = new GameObject("Untamo.F10.NativeUI", new Type[1] { typeof(RectTransform) });
				_root.SetActive(false);
				try
				{
					Type type = FindRuntimeType("UnityEngine.Canvas");
					Component obj = _root.AddComponent(type);
					Write(obj, "renderMode", Enum.Parse(type.GetProperty("renderMode").PropertyType, "ScreenSpaceOverlay"));
					Write(obj, "sortingOrder", 32760);
					Type type2 = FindRuntimeType("UnityEngine.UI.GraphicRaycaster");
					if (type2 != null)
					{
						_root.AddComponent(type2);
					}
					Object.DontDestroyOnLoad((Object)(object)_root);
					_root.SetActive(true);
				}
				catch
				{
					Object.Destroy((Object)(object)_root);
					throw;
				}
			}

			private static Component FindPanelTemplate(Component tab)
			{
				//IL_0057: 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_006e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0073: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b3: Expected O, but got Unknown
				//IL_011e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0123: Unknown result type (might be due to invalid IL or missing references)
				//IL_0135: Unknown result type (might be due to invalid IL or missing references)
				//IL_013a: Unknown result type (might be due to invalid IL or missing references)
				Type type = FindRuntimeType("UnityEngine.UI.Image");
				if (type == null)
				{
					return null;
				}
				Transform parent = tab.transform.parent;
				while ((Object)(object)parent != (Object)null)
				{
					Component component = ((Component)parent).GetComponent(type);
					RectTransform val = (RectTransform)(object)((parent is RectTransform) ? parent : null);
					Rect rect;
					if ((Object)(object)component != (Object)null && (Object)(object)val != (Object)null)
					{
						rect = val.rect;
						if (((Rect)(ref rect)).width >= 300f)
						{
							rect = val.rect;
							if (((Rect)(ref rect)).height >= 300f)
							{
								return component;
							}
						}
					}
					foreach (Transform item in parent)
					{
						Transform val2 = item;
						string text = ((Object)val2).name.ToLowerInvariant();
						if (!text.Contains("background") && !text.Contains("backdrop") && text != "panel")
						{
							continue;
						}
						component = ((Component)val2).GetComponent(type);
						val = (RectTransform)(object)((val2 is RectTransform) ? val2 : null);
						if (!((Object)(object)component != (Object)null) || !((Object)(object)val != (Object)null))
						{
							continue;
						}
						rect = val.rect;
						if (((Rect)(ref rect)).width >= 300f)
						{
							rect = val.rect;
							if (((Rect)(ref rect)).height >= 300f)
							{
								return component;
							}
						}
					}
					if ((Object)(object)((Component)parent).GetComponent(FindRuntimeType("UnityEngine.Canvas")) != (Object)null)
					{
						break;
					}
					parent = parent.parent;
				}
				return null;
			}

			public void Background(Rect rect)
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Invalid comparison between Unknown and I4
				//IL_016f: 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_0055: Expected O, but got Unknown
				//IL_0136: Unknown result type (might be due to invalid IL or missing references)
				if ((int)Event.current.type != 7)
				{
					return;
				}
				if (!_controls.TryGetValue("background", out var value))
				{
					GameObject val = new GameObject("F10.NativePanel", new Type[1] { typeof(RectTransform) });
					val.transform.SetParent(_root.transform, false);
					Component obj = val.AddComponent(FindRuntimeType("UnityEngine.UI.Image"));
					Write(obj, "raycastTarget", false);
					if ((Object)(object)_panelTemplate != (Object)null)
					{
						string[] array = new string[5] { "sprite", "type", "color", "material", "pixelsPerUnitMultiplier" };
						foreach (string name in array)
						{
							object obj2 = Read(_panelTemplate, name);
							if (obj2 != null)
							{
								Write(obj, name, obj2);
							}
						}
					}
					else
					{
						Write(obj, "color", (object)new Color(0f, 0f, 0f, 0.72f));
					}
					value = new NativeControl
					{
						Object = val,
						IsBackdrop = true
					};
					_controls.Add("background", value);
				}
				Place(value, rect);
				value.Object.transform.SetAsFirstSibling();
			}

			public void BeginPass()
			{
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Invalid comparison between Unknown and I4
				_sequence = 0;
				if ((int)Event.current.type == 7)
				{
					_pass++;
					_buttonRects.Clear();
				}
			}

			public void EndPass()
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Invalid comparison between Unknown and I4
				if ((int)Event.current.type != 7)
				{
					return;
				}
				foreach (NativeControl value in _controls.Values)
				{
					if ((Object)(object)value.Object != (Object)null && value.Pass != _pass)
					{
						value.Object.SetActive(false);
					}
				}
			}

			public bool IsButtonRect(Rect rect)
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Invalid comparison between Unknown and I4
				//IL_001f: Unknown result type (might be due to invalid IL or missing references)
				if ((int)Event.current.type != 7)
				{
					return false;
				}
				return _buttonRects.Contains(rect);
			}

			public void Dispose()
			{
				if ((Object)(object)_root != (Object)null)
				{
					_root.SetActive(false);
					Object.Destroy((Object)(object)_root);
				}
				_controls.Clear();
			}

			private NativeControl Clone(string key, Component template, bool interactive)
			{
				//IL_0020: Unknown result type (might be due to invalid IL or missing references)
				//IL_0026: Expected O, but got Unknown
				//IL_0256: Unknown result type (might be due to invalid IL or missing references)
				//IL_0219: Unknown result type (might be due to invalid IL or missing references)
				//IL_02bc: Unknown result type (might be due to invalid IL or missing references)
				//IL_02f5: Unknown result type (might be due to invalid IL or missing references)
				//IL_0366: Unknown result type (might be due to invalid IL or missing references)
				if (_controls.TryGetValue(key, out var value))
				{
					return value;
				}
				GameObject val = new GameObject("F10.Staging");
				val.SetActive(false);
				val.transform.SetParent(_root.transform, false);
				GameObject val2 = null;
				try
				{
					val2 = Object.Instantiate<GameObject>(template.gameObject, val.transform, false);
					val2.SetActive(false);
					Component[] componentsInChildren = val2.GetComponentsInChildren<Component>(true);
					foreach (Component val3 in componentsInChildren)
					{
						if ((Object)(object)val3 == (Object)null || val3 is Transform)
						{
							continue;
						}
						string text = ((object)val3).GetType().Namespace ?? "";
						if (!(text == "UnityEngine.UI") && !(text == "TMPro") && !(((object)val3).GetType().FullName == "UnityEngine.CanvasRenderer") && !(((object)val3).GetType().FullName == "UnityEngine.CanvasGroup"))
						{
							Behaviour val4 = (Behaviour)(object)((val3 is Behaviour) ? val3 : null);
							if ((Object)(object)val4 != (Object)null)
							{
								val4.enabled = false;
							}
							Object.DestroyImmediate((Object)(object)val3);
							continue;
						}
						string[] array = new string[5] { "onClick", "onValueChanged", "onEndEdit", "onSelect", "onDeselect" };
						foreach (string name in array)
						{
							PropertyInfo property = ((object)val3).GetType().GetProperty(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
							if (property != null && property.CanWrite)
							{
								property.SetValue(val3, Activator.CreateInstance(property.PropertyType), null);
							}
						}
						Write(val3, "raycastTarget", false);
						Write(val3, "interactable", true);
						if (!interactive && ((object)val3).GetType().FullName == "UnityEngine.UI.Button")
						{
							((Behaviour)val3).enabled = false;
						}
						Write(val3, "blocksRaycasts", false);
						Write(val3, "alpha", 1f);
						Write(val3, "color", Color.white);
						object obj = Read(val3, "colors");
						if (obj != null)
						{
							string[] array2 = new string[4] { "normalColor", "highlightedColor", "pressedColor", "selectedColor" };
							foreach (string name2 in array2)
							{
								Write(obj, name2, Color.white);
							}
							Write(obj, "disabledColor", (object)new Color(1f, 1f, 1f, 0.35f));
							Write(val3, "colors", obj);
						}
						if (((object)val3).GetType().Name.EndsWith("LayoutGroup") || ((object)val3).GetType().Name == "ContentSizeFitter" || ((object)val3).GetType().Name == "AspectRatioFitter")
						{
							((Behaviour)val3).enabled = false;
						}
						PropertyInfo property2 = ((object)val3).GetType().GetProperty("navigation", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
						if (property2 != null && property2.CanWrite)
						{
							object value2 = property2.GetValue(val3, null);
							Write(value2, "mode", Enum.Parse(value2.GetType().GetProperty("mode").PropertyType, "None"));
							property2.SetValue(val3, value2, null);
						}
					}
					val2.transform.SetParent(_root.transform, false);
					value = new NativeControl
					{
						Object = val2,
						Text = val2.GetComponentInChildren(_textType, true),
						Slider = (interactive ? val2.GetComponent(((object)_sliderTemplate).GetType()) : null)
					};
					if ((Object)(object)value.Text != (Object)null)
					{
						Component[] componentsInChildren2 = val2.GetComponentsInChildren(_textType, true);
						foreach (Component val5 in componentsInChildren2)
						{
							if ((Object)(object)val5 != (Object)(object)value.Text)
							{
								Write(val5, "text", string.Empty);
							}
						}
					}
					_controls.Add(key, value);
					return value;
				}
				catch
				{
					if ((Object)(object)val2 != (Object)null)
					{
						Object.Destroy((Object)(object)val2);
					}
					throw;
				}
				finally
				{
					Object.Destroy((Object)(object)val);
				}
			}

			private static void WhiteText(Component text, int size)
			{
				//IL_0017: 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_011c: Unknown result type (might be due to invalid IL or missing references)
				if (!((Object)(object)text == (Object)null))
				{
					Write(text, "color", Color.white);
					Write(text, "faceColor", (object)new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue));
					Write(text, "enableVertexGradient", false);
					Write(text, "overrideColorTags", true);
					Write(text, "richText", false);
					Write(text, "enableAutoSizing", true);
					Write(text, "fontSizeMin", 10f);
					Write(text, "fontSizeMax", (float)size);
					object obj = Read(text, "fontSize");
					if (obj is int)
					{
						Write(text, "fontSize", size);
					}
					else
					{
						Write(text, "fontSize", (float)size);
					}
					Write(text, "margin", (object)new Vector4(3f, 0f, 3f, 0f));
					Write(text, "enableWordWrapping", false);
					PropertyInfo property = ((object)text).GetType().GetProperty("alignment", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
					if (property != null && property.PropertyType.IsEnum)
					{
						string value = (property.PropertyType.FullName.StartsWith("TMPro.") ? "Center" : "MiddleCenter");
						Write(text, "alignment", Enum.Parse(property.PropertyType, value));
					}
				}
			}

			private void Place(NativeControl c, Rect rect)
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: 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_003b: 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_0046: Unknown result type (might be due to invalid IL or missing references)
				//IL_0050: Unknown result type (might be due to invalid IL or missing references)
				//IL_0057: 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_0061: Unknown result type (might be due to invalid IL or missing references)
				//IL_0066: Unknown result type (might be due to invalid IL or missing references)
				//IL_0067: Unknown result type (might be due to invalid IL or missing references)
				//IL_0068: Unknown result type (might be due to invalid IL or missing references)
				//IL_0069: Unknown result type (might be due to invalid IL or missing references)
				//IL_006e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0085: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bb: 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_00c8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
				Vector2 val = GUIUtility.GUIToScreenPoint(((Rect)(ref rect)).position);
				Transform transform = c.Object.transform;
				RectTransform val2 = (RectTransform)(object)((transform is RectTransform) ? transform : null);
				Vector2 val3 = default(Vector2);
				((Vector2)(ref val3))..ctor(0f, 1f);
				val2.pivot = val3;
				Vector2 anchorMin = (val2.anchorMax = val3);
				val2.anchorMin = anchorMin;
				Vector2 val5 = GUIUtility.GUIToScreenPoint(((Rect)(ref rect)).position + ((Rect)(ref rect)).size);
				Vector2 val6 = val5 - val;
				((Transform)val2).localScale = new Vector3((((Rect)(ref rect)).width > 0f) ? (val6.x / ((Rect)(ref rect)).width) : 1f, (((Rect)(ref rect)).height > 0f) ? (val6.y / ((Rect)(ref rect)).height) : 1f, 1f);
				c.ScreenRect = new Rect(val, val6);
				((Transform)val2).localRotation = Quaternion.identity;
				val2.anchoredPosition = new Vector2(val.x, 0f - val.y);
				val2.sizeDelta = ((Rect)(ref rect)).size;
				c.Pass = _pass;
				c.Object.SetActive(true);
				c.Object.transform.SetAsLastSibling();
			}

			public void HideBehindPopup(Rect rect)
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Invalid comparison between Unknown and I4
				//IL_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0021: Unknown result type (might be due to invalid IL or missing references)
				//IL_0026: Unknown result type (might be due to invalid IL or missing references)
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				//IL_0035: Unknown result type (might be due to invalid IL or missing references)
				//IL_003a: Unknown result type (might be due to invalid IL or missing references)
				//IL_003f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0042: 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_0044: Unknown result type (might be due to invalid IL or missing references)
				//IL_0045: Unknown result type (might be due to invalid IL or missing references)
				//IL_008c: Unknown result type (might be due to invalid IL or missing references)
				if ((int)Event.current.type != 7)
				{
					return;
				}
				Vector2 val = GUIUtility.GUIToScreenPoint(((Rect)(ref rect)).position);
				Vector2 val2 = GUIUtility.GUIToScreenPoint(((Rect)(ref rect)).position + ((Rect)(ref rect)).size);
				Rect val3 = default(Rect);
				((Rect)(ref val3))..ctor(val, val2 - val);
				foreach (NativeControl value in _controls.Values)
				{
					if ((Object)(object)value.Object != (Object)null && !value.IsBackdrop && ((Rect)(ref value.ScreenRect)).Overlaps(val3))
					{
						value.Object.SetActive(false);
					}
				}
			}

			public void Button(Rect rect, string text, bool selected, bool enabled, int size)
			{
				//IL_002a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Invalid comparison between Unknown and I4
				//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
				//IL_010e: Unknown result type (might be due to invalid IL or missing references)
				//IL_011b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0132: Unknown result type (might be due to invalid IL or missing references)
				//IL_0185: Unknown result type (might be due to invalid IL or missing references)
				//IL_0192: Unknown result type (might be due to invalid IL or missing references)
				string key = "button:" + _sequence++;
				if ((int)Event.current.type == 7)
				{
					NativeControl nativeControl = Clone(key, _buttonTemplate, interactive: false);
					Write(nativeControl.Text, "text", text);
					WhiteText(nativeControl.Text, (size > 0) ? size : 14);
					if ((Object)(object)nativeControl.Text != (Object)null && (Object)(object)nativeControl.Text.transform != (Object)(object)nativeControl.Object.transform)
					{
						Transform transform = nativeControl.Text.transform;
						RectTransform val = (RectTransform)(object)((transform is RectTransform) ? transform : null);
						((Transform)val).SetParent(nativeControl.Object.transform, false);
						val.anchorMin = Vector2.zero;
						val.anchorMax = Vector2.one;
						val.offsetMin = new Vector2(4f, 0f);
						val.offsetMax = new Vector2(-4f, 0f);
						((Transform)val).localScale = Vector3.one;
					}
					bool flag = enabled && ((Rect)(ref rect)).Contains(Event.current.mousePosition);
					Component component = nativeControl.Object.GetComponent(FindRuntimeType("UnityEngine.CanvasGroup"));
					Write(component, "alpha", (!enabled) ? 0.25f : ((selected || flag) ? 1f : 0.5f));
					Place(nativeControl, rect);
					_buttonRects.Add(rect);
				}
			}

			public void Label(Rect rect, string text, int size, bool enabled)
			{
				//IL_0028: Unknown result type (might be due to invalid IL or missing references)
				//IL_002e: Invalid comparison between Unknown and I4
				//IL_0071: Unknown result type (might be due to invalid IL or missing references)
				//IL_0078: Expected O, but got Unknown
				//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
				string key = "label:" + _sequence++;
				if ((int)Event.current.type != 7)
				{
					return;
				}
				if (!_controls.TryGetValue(key, out var value))
				{
					GameObject val = new GameObject("F10.Text", new Type[1] { typeof(RectTransform) });
					val.transform.SetParent(_root.transform, false);
					Component val2 = val.AddComponent(((object)_textTemplate).GetType());
					string[] array = new string[6] { "font", "fontSharedMaterial", "fontStyle", "color", "alignment", "characterSpacing" };
					foreach (string name in array)
					{
						object obj = Read(_textTemplate, name);
						if (obj != null)
						{
							Write(val2, name, obj);
						}
					}
					Write(val2, "raycastTarget", false);
					value = new NativeControl
					{
						Object = val,
						Text = val2
					};
					_controls.Add(key, value);
				}
				Write(value.Text, "text", text);
				WhiteText(value.Text, size);
				object obj2 = Read(_textTemplate, "fontSize");
				if (obj2 is int)
				{
					Write(value.Text, "fontSize", size);
				}
				else
				{
					Write(value.Text, "fontSize", (float)size);
				}
				Write(value.Text, "alpha", enabled ? 1f : 0.35f);
				Place(value, rect);
			}

			public void Slider(string key, Rect rect, float value, float min, float max, bool enabled)
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Invalid comparison between Unknown and I4
				//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
				if ((int)Event.current.type == 7)
				{
					NativeControl nativeControl = Clone("slider:" + key, _sliderTemplate, interactive: true);
					Write(nativeControl.Slider, "interactable", enabled);
					Write(nativeControl.Slider, "minValue", min);
					Write(nativeControl.Slider, "maxValue", max);
					Write(nativeControl.Slider, "wholeNumbers", false);
					Write(nativeControl.Slider, "value", Mathf.Clamp(value, min, max));
					Place(nativeControl, rect);
				}
			}
		}

		private readonly struct CollisionPair
		{
			internal readonly Collider Item;

			internal readonly Collider Boat;

			internal CollisionPair(Collider item, Collider boat)
			{
				Item = item;
				Boat = boat;
			}
		}

		public const string PluginGuid = "Untamo.Boats";

		public const string PluginName = "Untamo.Boats";

		public const string PluginVersion = "1.0.11";

		private const int BoatCost = 250;

		private const int MaximumBoats = 10;

		private ConfigEntry<KeyboardShortcut> _purchaseKey;

		private ConfigEntry<KeyboardShortcut> _removeAllKey;

		private ConfigEntry<float> _boatColorEditorPositionX;

		private ConfigEntry<float> _boatColorEditorPositionY;

		private bool _purchaseInProgress;

		private Boat _activeBoat;

		private Harmony _harmony;

		private readonly Dictionary<string, Boat> _savedBoats = new Dictionary<string, Boat>();

		private readonly HashSet<Boat> _restoringCustomBoats = new HashSet<Boat>();

		private BoatSaveFile _save = new BoatSaveFile();

		private string _savePath;

		private string _saveContextKey;

		private string _nextBoatName = "Custom Boat 1";

		private bool _restoreStarted;

		private BoatManager _knownBoatManager;

		private float _nextAutoSave;

		private bool _hasRuntimeSpawnAnchor;

		private Vector3 _runtimeSpawnAnchor;

		private bool _isIslandTransition;

		private readonly List<CollisionPair> _ignoredHeldItemCollisions = new List<CollisionPair>();

		private Component _collisionIgnoredItem;

		private Boat _collisionIgnoredBoat;

		private Boat _lastLocallyDrivenBoat;

		private bool _selectedMotorRestored;

		private bool _selectedSkinRestored;

		private bool _selectedControlSkinRestored;

		private Boat _selectedControlSkinRestoredBoat;

		private bool _selectedMotorMountRestored;

		private Boat _selectedMotorMountRestoredBoat;

		private Coroutine _selectedControlSkinRestoreRoutine;

		private Coroutine _originalMaterialFinishRestoreRoutine;

		private bool _selectedRadarPositionRestored;

		private float _nextOriginalSteeringWheelScaleRestore;

		private bool _originalHealthRestored;

		private bool _originalFuelRestored;

		private bool _originalCooknessRestored;

		private ILogHandler _previousUnityLogHandler;

		private GameObject _boostHudObject;

		private Component _boostTextComponent;

		private float _nextBoostHudRefresh;

		private float _nextNearbyBoatRefresh;

		private Boat _cachedNearbyBoat;

		private float _nextBoatCountRefresh;

		private int _cachedBoatCount;

		private float _nextOriginalBoatRefresh;

		private Boat _cachedOriginalBoat;

		private float _suppressOriginalNativeHullDetectionUntil;

		private static int _drivenBoatCacheFrame = -1;

		private static Boat _cachedLocallyDrivenBoat;

		private float _interactionRecoveryHoldStart = -1f;

		private bool _interactionRecoveryTriggered;

		private readonly Dictionary<string, int> _palette1024Selections = new Dictionary<string, int>(StringComparer.Ordinal);

		private string _palette1024SavePath;

		private bool _palette1024Dirty;

		private const float Palette1024SaveDebounceSeconds = 0.75f;

		private const float Palette1024RepairIntervalSeconds = 0.5f;

		private float _palette1024SaveNotBefore;

		private float _nextPalette1024RepairAt;

		private const float DestructiveKeyHoldSeconds = 0.3f;

		private const float ColorHoldInitialDelay = 0.3f;

		private const float ColorHoldRepeatInterval = 0.08f;

		private KeyCode _boatColorEditorHeldArrow = (KeyCode)0;

		private float _boatColorEditorArrowRepeatAt;

		private string _boatColorEditorHueInput = "";

		private int _boatColorEditorHueInputSelection = int.MinValue;

		private bool _boatColorEditorHueInputFocused;

		private int _boatColorEditorSliderMode;

		private int _boatColorEditorRandomMode = 2;

		private string _boatColorEditorHexInput = "FFFFFF";

		private int _boatColorEditorHexInputSelection = int.MinValue;

		private bool _boatColorEditorHexInputFocused;

		private bool _boatColorEditorOpen;

		private string _boatColorEditorTarget = "HULL";

		private bool _boatColorEditorMaterialDropdownOpen;

		private Rect _boatColorEditorMaterialButtonRect;

		private bool _boatColorEditorEditingSecondaryColor;

		private bool _boatColorEditorHasCopiedColor;

		private int _boatColorEditorCopiedColorSelection = -1;

		private string _boatColorEditorCopiedColorSourceMode;

		private bool _boatColorEditorCopiedHasSecondary;

		private int _boatColorEditorCopiedSecondarySelection = -1;

		private readonly Dictionary<string, string> _boatColorEditorColorSourceModes = new Dictionary<string, string>(StringComparer.Ordinal);

		private Boat _boatColorEditorBoat;

		private Rect _boatColorEditorRect = new Rect(120f, 20f, 720f, 850f);

		private float _boatColorEditorRequiredHeight = 850f;

		private CursorLockMode _boatColorEditorPreviousCursorLock;

		private bool _boatColorEditorPreviousCursorVisible;

		private GUIStyle _boatColorEditorTitleStyle;

		private GUIStyle _boatColorEditorTabStyle;

		private GUIStyle _boatColorEditorSelectedTabStyle;

		private GUIStyle _boatColorEditorButtonStyle;

		private GUIStyle _boatColorEditorOrangeModeStyle;

		private GUIStyle _boatColorEditorOrangeSelectedModeStyle;

		private GUIStyle _boatColorEditorSmallStyle;

		private GUIStyle _boatColorEditorHueInputStyle;

		private Font _boatColorEditorHudFont;

		private bool _boatColorEditorHudFontSearched;

		private Texture2D _boatColorEditorWhiteTexture;

		private Texture2D _boatColorEditorPanelTexture;

		private Texture2D _boatColorEditorButtonTexture;

		private Texture2D _boatColorEditorButtonHoverTexture;

		private Texture2D _boatColorEditorSelectedTexture;

		private Texture2D _boatColorEditorTransparentTexture;

		private Texture2D _boatColorEditorInspectSelectedTexture;

		private Texture2D _boatColorEditorBlackTexture;

		private Texture2D _boatColorEditorBlackSelectionTexture;

		private Texture2D _boatColorEditorSecondaryMarkerTexture;

		private Texture2D _boatColorEditorSecondaryMarkerBlackTexture;

		private Texture2D _boatColorEditorPaletteAtlasTexture;

		private readonly Dictionary<int, Texture2D> _boatColorEditorColorTextures = new Dictionary<int, Texture2D>();

		private bool _boatColorEditorResetSnapshotValid;

		private Boat _boatColorEditorResetSnapshotBoat;

		private readonly Dictionary<string, int> _boatColorEditorResetPalette = new Dictionary<string, int>(StringComparer.Ordinal);

		private byte _boatColorEditorResetHullSkin;

		private byte _boatColorEditorResetHullFinish;

		private byte _boatColorEditorResetStripeSecondarySkin;

		private byte _boatColorEditorResetControlSkin;

		private byte _boatColorEditorResetMotorSkin;

		private byte _boatColorEditorResetRadarSkin;

		private byte _boatColorEditorResetMotorFinish;

		private byte _boatColorEditorResetRadarFinish;

		private byte _boatColorEditorResetSteeringFinish;

		private byte _boatColorEditorResetThrottleFinish;

		private byte _boatColorEditorResetMotorMountFinish;

		private bool _boatColorEditorResetMotorMountUsesControls;

		private float _purchaseKeyHoldStart = -1f;

		private bool _purchaseKeyHoldTriggered;

		private bool _purchaseSpawnConsumedForCurrentF8Hold;

		private bool _f8HudDetailsTapStarted;

		private bool _showCustomHudBoatColorDetails;

		private float _removeAllKeyHoldStart = -1f;

		private bool _removeAllKeyHoldTriggered;

		private float _deleteKeyHoldStart = -1f;

		private bool _deleteKeyHoldTriggered;

		private float _insertKeyHoldStart = -1f;

		private bool _insertKeyHoldTriggered;

		private const float FuelSellHoldStepSeconds = 0.4f;

		private float _homeFuelHoldStart = -1f;

		private int _homeFuelSellSteps;

		private const float RadarHoldInitialDelay = 0.3f;

		private const float RadarHoldRepeatInterval = 0.1f;

		private KeyCode _radarHeldDirection = (KeyCode)0;

		private bool _radarHeldVerticalAxis;

		private float _radarHoldNextTime;

		private const int HsbSelectionBase = 10000000;

		private const int HsbHueMaximum = 360;

		private const int HsbSaturationMaximum = 100;

		private const int HsbBrightnessMaximum = 100;

		private const int HsbAxisSize = 101;

		private const int HsbSelectionMaximum = 13682560;

		private const int RgbSelectionBase = 20000000;

		private const int RgbChannelSize = 256;

		private const int RgbSelectionMaximum = 36777215;

		private static readonly Color32[] ScreenshotPalette1024 = (Color32[])(object)new Color32[1024]
		{
			new Color32(byte.MaxValue, (byte)0, (byte)0, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)16, (byte)0, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)69, (byte)0, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)103, (byte)0, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)116, (byte)0, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)138, (byte)0, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)171, (byte)0, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)205, (byte)0, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)238, (byte)0, byte.MaxValue),
			new Color32((byte)238, (byte)253, (byte)0, byte.MaxValue),
			new Color32((byte)171, byte.MaxValue, (byte)0, byte.MaxValue),
			new Color32((byte)98, byte.MaxValue, (byte)13, byte.MaxValue),
			new Color32((byte)37, byte.MaxValue, (byte)79, byte.MaxValue),
			new Color32((byte)5, byte.MaxValue, (byte)156, byte.MaxValue),
			new Color32((byte)0, byte.MaxValue, (byte)216, byte.MaxValue),
			new Color32((byte)0, (byte)253, (byte)250, byte.MaxValue),
			new Color32((byte)0, (byte)237, byte.MaxValue, byte.MaxValue),
			new Color32((byte)0, (byte)206, byte.MaxValue, byte.MaxValue),
			new Color32((byte)0, (byte)162, byte.MaxValue, byte.MaxValue),
			new Color32((byte)0, (byte)109, byte.MaxValue, byte.MaxValue),
			new Color32((byte)0, (byte)54, byte.MaxValue, byte.MaxValue),
			new Color32((byte)3, (byte)9, byte.MaxValue, byte.MaxValue),
			new Color32((byte)31, (byte)0, byte.MaxValue, byte.MaxValue),
			new Color32((byte)87, (byte)0, byte.MaxValue, byte.MaxValue),
			new Color32((byte)140, (byte)0, byte.MaxValue, byte.MaxValue),
			new Color32((byte)190, (byte)0, (byte)254, byte.MaxValue),
			new Color32((byte)227, (byte)0, (byte)244, byte.MaxValue),
			new Color32((byte)249, (byte)0, (byte)218, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)0, (byte)176, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)0, (byte)119, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)0, (byte)95, byte.MaxValue),
			new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
			new Color32((byte)179, (byte)0, (byte)0, byte.MaxValue),
			new Color32((byte)179, (byte)12, (byte)0, byte.MaxValue),
			new Color32((byte)179, (byte)48, (byte)0, byte.MaxValue),
			new Color32((byte)179, (byte)72, (byte)0, byte.MaxValue),
			new Color32((byte)179, (byte)81, (byte)0, byte.MaxValue),
			new Color32((byte)179, (byte)96, (byte)0, byte.MaxValue),
			new Color32((byte)179, (byte)121, (byte)0, byte.MaxValue),
			new Color32((byte)180, (byte)144, (byte)0, byte.MaxValue),
			new Color32((byte)185, (byte)167, (byte)0, byte.MaxValue),
			new Color32((byte)168, (byte)180, (byte)0, byte.MaxValue),
			new Color32((byte)120, (byte)181, (byte)0, byte.MaxValue),
			new Color32((byte)69, (byte)179, (byte)9, byte.MaxValue),
			new Color32((byte)26, (byte)179, (byte)55, byte.MaxValue),
			new Color32((byte)3, (byte)179, (byte)109, byte.MaxValue),
			new Color32((byte)0, (byte)181, (byte)151, byte.MaxValue),
			new Color32((byte)0, (byte)178, (byte)178, byte.MaxValue),
			new Color32((byte)0, (byte)166, (byte)184, byte.MaxValue),
			new Color32((byte)0, (byte)144, (byte)180, byte.MaxValue),
			new Color32((byte)0, (byte)114, (byte)179, byte.MaxValue),
			new Color32((byte)0, (byte)77, (byte)179, byte.MaxValue),
			new Color32((byte)0, (byte)38, (byte)179, byte.MaxValue),
			new Color32((byte)2, (byte)7, (byte)179, byte.MaxValue),
			new Color32((byte)22, (byte)0, (byte)179, byte.MaxValue),
			new Color32((byte)62, (byte)0, (byte)179, byte.MaxValue),
			new Color32((byte)99, (byte)0, (byte)180, byte.MaxValue),
			new Color32((byte)133, (byte)0, (byte)180, byte.MaxValue),
			new Color32((byte)158, (byte)0, (byte)171, byte.MaxValue),
			new Color32((byte)174, (byte)0, (byte)152, byte.MaxValue),
			new Color32((byte)181, (byte)0, (byte)123, byte.MaxValue),
			new Color32((byte)180, (byte)0, (byte)85, byte.MaxValue),
			new Color32((byte)179, (byte)0, (byte)67, byte.MaxValue),
			new Color32((byte)238, (byte)238, (byte)238, byte.MaxValue),
			new Color32((byte)128, (byte)0, (byte)0, byte.MaxValue),
			new Color32((byte)128, (byte)8, (byte)0, byte.MaxValue),
			new Color32((byte)128, (byte)34, (byte)0, byte.MaxValue),
			new Color32((byte)128, (byte)52, (byte)0, byte.MaxValue),
			new Color32((byte)128, (byte)58, (byte)0, byte.MaxValue),
			new Color32((byte)128, (byte)68, (byte)0, byte.MaxValue),
			new Color32((byte)128, (byte)85, (byte)0, byte.MaxValue),
			new Color32((byte)129, (byte)102, (byte)0, byte.MaxValue),
			new Color32((byte)132, (byte)119, (byte)0, byte.MaxValue),
			new Color32((byte)120, (byte)129, (byte)0, byte.MaxValue),
			new Color32((byte)85, (byte)130, (byte)0, byte.MaxValue),
			new Color32((byte)49, (byte)128, (byte)6, byte.MaxValue),
			new Color32((byte)19, (byte)128, (byte)39, byte.MaxValue),
			new Color32((byte)2, (byte)128, (byte)79, byte.MaxValue),
			new Color32((byte)0, (byte)130, (byte)108, byte.MaxValue),
			new Color32((byte)0, (byte)128, (byte)127, byte.MaxValue),
			new Color32((byte)0, (byte)119, (byte)131, byte.MaxValue),
			new Color32((byte)0, (byte)103, (byte)128, byte.MaxValue),
			new Color32((byte)0, (byte)81, (byte)128, byte.MaxValue),
			new Color32((byte)0, (byte)54, (byte)128, byte.MaxValue),
			new Color32((byte)0, (byte)27, (byte)128, byte.MaxValue),
			new Color32((byte)1, (byte)5, (byte)128, byte.MaxValue),
			new Color32((byte)15, (byte)0, (byte)128, byte.MaxValue),
			new Color32((byte)44, (byte)0, (byte)128, byte.MaxValue),
			new Color32((byte)70, (byte)0, (byte)129, byte.MaxValue),
			new Color32((byte)95, (byte)0, (byte)129, byte.MaxValue),
			new Color32((byte)113, (byte)0, (byte)123, byte.MaxValue),
			new Color32((byte)125, (byte)0, (byte)109, byte.MaxValue),
			new Color32((byte)130, (byte)0, (byte)88, byte.MaxValue),
			new Color32((byte)129, (byte)0, (byte)60, byte.MaxValue),
			new Color32((byte)128, (byte)0, (byte)47, byte.MaxValue),
			new Color32((byte)220, (byte)220, (byte)220, byte.MaxValue),
			new Color32((byte)89, (byte)0, (byte)0, byte.MaxValue),
			new Color32((byte)89, (byte)5, (byte)0, byte.MaxValue),
			new Color32((byte)89, (byte)24, (byte)0, byte.MaxValue),
			new Color32((byte)89, (byte)36, (byte)0, byte.MaxValue),
			new Color32((byte)89, (byte)41, (byte)0, byte.MaxValue),
			new Color32((byte)89, (byte)48, (byte)0, byte.MaxValue),
			new Color32((byte)89, (byte)59, (byte)0, byte.MaxValue),
			new Color32((byte)90, (byte)71, (byte)0, byte.MaxValue),
			new Color32((byte)93, (byte)82, (byte)0, byte.MaxValue),
			new Color32((byte)84, (byte)89, (byte)0, byte.MaxValue),
			new Color32((byte)60, (byte)89, (byte)0, byte.MaxValue),
			new Color32((byte)34, (byte)89, (byte)4, byte.MaxValue),
			new Color32((byte)13, (byte)89, (byte)27, byte.MaxValue),
			new Color32((byte)1, (byte)89, (byte)54, byte.MaxValue),
			new Color32((byte)0, (byte)90, (byte)75, byte.MaxValue),
			new Color32((byte)0, (byte)89, (byte)89, byte.MaxValue),
			new Color32((byte)0, (byte)82, (byte)92, byte.MaxValue),
			new Color32((byte)0, (byte)71, (byte)89, byte.MaxValue),
			new Color32((byte)0, (byte)56, (byte)89, byte.MaxValue),
			new Color32((byte)0, (byte)38, (byte)89, byte.MaxValue),
			new Color32((byte)0, (byte)19, (byte)89, byte.MaxValue),
			new Color32((byte)1, (byte)3, (byte)89, byte.MaxValue),
			new Color32((byte)11, (byte)0, (byte)89, byte.MaxValue),
			new Color32((byte)31, (byte)0, (byte)89, byte.MaxValue),
			new Color32((byte)49, (byte)0, (byte)89, byte.MaxValue),
			new Color32((byte)66, (byte)0, (byte)90, byte.MaxValue),
			new Color32((byte)79, (byte)0, (byte)85, byte.MaxValue),
			new Color32((byte)87, (byte)0, (byte)76, byte.MaxValue),
			new Color32((byte)90, (byte)0, (byte)62, byte.MaxValue),
			new Color32((byte)89, (byte)0, (byte)42, byte.MaxValue),
			new Color32((byte)89, (byte)0, (byte)33, byte.MaxValue),
			new Color32((byte)204, (byte)204, (byte)204, byte.MaxValue),
			new Color32((byte)64, (byte)0, (byte)0, byte.MaxValue),
			new Color32((byte)64, (byte)4, (byte)0, byte.MaxValue),
			new Color32((byte)64, (byte)17, (byte)0, byte.MaxValue),
			new Color32((byte)64, (byte)26, (byte)0, byte.MaxValue),
			new Color32((byte)64, (byte)29, (byte)0, byte.MaxValue),
			new Color32((byte)64, (byte)34, (byte)0, byte.MaxValue),
			new Color32((byte)64, (byte)43, (byte)0, byte.MaxValue),
			new Color32((byte)64, (byte)51, (byte)0, byte.MaxValue),
			new Color32((byte)64, (byte)59, (byte)0, byte.MaxValue),
			new Color32((byte)59, (byte)63, (byte)0, byte.MaxValue),
			new Color32((byte)43, (byte)64, (byte)0, byte.MaxValue),
			new Color32((byte)24, (byte)64, (byte)3, byte.MaxValue),
			new Color32((byte)9, (byte)64, (byte)20, byte.MaxValue),
			new Color32((byte)1, (byte)64, (byte)39, byte.MaxValue),
			new Color32((byte)0, (byte)64, (byte)54, byte.MaxValue),
			new Color32((byte)0, (byte)63, (byte)62, byte.MaxValue),
			new Color32((byte)0, (byte)59, (byte)64, byte.MaxValue),
			new Color32((byte)0, (byte)51, (byte)64, byte.MaxValue),
			new Color32((byte)0, (byte)40, (byte)64, byte.MaxValue),
			new Color32((byte)0, (byte)27, (byte)64, byte.MaxValue),
			new Color32((byte)0, (byte)13, (byte)64, byte.MaxValue),
			new Color32((byte)1, (byte)2, (byte)64, byte.MaxValue),
			new Color32((byte)8, (byte)0, (byte)64, byte.MaxValue),
			new Color32((byte)22, (byte)0, (byte)64, byte.MaxValue),
			new Color32((byte)35, (byte)0, (byte)64, byte.MaxValue),
			new Color32((byte)47, (byte)0, (byte)63, byte.MaxValue),
			new Color32((byte)57, (byte)0, (byte)61, byte.MaxValue),
			new Color32((byte)62, (byte)0, (byte)54, byte.MaxValue),
			new Color32((byte)64, (byte)0, (byte)44, byte.MaxValue),
			new Color32((byte)64, (byte)0, (byte)30, byte.MaxValue),
			new Color32((byte)64, (byte)0, (byte)24, byte.MaxValue),
			new Color32((byte)186, (byte)186, (byte)186, byte.MaxValue),
			new Color32((byte)45, (byte)0, (byte)0, byte.MaxValue),
			new Color32((byte)45, (byte)3, (byte)0, byte.MaxValue),
			new Color32((byte)45, (byte)12, (byte)0, byte.MaxValue),
			new Color32((byte)45, (byte)18, (byte)0, byte.MaxValue),
			new Color32((byte)45, (byte)20, (byte)0, byte.MaxValue),
			new Color32((byte)45, (byte)24, (byte)0, byte.MaxValue),
			new Color32((byte)45, (byte)30, (byte)0, byte.MaxValue),
			new Color32((byte)45, (byte)36, (byte)0, byte.MaxValue),
			new Color32((byte)46, (byte)42, (byte)0, byte.MaxValue),
			new Color32((byte)42, (byte)45, (byte)0, byte.MaxValue),
			new Color32((byte)30, (byte)45, (byte)0, byte.MaxValue),
			new Color32((byte)17, (byte)45, (byte)2, byte.MaxValue),
			new Color32((byte)6, (byte)45, (byte)14, byte.MaxValue),
			new Color32((byte)1, (byte)45, (byte)27, byte.MaxValue),
			new Color32((byte)0, (byte)45, (byte)38, byte.MaxValue),
			new Color32((byte)0, (byte)44, (byte)44, byte.MaxValue),
			new Color32((byte)0, (byte)41, (byte)46, byte.MaxValue),
			new Color32((byte)0, (byte)36, (byte)45, byte.MaxValue),
			new Color32((byte)0, (byte)28, (byte)45, byte.MaxValue),
			new Color32((byte)0, (byte)19, (byte)45, byte.MaxValue),
			new Color32((byte)0, (byte)9, (byte)45, byte.MaxValue),
			new Color32((byte)0, (byte)2, (byte)45, byte.MaxValue),
			new Color32((byte)5, (byte)0, (byte)45, byte.MaxValue),
			new Color32((byte)15, (byte)0, (byte)45, byte.MaxValue),
			new Color32((byte)25, (byte)0, (byte)45, byte.MaxValue),
			new Color32((byte)33, (byte)0, (byte)45, byte.MaxValue),
			new Color32((byte)39, (byte)0, (byte)43, byte.MaxValue),
			new Color32((byte)43, (byte)0, (byte)38, byte.MaxValue),
			new Color32((byte)45, (byte)0, (byte)31, byte.MaxValue),
			new Color32((byte)45, (byte)0, (byte)21, byte.MaxValue),
			new Color32((byte)45, (byte)0, (byte)17, byte.MaxValue),
			new Color32((byte)172, (byte)172, (byte)172, byte.MaxValue),
			new Color32((byte)32, (byte)0, (byte)0, byte.MaxValue),
			new Color32((byte)32, (byte)2, (byte)0, byte.MaxValue),
			new Color32((byte)32, (byte)8, (byte)0, byte.MaxValue),
			new Color32((byte)32, (byte)13, (byte)0, byte.MaxValue),
			new Color32((byte)32, (byte)14, (byte)0, byte.MaxValue),
			new Color32((byte)32, (byte)17, (byte)0, byte.MaxValue),
			new Color32((byte)32, (byte)21, (byte)0, byte.MaxValue),
			new Color32((byte)32, (byte)25, (byte)0, byte.MaxValue),
			new Color32((byte)33, (byte)30, (byte)0, byte.MaxValue),
			new Color32((byte)30, (byte)32, (byte)0, byte.MaxValue),
			new Color32((byte)21, (byte)32, (byte)0, byte.MaxValue),
			new Color32((byte)12, (byte)32, (byte)1, byte.MaxValue),
			new Color32((byte)5, (byte)32, (byte)10, byte.MaxValue),
			new Color32((byte)0, (byte)32, (byte)20, byte.MaxValue),
			new Color32((byte)0, (byte)32, (byte)27, byte.MaxValue),
			new Color32((byte)0, (byte)32, (byte)32, byte.MaxValue),
			new Color32((byte)0, (byte)30, (byte)33, byte.MaxValue),
			new Color32((byte)0, (byte)26, (byte)32, byte.MaxValue),
			new Color32((byte)0, (byte)20, (byte)32, byte.MaxValue),
			new Color32((byte)0, (byte)13, (byte)32, byte.MaxValue),
			new Color32((byte)0, (byte)7, (byte)32, byte.MaxValue),
			new Color32((byte)0, (byte)1, (byte)32, byte.MaxValue),
			new Color32((byte)4, (byte)0, (byte)32, byte.MaxValue),
			new Color32((byte)11, (byte)0, (byte)32, byte.MaxValue),
			new Color32((byte)17, (byte)0, (byte)32, byte.MaxValue),
			new Color32((byte)24, (byte)0, (byte)32, byte.MaxValue),
			new Color32((byte)28, (byte)0, (byte)31, byte.MaxValue),
			new Color32((byte)31, (byte)0, (byte)27, byte.MaxValue),
			new Color32((byte)32, (byte)0, (byte)22, byte.MaxValue),
			new Color32((byte)32, (byte)0, (byte)15, byte.MaxValue),
			new Color32((byte)32, (byte)0, (byte)12, byte.MaxValue),
			new Color32((byte)154, (byte)154, (byte)154, byte.MaxValue),
			new Color32((byte)22, (byte)0, (byte)0, byte.MaxValue),
			new Color32((byte)22, (byte)1, (byte)0, byte.MaxValue),
			new Color32((byte)22, (byte)6, (byte)0, byte.MaxValue),
			new Color32((byte)22, (byte)9, (byte)0, byte.MaxValue),
			new Color32((byte)22, (byte)10, (byte)0, byte.MaxValue),
			new Color32((byte)22, (byte)12, (byte)0, byte.MaxValue),
			new Color32((byte)22, (byte)15, (byte)0, byte.MaxValue),
			new Color32((byte)22, (byte)18, (byte)0, byte.MaxValue),
			new Color32((byte)23, (byte)20, (byte)0, byte.MaxValue),
			new Color32((byte)21, (byte)22, (byte)0, byte.MaxValue),
			new Color32((byte)15, (byte)22, (byte)0, byte.MaxValue),
			new Color32((byte)8, (byte)22, (byte)1, byte.MaxValue),
			new Color32((byte)3, (byte)22, (byte)7, byte.MaxValue),
			new Color32((byte)0, (byte)22, (byte)13, byte.MaxValue),
			new Color32((byte)0, (byte)22, (byte)19, byte.MaxValue),
			new Color32((byte)0, (byte)22, (byte)22, byte.MaxValue),
			new Color32((byte)0, (byte)20, (byte)23, byte.MaxValue),
			new Color32((byte)0, (byte)18, (byte)22, byte.MaxValue),
			new Color32((byte)0, (byte)14, (byte)22, byte.MaxValue),
			new Color32((byte)0, (byte)9, (byte)22, byte.MaxValue),
			new Color32((byte)0, (byte)5, (byte)22, byte.MaxValue),
			new Color32((byte)0, (byte)1, (byte)22, byte.MaxValue),
			new Color32((byte)3, (byte)0, (byte)22, byte.MaxValue),
			new Color32((byte)8, (byte)0, (byte)22, byte.MaxValue),
			new Color32((byte)12, (byte)0, (byte)22, byte.MaxValue),
			new Color32((byte)16, (byte)0, (byte)22, byte.MaxValue),
			new Color32((byte)20, (byte)0, (byte)21, byte.MaxValue),
			new Color32((byte)22, (byte)0, (byte)19, byte.MaxValue),
			new Color32((byte)22, (byte)0, (byte)15, byte.MaxValue),
			new Color32((byte)22, (byte)0, (byte)10, byte.MaxValue),
			new Color32((byte)22, (byte)0, (byte)8, byte.MaxValue),
			new Color32((byte)136, (byte)136, (byte)136, byte.MaxValue),
			new Color32((byte)240, (byte)80, (byte)80, byte.MaxValue),
			new Color32((byte)240, (byte)90, (byte)80, byte.MaxValue),
			new Color32((byte)240, (byte)123, (byte)80, byte.MaxValue),
			new Color32((byte)240, (byte)144, (byte)80, byte.MaxValue),
			new Color32((byte)240, (byte)153, (byte)80, byte.MaxValue),
			new Color32((byte)240, (byte)167, (byte)80, byte.MaxValue),
			new Color32((byte)240, (byte)187, (byte)80, byte.MaxValue),
			new Color32((byte)240, (byte)209, (byte)80, byte.MaxValue),
			new Color32((byte)240, (byte)230, (byte)80, byte.MaxValue),
			new Color32((byte)229, (byte)239, (byte)79, byte.MaxValue),
			new Color32((byte)187, (byte)240, (byte)80, byte.MaxValue),
			new Color32((byte)146, (byte)244, (byte)92, byte.MaxValue),
			new Color32((byte)114, (byte)251, (byte)141, byte.MaxValue),
			new Color32((byte)84, (byte)241, (byte)180, byte.MaxValue),
			new Color32((byte)80, (byte)240, (byte)216, byte.MaxValue),
			new Color32((byte)79, (byte)239, (byte)236, byte.MaxValue),
			new Color32((byte)80, (byte)229, (byte)240, byte.MaxValue),
			new Color32((byte)80, (byte)210, (byte)240, byte.MaxValue),
			new Color32((byte)80, (byte)182, (byte)240, byte.MaxValue),
			new Color32((byte)80, (byte)148, (byte)240, byte.MaxValue),
			new Color32((byte)80, (byte)114, (byte)240, byte.MaxValue),
			new Color32((byte)83, (byte)87, (byte)241, byte.MaxValue),
			new Color32((byte)99, (byte)80, (byte)240, byte.MaxValue),
			new Color32((byte)134, (byte)80, (byte)240, byte.MaxValue),
			new Color32((byte)168, (byte)80, (byte)240, byte.MaxValue),
			new Color32((byte)199, (byte)79, (byte)239, byte.MaxValue),
			new Color32((byte)219, (byte)77, (byte)230, byte.MaxValue),
			new Color32((byte)235, (byte)78, (byte)215, byte.MaxValue),
			new Color32((byte)240, (byte)80, (byte)191, byte.MaxValue),
			new Color32((byte)240, (byte)80, (byte)155, byte.MaxValue),
			new Color32((byte)240, (byte)80, (byte)140, byte.MaxValue),
			new Color32((byte)120, (byte)120, (byte)120, byte.MaxValue),
			new Color32((byte)168, (byte)57, (byte)57, byte.MaxValue),
			new Color32((byte)168, (byte)64, (byte)57, byte.MaxValue),
			new Color32((byte)168, (byte)87, (byte)57, byte.MaxValue),
			new Color32((byte)168, (byte)102, (byte)57, byte.MaxValue),
			new Color32((byte)168, (byte)107, (byte)57, byte.MaxValue),
			new Color32((byte)168, (byte)117, (byte)57, byte.MaxValue),
			new Color32((byte)168, (byte)132, (byte)57, byte.MaxValue),
			new Color32((byte)170, (byte)147, (byte)57, byte.MaxValue),
			new Color32((byte)175, (byte)163, (byte)58, byte.MaxValue),
			new Color32((byte)162, (byte)170, (byte)57, byte.MaxValue),
			new Color32((byte)132, (byte)171, (byte)57, byte.MaxValue),
			new Color32((byte)102, (byte)171, (byte)64, byte.MaxValue),
			new Color32((byte)80, (byte)177, (byte)99, byte.MaxValue),
			new Color32((byte)59, (byte)170, (byte)126, byte.MaxValue),
			new Color32((byte)57, (byte)171, (byte)152, byte.MaxValue),
			new Color32((byte)55, (byte)167, (byte)167, byte.MaxValue),
			new Color32((byte)58, (byte)162, (byte)173, byte.MaxValue),
			new Color32((byte)57, (byte)147, (byte)170, byte.MaxValue),
			new Color32((byte)57, (byte)128, (byte)168, byte.MaxValue),
			new Color32((byte)57, (byte)104, (byte)168, byte.MaxValue),
			new Color32((byte)57, (byte)80, (byte)168, byte.MaxValue),
			new Color32((byte)58, (byte)62, (byte)170, byte.MaxValue),
			new Color32((byte)70, (byte)57, (byte)168, byte.MaxValue),
			new Color32((byte)96, (byte)57, (byte)168, byte.MaxValue),
			new Color32((byte)118, (byte)57, (byte)170, byte.MaxValue),
			new Color32((byte)140, (byte)57, (byte)170, byte.MaxValue),
			new Color32((byte)153, (byte)54, (byte)161, byte.MaxValue),
			new Color32((byte)163, (byte)54, (byte)150, byte.MaxValue),
			new Color32((byte)171, (byte)57, (byte)134, byte.MaxValue),
			new Color32((byte)170, (byte)57, (byte)109, byte.MaxValue),
			new Color32((byte)168, (byte)57, (byte)98, byte.MaxValue),
			new Color32((byte)102, (byte)102, (byte)102, byte.MaxValue),
			new Color32((byte)121, (byte)40, (byte)40, byte.MaxValue),
			new Color32((byte)121, (byte)45, (byte)40, byte.MaxValue),
			new Color32((byte)121, (byte)62, (byte)40, byte.MaxValue),
			new Color32((byte)121, (byte)73, (byte)40, byte.MaxValue),
			new Color32((byte)121, (byte)77, (byte)40, byte.MaxValue),
			new Color32((byte)121, (byte)83, (byte)40, byte.MaxValue),
			new Color32((byte)121, (byte)93, (byte)40, byte.MaxValue),
			new Color32((byte)122, (byte)104, (byte)40, byte.MaxValue),
			new Color32((byte)124, (byte)116, (byte)41, byte.MaxValue),
			new Color32((byte)116, (byte)122, (byte)40, byte.MaxValue),
			new Color32((byte)94, (byte)122, (byte)40, byte.MaxValue),
			new Color32((byte)73, (byte)122, (byte)45, byte.MaxValue),
			new Color32((byte)58, (byte)127, (byte)70, byte.MaxValue),
			new Color32((byte)41, (byte)121, (byte)90, byte.MaxValue),
			new Color32((byte)40, (byte)122, (byte)108, byte.MaxValue),
			new Color32((byte)40, (byte)121, (byte)119, byte.MaxValue),
			new Color32((byte)41, (byte)116, (byte)123, byte.MaxValue),
			new Color32((byte)40, (byte)104, (byte)121, byte.MaxValue),
			new Color32((byte)40, (byte)90, (byte)121, byte.MaxValue),
			new Color32((byte)40, (byte)74, (byte)121, byte.MaxValue),
			new Color32((byte)40, (byte)57, (byte)121, byte.MaxValue),
			new Color32((byte)41, (byte)44, (byte)121, byte.MaxValue),
			new Color32((byte)49, (byte)40, (byte)121, byte.MaxValue),
			new Color32((byte)68, (byte)40, (byte)121, byte.MaxValue),
			new Color32((byte)84, (byte)40, (byte)122, byte.MaxValue),
			new Color32((byte)101, (byte)40, (byte)122, byte.MaxValue),
			new Color32((byte)109, (byte)39, (byte)116, byte.MaxValue),
			new Color32((byte)118, (byte)39, (byte)108, byte.MaxValue),
			new Color32((byte)122, (byte)40, (byte)96, byte.MaxValue),
			new Color32((byte)122, (byte)40, (byte)78, byte.MaxValue),
			new Color32((byte)121, (byte)40, (byte)69, byte.MaxValue),
			new Color32((byte)86, (byte)86, (byte)86, byte.MaxValue),
			new Color32((byte)84, (byte)28, (byte)28, byte.MaxValue),
			new Color32((byte)84, (byte)31, (byte)28, byte.MaxValue),
			new Color32((byte)84, (byte)43, (byte)28, byte.MaxValue),
			new Color32((byte)84, (byte)50, (byte)28, byte.MaxValue),
			new Color32((byte)84, (byte)54, (byte)28, byte.MaxValue),
			new Color32((byte)84, (byte)58, (byte)28, byte.MaxValue),
			new Color32((byte)84, (byte)65, (byte)28, byte.MaxValue),
			new Color32((byte)84, (byte)73, (byte)28, byte.MaxValue),
			new Color32((byte)88, (byte)80, (byte)29, byte.MaxValue),
			new Color32((byte)80, (byte)84, (byte)28, byte.MaxValue),
			new Color32((byte)65, (byte)84, (byte)28, byte.MaxValue),
			new Color32((byte)50, (byte)85, (byte)31, byte.MaxValue),
			new Color32((byte)40, (byte)88, (byte)49, byte.MaxValue),
			new Color32((byte)29, (byte)84, (byte)62, byte.MaxValue),
			new Color32((byte)28, (byte)84, (byte)75, byte.MaxValue),
			new Color32((byte)28, (byte)84, (byte)84, byte.MaxValue),
			new Color32((byte)29, (byte)80, (byte)87, byte.MaxValue),
			new Color32((byte)28, (byte)73, (byte)84, byte.MaxValue),
			new Color32((byte)28, (byte)63, (byte)84, byte.MaxValue),
			new Color32((byte)28, (byte)51, (byte)84, byte.MaxValue),
			new Color32((byte)28, (byte)40, (byte)84, byte.MaxValue),
			new Color32((byte)29, (byte)30, (byte)84, byte.MaxValue),
			new Color32((byte)35, (byte)28, (byte)84, byte.MaxValue),
			new Color32((byte)48, (byte)28, (byte)84, byte.MaxValue),
			new Color32((byte)59, (byte)28, (byte)84, byte.MaxValue),
			new Color32((byte)69, (byte)28, (byte)84, byte.MaxValue),
			new Color32((byte)77, (byte)26, (byte)80, byte.MaxValue),
			new Color32((byte)82, (byte)28, (byte)75, byte.MaxValue),
			new Color32((byte)84, (byte)28, (byte)67, byte.MaxValue),
			new Color32((byte)84, (byte)28, (byte)54, byte.MaxValue),
			new Color32((byte)84, (byte)28, (byte)49, byte.MaxValue),
			new Color32((byte)68, (byte)68, (byte)68, byte.MaxValue),
			new Color32((byte)60, (byte)20, (byte)20, byte.MaxValue),
			new Color32((byte)60, (byte)23, (byte)20, byte.MaxValue),
			new Color32((byte)60, (byte)30, (byte)20, byte.MaxValue),
			new Color32((byte)60, (byte)36, (byte)20, byte.MaxValue),
			new Color32((byte)60, (byte)38, (byte)20, byte.MaxValue),
			new Color32((byte)60, (byte)41, (byte)20, byte.MaxValue),
			new Color32((byte)60, (byte)47, (byte)20, byte.MaxValue),
			new Color32((byte)60, (byte)51, (byte)20, byte.MaxValue),
			new Color32((byte)60, (byte)57, (byte)20, byte.MaxValue),
			new Color32((byte)57, (byte)59, (byte)20, byte.MaxValue),
			new Color32((byte)47, (byte)60, (byte)20, byte.MaxValue),
			new Color32((byte)36, (byte)62, (byte)23, byte.MaxValue),
			new Color32((byte)29, (byte)63, (byte)35, byte.MaxValue),
			new Color32((byte)21, (byte)60, (byte)45, byte.MaxValue),
			new Color32((byte)20, (byte)60, (byte)54, byte.MaxValue),
			new Color32((byte)20, (byte)59, (byte)59, byte.MaxValue),
			new Color32((byte)20, (byte)57, (byte)60, byte.MaxValue),
			new Color32((byte)20, (byte)51, (byte)60, byte.MaxValue),
			new Color32((byte)20, (byte)45, (byte)60, byte.MaxValue),
			new Color32((byte)20, (byte)36, (byte)60, byte.MaxValue),
			new Color32((byte)20, (byte)28, (byte)60, byte.MaxValue),
			new Color32((byte)21, (byte)21, (byte)60, byte.MaxValue),
			new Color32((byte)25, (byte)20, (byte)60, byte.MaxValue),
			new Color32((byte)34, (byte)20, (byte)60, byte.MaxValue),
			new Color32((byte)41, (byte)20, (byte)60, byte.MaxValue),
			new Color32((byte)49, (byte)20, (byte)59, byte.MaxValue),
			new Color32((byte)55, (byte)19, (byte)58, byte.MaxValue),
			new Color32((byte)58, (byte)19, (byte)53, byte.MaxValue),
			new Color32((byte)60, (byte)20, (byte)48, byte.MaxValue),
			new Color32((byte)60, (byte)20, (byte)39, byte.MaxValue),
			new Color32((byte)60, (byte)20, (byte)35, byte.MaxValue),
			new Color32((byte)50, (byte)50, (byte)50, byte.MaxValue),
			new Color32((byte)43, (byte)14, (byte)14, byte.MaxValue),
			new Color32((byte)43, (byte)16, (byte)14, byte.MaxValue),
			new Color32((byte)43, (byte)21, (byte)14, byte.MaxValue),
			new Color32((byte)43, (byte)25, (byte)14, byte.MaxValue),
			new Color32((byte)43, (byte)26, (byte)14, byte.MaxValue),
			new Color32((byte)43, (byte)29, (byte)14, byte.MaxValue),
			new Color32((byte)43, (byte)33, (byte)14, byte.MaxValue),
			new Color32((byte)43, (byte)36, (byte)14, byte.MaxValue),
			new Color32((byte)43, (byte)40, (byte)14, byte.MaxValue),
			new Color32((byte)40, (byte)43, (byte)14, byte.MaxValue),
			new Color32((byte)33, (byte)43, (byte)14, byte.MaxValue),
			new Color32((byte)25, (byte)43, (byte)16, byte.MaxValue),
			new Color32((byte)20, (byte)44, (byte)25, byte.MaxValue),
			new Color32((byte)15, (byte)43, (byte)31, byte.MaxValue),
			new Color32((byte)14, (byte)43, (byte)38, byte.MaxValue),
			new Color32((byte)14, (byte)41, (byte)41, byte.MaxValue),
			new Color32((byte)14, (byte)40, (byte)43, byte.MaxValue),
			new Color32((byte)14, (byte)36, (byte)43, byte.MaxValue),
			new Color32((byte)14, (byte)31, (byte)43, byte.MaxValue),
			new Color32((byte)14, (byte)26, (byte)43, byte.MaxValue),
			new Color32((byte)14, (byte)20, (byte)43, byte.MaxValue),
			new Color32((byte)14, (byte)15, (byte)43, byte.MaxValue),
			new Color32((byte)18, (byte)14, (byte)43, byte.MaxValue),
			new Color32((byte)24, (byte)14, (byte)43, byte.MaxValue),
			new Color32((byte)30, (byte)14, (byte)43, byte.MaxValue),
			new Color32((byte)35, (byte)14, (byte)43, byte.MaxValue),
			new Color32((byte)38, (byte)14, (byte)40, byte.MaxValue),
			new Color32((byte)40, (byte)14, (byte)38, byte.MaxValue),
			new Color32((byte)43, (byte)14, (byte)34, byte.MaxValue),
			new Color32((byte)43, (byte)14, (byte)28, byte.MaxValue),
			new Color32((byte)43, (byte)14, (byte)25, byte.MaxValue),
			new Color32((byte)34, (byte)34, (byte)34, byte.MaxValue),
			new Color32((byte)30, (byte)10, (byte)10, byte.MaxValue),
			new Color32((byte)30, (byte)11, (byte)10, byte.MaxValue),
			new Color32((byte)30, (byte)15, (byte)10, byte.MaxValue),
			new Color32((byte)30, (byte)18, (byte)10, byte.MaxValue),
			new Color32((byte)30, (byte)19, (byte)10, byte.MaxValue),
			new Color32((byte)30, (byte)20, (byte)10, byte.MaxValue),
			new Color32((byte)30, (byte)23, (byte)10, byte.MaxValue),
			new Color32((byte)30, (byte)25, (byte)10, byte.MaxValue),
			new Color32((byte)31, (byte)29, (byte)10, byte.MaxValue),
			new Color32((byte)29, (byte)30, (byte)10, byte.MaxValue),
			new Color32((byte)23, (byte)30, (byte)10, byte.MaxValue),
			new Color32((byte)18, (byte)30, (byte)11, byte.MaxValue),
			new Color32((byte)15, (byte)31, (byte)18, byte.MaxValue),
			new Color32((byte)10, (byte)30, (byte)23, byte.MaxValue),
			new Color32((byte)10, (byte)30, (byte)26, byte.MaxValue),
			new Color32((byte)10, (byte)30, (byte)30, byte.MaxValue),
			new Color32((byte)10, (byte)29, (byte)31, byte.MaxValue),
			new Color32((byte)10, (byte)26, (byte)30, byte.MaxValue),
			new Color32((byte)10, (byte)23, (byte)30, byte.MaxValue),
			new Color32((byte)10, (byte)18, (byte)30, byte.MaxValue),
			new Color32((byte)10, (byte)14, (byte)30, byte.MaxValue),
			new Color32((byte)10, (byte)10, (byte)30, byte.MaxValue),
			new Color32((byte)13, (byte)10, (byte)30, byte.MaxValue),
			new Color32((byte)16, (byte)10, (byte)30, byte.MaxValue),
			new Color32((byte)20, (byte)10, (byte)30, byte.MaxValue),
			new Color32((byte)25, (byte)10, (byte)30, byte.MaxValue),
			new Color32((byte)28, (byte)10, (byte)29, byte.MaxValue),
			new Color32((byte)29, (byte)10, (byte)26, byte.MaxValue),
			new Color32((byte)30, (byte)10, (byte)24, byte.MaxValue),
			new Color32((byte)30, (byte)10, (byte)19, byte.MaxValue),
			new Color32((byte)30, (byte)10, (byte)18, byte.MaxValue),
			new Color32((byte)18, (byte)18, (byte)18, byte.MaxValue),
			new Color32((byte)20, (byte)6, (byte)6, byte.MaxValue),
			new Color32((byte)20, (byte)8, (byte)6, byte.MaxValue),
			new Color32((byte)20, (byte)10, (byte)6, byte.MaxValue),
			new Color32((byte)20, (byte)13, (byte)6, byte.MaxValue),
			new Color32((byte)20, (byte)13, (byte)6, byte.MaxValue),
			new Color32((byte)20, (byte)14, (byte)6, byte.MaxValue),
			new Color32((byte)20, (byte)16, (byte)6, byte.MaxValue),
			new Color32((byte)20, (byte)18, (byte)6, byte.MaxValue),
			new Color32((byte)21, (byte)20, (byte)8, byte.MaxValue),
			new Color32((byte)20, (byte)20, (byte)6, byte.MaxValue),
			new Color32((byte)16, (byte)20, (byte)6, byte.MaxValue),
			new Color32((byte)13, (byte)21, (byte)8, byte.MaxValue),
			new Color32((byte)10, (byte)21, (byte)13, byte.MaxValue),
			new Color32((byte)6, (byte)20, (byte)15, byte.MaxValue),
			new Color32((byte)6, (byte)20, (byte)19, byte.MaxValue),
			new Color32((byte)6, (byte)20, (byte)20, byte.MaxValue),
			new Color32((byte)8, (byte)20, (byte)21, byte.MaxValue),
			new Color32((byte)6, (byte)18, (byte)20, byte.MaxValue),
			new Color32((byte)6, (byte)15, (byte)20, byte.MaxValue),
			new Color32((byte)6, (byte)13, (byte)20, byte.MaxValue),
			new Color32((byte)6, (byte)10, (byte)20, byte.MaxValue),
			new Color32((byte)6, (byte)8, (byte)20, byte.MaxValue),
			new Color32((byte)9, (byte)6, (byte)20, byte.MaxValue),
			new Color32((byte)11, (byte)6, (byte)20, byte.MaxValue),
			new Color32((byte)14, (byte)6, (byte)20, byte.MaxValue),
			new Color32((byte)16, (byte)6, (byte)20, byte.MaxValue),
			new Color32((byte)19, (byte)6, (byte)20, byte.MaxValue),
			new Color32((byte)20, (byte)6, (byte)19, byte.MaxValue),
			new Color32((byte)20, (byte)6, (byte)16, byte.MaxValue),
			new Color32((byte)20, (byte)6, (byte)13, byte.MaxValue),
			new Color32((byte)20, (byte)6, (byte)11, byte.MaxValue),
			new Color32((byte)0, (byte)0, (byte)0, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)161, (byte)161, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)168, (byte)161, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)190, (byte)161, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)203, (byte)161, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)210, (byte)161, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)219, (byte)161, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)232, (byte)161, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)247, (byte)161, byte.MaxValue),
			new Color32(byte.MaxValue, byte.MaxValue, (byte)161, byte.MaxValue),
			new Color32(byte.MaxValue, byte.MaxValue, (byte)160, byte.MaxValue),
			new Color32((byte)232, byte.MaxValue, (byte)161, byte.MaxValue),
			new Color32((byte)210, byte.MaxValue, (byte)175, byte.MaxValue),
			new Color32((byte)200, byte.MaxValue, (byte)217, byte.MaxValue),
			new Color32((byte)166, byte.MaxValue, (byte)229, byte.MaxValue),
			new Color32((byte)161, byte.MaxValue, (byte)252, byte.MaxValue),
			new Color32((byte)160, byte.MaxValue, byte.MaxValue, byte.MaxValue),
			new Color32((byte)161, byte.MaxValue, byte.MaxValue, byte.MaxValue),
			new Color32((byte)161, (byte)247, byte.MaxValue, byte.MaxValue),
			new Color32((byte)161, (byte)229, byte.MaxValue, byte.MaxValue),
			new Color32((byte)161, (byte)207, byte.MaxValue, byte.MaxValue),
			new Color32((byte)161, (byte)183, byte.MaxValue, byte.MaxValue),
			new Color32((byte)163, (byte)166, byte.MaxValue, byte.MaxValue),
			new Color32((byte)173, (byte)161, byte.MaxValue, byte.MaxValue),
			new Color32((byte)197, (byte)161, byte.MaxValue, byte.MaxValue),
			new Color32((byte)220, (byte)161, byte.MaxValue, byte.MaxValue),
			new Color32((byte)240, (byte)160, byte.MaxValue, byte.MaxValue),
			new Color32((byte)249, (byte)153, byte.MaxValue, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)156, (byte)249, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)161, (byte)235, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)161, (byte)210, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)161, (byte)200, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)239, (byte)202, byte.MaxValue),
			new Color32((byte)188, (byte)113, (byte)113, byte.MaxValue),
			new Color32((byte)188, (byte)118, (byte)113, byte.MaxValue),
			new Color32((byte)188, (byte)133, (byte)113, byte.MaxValue),
			new Color32((byte)188, (byte)143, (byte)113, byte.MaxValue),
			new Color32((byte)188, (byte)146, (byte)113, byte.MaxValue),
			new Color32((byte)188, (byte)153, (byte)113, byte.MaxValue),
			new Color32((byte)188, (byte)163, (byte)113, byte.MaxValue),
			new Color32((byte)188, (byte)173, (byte)113, byte.MaxValue),
			new Color32((byte)195, (byte)187, (byte)116, byte.MaxValue),
			new Color32((byte)183, (byte)188, (byte)113, byte.MaxValue),
			new Color32((byte)165, (byte)190, (byte)114, byte.MaxValue),
			new Color32((byte)148, (byte)193, (byte)123, byte.MaxValue),
			new Color32((byte)140, (byte)205, (byte)153, byte.MaxValue),
			new Color32((byte)116, (byte)190, (byte)160, byte.MaxValue),
			new Color32((byte)114, (byte)190, (byte)178, byte.MaxValue),
			new Color32((byte)113, (byte)187, (byte)187, byte.MaxValue),
			new Color32((byte)116, (byte)185, (byte)193, byte.MaxValue),
			new Color32((byte)113, (byte)173, (byte)188, byte.MaxValue),
			new Color32((byte)113, (byte)161, (byte)188, byte.MaxValue),
			new Color32((byte)113, (byte)145, (byte)188, byte.MaxValue),
			new Color32((byte)113, (byte)129, (byte)188, byte.MaxValue),
			new Color32((byte)114, (byte)118, (byte)190, byte.MaxValue),
			new Color32((byte)123, (byte)113, (byte)188, byte.MaxValue),
			new Color32((byte)140, (byte)113, (byte)188, byte.MaxValue),
			new Color32((byte)155, (byte)113, (byte)188, byte.MaxValue),
			new Color32((byte)170, (byte)113, (byte)188, byte.MaxValue),
			new Color32((byte)175, (byte)108, (byte)180, byte.MaxValue),
			new Color32((byte)183, (byte)109, (byte)173, byte.MaxValue),
			new Color32((byte)190, (byte)114, (byte)166, byte.MaxValue),
			new Color32((byte)188, (byte)113, (byte)150, byte.MaxValue),
			new Color32((byte)188, (byte)113, (byte)141, byte.MaxValue),
			new Color32(byte.MaxValue, (byte)218, (byte)168, byte.MaxValue),
			new Color32((byte)135, (byte)81, (byte)81, byte.MaxValue),
			new Color32((byte)135, (byte)84, (byte)81, byte.MaxValue),
			new Color32((byte)135, (byte)94, (byte)81, byte.MaxValue),
			new Color32((byte)135, (byte)103, (byte)81, byte.MaxValue),
			new Color32((byte)135, (byte)104, (byte)81, byte.MaxValue),
			new Color32((byte)135, (byte)109, (byte)81, byte.MaxValue),
			new Color32((byte)135, (byte)116, (byte)81, byte.MaxValue),
			new Color32((byte)136, (byte)124, (byte)81, byte.MaxValue),
			new Color32((byte)138, (byte)133, (byte)82, byte.MaxValue),
			new Color32((byte)131, (byte)136, (byte)81, byte.MaxValue),
			new Color32((byte)118, (byte)136, (byte)82, byte.MaxValue),
			new Color32((byte)104, (byte)138, (byte)87, byte.MaxValue),
			new Color32((byte)101, (byte)146, (byte)109, byte.MaxValue),
			new Color32((byte)82, (byte)136, (byte)114, byte.MaxValue),
			new Color32((byte)82, (byte)136, (byte)128, byte.MaxValue),
			new Color32((byte)81, (byte)135, (byte)135, byte.MaxValue),
			new Color32((byte)82, (byte)133, (byte)138, byte.MaxValue),
			new Color32((byte)81, (byte)124, (byte)135, byte.MaxValue),
			new Color32((byte)81, (byte)114, (byte)135, byte.MaxValue),
			new Color32((byte)81, (byte)103, (byte)135, byte.MaxValue),
			new Color32((byte)81, (byte)92, (byte)135, byte.MaxValue),
			new Color32((byte)82, (byte)84, (byte)135, byte.MaxValue),
			new Color32((byte)87, (byte)81, (byte)135, byte.MaxValue),
			new Color32((byte)99, (byte)81, (byte)135, byte.MaxValue),
			new Color32((byte)111, (byte)81, (byte)136, byte.MaxValue),
			new Color32((byte)121, (byte)81, (byte)136, byte.MaxValue),
			new Color32((byte)124, (byte)77, (byte)129, byte.MaxValue),
			new Color32((byte)131, (byte)79, (byte)124, byte.MaxValue),
			new Color32((byte)136, (byte)82, (byte)119, byte.MaxValue),
			new Color32((byte)136, (byte)81, (byte)106, byte.MaxValue),
			new Color32((byte)135, (byte)81, (byte)101, byte.MaxValue),
			new Color32((byte)253, (byte)197, (byte)135, byte.MaxValue),
			new Color32((byte)94, (byte)55, (byte)55, byte.MaxValue),
			new Color32((byte)94, (byte)59, (byte)55, byte.MaxValue),
			new Color32((byte)94, (byte)66, (byte)55, byte.MaxValue),
			new Color32((byte)94, (byte)71, (byte)55, byte.MaxValue),
			new Color32((byte)94, (byte)74, (byte)55, byte.MaxValue),
			new Color32((byte)94, (byte)76, (byte)55, byte.MaxValue),
			new Color32((byte)94, (byte)81, (byte)55, byte.MaxValue),
			new Color32((byte)94, (byte)86, (byte)57, byte.MaxValue),
			new Color32((byte)97, (byte)92, (byte)59, byte.MaxValue),
			new Color32((byte)91, (byte)94, (byte)55, byte.MaxValue),
			new Color32((byte)81, (byte)94, (byte)55, byte.MaxValue),
			new Color32((byte)72, (byte)96, (byte)61, byte.MaxValue),
			new Color32((byte)69, (byte)101, (byte)76, byte.MaxValue),
			new Color32((byte)57, (byte)94, (byte)79, byte.MaxValue),
			new Color32((byte)57, (byte)94, (byte)87, byte.MaxValue),
			new Color32((byte)55, (byte)94, (byte)94, byte.MaxValue),
			new Color32((byte)57, (byte)92, (byte)96, byte.MaxValue),
			new Color32((byte)55, (byte)86, (byte)94, byte.MaxValue),
			new Color32((byte)55, (byte)79, (byte)94, byte.MaxValue),
			new Color32((byte)55, (byte)72, (byte)94, byte.MaxValue),
			new Color32((byte)55, (byte)64, (byte)94, byte.MaxValue),
			new Color32((byte)57, (byte)57, (byte)94, byte.MaxValue),
			new Color32((byte)61, (byte)55, (byte)94, byte.MaxValue),
			new Color32((byte)69, (byte)55, (byte)94, byte.MaxValue),
			new Color32((byte)77, (byte)55, (byte)94, byte.MaxValue),
			new Color32((byte)84, (byte)57, (byte)94, byte.MaxValue),
			new Color32((byte)87, (byte)54, (byte)89, byte.MaxValue),
			new Color32((byte)91, (byte)55, (byte)87, byte.MaxValue),
			new Color32((byte)94, (byte)57, (byte)82, byte.MaxValue),
			new Color32((byte)94, (byte)55, (byte)74, byte.MaxValue),
			new Color32((byte)94, (byte)55, (byte)71, byte.MaxValue),
			new Color32((byte)240, (byte)171, (byte)101, byte.MaxValue),
			new Color32((byte)67, (byte)40, (byte)40, byte.MaxValue),
			new Color32((byte)67, (byte)42, (byte)40, byte.MaxValue),
			new Color32((byte)67, (byte)47, (byte)40, byte.MaxValue),
			new Color32((byte)67, (byte)50, (byte)40, byte.MaxValue),
			new Color32((byte)67, (byte)52, (byte)40, byte.MaxValue),
			new Color32((byte)67, (byte)54, (byte)40, byte.MaxValue),
			new Color32((byte)67, (byte)59, (byte)40, byte.MaxValue),
			new Color32((byte)67, (byte)62, (byte)40, byte.MaxValue),
			new Color32((byte)67, (byte)66, (byte)40, byte.MaxValue),
			new Color32((byte)64, (byte)66, (byte)40, byte.MaxValue),
			new Color32((byte)59, (byte)67, (byte)40, byte.MaxValue),
			new Color32((byte)52, (byte)69, (byte)44, byte.MaxValue),
			new Color32((byte)50, (byte)72, (byte)54, byte.MaxValue),
			new Color32((byte)42, (byte)67, (byte)57, byte.MaxValue),
			new Color32((byte)40, (byte)67, (byte)62, byte.MaxValue),
			new Color32((byte)40, (byte)66, (byte)66, byte.MaxValue),
			new Color32((byte)40, (byte)66, (byte)67, byte.MaxValue),
			new Color32((byte)40, (byte)62, (byte)67, byte.MaxValue),
			new Color32((byte)40, (byte)57, (byte)67, byte.MaxValue),
			new Color32((byte)40, (byte)52, (byte)67, byte.MaxValue),
			new Color32((byte)40, (byte)45, (byte)67, byte.MaxValue),
			new Color32((byte)42, (byte)42, (byte)67, byte.MaxValue),
			new Color32((byte)44, (byte)40, (byte)67, byte.MaxValue),
			new Color32((byte)49, (byte)40, (byte)67, byte.MaxValue),
			new Color32((byte)55, (byte)40, (byte)67, byte.MaxValue),
			new Color32((byte)59, (byte)40, (byte)66, byte.MaxValue),
			new Color32((byte)62, (byte)39, (byte)64, byte.MaxValue),
			new Color32((byte)66, (byte)39, (byte)62, byte.MaxValue),
			new Color32((byte)67, (byte)40, (byte)59, byte.MaxValue),
			new Color32((byte)67, (byte)40, (byte)52, byte.MaxValue),
			new Color32((byte)67, (byte)40, (byte)50, byte.MaxValue),
			new Color32((byte)205, (byte)135, (byte)72, byte.MaxValue),
			new Color32((byte)47, (byte)29, (byte)29, byte.MaxValue),
			new Color32((byte)47, (byte)30, (byte)29, byte.MaxValue),
			new Color32((byte)47, (byte)34, (byte)29, byte.MaxValue),
			new Color32((byte)47, (byte)35, (byte)29, byte.MaxValue),
			new Color32((byte)47, (byte)37, (byte)29, byte.MaxValue),
			new Color32((byte)47, (byte)39, (byte)29, byte.MaxValue),
			new Color32((byte)47, (byte)40, (byte)29, byte.MaxValue),
			new Color32((byte)47, (byte)44, (byte)29, byte.MaxValue),
			new Color32((byte)49, (byte)47, (byte)29, byte.MaxValue),
			new Color32((byte)45, (byte)47, (byte)29, byte.MaxValue),
			new Color32((byte)40, (byte)47, (byte)29, byte.MaxValue),
			new Color32((byte)37, (byte)49, (byte)30, byte.MaxValue),
			new Color32((byte)35, (byte)50, (byte)39, byte.MaxValue),
			new Color32((byte)29, (byte)47, (byte)40, byte.MaxValue),
			new Color32((byte)29, (byte)47, (byte)44, byte.MaxValue),
			new Color32((byte)27, (byte)45, (byte)45, byte.MaxValue),
			new Color32((byte)29, (byte)45, (byte)49, byte.MaxValue),
			new Color32((byte)29, (byte)44, (byte)47, byte.MaxValue),
			new Color32((byte)29, (byte)40, (byte)47, byte.MaxValue),
			new Color32((byte)29, (byte)37, (byte)47, byte.MaxValue),
			new Color32((byte)29, (byte)32, (byte)47, byte.MaxValue),
			new Color32((byte)29, (byte)29, (byte)47, byte.MaxValue),
			new Color32((byte)30, (byte)29, (byte)47, byte.MaxValue),
			new Color32((byte)35, (byte)29, (byte)47, byte.MaxValue),
			new Color32((byte)39, (byte)29, (byte)47, byte.MaxValue),
			new Color32((byte)42, (byte)29, (byte)47, byte.MaxValue),
			new Color32((byte)44, (byte)27, (byte)45, byte.MaxValue),
			new Color32((byte)45, (byte)27, (byte)44, byte.MaxValue),
			new Color32((byte)47, (byte)29, (byte)42, byte.MaxValue),
			new Color32((byte)47, (byte)29, (byte)37, byte.MaxValue),
			new Color32((byte)47, (byte)29, (byte)35, byte.MaxValue),
			new Color32((byte)160, (byte)96, (byte)46, byte.MaxValue),
			new Color32((byte)34, (byte)20, (byte)20, byte.MaxValue),
			new Color32((byte)34, (byte)20, (byte)20, byte.MaxValue),
			new Color32((byte)34, (byte)24, (byte)20, byte.MaxValue),
			new Color32((byte)34, (byte)25, (byte)20, byte.MaxValue),
			new Color32((byte)34, (byte)25, (byte)20, byte.MaxValue),
			new Color32((byte)34, (byte)27, (byte)20, byte.MaxValue),
			new Color32((byte)34, (byte)29, (byte)20, byte.MaxValue),
			new Color32((byte)34, (byte)30, (byte)20, byte.MaxValue),
			new Color32((byte)35, (byte)34, (byte)20, byte.MaxValue),
			new Color32((byte)32, (byte)34, (byte)20, byte.MaxValue),
			new Color32((byte)29, (byte)34, (byte)20, byte.MaxValue),
			new Color32((byte)25, (byte)34, (byte)22, byte.MaxValue),
			new Color32((byte)25, (byte)37, (byte)27, byte.MaxValue),
			new Color32((byte)20, (byte)34, (byte)29, byte.MaxValue),
			new Color32((byte)20, (byte)34, (byte)32, byte.MaxValue),
			new Color32((byte)20, (byte)34, (byte)34, byte.MaxValue),
			new Color32((byte)20, (byte)34, (byte)35, byte.MaxValue),
			new Color32((byte)20, (byte)30, (byte)34, byte.MaxValue),
			new Color32((byte)20, (byte)29, (byte)34, byte.MaxValue),
			new Color32((byte)20, (byte)25, (byte)34, byte.MaxValue),
			new Color32((byte)20, (byte)24, (byte)34, byte.MaxValue),
			new Color32((byte)20, (byte)20, (byte)34, byte.MaxValue),
			new Color32((byte)22, (byte)20, (byte)34, byte.MaxValue),
			new Color32((byte)25, (byte)20, (byte)34, byte.MaxValue),
			new Color32((byte)27, (byte)20, (byte)34, byte.MaxValue),
			new Color32((byte)30, (byte)20, (byte)34, byte.MaxValue),
			new Color32((byte)32, (byte)20, (byte)32, byte.MaxValue),
			new Color32((byte)32, (byte)20, (byte)30, byte.MaxValue),
			new Color32((byte)34, (byte)20, (byte)29, byte.MaxValue),
			new Color32((byte)34, (byte)20, (byte)27, byte.MaxValue),
			new Color32((byte)34, (byte)20, (byte)25, byte.MaxValue),
			new Color32((byte)110, (byte)55, (byte)18, byte.MaxValue),
			new Color32((byte)24, (byte)13, (byte)13, byte.MaxValue),
			new Color32((byte)24, (byte)13, (byte)13, byte.MaxValue),
			new Color32((byte)24, (byte)17, (byte)13, byte.MaxValue),
			new Color32((byte)24, (byte)17, (byte)13, byte.MaxValue),
			new Color32((byte)24, (byte)18, (byte)13, byte.MaxValue),
			new Color32((byte)24, (byte)18, (byte)13, byte.MaxValue),
			new Color32((byte)24, (byte)20, (byte)13, byte.MaxValue),
			new Color32((byte)24, (byte)22, (byte)13, byte.MaxValue),
			new Color32((byte)24, (byte)24, (byte)15, byte.MaxValue),
			new Color32((byte)22, (byte)24, (byte)13, byte.MaxValue),
			new Color32((byte)20, (byte)24, (byte)13, byte.MaxValue),
			new Color32((byte)18, (byte)24, (byte)15, byte.MaxValue),
			new Color32((byte)17, (byte)25, (byte)18, byte.MaxValue),
			new Color32((byte)13, (byte)24, (byte)18, byte.MaxValue),
			new Color32((byte)13, (byte)24, (byte)22, byte.MaxValue),
			new Color32((byte)13, (byte)24, (byte)24, byte.MaxValue),
			new Color32((byte)15, (byte)24, (byte)24, byte.MaxValue),
			new Color32((byte)13, (byte)22, (byte)24, byte.MaxValue),
			new Color32((byte)13, (byte)20, (byte)24, byte.MaxValue),
			new Color32((byte)13, (byte)17, (byte)24, byte.MaxValue),
			new Color32((byte)13, (byte)15, (byte)24, byte.MaxValue),
			new Color32((byte)13, (byte)13, (byte)24, byte.MaxValue),
			new Color32((byte)15, (byte)13, (byte)24, byte.MaxValue),
			new Color32((byte)17, (byte)13, (byte)24, byte.MaxValue),
			new Color32((byte)18, (byte)13, (byte)24, byte.MaxValue),
			new Color32((byte)20, (byte)13, (byte)24, byte.MaxValue),
			new Color32((byte)22, (byte)13, (byte)22, byte.MaxValue),
			new Color32((byte)24, (byte)13, (byte)22, byte.MaxValue),
			new Color32((byte)24, (byte)13, (byte)20, byte.MaxValue),
			new Color32((byte)24, (byte)13, (byte)18, byte.MaxValue),
			new Color32((byte)24, (byte)13, (byte)17, byte.MaxValue),
			new Color32((byte)88, (byte)42, (byte)16, byte.MaxValue),
			new Color32((byte)235, (byte)193, (byte)193, byte.MaxValue),
			new Color32((byte)235, (byte)195, (byte)193, byte.MaxValue),
			new Color32((byte)235, (byte)205, (byte)193, byte.MaxValue),
			new Color32((byte)235, (byte)210, (byte)193, byte.MaxValue),
			new Color32((byte)235, (byte)212, (byte)193, byte.MaxValue),
			new Color32((byte)235, (byte)215, (byte)193, byte.MaxValue),
			new Color32((byte)235, (byte)222, (byte)193, byte.MaxValue),
			new Color32((byte)235, (byte)227, (byte)193, byte.MaxValue),
			new Color32((byte)235, (byte)234, (byte)193, byte.MaxValue),
			new Color32((byte)232, (byte)234, (byte)192, byte.MaxValue),
			new Color32((byte)222, (byte)235, (byte)193, byte.MaxValue),
			new Color32((byte)219, (byte)246, (byte)205, byte.MaxValue),
			new Color32((byte)227, byte.MaxValue, (byte)234, byte.MaxValue),
			new Color32((byte)197, (byte)239, (byte)224, byte.MaxValue),
			new Color32((byte)193, (byte)235, (byte)229, byte.MaxValue),
			new Color32((byte)192, (byte)234, (byte)234, byte.MaxValue),
			new Color32((byte)193, (byte)232, (byte)235, byte.MaxValue),
			new Color32((byte)193, (byte)227, (byte)235, byte.MaxValue),
			new Color32((byte)193, (byte)220, (byte)235, byte.MaxValue),
			new Color32((byte)193, (byte)212, (byte)235, byte.MaxValue),
			new Color32((byte)193, (byte)202, (byte)235, byte.MaxValue),
			new Color32((byte)195, (byte)197, (byte)239, byte.MaxValue),
			new Color32((byte)198, (byte)193, (byte)235, byte.MaxValue),
			new Color32((byte)207, (byte)193, (byte)235, byte.MaxValue),
			new Color32((byte)217, (byte)193, (byte)235, byte.MaxValue),
			new Color32((byte)224, (byte)192, (byte)235, byte.MaxValue),
			new Color32((byte)222, (byte)185, (byte)225, byte.MaxValue),
			new Color32((byte)230, (byte)188, (byte)225, byte.MaxValue),
			new Color32((byte)235, (byte)193, (byte)222, byte.MaxValue),
			new Color32((byte)235, (byte)193, (byte)214, byte.MaxValue),
			new Color32((byte)235, (byte)193, (byte)208, byte.MaxValue),
			new Color32((byte)146, (byte)108, (byte)90, byte.MaxValue),
			new Color32((byte)165, (byte)135, (byte)135, byte.MaxValue),
			new Color32((byte)165, (byte)138, (byte)135, byte.MaxValue),
			new Color32((byte)165, (byte)143, (byte)135, byte.MaxValue),
			new Color32((byte)165, (byte)148, (byte)135, byte.MaxValue),
			new Color32((byte)165, (byte)150, (byte)135, byte.MaxValue),
			new Color32((byte)165, (byte)151, (byte)135, byte.MaxValue),
			new Color32((byte)165, (byte)156, (byte)135, byte.MaxValue),
			new Color32((byte)166, (byte)160, (byte)136, byte.MaxValue),
			new Color32((byte)172, (byte)168, (byte)140, byte.MaxValue),
			new Color32((byte)165, (byte)166, (byte)136, byte.MaxValue),
			new Color32((byte)156, (byte)168, (byte)136, byte.MaxValue),
			new Color32((byte)153, (byte)172, (byte)143, byte.MaxValue),
			new Color32((byte)160, (byte)185, (byte)165, byte.MaxValue),
			new Color32((byte)138, (byte)168, (byte)156, byte.MaxValue),
			new Color32((byte)136, (byte)168, (byte)161, byte.MaxValue),
			new Color32((byte)135, (byte)165, (byte)165, byte.MaxValue),
			new Color32((byte)140, (byte)166, (byte)170, byte.MaxValue),
			new Color32((byte)136, (byte)160, (byte)166, byte.MaxValue),
			new Color32((byte)135, (byte)155, (byte)165, byte.MaxValue),
			new Color32((byte)135, (byte)148, (byte)165, byte.MaxValue),
			new Color32((byte)135, (byte)141, (byte)165, byte.MaxValue),
			new Color32((byte)138, (byte)138, (byte)166, byte.MaxValue),
			new Color32((byte)140, (byte)135, (byte)165, byte.MaxValue),
			new Color32((byte)146, (byte)135, (byte)165, byte.MaxValue),
			new Color32((byte)153, (byte)136, (byte)166, byte.MaxValue),
			new Color32((byte)158, (byte)136, (byte)166, byte.MaxValue),
			new Color32((byte)156, (byte)129, (byte)158, byte.MaxValue),
			new Color32((byte)161, (byte)131, (byte)156, byte.MaxValue),
			new Color32((byte)168, (byte)136, (byte)158, byte.MaxValue),
			new Color32((byte)166, (byte)136, (byte)150, byte.MaxValue),
			new Color32((byte)165, (byte)135, (byte)146, byte.MaxValue),
			new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
			new Color32((byte)118, (byte)97, (byte)97, byte.MaxValue),
			new Color32((byte)118, (byte)97, (byte)97, byte.MaxValue),
			new Color32((byte)118, (byte)103, (byte)97, byte.MaxValue),
			new Color32((byte)118, (byte)106, (byte)97, byte.MaxValue),
			new Color32((byte)118, (byte)106, (byte)97, byte.MaxValue),
			new Color32((byte)118, (byte)108, (byte)97, byte.MaxValue),
			new Color32((byte)118, (byte)111, (byte)97, byte.MaxValue),
			new Color32((byte)119, (byte)114, (byte)97, byte.MaxValue),
			new Color32((byte)123, (byte)119, (byte)99, byte.MaxValue),
			new Color32((byte)118, (byte)119, (byte)97, byte.MaxValue),
			new Color32((byte)113, (byte)119, (byte)97, byte.MaxValue),
			new Color32((byte)109, (byte)123, (byte)103, byte.MaxValue),
			new Color32((byte)114, (byte)133, (byte)118, byte.MaxValue),
			new Color32((byte)99, (byte)119, (byte)111, byte.MaxValue),
			new Color32((byte)97, (byte)119, (byte)116, byte.MaxValue),
			new Color32((byte)97, (byte)118, (byte)118, byte.MaxValue),
			new Color32((byte)99, (byte)119, (byte)121, byte.MaxValue),
			new Color32((byte)97, (byte)114, (byte)118, byte.MaxValue),
			new Color32((byte)97, (byte)111, (byte)118, byte.MaxValue),
			new Color32((byte)97, (byte)106, (byte)118, byte.MaxValue),
			new Color32((byte)97, (byte)101, (byte)118, byte.MaxValue),
			new Color32((byte)97, (byte)99, (byte)119, byte.MaxValue),
			new Color32((byte)99, (byte)97, (byte)118, byte.MaxValue),
			new Color32((byte)104, (byte)97, (byte)118, byte.MaxValue),
			new Color32((byte)109, (byte)97, (byte)119, byte.MaxValue),
			new Color32((byte)114, (byte)97, (byte)119, byte.MaxValue),
			new Color32((byte)113, (byte)92, (byte)114, byte.MaxValue),
			new Color32((byte)116, (byte)94, (byte)113, byte.MaxValue),
			new Color32((byte)119, (byte)97, (byte)113, byte.MaxValue),
			new Color32((byte)119, (byte)97, (byte)108, byte.MaxValue),
			new Color32((byte)118, (byte)97, (byte)104, byte.MaxValue),
			new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
			new Color32((byte)82, (byte)67, (byte)67, byte.MaxValue),
			new Color32((byte)82, (byte)69, (byte)67, byte.MaxValue),
			new Color32((byte)82, (byte)71, (byte)67, byte.MaxValue),
			new Color32((byte)82, (byte)74, (byte)67, byte.MaxValue),
			new Color32((byte)82, (byte)74, (byte)67, byte.MaxValue),
			new Color32((byte)82, (byte)76, (byte)67, byte.MaxValue),
			new Color32((byte)82, (byte)77, (byte)67, byte.MaxValue),
			new Color32((byte)82, (byte)81, (byte)67, byte.MaxValue),
			new Color32((byte)86, (byte)84, (byte)71, byte.MaxValue),
			new Color32((byte)81, (byte)82, (byte)67, byte.MaxValue),
			new Color32((byte)77, (byte)82, (byte)67, byte.MaxValue),
			new Color32((byte)76, (byte)86, (byte)71, byte.MaxValue),
			new Color32((byte)79, (byte)92, (byte)82, byte.MaxValue),
			new Color32((byte)69, (byte)82, (byte)77, byte.MaxValue),
			new Color32((byte)67, (byte)82, (byte)81, byte.MaxValue),
			new Color32((byte)67, (byte)82, (byte)82, byte.MaxValue),
			new Color32((byte)69, (byte)84, (byte)86, byte.MaxValue),
			new Color32((byte)67, (byte)79, (byte)82, byte.MaxValue),
			new Color32((byte)67, (byte)77, (byte)82, byte.MaxValue),
			new Color32((byte)67, (byte)74, (byte)82, byte.MaxValue),
			new Color32((byte)67, (byte)71, (byte)82, byte.MaxValue),
			new Color32((byte)69, (byte)69, (byte)82, byte.MaxValue),
			new Color32((byte)69, (byte)67, (byte)82, byte.MaxValue),
			new Color32((byte)72, (byte)67, (byte)82, byte.MaxValue),
			new Color32((byte)76, (byte)67, (byte)82, byte.MaxValue),
			new Color32((byte)79, (byte)67, (byte)82, byte.MaxValue),
			new Color32((byte)77, (byte)64, (byte)79, byte.MaxValue),
			new Color32((byte)81, (byte)66, (byte)79, byte.MaxValue),
			new Color32((byte)82, (byte)67, (byte)79, byte.MaxValue),
			new Color32((byte)82, (byte)67, (byte)74, byte.MaxValue),
			new Color32((byte)82, (byte)67, (byte)72, byte.MaxValue),
			new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
			new Color32((byte)59, (byte)49, (byte)49, byte.MaxValue),
			new Color32((byte)59, (byte)49, (byte)49, byte.MaxValue),
			new Color32((byte)59, (byte)50, (byte)49, byte.MaxValue),
			new Color32((byte)59, (byte)52, (byte)49, byte.MaxValue),
			new Color32((byte)59, (byte)54, (byte)49, byte.MaxValue),
			new Color32((byte)59, (byte)54, (byte)49, byte.MaxValue),
			new Color32((byte)59, (byte)55, (byte)49, byte.MaxValue),
			new Color32((byte)59, (byte)57, (byte)49, byte.MaxValue),
			new Color32((byte)59, (byte)59, (byte)49, byte.MaxValue),
			new Color32((byte)57, (byte)59, (byte)47, byte.MaxValue),
			new Color32((byte)55, (byte)59, (byte)49, byte.MaxValue),
			new Color32((byte)54, (byte)62, (byte)50, byte.MaxValue),
			new Color32((byte)57, (byte)66, (byte)59, byte.MaxValue),
			new Color32((byte)49, (byte)61, (byte)55, byte.MaxValue),
			new Color32((byte)49, (byte)59, (byte)57, byte.MaxValue),
			new Color32((byte)47, (byte)59, (byte)57, byte.MaxValue),
			new Color32((byte)49, (byte)59, (byte)59, byte.MaxValue),
			new Color32((byte)49, (byte)57, (byte)59, byte.MaxValue),
			new Color32((byte)49, (byte)55, (byte)59, byte.MaxValue),
			new Color32((byte)49, (byte)52, (byte)59, byte.MaxValue),
			new Color32((byte)49, (byte)50, (byte)59, byte.MaxValue),
			new Color32((byte)49, (byte)49, (byte)61, byte.MaxValue),
			new Color32((byte)50, (byte)49, (byte)59, byte.MaxValue),
			new Color32((byte)52, (byte)49, (byte)59, byte.MaxValue),
			new Color32((byte)54, (byte)49, (byte)59, byte.MaxValue),
			new Color32((byte)55, (byte)47, (byte)59, byte.MaxValue),
			new Color32((byte)55, (byte)45, (byte)55, byte.MaxValue),
			new Color32((byte)57, (byte)47, (byte)55, byte.MaxValue),
			new Color32((byte)59, (byte)49, (byte)55, byte.MaxValue),
			new Color32((byte)59, (byte)49, (byte)54, byte.MaxValue),
			new Color32((byte)59, (byte)49, (byte)52, byte.MaxValue),
			new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
			new Color32((byte)42, (byte)34, (byte)34, byte.MaxValue),
			new Color32((byte)42, (byte)35, (byte)34, byte.MaxValue),
			new Color32((byte)42, (byte)35, (byte)34, byte.MaxValue),
			new Color32((byte)42, (byte)37, (byte)34, byte.MaxValue),
			new Color32((byte)42, (byte)37, (byte)34, byte.MaxValue),
			new Color32((byte)42, (byte)39, (byte)34, byte.MaxValue),
			new Color32((byte)42, (byte)39, (byte)34, byte.MaxValue),
			new Color32((byte)42, (byte)40, (byte)34, byte.MaxValue),
			new Color32((byte)42, (byte)42, (byte)35, byte.MaxValue),
			new Color32((byte)40, (byte)42, (byte)34, byte.MaxValue),
			new Color32((byte)39, (byte)42, (byte)34, byte.MaxValue),
			new Color32((byte)39, (byte)44, (byte)35, byte.MaxValue),
			new Color32((byte)40, (byte)45, (byte)40, byte.MaxValue),
			new Color32((byte)35, (byte)42, (byte)39, byte.MaxValue),
			new Color32((byte)34, (byte)42, (byte)40, byte.MaxValue),
			new Color32((byte)34, (byte)40, (byte)40, byte.MaxValue),
			new Color32((byte)35, (byte)42, (byte)42, byte.MaxValue),
			new Color32((byte)34, (byte)40, (byte)42, byte.MaxValue),
			new Color32((byte)34, (byte)39, (byte)42, byte.MaxValue),
			new Color32((byte)34, (byte)37, (byte)42, byte.MaxValue),
			new Color32((byte)34, (byte)35, (byte)42, byte.MaxValue),
			new Color32((byte)34, (byte)34, (byte)42, byte.MaxValue),
			new Color32((byte)35, (byte)34, (byte)42, byte.MaxValue),
			new Color32((byte)37, (byte)34, (byte)42, byte.MaxValue),
			new Color32((byte)39, (byte)34, (byte)42, byte.MaxValue),
			new Color32((byte)40, (byte)34, (byte)42, byte.MaxValue),
			new Color32((byte)39, (byte)32, (byte)40, byte.MaxValue),
			new Color32((byte)40, (byte)32, (byte)39, byte.MaxValue),
			new Color32((byte)42, (byte)34, (byte)39, byte.MaxValue),
			new Color32((byte)42, (byte)34, (byte)37, byte.MaxValue),
			new Color32((byte)42, (byte)34, (byte)37, byte.MaxValue),
			new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
			new Color32((byte)30, (byte)24, (byte)24, byte.MaxValue),
			new Color32((byte)30, (byte)25, (byte)24, byte.MaxValue),
			new Color32((byte)30, (byte)25, (byte)24, byte.MaxValue),
			new Color32((byte)30, (byte)27, (byte)24, byte.MaxValue),
			new Color32((byte)30, (byte)27, (byte)24, byte.MaxValue),
			new Color32((byte)30, (byte)27, (byte)24, byte.MaxValue),
			new Color32((byte)30, (byte)27, (byte)24, byte.MaxValue),
			new Color32((byte)30, (byte)29, (byte)24, byte.MaxValue),
			new Color32((byte)30, (byte)30, (byte)25, byte.MaxValue),
			new Color32((byte)29, (byte)30, (byte)24, byte.MaxValue),
			new Color32((byte)27, (byte)30, (byte)24, byte.MaxValue),
			new Color32((byte)27, (byte)30, (byte)25, byte.MaxValue),
			new Color32((byte)29, (byte)34, (byte)30, byte.MaxValue),
			new Color32((byte)24, (byte)30, (byte)27, byte.MaxValue),
			new Color32((byte)24, (byte)30, (byte)29, byte.MaxValue),
			new Color32((byte)24, (byte)30, (byte)30, byte.MaxValue),
			new Color32((byte)25, (byte)30, (byte)30, byte.MaxValue),
			new Color32((byte)24, (byte)29, (byte)30, byte.MaxValue),
			new Color32((byte)24, (byte)27, (byte)30, byte.MaxValue),
			new Color32((byte)24, (byte)27, (byte)30, byte.MaxValue),
			new Color32((byte)24, (byte)25, (byte)30, byte.MaxValue),
			new Color32((byte)24, (byte)24, (byte)30, byte.MaxValue),
			new Color32((byte)25, (byte)24, (byte)30, byte.MaxValue),
			new Color32((byte)25, (byte)24, (byte)30, byte.MaxValue),
			new Color32((byte)27, (byte)24, (byte)30, byte.MaxValue),
			new Color32((byte)29, (byte)24, (byte)30, byte.MaxValue),
			new Color32((byte)29, (byte)24, (byte)29, byte.MaxValue),
			new Color32((byte)29, (byte)24, (byte)29, byte.MaxValue),
			new Color32((byte)30, (byte)24, (byte)29, byte.MaxValue),
			new Color32((byte)30, (byte)24, (byte)27, byte.MaxValue),
			new Color32((byte)30, (byte)24, (byte)27, byte.MaxValue),
			new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
			new Color32((byte)0, (byte)0, (byte)0, byte.MaxValue),
			new Color32((byte)20, (byte)17, (byte)17, byte.MaxValue),
			new Color32((byte)20, (byte)17, (byte)17, byte.MaxValue),
			new Color32((byte)20, (byte)18, (byte)17, byte.MaxValue),
			new Color32((byte)20, (byte)18, (byte)17, byte.MaxValue),
			new Color32((byte)20, (byte)18, (byte)17, byte.MaxValue),
			new Color32((byte)20, (byte)18, (byte)17, byte.MaxValue),
			new Color32((byte)20, (byte)20, (byte)17, byte.MaxValue),
			new Color32((byte)22, (byte)20, (byte)17, byte.MaxValue),
			new Color32((byte)20, (byte)20, (byte)17, byte.MaxValue),
			new Color32((byte)18, (byte)20, (byte)17, byte.MaxValue),
			new Color32((byte)18, (byte)22, (byte)17, byte.MaxValue),
			new Color32((byte)20, (byte)22, (byte)20, byte.MaxValue),
			new Color32((byte)17, (byte)20, (byte)18, byte.MaxValue),
			new Color32((byte)17, (byte)20, (byte)20, byte.MaxValue),
			new Color32((byte)17, (byte)20, (byte)20, byte.MaxValue),
			new Color32((byte)17, (byte)20, (byte)22, byte.MaxValue),
			new Color32((byte)17, (byte)20, (byte)20, byte.MaxValue),
			new Color32((byte)17, (byte)18, (byte)20, byte.MaxValue),
			new Color32((byte)17, (byte)18, (byte)20, byte.MaxValue),
			new Color32((byte)17, (byte)17, (byte)20, byte.MaxValue),
			new Color32((byte)17, (byte)17, (byte)20, byte.MaxValue),
			new Color32((byte)17, (byte)17, (byte)20, byte.MaxValue),
			new Color32((byte)18, (byte)17, (byte)20, byte.MaxValue),
			new Color32((byte)18, (byte)17, (byte)20, byte.MaxValue),
			new Color32((byte)18, (byte)17, (byte)20, byte.MaxValue),
			new Color32((byte)18, (byte)15, (byte)20, byte.MaxValue),
			new Color32((byte)20, (byte)17, (byte)20, byte.MaxValue),
			new Color32((byte)20, (byte)17, (byte)18, byte.MaxValue),
			new Color32((byte)20, (byte)17, (byte)18, byte.MaxValue),
			new Color32((byte)20, (byte)17, (byte)18, byte.MaxValue),
			new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue)
		};

		private BoatNativeEditorUi _boatNativeEditorUi;

		private float _boatNativeEditorRetryAt;

		private GUIStyle _boatSliderHitTrack;

		private GUIStyle _boatSliderHitThumb;

		internal static Plugin Instance { get; private set; }

		private void Awake()
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Expected O, but got Unknown
			Instance = this;
			_purchaseKey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Controls", "PurchaseBoatKey", new KeyboardShortcut((KeyCode)289, Array.Empty<KeyCode>()), "Buys and spawns a boat for 250. Up to four boats may exist.");
			_removeAllKey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Controls", "RemoveAllBoatsKey", new KeyboardShortcut((KeyCode)290, Array.Empty<KeyCode>()), "Despawns every boat and clears all saved purchased boats.");
			_boatColorEditorPositionX = ((BaseUnityPlugin)this).Config.Bind<float>("Boat Color Editor", "PositionX", 120f, "Remembered horizontal position of the F10 Boat Color Editor.");
			_boatColorEditorPositionY = ((BaseUnityPlugin)this).Config.Bind<float>("Boat Color Editor", "PositionY", 30f, "Remembered vertical position of the F10 Boat Color Editor.");
			((Rect)(ref _boatColorEditorRect)).x = _boatColorEditorPositionX.Value;
			((Rect)(ref _boatColorEditorRect)).y = _boatColorEditorPositionY.Value;
			_saveContextKey = null;
			_savePath = Path.Combine(Paths.ConfigPath, "Untamo.Boats.pending.boats.txt");
			_save = new BoatSaveFile();
			BoatCruiseRouting.ConfigurePersistence(1f, RememberCruisePower);
			try
			{
				_previousUnityLogHandler = Debug.unityLogger.logHandler;
				if (!(_previousUnityLogHandler is SkinKeywordNoiseLogHandler))
				{
					Debug.unityLogger.logHandler = (ILogHandler)(object)new SkinKeywordNoiseLogHandler(_previousUnityLogHandler);
				}
			}
			catch
			{
				_previousUnityLogHandler = null;
			}
			_harmony = new Harmony("Untamo.Boats");
			_harmony.PatchAll();
			BoatF10GameMouse1CallerBlockBridge.Install(_harmony, ((BaseUnityPlugin)this).Logger);
			BoatF10Mouse1BlockBridge.Install(_harmony, ((BaseUnityPlugin)this).Logger);
			BoatAdditionalDamageBridge.Install(_harmony, ((BaseUnityPlugin)this).Logger);
			BoatExactMeleeHitBridge.Install(_harmony, ((BaseUnityPlugin)this).Logger);
			BoatExactFistHitBridge.Install(_harmony, ((BaseUnityPlugin)this).Logger);
			((BaseUnityPlugin)this).Logger.LogInfo((object)string.Format("{0} {1} loaded. Press F8 to buy a boat for {2:N0}.", "Untamo.Boats", "1.0.11", 250));
			((BaseUnityPlugin)this).Logger.LogInfo((object)"1024-color 32x32 screenshot