Decompiled source of PeakSentinel Chinese v1.1.6

BepInEx/plugins/PeakSentinel-Chinese-1.1.6/PeakSentinel-Chinese-1.1.6.dll

Decompiled 3 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Text;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using ExitGames.Client.Photon;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Photon.Realtime;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("PeakSentinel-Chinese-1.1.6")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.1.6.0")]
[assembly: AssemblyInformationalVersion("1.1.6")]
[assembly: AssemblyProduct("PeakSentinel-Chinese-1.1.6")]
[assembly: AssemblyTitle("PeakSentinel-Chinese-1.1.6")]
[assembly: AssemblyVersion("1.1.6.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 PeakSentinel.Chinese
{
	[BepInPlugin("peaksentinel.chinese", "PeakSentinel-Chinese-1.1.6", "1.1.6")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public sealed class ChinesePlugin : BaseUnityPlugin
	{
		public const string Guid = "peaksentinel.chinese";

		public const string Name = "PeakSentinel-Chinese-1.1.6";

		public const string Version = "1.1.6";

		internal static ManualLogSource Log;

		internal static ConfigEntry<bool> Notifications;

		internal static ConfigEntry<int> MaxNotifications;

		internal static ConfigEntry<int> FontSize;

		internal static ConfigEntry<bool> ShowCheat;

		internal static ConfigEntry<bool> ShowSuspicious;

		internal static ConfigEntry<bool> ShowFix;

		internal static ConfigEntry<bool> ShowNotice;

		private Harmony _harmony;

		private void Awake()
		{
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Expected O, but got Unknown
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Expected O, but got Unknown
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Expected O, but got Unknown
			Log = ((BaseUnityPlugin)this).Logger;
			Notifications = ((BaseUnityPlugin)this).Config.Bind<bool>("Game feed", "Notifications", true, "游戏内弹出哨兵通知。关闭后仍会记录到窗口的日志页与导出报告;也可在窗口的日志页切换。");
			MaxNotifications = ((BaseUnityPlugin)this).Config.Bind<int>("Game feed", "MaxNotifications", 3, new ConfigDescription("游戏内同时显示的哨兵通知条数上限(1-20):只显示最新的 N 条,更早的从游戏内通知中隐藏(仍保留在窗口日志里)。也可在窗口的日志页设置。", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 20), Array.Empty<object>()));
			FontSize = ((BaseUnityPlugin)this).Config.Bind<int>("Game feed", "FontSize", 0, new ConfigDescription("游戏内通知文字字号:0 = 跟随游戏默认,10-48 = 自定义字号(只影响哨兵通知行,游戏原生的加入/离开消息保持原字号)。也可在窗口的日志页设置。", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 48), Array.Empty<object>()));
			ShowCheat = ((BaseUnityPlugin)this).Config.Bind<bool>("Game feed", "ShowCheat", true, "在游戏内通知中显示“作弊或已拦截”类消息(红色)。");
			ShowSuspicious = ((BaseUnityPlugin)this).Config.Bind<bool>("Game feed", "ShowSuspicious", true, "在游戏内通知中显示“可疑,可能误判”类消息(橙色)。");
			ShowFix = ((BaseUnityPlugin)this).Config.Bind<bool>("Game feed", "ShowFix", true, "在游戏内通知中显示“已修复”类消息(绿色)。");
			ShowNotice = ((BaseUnityPlugin)this).Config.Bind<bool>("Game feed", "ShowNotice", false, "在游戏内通知中显示“提示,没有问题”类消息(棕色)。默认关闭;也可在窗口的日志页切换。");
			ConfigEntry<bool> val = ((BaseUnityPlugin)this).Config.Bind<bool>("Internal", "NoticeDefaultOffApplied", false, "内部标记:本版本起“提示,没有问题”通知默认关闭。请勿修改。");
			if (!val.Value)
			{
				ShowNotice.Value = false;
				val.Value = true;
			}
			try
			{
				_harmony = new Harmony("peaksentinel.chinese");
				Localizer.Apply(_harmony, ((BaseUnityPlugin)this).Logger);
				ConfigComments.Localize();
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)("汉化包加载失败(游戏仍可正常游玩):" + ex));
			}
		}

		private void OnDestroy()
		{
			try
			{
				Harmony harmony = _harmony;
				if (harmony != null)
				{
					harmony.UnpatchSelf();
				}
			}
			catch (Exception)
			{
			}
		}
	}
	internal static class ColorNameNotices
	{
		private static readonly HashSet<int> Seen = new HashSet<int>();

		internal static void CheckPrefix(Player player)
		{
			if (player != null && RichTextNames.HasColorTag(player.NickName) && Seen.Add(player.ActorNumber))
			{
				ModAccess.Notice(player, "检测到彩色名字(MyColoredName):颜色变化不算改名或冒充");
			}
		}
	}
	internal static class Composer
	{
		private static readonly Regex TakenBack = new Regex("^took the host from (.+), taken back$", RegexOptions.Compiled);

		private static readonly Regex TookHost = new Regex("^took the host from (.+)$", RegexOptions.Compiled);

		private static readonly Regex Takeover = new Regex("^tried to take control of the character of (.+)$", RegexOptions.Compiled);

		private static readonly Regex Balloon = new Regex("^tied a balloon onto (.+)$", RegexOptions.Compiled);

		private static readonly Regex Built = new Regex("^built '(.+)' with an item of (.+)$", RegexOptions.Compiled);

		private static readonly Regex Zombified = new Regex("^zombified (.+)$", RegexOptions.Compiled);

		private static readonly Regex Exploded = new Regex("^set off an explosion on (.+)$", RegexOptions.Compiled);

		private static readonly Regex Pickup = new Regex("^forced an item pickup on (.+)$", RegexOptions.Compiled);

		private static readonly Regex Spawned = new Regex("^spawned '(.+)' into the hands of (.+)$", RegexOptions.Compiled);

		internal static string Translate(string action)
		{
			if (string.IsNullOrEmpty(action))
			{
				return action;
			}
			Match match;
			if ((match = TakenBack.Match(action)).Success)
			{
				return "从" + match.Groups[1].Value + "手中夺走了房主,已夺回";
			}
			if ((match = TookHost.Match(action)).Success)
			{
				return "从" + match.Groups[1].Value + "手中夺走了房主";
			}
			if ((match = Takeover.Match(action)).Success)
			{
				return "试图控制 " + match.Groups[1].Value + " 的角色";
			}
			if ((match = Balloon.Match(action)).Success)
			{
				return "把气球绑到了 " + match.Groups[1].Value + " 身上";
			}
			if ((match = Built.Match(action)).Success)
			{
				return "建造了“" + match.Groups[1].Value + "”,用的是 " + match.Groups[2].Value + " 的物品";
			}
			if ((match = Zombified.Match(action)).Success)
			{
				return "把 " + match.Groups[1].Value + " 变成了僵尸";
			}
			if ((match = Exploded.Match(action)).Success)
			{
				return "在 " + match.Groups[1].Value + " 身上引发了爆炸";
			}
			if ((match = Pickup.Match(action)).Success)
			{
				return "强制 " + match.Groups[1].Value + " 拾取了物品";
			}
			if ((match = Spawned.Match(action)).Success)
			{
				return "把“" + match.Groups[1].Value + "”刷到了 " + match.Groups[2].Value + " 的手里";
			}
			return action;
		}

		internal static string WhereTo(string result)
		{
			if (string.IsNullOrEmpty(result))
			{
				return result;
			}
			if (result.StartsWith("next to ", StringComparison.Ordinal))
			{
				return "到 " + result.Substring("next to ".Length) + " 旁边";
			}
			if (result.StartsWith("to ", StringComparison.Ordinal))
			{
				return "到 " + result.Substring("to ".Length);
			}
			return result;
		}

		internal static string ReasonAgainst(string result)
		{
			if (string.IsNullOrEmpty(result))
			{
				return result;
			}
			if (result.StartsWith("in the name of ", StringComparison.Ordinal))
			{
				return "冒用 " + result.Substring("in the name of ".Length) + " 的名义";
			}
			return result;
		}
	}
	internal static class ConfigComments
	{
		private static readonly Dictionary<string, string> Descriptions = BuildDescriptions();

		private static string _path;

		internal static void Localize()
		{
			try
			{
				if (_path == null)
				{
					_path = Path.Combine(Paths.ConfigPath, "peaksentinel.cfg");
				}
				if (!File.Exists(_path))
				{
					return;
				}
				bool encoderShouldEmitUTF8Identifier = HasBom(_path);
				string text = File.ReadAllText(_path, Encoding.UTF8);
				if (Descriptions.Count == 0 || text.IndexOf("## ", StringComparison.Ordinal) < 0)
				{
					return;
				}
				string separator = ((text.IndexOf("\r\n", StringComparison.Ordinal) >= 0) ? "\r\n" : "\n");
				string[] array = text.Replace("\r\n", "\n").Split('\n');
				bool flag = false;
				for (int i = 0; i < array.Length; i++)
				{
					if (array[i].StartsWith("## ", StringComparison.Ordinal))
					{
						string key = array[i].Substring(3).TrimEnd();
						if (Descriptions.TryGetValue(key, out var value))
						{
							array[i] = "## " + value;
							flag = true;
						}
					}
				}
				if (flag)
				{
					File.WriteAllText(_path, string.Join(separator, array), new UTF8Encoding(encoderShouldEmitUTF8Identifier));
				}
			}
			catch (Exception ex)
			{
				if (ChinesePlugin.Log != null)
				{
					ChinesePlugin.Log.LogWarning((object)("汉化:无法汉化配置说明:" + ex.Message));
				}
			}
		}

		private static bool HasBom(string path)
		{
			using FileStream fileStream = File.OpenRead(path);
			byte[] array = new byte[3];
			return fileStream.Read(array, 0, 3) == 3 && array[0] == 239 && array[1] == 187 && array[2] == 191;
		}

		private static Dictionary<string, string> BuildDescriptions()
		{
			Dictionary<string, string> dictionary = new Dictionary<string, string>(StringComparer.Ordinal);
			foreach (KeyValuePair<string, Dictionary<int, Entry>> item in Table.ByMethod)
			{
				if (!item.Key.Contains("::.ctor(") || !item.Key.Contains(".Settings."))
				{
					continue;
				}
				foreach (Entry value in item.Value.Values)
				{
					if (value.Original.Length > 12 && !dictionary.ContainsKey(value.Original))
					{
						dictionary.Add(value.Original, value.Replacement);
					}
				}
			}
			return dictionary;
		}
	}
	internal static class DynamicNames
	{
		private static readonly Dictionary<string, string> Names = new Dictionary<string, string>(StringComparer.Ordinal)
		{
			{ "Injury", "受伤" },
			{ "Hunger", "饥饿" },
			{ "Cold", "寒冷" },
			{ "Poison", "中毒" },
			{ "Crab", "螃蟹" },
			{ "Curse", "诅咒" },
			{ "Drowsy", "困倦" },
			{ "Weight", "负重" },
			{ "Hot", "炎热" },
			{ "Thorns", "荆棘" },
			{ "Spores", "孢子" },
			{ "Web", "蛛网" },
			{ "Arrow", "箭伤" },
			{ "Petrify", "石化" },
			{ "FlyTrap", "捕蝇草" },
			{ "Invincibility", "无敌" },
			{ "BingBongShield", "Bing Bong 护盾" },
			{ "InfiniteStamina", "无限体力" },
			{ "NoHunger", "不饿" },
			{ "FasterBoi", "加速" },
			{ "Glowing", "发光" },
			{ "Chaos", "混乱" },
			{ "Exhausted", "力竭" },
			{ "Blind", "失明" },
			{ "Numb", "麻木" }
		};

		private static readonly Regex Pattern = new Regex("\\b(" + string.Join("|", Names.Keys) + ")\\b", RegexOptions.Compiled);

		internal static string Localize(string text)
		{
			if (string.IsNullOrEmpty(text))
			{
				return text;
			}
			try
			{
				string value;
				return Pattern.Replace(text, (Match match) => (!Names.TryGetValue(match.Value, out value)) ? match.Value : value);
			}
			catch (Exception)
			{
				return text;
			}
		}
	}
	internal static class FeedControl
	{
		private struct RepeatState
		{
			internal int Count;

			internal float Time;
		}

		private const string HiddenMark = "\u2063[哨兵]";

		private const float RepeatWindow = 30f;

		private static readonly string[] Markers = new string[2] { "[哨兵]", "[Sentinel]" };

		private static readonly Regex RepeatSuffix = new Regex("  ×\\d+$", RegexOptions.Compiled);

		private static readonly Type LogType = typeof(FontFallbackSwapper).Assembly.GetType("PlayerConnectionLog");

		private static readonly FieldInfo TextField = LogType?.GetField("text", BindingFlags.Instance | BindingFlags.Public);

		private static readonly FieldInfo LogField = LogType?.GetField("currentLog", BindingFlags.Instance | BindingFlags.NonPublic);

		private static readonly MethodInfo RebuildMethod = LogType?.GetMethod("RebuildString", BindingFlags.Instance | BindingFlags.NonPublic);

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

		private static object _last;

		internal static int Max => Mathf.Clamp((ChinesePlugin.MaxNotifications == null) ? 3 : ChinesePlugin.MaxNotifications.Value, 1, 20);

		internal static bool IsSentinel(string line)
		{
			if (string.IsNullOrEmpty(line))
			{
				return false;
			}
			string[] markers = Markers;
			foreach (string value in markers)
			{
				if (line.IndexOf(value, StringComparison.Ordinal) >= 0)
				{
					return true;
				}
			}
			return false;
		}

		internal static bool Prefix(string s, object __instance)
		{
			if (!IsSentinel(s))
			{
				return true;
			}
			_last = __instance;
			if (ChinesePlugin.Notifications != null)
			{
				return ChinesePlugin.Notifications.Value;
			}
			return true;
		}

		internal static void Postfix(string s, object __instance)
		{
			if (!IsSentinel(s) || (ChinesePlugin.Notifications != null && !ChinesePlugin.Notifications.Value))
			{
				return;
			}
			try
			{
				List<string> list = LogOf(__instance);
				if (list == null || list.Count == 0)
				{
					return;
				}
				string text = FeedTrim.BaseOf(s, RepeatSuffix);
				int num = list.Count - 1;
				if (!IsSentinel(list[num]) || FeedTrim.BaseOf(list[num], RepeatSuffix) != text)
				{
					return;
				}
				int num2 = NextCount(text);
				if (num2 <= 1)
				{
					return;
				}
				for (int num3 = num - 1; num3 >= 0; num3--)
				{
					if (IsSentinel(list[num3]) && !IsHidden(list[num3]) && !(FeedTrim.BaseOf(list[num3], RepeatSuffix) != text))
					{
						list[num3] = "\u2063[哨兵]";
						break;
					}
				}
				list[num] = text + "  ×" + num2;
				Rebuild(__instance);
			}
			catch (Exception)
			{
			}
		}

		internal static void RebuildPostfix(object __instance)
		{
			if (__instance != null)
			{
				_last = __instance;
				Apply(__instance);
			}
		}

		internal static void Refresh()
		{
			object last = _last;
			if (last == null)
			{
				return;
			}
			try
			{
				RebuildMethod?.Invoke(last, null);
			}
			catch (Exception)
			{
			}
		}

		internal static bool IsVisible(string line)
		{
			if (IsHidden(line))
			{
				return false;
			}
			switch (FeedTrim.KindOf(line))
			{
			case FeedTrim.FeedKind.Cheat:
				if (ChinesePlugin.ShowCheat != null)
				{
					return ChinesePlugin.ShowCheat.Value;
				}
				return true;
			case FeedTrim.FeedKind.Suspicious:
				if (ChinesePlugin.ShowSuspicious != null)
				{
					return ChinesePlugin.ShowSuspicious.Value;
				}
				return true;
			case FeedTrim.FeedKind.Fix:
				if (ChinesePlugin.ShowFix != null)
				{
					return ChinesePlugin.ShowFix.Value;
				}
				return true;
			default:
				if (ChinesePlugin.ShowNotice != null)
				{
					return ChinesePlugin.ShowNotice.Value;
				}
				return true;
			}
		}

		private static bool IsHidden(string line)
		{
			if (!string.IsNullOrEmpty(line))
			{
				return line.IndexOf("\u2063[哨兵]", StringComparison.Ordinal) >= 0;
			}
			return false;
		}

		private static int NextCount(string baseText)
		{
			float unscaledTime = Time.unscaledTime;
			if (Repeats.TryGetValue(baseText, out var value) && unscaledTime - value.Time <= 30f)
			{
				value.Count++;
				value.Time = unscaledTime;
				Repeats[baseText] = value;
				return value.Count;
			}
			Repeats[baseText] = new RepeatState
			{
				Count = 1,
				Time = unscaledTime
			};
			Prune(unscaledTime);
			return 1;
		}

		private static void Prune(float now)
		{
			if (Repeats.Count < 256)
			{
				return;
			}
			List<string> list = new List<string>();
			foreach (KeyValuePair<string, RepeatState> repeat in Repeats)
			{
				if (now - repeat.Value.Time > 30f)
				{
					list.Add(repeat.Key);
				}
			}
			foreach (string item in list)
			{
				Repeats.Remove(item);
			}
		}

		private static void Apply(object feed)
		{
			try
			{
				if (TextField == null)
				{
					return;
				}
				object? value = TextField.GetValue(feed);
				TextMeshProUGUI val = (TextMeshProUGUI)((value is TextMeshProUGUI) ? value : null);
				if (val == null)
				{
					return;
				}
				string text = ((TMP_Text)val).text;
				if (!string.IsNullOrEmpty(text))
				{
					int max = ((ChinesePlugin.Notifications == null || ChinesePlugin.Notifications.Value) ? Max : 0);
					string text2 = FeedTrim.Filter(text, max, IsSentinel, IsVisible);
					int num = ((ChinesePlugin.FontSize != null) ? ChinesePlugin.FontSize.Value : 0);
					string text3 = FeedTrim.Resize(text2, Mathf.Clamp(num, 0, 48), IsSentinel);
					if (!string.Equals(text3, text, StringComparison.Ordinal))
					{
						((TMP_Text)val).text = text3;
					}
				}
			}
			catch (Exception)
			{
			}
		}

		private static List<string> LogOf(object feed)
		{
			if (feed == null || LogField == null)
			{
				return null;
			}
			return LogField.GetValue(feed) as List<string>;
		}

		private static void Rebuild(object feed)
		{
			try
			{
				RebuildMethod?.Invoke(feed, null);
			}
			catch (Exception)
			{
			}
		}
	}
	internal static class FeedTrim
	{
		internal enum FeedKind
		{
			Cheat,
			Suspicious,
			Fix,
			Notice
		}

		private static readonly Regex ColorToken = new Regex("<color=#([0-9A-Fa-f]{6,8})>|</color>", RegexOptions.IgnoreCase | RegexOptions.Compiled);

		internal static int Count(IEnumerable<string> lines, Func<string, bool> matches)
		{
			int num = 0;
			foreach (string line in lines)
			{
				if (matches(line))
				{
					num++;
				}
			}
			return num;
		}

		internal static string Filter(string text, int max, Func<string, bool> isSentinel, Func<string, bool> isVisible)
		{
			if (string.IsNullOrEmpty(text))
			{
				return text;
			}
			string[] array = text.Split('\n');
			int num = 0;
			int num2 = 0;
			string[] array2 = array;
			foreach (string arg in array2)
			{
				if (isSentinel(arg))
				{
					if (isVisible(arg))
					{
						num++;
					}
					else
					{
						num2++;
					}
				}
			}
			int num3 = num - max;
			if (num3 <= 0 && num2 == 0)
			{
				return text;
			}
			List<string> list = new List<string>(array.Length);
			array2 = array;
			foreach (string text2 in array2)
			{
				if (isSentinel(text2))
				{
					if (!isVisible(text2))
					{
						continue;
					}
					if (num3 > 0)
					{
						num3--;
						continue;
					}
				}
				list.Add(text2);
			}
			return string.Join("\n", list);
		}

		internal static FeedKind KindOf(string line)
		{
			if (string.IsNullOrEmpty(line))
			{
				return FeedKind.Notice;
			}
			Stack<string> stack = new Stack<string>();
			string a = null;
			foreach (Match item in ColorToken.Matches(line))
			{
				if (item.Groups[1].Success)
				{
					stack.Push(item.Groups[1].Value);
				}
				else if (stack.Count > 0)
				{
					a = stack.Pop();
				}
			}
			if (string.Equals(a, "FF6060", StringComparison.OrdinalIgnoreCase))
			{
				return FeedKind.Cheat;
			}
			if (string.Equals(a, "FFA040", StringComparison.OrdinalIgnoreCase))
			{
				return FeedKind.Suspicious;
			}
			if (string.Equals(a, "70DC70", StringComparison.OrdinalIgnoreCase))
			{
				return FeedKind.Fix;
			}
			return FeedKind.Notice;
		}

		internal static string BaseOf(string line, Regex repeatSuffix)
		{
			if (!string.IsNullOrEmpty(line))
			{
				return repeatSuffix.Replace(line, string.Empty);
			}
			return line;
		}

		internal static string StripTags(string text)
		{
			if (!string.IsNullOrEmpty(text))
			{
				return Regex.Replace(text, "<[^>]+>", string.Empty);
			}
			return text;
		}

		internal static string Resize(string text, int size, Func<string, bool> isSentinel)
		{
			if (size <= 0 || string.IsNullOrEmpty(text))
			{
				return text;
			}
			string[] array = text.Split('\n');
			for (int i = 0; i < array.Length; i++)
			{
				if (isSentinel(array[i]))
				{
					array[i] = "<size=" + size + ">" + array[i] + "</size>";
				}
			}
			return string.Join("\n", array);
		}
	}
	internal static class FontFallback
	{
		private const int SystemSamplingSize = 48;

		private static readonly string[] SystemFamilies = new string[9] { "Microsoft YaHei", "微软雅黑", "Microsoft YaHei UI", "SimHei", "Noto Sans CJK SC", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Arial Unicode MS" };

		private static readonly HashSet<TMP_FontAsset> Prepared = new HashSet<TMP_FontAsset>();

		private static TMP_FontAsset _system;

		private static bool _systemTried;

		internal static void Ensure(TMP_FontAsset font)
		{
			if (font == null || Prepared.Contains(font))
			{
				return;
			}
			try
			{
				FontFallbackSwapper instance = FontFallbackSwapper.instance;
				TMP_FontAsset val = (((Object)(object)instance != (Object)null) ? instance.simplifiedChineseFont : null);
				TMP_FontAsset val2 = SystemChinese();
				if (val != null || val2 != null)
				{
					Add(font, val);
					Add(font, val2);
					Prepared.Add(font);
				}
			}
			catch (Exception)
			{
			}
		}

		private static void Add(TMP_FontAsset font, TMP_FontAsset fallback)
		{
			if (fallback != null && fallback != font)
			{
				List<TMP_FontAsset> list = font.fallbackFontAssetTable;
				if (list == null)
				{
					list = (font.fallbackFontAssetTable = new List<TMP_FontAsset>());
				}
				if (!list.Contains(fallback))
				{
					list.Add(fallback);
				}
			}
		}

		private static TMP_FontAsset SystemChinese()
		{
			if (_systemTried)
			{
				return _system;
			}
			_systemTried = true;
			Font val = Font.CreateDynamicFontFromOSFont(SystemFamilies, 48);
			if (val == null)
			{
				return null;
			}
			TMP_FontAsset val2 = TMP_FontAsset.CreateFontAsset(val);
			string value = default(string);
			if (val2 == null || !val2.TryAddCharacters("中文测试", ref value, false) || !string.IsNullOrEmpty(value))
			{
				return null;
			}
			_system = val2;
			return val2;
		}
	}
	internal static class ItemNames
	{
		private static readonly Dictionary<string, string> Cache = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);

		private static MethodInfo _lookup;

		private static bool _lookupReady;

		internal static string Localize(string action)
		{
			if (string.IsNullOrEmpty(action))
			{
				return action;
			}
			try
			{
				return ItemNameText.Replace(action, Resolve);
			}
			catch (Exception)
			{
				return action;
			}
		}

		private static string Resolve(string name)
		{
			if (Cache.TryGetValue(name, out var value))
			{
				return value;
			}
			string text = null;
			try
			{
				Item val = Find(name);
				if ((Object)(object)val != (Object)null)
				{
					string name2 = val.GetName();
					if (Usable(name2, name))
					{
						text = name2;
					}
				}
				if (text == null)
				{
					string text2 = LocalizedText.GetText("NAME_" + name, true);
					if (Usable(text2, name))
					{
						text = text2;
					}
				}
			}
			catch (Exception)
			{
				text = null;
			}
			if (text != null)
			{
				Cache[name] = text;
			}
			return text;
		}

		private static Item Find(string name)
		{
			try
			{
				if (!_lookupReady)
				{
					_lookupReady = true;
					_lookup = typeof(Item).Assembly.GetType("ItemDatabase")?.GetMethod("TryGetItem", BindingFlags.Static | BindingFlags.Public, null, new Type[2]
					{
						typeof(string),
						typeof(Item).MakeByRefType()
					}, null);
				}
				if (_lookup == null)
				{
					return null;
				}
				object[] array = new object[2] { name, null };
				return (Item)(((bool)_lookup.Invoke(null, array)) ? /*isinst with value type is only supported in some contexts*/: null);
			}
			catch (Exception)
			{
				return null;
			}
		}

		private static bool Usable(string value, string original)
		{
			if (!string.IsNullOrEmpty(value) && !value.StartsWith("LOC: ", StringComparison.Ordinal))
			{
				return !string.Equals(value, original, StringComparison.Ordinal);
			}
			return false;
		}
	}
	internal static class ItemNameText
	{
		private static readonly Regex Quoted = new Regex("“([^”]{1,80})”|'([^']{1,80})'", RegexOptions.Compiled);

		internal static string Replace(string text, Func<string, string> resolve)
		{
			if (string.IsNullOrEmpty(text) || resolve == null)
			{
				return text;
			}
			return Quoted.Replace(text, delegate(Match match)
			{
				string text2 = (match.Groups[1].Success ? match.Groups[1].Value : match.Groups[2].Value);
				string text3 = resolve(text2);
				return (string.IsNullOrEmpty(text3) || text3 == text2) ? match.Value : (match.Value.Substring(0, 1) + text3 + match.Value.Substring(match.Value.Length - 1));
			});
		}
	}
	internal static class LiteralPatch
	{
		internal static IEnumerable<CodeInstruction> Transpiler(MethodBase original, IEnumerable<CodeInstruction> instructions)
		{
			if (original == null || !Table.ByMethod.TryGetValue(MethodKeys.Of(original), out var value))
			{
				return instructions;
			}
			return Rewrite(value, instructions);
		}

		private static IEnumerable<CodeInstruction> Rewrite(Dictionary<int, Entry> entries, IEnumerable<CodeInstruction> instructions)
		{
			int index = 0;
			foreach (CodeInstruction instruction in instructions)
			{
				if (instruction.opcode != OpCodes.Ldstr)
				{
					yield return instruction;
					continue;
				}
				if (entries.TryGetValue(index, out var value) && instruction.operand is string text && text == value.Original)
				{
					CodeInstruction val = new CodeInstruction(OpCodes.Ldstr, (object)value.Replacement);
					val.labels.AddRange(instruction.labels);
					val.blocks.AddRange(instruction.blocks);
					yield return val;
				}
				else
				{
					yield return instruction;
				}
				index++;
			}
		}
	}
	internal static class Localizer
	{
		internal static void Apply(Harmony harmony, ManualLogSource log)
		{
			Assembly assembly = FindMod(log);
			if (!(assembly == null))
			{
				ModAccess.ModAssembly = assembly;
				int num = PatchLiterals(harmony, assembly, log);
				int num2 = PatchActionParameters(harmony, assembly, log);
				int num3 = PatchMessages(harmony, assembly, log);
				int num4 = PatchFeed(harmony, assembly, log);
				int num5 = PatchNotice(harmony, assembly, log);
				int num6 = PatchRichText(harmony, assembly, log);
				int num7 = PatchColorNotices(harmony, assembly, log);
				StaticStrings.Fix(assembly, log);
				PatchConfigSave(harmony, log);
				WarnVersion(assembly, log);
				log.LogInfo((object)$"PeakSentinel-Chinese-1.1.6:{num}/{Table.MethodCount} 个方法、{num2} 个消息入口、{num3} 个特殊点、{num4} 个通知接入点、{num5} 个提示接入点、{num6} 个富文本接入点、{num7} 个彩色名字接入点已接入(共 {Table.EntryCount} 条文本)");
			}
		}

		private static int PatchNotice(Harmony harmony, Assembly mod, ManualLogSource log)
		{
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Expected O, but got Unknown
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Expected O, but got Unknown
			//IL_00f6: Expected O, but got Unknown
			int num = 0;
			try
			{
				Type type = mod.GetType("PeakSentinel.Reporting.SuspicionReport");
				if (type == null)
				{
					return 0;
				}
				MethodInfo methodInfo = type.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).FirstOrDefault((MethodInfo method) => method.Name == "Notice" && method.GetParameters().Length == 3);
				MethodInfo methodInfo2 = type.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).FirstOrDefault((MethodInfo method) => method.Name == "Announce" && method.GetParameters().Length == 4);
				if (methodInfo != null)
				{
					harmony.Patch((MethodBase)methodInfo, (HarmonyMethod)null, new HarmonyMethod(typeof(NoticeFeed).GetMethod("NoticePostfix", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
					num++;
				}
				if (methodInfo2 != null)
				{
					harmony.Patch((MethodBase)methodInfo2, new HarmonyMethod(typeof(NoticeFeed).GetMethod("AnnouncePrefix", BindingFlags.Static | BindingFlags.NonPublic)), new HarmonyMethod(typeof(NoticeFeed).GetMethod("AnnouncePostfix", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
					num++;
				}
			}
			catch (Exception ex)
			{
				log.LogWarning((object)("汉化包:无法让提示类消息进入游戏内通知:" + ex.Message));
			}
			return num;
		}

		private static int PatchRichText(Harmony harmony, Assembly mod, ManualLogSource log)
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Expected O, but got Unknown
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Expected O, but got Unknown
			//IL_00bd: Expected O, but got Unknown
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Expected O, but got Unknown
			//IL_012a: Expected O, but got Unknown
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Expected O, but got Unknown
			int num = 0;
			try
			{
				MethodInfo methodInfo = mod.GetType("PeakSentinel.Ui.FindingFeed")?.GetMethod("LineOf", BindingFlags.Instance | BindingFlags.NonPublic);
				if (methodInfo != null)
				{
					harmony.Patch((MethodBase)methodInfo, (HarmonyMethod)null, new HarmonyMethod(typeof(RichTextPatches).GetMethod("LineOfPostfix", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
					num++;
				}
				MethodInfo methodInfo2 = mod.GetType("PeakSentinel.Ui.PlayerListView")?.GetMethod("ShowRows", BindingFlags.Instance | BindingFlags.NonPublic);
				if (methodInfo2 != null)
				{
					harmony.Patch((MethodBase)methodInfo2, new HarmonyMethod(typeof(RichTextUi).GetMethod("PlayerListPrefix", BindingFlags.Static | BindingFlags.NonPublic)), new HarmonyMethod(typeof(RichTextUi).GetMethod("PlayerListPostfix", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
					num += 2;
				}
				MethodInfo methodInfo3 = mod.GetType("PeakSentinel.Ui.PlayerProfileView")?.GetMethod("Refresh", BindingFlags.Instance | BindingFlags.Public);
				if (methodInfo3 != null)
				{
					harmony.Patch((MethodBase)methodInfo3, new HarmonyMethod(typeof(RichTextUi).GetMethod("ProfilePrefix", BindingFlags.Static | BindingFlags.NonPublic)), new HarmonyMethod(typeof(RichTextUi).GetMethod("ProfilePostfix", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
					num += 2;
				}
				MethodInfo methodInfo4 = mod.GetType("PeakSentinel.Reporting.ReportExport")?.GetMethod("Save", BindingFlags.Instance | BindingFlags.Public);
				if (methodInfo4 != null)
				{
					harmony.Patch((MethodBase)methodInfo4, (HarmonyMethod)null, new HarmonyMethod(typeof(RichTextPatches).GetMethod("ReportPostfix", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
					num++;
				}
			}
			catch (Exception ex)
			{
				log.LogWarning((object)("汉化包:无法处理彩色名字:" + ex.Message));
			}
			return num;
		}

		private static int PatchColorNotices(Harmony harmony, Assembly mod, ManualLogSource log)
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Expected O, but got Unknown
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Expected O, but got Unknown
			int num = 0;
			try
			{
				Type? type = mod.GetType("PeakSentinel.Detection.IdentityAudit");
				MethodInfo methodInfo = type?.GetMethod("Check", BindingFlags.Instance | BindingFlags.NonPublic);
				if (methodInfo != null)
				{
					harmony.Patch((MethodBase)methodInfo, new HarmonyMethod(typeof(ColorNameNotices).GetMethod("CheckPrefix", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
					num++;
				}
				MethodInfo methodInfo2 = type?.GetMethod("CheckRename", BindingFlags.Instance | BindingFlags.NonPublic);
				MethodInfo methodInfo3 = type?.GetMethod("CheckSteamName", BindingFlags.Instance | BindingFlags.NonPublic);
				if (methodInfo2 != null)
				{
					harmony.Patch((MethodBase)methodInfo2, (HarmonyMethod)null, (HarmonyMethod)null, new HarmonyMethod(typeof(NickNameComparePatch).GetMethod("Transpiler", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null);
					num++;
				}
				if (methodInfo3 != null)
				{
					harmony.Patch((MethodBase)methodInfo3, (HarmonyMethod)null, (HarmonyMethod)null, new HarmonyMethod(typeof(NickNameComparePatch).GetMethod("Transpiler", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null);
					num++;
				}
			}
			catch (Exception ex)
			{
				log.LogWarning((object)("汉化包:无法处理彩色名字的提示记录:" + ex.Message));
			}
			return num;
		}

		private static void WarnVersion(Assembly mod, ManualLogSource log)
		{
			try
			{
				Type type = mod.GetType("PeakSentinel.SentinelPlugin");
				FieldInfo fieldInfo = ((type == null) ? null : type.GetField("Version", BindingFlags.Static | BindingFlags.Public | BindingFlags.FlattenHierarchy));
				if (fieldInfo != null && fieldInfo.IsLiteral && fieldInfo.GetRawConstantValue() is string text && text != "1.1.6")
				{
					log.LogWarning((object)("汉化包基于 Peak Sentinel 1.1.6,当前安装的是 " + text + ":未匹配的文本会保持英文"));
				}
			}
			catch (Exception)
			{
			}
		}

		private static Assembly FindMod(ManualLogSource log)
		{
			try
			{
				if (Chainloader.PluginInfos.TryGetValue("peaksentinel", out var value) && (Object)(object)value.Instance != (Object)null)
				{
					return ((object)value.Instance).GetType().Assembly;
				}
			}
			catch (Exception)
			{
			}
			Assembly? assembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault((Assembly assembly2) => assembly2.GetName().Name == "PeakSentinel");
			if (assembly == null)
			{
				log.LogError((object)"汉化:找不到 Peak Sentinel 本体,汉化包未生效(请先安装原模组)");
			}
			return assembly;
		}

		private static int PatchLiterals(Harmony harmony, Assembly mod, ManualLogSource log)
		{
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Expected O, but got Unknown
			int num = 0;
			int num2 = 0;
			HashSet<string> matched = new HashSet<string>(StringComparer.Ordinal);
			foreach (Type item in Types(mod))
			{
				foreach (MethodBase item2 in Methods(item))
				{
					if (item2.IsAbstract || item2.ContainsGenericParameters)
					{
						continue;
					}
					string text = MethodKeys.Of(item2);
					if (!Table.ByMethod.ContainsKey(text))
					{
						continue;
					}
					try
					{
						harmony.Patch(item2, (HarmonyMethod)null, (HarmonyMethod)null, new HarmonyMethod(typeof(LiteralPatch).GetMethod("Transpiler", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null);
						num++;
						matched.Add(text);
					}
					catch (Exception ex)
					{
						num2++;
						if (num2 <= 3)
						{
							log.LogWarning((object)("汉化:无法注入 " + text + ":" + ex.Message));
						}
					}
				}
			}
			List<string> list = Table.ByMethod.Keys.Where((string key) => !matched.Contains(key) && !key.EndsWith("::.cctor()", StringComparison.Ordinal)).ToList();
			if (list.Count > 0)
			{
				log.LogWarning((object)string.Format("汉化:{0} 个方法未匹配到(文本保持英文),例如:{1}", list.Count, string.Join(";", list.Take(3))));
			}
			if (num2 > 0)
			{
				log.LogWarning((object)$"汉化:{num2} 个方法注入失败,这些文本会保持英文");
			}
			return num;
		}

		private static int PatchFeed(Harmony harmony, Assembly mod, ManualLogSource log)
		{
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Expected O, but got Unknown
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Expected O, but got Unknown
			//IL_008d: Expected O, but got Unknown
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Expected O, but got Unknown
			int num = 0;
			try
			{
				Type? type = typeof(FontFallbackSwapper).Assembly.GetType("PlayerConnectionLog");
				MethodInfo methodInfo = type?.GetMethod("AddMessage", BindingFlags.Instance | BindingFlags.NonPublic);
				MethodInfo methodInfo2 = type?.GetMethod("RebuildString", BindingFlags.Instance | BindingFlags.NonPublic);
				if (methodInfo != null)
				{
					harmony.Patch((MethodBase)methodInfo, new HarmonyMethod(typeof(FeedControl).GetMethod("Prefix", BindingFlags.Static | BindingFlags.NonPublic)), new HarmonyMethod(typeof(FeedControl).GetMethod("Postfix", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
					num++;
				}
				if (methodInfo2 != null)
				{
					harmony.Patch((MethodBase)methodInfo2, (HarmonyMethod)null, new HarmonyMethod(typeof(FeedControl).GetMethod("RebuildPostfix", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
					num++;
				}
			}
			catch (Exception ex)
			{
				log.LogWarning((object)("汉化包:无法接管游戏内通知:" + ex.Message));
			}
			try
			{
				Type type2 = mod.GetType("PeakSentinel.Ui.Pages.LogPage");
				ConstructorInfo constructorInfo = ((type2 == null) ? null : type2.GetConstructors(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).FirstOrDefault(delegate(ConstructorInfo candidate)
				{
					ParameterInfo[] parameters = candidate.GetParameters();
					return parameters.Length == 2 && parameters[1].ParameterType == typeof(Transform);
				}));
				if (constructorInfo != null)
				{
					harmony.Patch((MethodBase)constructorInfo, (HarmonyMethod)null, new HarmonyMethod(typeof(LogPageUi).GetMethod("Postfix", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
					num++;
				}
			}
			catch (Exception ex2)
			{
				log.LogWarning((object)("汉化包:无法在日志页添加通知设置:" + ex2.Message));
			}
			return num;
		}

		private static int PatchActionParameters(Harmony harmony, Assembly mod, ManualLogSource log)
		{
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Expected O, but got Unknown
			MethodInfo method = typeof(Patches).GetMethod("ActionPrefix", BindingFlags.Static | BindingFlags.NonPublic);
			int num = 0;
			int num2 = 0;
			foreach (Type item in Types(mod))
			{
				foreach (MethodBase item2 in Methods(item))
				{
					if (item2.IsAbstract || item2.ContainsGenericParameters || !item2.GetParameters().Any((ParameterInfo parameter) => parameter.ParameterType == typeof(string) && parameter.Name == "action"))
					{
						continue;
					}
					try
					{
						harmony.Patch(item2, new HarmonyMethod(method), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
						num++;
					}
					catch (Exception ex)
					{
						num2++;
						if (num2 <= 3)
						{
							log.LogWarning((object)("汉化:无法接入消息入口 " + MethodKeys.Of(item2) + ":" + ex.Message));
						}
					}
				}
			}
			return num;
		}

		private static int PatchMessages(Harmony harmony, Assembly mod, ManualLogSource log)
		{
			return 0 + PatchNamed(harmony, mod, "PeakSentinel.Detection.HarmAudit", "WhereTo", "WhereToPostfix", prefix: false, log) + PatchNamed(harmony, mod, "PeakSentinel.Detection.CarryAudit", "ReasonAgainst", "ReasonAgainstPostfix", prefix: false, log) + PatchNamed(harmony, mod, "PeakSentinel.Ui.SentinelWindow", "Open", "TitlePrefix", prefix: true, log) + PatchNamed(harmony, mod, "PeakSentinel.Ui.GameFonts", "Main", "FontPostfix", prefix: false, log);
		}

		private static int PatchNamed(Harmony harmony, Assembly mod, string typeName, string methodName, string patchName, bool prefix, ManualLogSource log)
		{
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Expected O, but got Unknown
			try
			{
				Type type = mod.GetType(typeName);
				MethodInfo methodInfo = ((type == null) ? null : type.GetMethod(methodName, BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic));
				if (methodInfo == null)
				{
					log.LogWarning((object)("汉化:找不到 " + typeName + "." + methodName));
					return 0;
				}
				HarmonyMethod val = new HarmonyMethod(typeof(Patches).GetMethod(patchName, BindingFlags.Static | BindingFlags.NonPublic));
				if (prefix)
				{
					harmony.Patch((MethodBase)methodInfo, val, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
				}
				else
				{
					harmony.Patch((MethodBase)methodInfo, (HarmonyMethod)null, val, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
				}
				return 1;
			}
			catch (Exception ex)
			{
				log.LogWarning((object)("汉化:无法接入 " + typeName + "." + methodName + ":" + ex.Message));
				return 0;
			}
		}

		private static void PatchConfigSave(Harmony harmony, ManualLogSource log)
		{
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Expected O, but got Unknown
			try
			{
				MethodInfo method = typeof(ConfigFile).GetMethod("Save", Type.EmptyTypes);
				if (!(method == null))
				{
					harmony.Patch((MethodBase)method, (HarmonyMethod)null, new HarmonyMethod(typeof(Patches).GetMethod("SavePostfix", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
				}
			}
			catch (Exception ex)
			{
				log.LogWarning((object)("汉化:无法接入配置保存,cfg 说明可能保持英文:" + ex.Message));
			}
		}

		private static IEnumerable<Type> Types(Assembly assembly)
		{
			try
			{
				return assembly.GetTypes();
			}
			catch (ReflectionTypeLoadException ex)
			{
				return ex.Types.Where((Type type) => type != null);
			}
		}

		private static IEnumerable<MethodBase> Methods(Type type)
		{
			MethodInfo[] methods = type.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
			foreach (MethodInfo methodInfo in methods)
			{
				if (methodInfo.Name != ".cctor")
				{
					yield return methodInfo;
				}
			}
			ConstructorInfo[] constructors = type.GetConstructors(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
			for (int i = 0; i < constructors.Length; i++)
			{
				yield return constructors[i];
			}
		}
	}
	internal static class LogPageUi
	{
		private static Type _uiType;

		private static FieldInfo _contextField;

		private static MethodInfo _row;

		private static MethodInfo _label;

		private static MethodInfo _toggle;

		private static MethodInfo _input;

		private static MethodInfo _flexible;

		internal static void Postfix(Transform page, object __instance)
		{
			try
			{
				if (!((Object)(object)page == (Object)null) && __instance != null)
				{
					if (_contextField == null)
					{
						_contextField = __instance.GetType().GetField("_context", BindingFlags.Instance | BindingFlags.NonPublic);
					}
					object obj = ((_contextField == null) ? null : _contextField.GetValue(__instance));
					object obj2 = obj?.GetType().GetProperty("Ui")?.GetValue(obj);
					if (obj2 != null)
					{
						Build(obj2, page);
					}
				}
			}
			catch (Exception ex)
			{
				if (ChinesePlugin.Log != null)
				{
					ChinesePlugin.Log.LogWarning((object)("汉化包:无法在日志页添加通知设置:" + ex.Message));
				}
			}
		}

		private static void Build(object ui, Transform page)
		{
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: 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_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			CacheMethods(ui.GetType());
			if (_row == null || _label == null || _toggle == null || _input == null || _flexible == null)
			{
				if (ChinesePlugin.Log != null)
				{
					ChinesePlugin.Log.LogWarning((object)"汉化包:UiFactory 接口不匹配,通知设置未能添加到日志页");
				}
			}
			else
			{
				Color text = Palette("Text");
				Color notice = Palette("Notice");
				BuildMainRow(ui, page, text, notice);
				BuildCategoryRow(ui, page, text);
				Fit(page);
			}
		}

		private static void Fit(Transform page)
		{
			try
			{
				ScrollRect[] componentsInChildren = ((Component)page).GetComponentsInChildren<ScrollRect>(true);
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					LayoutElement component = ((Component)componentsInChildren[i]).GetComponent<LayoutElement>();
					if ((Object)(object)component != (Object)null)
					{
						component.minHeight = 0f;
					}
				}
				RectTransform val = (RectTransform)(object)((page is RectTransform) ? page : null);
				if (val != null)
				{
					LayoutRebuilder.ForceRebuildLayoutImmediate(val);
				}
			}
			catch (Exception)
			{
			}
		}

		private static void BuildMainRow(object ui, Transform page, Color text, Color notice)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
			RectTransform val = (RectTransform)_row.Invoke(ui, new object[2] { page, 10f });
			if ((Object)(object)val == (Object)null)
			{
				return;
			}
			((Object)((Component)val).gameObject).name = "SentinelChineseFeedOptions";
			UnityAction<bool> val2 = delegate(bool value)
			{
				ChinesePlugin.Notifications.Value = value;
				FeedControl.Refresh();
			};
			object? obj = _toggle.Invoke(ui, new object[5]
			{
				val,
				"游戏内通知",
				20f,
				ChinesePlugin.Notifications.Value,
				val2
			});
			Component val3 = (Component)((obj is Component) ? obj : null);
			if (val3 != null)
			{
				_flexible.Invoke(ui, new object[3] { val3, 1f, 0f });
			}
			_label.Invoke(ui, new object[5] { val, "上限", 20f, text, false });
			object obj2 = _input.Invoke(ui, new object[4] { val, "1-20", 20f, 100f });
			TMP_InputField limitField = (TMP_InputField)((obj2 is TMP_InputField) ? obj2 : null);
			if (limitField != null)
			{
				limitField.contentType = (ContentType)2;
				limitField.SetTextWithoutNotify(FeedControl.Max.ToString());
				((UnityEvent<string>)(object)limitField.onEndEdit).AddListener((UnityAction<string>)delegate(string value)
				{
					ApplyLimit(value, limitField);
				});
			}
			_label.Invoke(ui, new object[5] { val, "字号", 20f, text, false });
			object obj3 = _input.Invoke(ui, new object[4] { val, "默认", 20f, 90f });
			TMP_InputField sizeField = (TMP_InputField)((obj3 is TMP_InputField) ? obj3 : null);
			if (sizeField != null)
			{
				sizeField.contentType = (ContentType)2;
				sizeField.SetTextWithoutNotify((ChinesePlugin.FontSize.Value > 0) ? ChinesePlugin.FontSize.Value.ToString() : string.Empty);
				((UnityEvent<string>)(object)sizeField.onEndEdit).AddListener((UnityAction<string>)delegate(string value)
				{
					ApplyFontSize(value, sizeField);
				});
			}
			object? obj4 = _label.Invoke(ui, new object[5] { val, "(条数 / 字号,0 为默认字号)", 16f, notice, false });
			Component val4 = (Component)((obj4 is Component) ? obj4 : null);
			if (val4 != null)
			{
				_flexible.Invoke(ui, new object[3] { val4, 0f, 0f });
			}
			((Transform)val).SetSiblingIndex(1);
		}

		private static void BuildCategoryRow(object ui, Transform page, Color text)
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			RectTransform val = (RectTransform)_row.Invoke(ui, new object[2] { page, 6f });
			if (!((Object)(object)val == (Object)null))
			{
				((Object)((Component)val).gameObject).name = "SentinelChineseFeedCategories";
				_label.Invoke(ui, new object[5] { val, "显示:", 18f, text, false });
				CategoryToggle(ui, val, "作弊或已拦截", ChinesePlugin.ShowCheat);
				CategoryToggle(ui, val, "可疑,可能误判", ChinesePlugin.ShowSuspicious);
				CategoryToggle(ui, val, "已修复", ChinesePlugin.ShowFix);
				CategoryToggle(ui, val, "提示,没有问题", ChinesePlugin.ShowNotice);
				((Transform)val).SetSiblingIndex(2);
			}
		}

		private static void CategoryToggle(object ui, RectTransform row, string caption, ConfigEntry<bool> entry)
		{
			UnityAction<bool> val = delegate(bool value)
			{
				entry.Value = value;
				FeedControl.Refresh();
			};
			object? obj = _toggle.Invoke(ui, new object[5] { row, caption, 18f, entry.Value, val });
			Component val2 = (Component)((obj is Component) ? obj : null);
			if (val2 != null)
			{
				_flexible.Invoke(ui, new object[3] { val2, 1f, 0f });
			}
		}

		private static void ApplyLimit(string value, TMP_InputField field)
		{
			if (int.TryParse(value, out var result))
			{
				result = Mathf.Clamp(result, 1, 20);
				ChinesePlugin.MaxNotifications.Value = result;
				FeedControl.Refresh();
			}
			field.SetTextWithoutNotify(FeedControl.Max.ToString());
		}

		private static void ApplyFontSize(string value, TMP_InputField field)
		{
			int result;
			int num = (int.TryParse(value, out result) ? Mathf.Clamp(result, 0, 48) : 0);
			ChinesePlugin.FontSize.Value = num;
			FeedControl.Refresh();
			field.SetTextWithoutNotify((num > 0) ? num.ToString() : string.Empty);
		}

		private static void CacheMethods(Type type)
		{
			if (!(_uiType == type))
			{
				_uiType = type;
				_row = type.GetMethod("Row", new Type[2]
				{
					typeof(Transform),
					typeof(float)
				});
				_label = type.GetMethod("Label", new Type[5]
				{
					typeof(Transform),
					typeof(string),
					typeof(float),
					typeof(Color),
					typeof(bool)
				});
				_toggle = type.GetMethod("Toggle", new Type[5]
				{
					typeof(Transform),
					typeof(string),
					typeof(float),
					typeof(bool),
					typeof(UnityAction<bool>)
				});
				_input = type.GetMethod("Input", new Type[4]
				{
					typeof(Transform),
					typeof(string),
					typeof(float),
					typeof(float)
				});
				_flexible = type.GetMethod("Flexible", new Type[3]
				{
					typeof(Component),
					typeof(float),
					typeof(float)
				});
			}
		}

		private static Color Palette(string name)
		{
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			object obj = (from assembly in AppDomain.CurrentDomain.GetAssemblies()
				select assembly.GetType("PeakSentinel.Ui.UiPalette")).FirstOrDefault((Type type) => type != null)?.GetProperty(name, BindingFlags.Static | BindingFlags.Public)?.GetValue(null);
			if (obj is Color)
			{
				return (Color)obj;
			}
			return Color.white;
		}
	}
	internal static class MethodKeys
	{
		private static readonly Dictionary<MethodBase, string> Cache = new Dictionary<MethodBase, string>();

		internal static string Of(MethodBase method)
		{
			if (method == null)
			{
				return string.Empty;
			}
			if (Cache.TryGetValue(method, out var value))
			{
				return value;
			}
			ParameterInfo[] parameters = method.GetParameters();
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.Append(TypeName(method.DeclaringType)).Append("::").Append(method.Name)
				.Append('(');
			for (int i = 0; i < parameters.Length; i++)
			{
				if (i > 0)
				{
					stringBuilder.Append(',');
				}
				stringBuilder.Append(TypeName(parameters[i].ParameterType));
			}
			stringBuilder.Append(')');
			string text = stringBuilder.ToString();
			Cache[method] = text;
			return text;
		}

		private static string TypeName(Type type)
		{
			if (type.IsByRef)
			{
				return TypeName(type.GetElementType()) + "&";
			}
			if (type.IsPointer)
			{
				return TypeName(type.GetElementType()) + "*";
			}
			if (type.IsArray)
			{
				return TypeName(type.GetElementType()) + "[]";
			}
			if (type.IsGenericType && !type.IsGenericTypeDefinition)
			{
				Type genericTypeDefinition = type.GetGenericTypeDefinition();
				Type[] genericArguments = type.GetGenericArguments();
				StringBuilder stringBuilder = new StringBuilder(TypeName(genericTypeDefinition)).Append('<');
				for (int i = 0; i < genericArguments.Length; i++)
				{
					if (i > 0)
					{
						stringBuilder.Append(',');
					}
					stringBuilder.Append(TypeName(genericArguments[i]));
				}
				return stringBuilder.Append('>').ToString();
			}
			return (type.FullName ?? type.Name).Replace('+', '/');
		}
	}
	internal static class ModAccess
	{
		internal static Assembly ModAssembly;

		private static PropertyInfo _reportProperty;

		private static MethodInfo _flag;

		private static MethodInfo _notice;

		private static MethodInfo _spares;

		private static MethodInfo _name;

		private static MethodInfo _rpcMethod;

		private static object _categoryCheats;

		internal static object Report
		{
			get
			{
				if (ModAssembly == null)
				{
					return null;
				}
				if (_reportProperty == null)
				{
					_reportProperty = ModAssembly.GetType("PeakSentinel.Patches.SentinelHooks")?.GetProperty("Report", BindingFlags.Static | BindingFlags.Public);
				}
				try
				{
					return _reportProperty?.GetValue(null);
				}
				catch (Exception)
				{
					return null;
				}
			}
		}

		internal static bool Spares(Player player)
		{
			try
			{
				object report = Report;
				if (report == null)
				{
					return true;
				}
				if (_spares == null)
				{
					_spares = report.GetType().GetMethod("Spares", new Type[1] { typeof(Player) });
				}
				return _spares == null || (bool)_spares.Invoke(report, new object[1] { player });
			}
			catch (Exception)
			{
				return true;
			}
		}

		internal static void Flag(Player culprit, string action, bool blocked)
		{
			try
			{
				object report = Report;
				if (report == null || culprit == null)
				{
					return;
				}
				Type type = report.GetType();
				if (_flag == null)
				{
					Type type2 = ModAssembly.GetType("PeakSentinel.Reporting.FindingCategory");
					Type type3 = ModAssembly.GetType("PeakSentinel.Reporting.Repair");
					if (type2 == null || type3 == null)
					{
						return;
					}
					_categoryCheats = Enum.Parse(type2, "Cheats");
					_flag = type.GetMethod("Flag", new Type[5]
					{
						typeof(Player),
						type2,
						typeof(string),
						typeof(bool),
						type3
					});
				}
				_flag?.Invoke(report, new object[5] { culprit, _categoryCheats, action, blocked, null });
			}
			catch (Exception)
			{
			}
		}

		internal static void Notice(Player culprit, string action)
		{
			try
			{
				object report = Report;
				if (report == null || culprit == null)
				{
					return;
				}
				Type type = report.GetType();
				if (_notice == null)
				{
					Type type2 = ModAssembly.GetType("PeakSentinel.Reporting.FindingCategory");
					if (type2 == null)
					{
						return;
					}
					_categoryCheats = Enum.Parse(type2, "Cheats");
					_notice = type.GetMethod("Notice", new Type[3]
					{
						typeof(Player),
						type2,
						typeof(string)
					});
				}
				_notice?.Invoke(report, new object[3] { culprit, _categoryCheats, action });
			}
			catch (Exception)
			{
			}
		}

		internal static string Name(Player player)
		{
			if (player == null)
			{
				return "未知";
			}
			try
			{
				if (_name == null)
				{
					_name = (ModAssembly?.GetType("PeakSentinel.Reporting.PlayerNames"))?.GetMethod("Name", BindingFlags.Static | BindingFlags.Public, null, new Type[1] { typeof(Player) }, null);
				}
				string text = _name?.Invoke(null, new object[1] { player }) as string;
				return string.IsNullOrEmpty(text) ? player.NickName : text;
			}
			catch (Exception)
			{
				return player.NickName;
			}
		}

		internal static string PlainName(Player player)
		{
			return FeedTrim.StripTags(Name(player));
		}

		internal static string RpcMethod(Hashtable rpc)
		{
			try
			{
				if (_rpcMethod == null)
				{
					_rpcMethod = (ModAssembly?.GetType("PeakSentinel.Network.RpcRouter"))?.GetMethod("MethodOf", BindingFlags.Static | BindingFlags.Public);
				}
				return _rpcMethod?.Invoke(null, new object[1] { rpc }) as string;
			}
			catch (Exception)
			{
				return null;
			}
		}
	}
	internal static class NickNameComparePatch
	{
		private static readonly MethodInfo Strip = typeof(RichTextNames).GetMethod("StripForCompare", BindingFlags.Static | BindingFlags.NonPublic);

		internal static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
		{
			foreach (CodeInstruction instruction in instructions)
			{
				yield return instruction;
				if ((instruction.opcode == OpCodes.Callvirt || instruction.opcode == OpCodes.Call) && instruction.operand is MethodInfo { Name: "get_NickName" } methodInfo && methodInfo.DeclaringType != null && methodInfo.DeclaringType.FullName == "Photon.Realtime.Player")
				{
					yield return new CodeInstruction(OpCodes.Call, (object)Strip);
				}
			}
		}
	}
	internal static class NoticeFeed
	{
		internal const string NoticeColor = "#D8B98A";

		internal const string NoticeLead = "提示:";

		private static bool _suppress;

		private static MethodInfo _show;

		private static Type _showType;

		internal static void AnnouncePrefix()
		{
			_suppress = true;
		}

		internal static void AnnouncePostfix()
		{
			_suppress = false;
		}

		internal static void NoticePostfix(Player culprit, string action)
		{
			if (_suppress || culprit == null || string.IsNullOrEmpty(action))
			{
				return;
			}
			try
			{
				object report = ModAccess.Report;
				if (report != null)
				{
					Type type = report.GetType();
					if (_show == null || _showType != type)
					{
						_showType = type;
						_show = type.GetMethod("Show", BindingFlags.Instance | BindingFlags.NonPublic);
					}
					_show?.Invoke(report, new object[4]
					{
						ModAccess.Name(culprit),
						action,
						"#D8B98A",
						"提示:"
					});
				}
			}
			catch (Exception)
			{
			}
		}
	}
	internal static class Patches
	{
		private static FieldInfo _titleField;

		internal static void ActionPrefix(ref string action)
		{
			action = Composer.Translate(action);
			action = ItemNames.Localize(action);
			action = DynamicNames.Localize(action);
		}

		internal static void WhereToPostfix(ref string __result)
		{
			__result = Composer.WhereTo(__result);
		}

		internal static void ReasonAgainstPostfix(ref string __result)
		{
			__result = Composer.ReasonAgainst(__result);
		}

		internal static void TitlePrefix(object __instance)
		{
			if (__instance == null)
			{
				return;
			}
			try
			{
				if (_titleField == null)
				{
					_titleField = __instance.GetType().GetField("_title", BindingFlags.Instance | BindingFlags.NonPublic);
				}
				if (!(_titleField == null) && _titleField.GetValue(__instance) is string text && text.IndexOf("Peak Sentinel", StringComparison.Ordinal) >= 0)
				{
					_titleField.SetValue(__instance, text.Replace("Peak Sentinel", "PEAK 哨兵"));
				}
			}
			catch (Exception)
			{
			}
		}

		internal static void FontPostfix(TMP_FontAsset __result)
		{
			FontFallback.Ensure(__result);
		}

		internal static void SavePostfix()
		{
			ConfigComments.Localize();
		}
	}
	internal static class ReportText
	{
		private static readonly Dictionary<string, string> Kinds = new Dictionary<string, string>
		{
			{ "Cheat", "作弊" },
			{ "Suspicious", "可疑" },
			{ "Blocked", "拦截" },
			{ "Recovered", "恢复" },
			{ "Kicked", "踢出" },
			{ "Fix", "修复" },
			{ "Notice", "提示" }
		};

		private static readonly Dictionary<string, string> Categories = new Dictionary<string, string>
		{
			{ "Cheats", "作弊" },
			{ "Items", "物品" },
			{ "Other", "其他" }
		};

		private static readonly Regex Line = new Regex("^(\\[[^\\]]+\\] )(Cheat|Suspicious|Blocked|Recovered|Kicked|Fix|Notice)(\\s+)(Cheats|Items|Other)", RegexOptions.Multiline | RegexOptions.Compiled);

		internal static string Translate(string text)
		{
			if (string.IsNullOrEmpty(text))
			{
				return text;
			}
			string value;
			string value2;
			return Line.Replace(text, (Match match) => match.Groups[1].Value + (Kinds.TryGetValue(match.Groups[2].Value, out value) ? value : match.Groups[2].Value) + match.Groups[3].Value + (Categories.TryGetValue(match.Groups[4].Value, out value2) ? value2 : match.Groups[4].Value));
		}
	}
	internal static class RichTextNames
	{
		private static readonly Regex Noparse = new Regex("<noparse>(.*?)</noparse>", RegexOptions.IgnoreCase | RegexOptions.Compiled | RegexOptions.Singleline);

		private static readonly Regex Tokens = new Regex("<color=#[0-9A-Fa-f]{6,8}>|</color>|<[^<>]{1,64}>", RegexOptions.IgnoreCase | RegexOptions.Compiled);

		internal static string RestoreColors(string line)
		{
			if (string.IsNullOrEmpty(line))
			{
				return line;
			}
			try
			{
				return Noparse.Replace(line, (Match match) => Sanitize(match.Groups[1].Value));
			}
			catch (Exception)
			{
				return line;
			}
		}

		internal static string RestoreNameColors(string line)
		{
			if (string.IsNullOrEmpty(line))
			{
				return line;
			}
			try
			{
				int block = 0;
				return Noparse.Replace(line, delegate(Match match)
				{
					string value = match.Groups[1].Value;
					return (block++ == 0) ? Sanitize(value) : ("<noparse>" + FeedTrim.StripTags(value) + "</noparse>");
				});
			}
			catch (Exception)
			{
				return line;
			}
		}

		internal static string Sanitize(string text)
		{
			if (string.IsNullOrEmpty(text))
			{
				return text;
			}
			StringBuilder stringBuilder = new StringBuilder(text.Length);
			int num = 0;
			int num2 = 0;
			foreach (Match item in Tokens.Matches(text))
			{
				stringBuilder.Append(text, num, item.Index - num);
				string value = item.Value;
				if (value.StartsWith("<color=#", StringComparison.OrdinalIgnoreCase))
				{
					stringBuilder.Append(value);
					num2++;
				}
				else if (string.Equals(value, "</color>", StringComparison.OrdinalIgnoreCase) && num2 > 0)
				{
					stringBuilder.Append("</color>");
					num2--;
				}
				num = item.Index + item.Length;
			}
			stringBuilder.Append(text, num, text.Length - num);
			while (num2-- > 0)
			{
				stringBuilder.Append("</color>");
			}
			return stringBuilder.ToString();
		}

		internal static string StripForCompare(string name)
		{
			return FeedTrim.StripTags(name);
		}

		internal static bool IsColorOnly(string first, string second, bool ignoreCase)
		{
			if (string.IsNullOrEmpty(second))
			{
				return false;
			}
			string a = FeedTrim.StripTags(first);
			string b = FeedTrim.StripTags(second);
			if (!string.Equals(a, b, ignoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal))
			{
				return false;
			}
			if (!HasColorTag(first))
			{
				return HasColorTag(second);
			}
			return true;
		}

		internal static bool HasColorTag(string text)
		{
			if (!string.IsNullOrEmpty(text))
			{
				return text.IndexOf("<color=#", StringComparison.OrdinalIgnoreCase) >= 0;
			}
			return false;
		}
	}
	internal static class RichTextPatches
	{
		internal static void LineOfPostfix(ref string __result)
		{
			__result = RichTextNames.RestoreNameColors(__result);
		}

		internal static void ReportPostfix(ref string __result)
		{
			try
			{
				if (!string.IsNullOrEmpty(__result) && File.Exists(__result))
				{
					string text = File.ReadAllText(__result);
					string text2 = ReportText.Translate(FeedTrim.StripTags(text));
					if (text2 != text)
					{
						File.WriteAllText(__result, text2, new UTF8Encoding(encoderShouldEmitUTF8Identifier: false));
					}
				}
			}
			catch (Exception)
			{
			}
		}
	}
	internal static class RichTextUi
	{
		internal static void PlayerListPrefix(object __instance)
		{
			ForEachName(__instance, richText: true);
		}

		internal static void PlayerListPostfix(object __instance)
		{
			ForEachName(__instance, richText: false);
		}

		internal static void ProfilePrefix(object __instance)
		{
			Name(__instance, richText: true);
		}

		internal static void ProfilePostfix(object __instance)
		{
			Name(__instance, richText: false);
		}

		private static void ForEachName(object instance, bool richText)
		{
			try
			{
				if (!((instance?.GetType().GetField("_rowViews", BindingFlags.Instance | BindingFlags.NonPublic))?.GetValue(instance) is IDictionary dictionary))
				{
					return;
				}
				foreach (object value in dictionary.Values)
				{
					object? obj = (value?.GetType().GetProperty("Name", BindingFlags.Instance | BindingFlags.Public))?.GetValue(value);
					TMP_Text val = (TMP_Text)((obj is TMP_Text) ? obj : null);
					if (val != null)
					{
						Apply(val, richText);
					}
				}
			}
			catch (Exception)
			{
			}
		}

		private static void Name(object instance, bool richText)
		{
			try
			{
				object? obj = (instance?.GetType().GetField("_name", BindingFlags.Instance | BindingFlags.NonPublic))?.GetValue(instance);
				TMP_Text val = (TMP_Text)((obj is TMP_Text) ? obj : null);
				if (val != null)
				{
					Apply(val, richText);
				}
			}
			catch (Exception)
			{
			}
		}

		private static void Apply(TMP_Text label, bool richText)
		{
			if (richText)
			{
				label.richText = true;
				return;
			}
			string text = label.text;
			if (!string.IsNullOrEmpty(text))
			{
				string text2 = RichTextNames.Sanitize(text);
				if (text2 != text)
				{
					label.text = text2;
				}
			}
		}
	}
	internal static class StaticStrings
	{
		internal static void Fix(Assembly mod, ManualLogSource log)
		{
			FixArray(mod, "PeakSentinel.Ui.SentinelWindow", "Tabs", log);
			FixArray(mod, "PeakSentinel.Speedrun.MushroomTable", "EffectNames", log);
			FixDictionaryValues(mod, "PeakSentinel.Detection.ControlAudit", "Actions", log);
			FixTupleArray(mod, "PeakSentinel.Detection.CheatModScan", "Markers", log);
			FixTupleArray(mod, "PeakSentinel.Detection.CheatModScan", "ConsoleMarkers", log);
		}

		private static void FixArray(Assembly mod, string typeName, string fieldName, ManualLogSource log)
		{
			try
			{
				Type type = mod.GetType(typeName);
				FieldInfo fieldInfo = ((type == null) ? null : type.GetField(fieldName, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic));
				if (fieldInfo == null || !(fieldInfo.GetValue(null) is string[] array) || !Table.OriginalsByMethod.TryGetValue(typeName + "::.cctor()", out var value))
				{
					return;
				}
				for (int i = 0; i < array.Length; i++)
				{
					if (value.TryGetValue(array[i], out var value2))
					{
						array[i] = value2;
					}
				}
			}
			catch (Exception ex)
			{
				if (log != null)
				{
					log.LogWarning((object)("汉化:无法修正静态文本 " + typeName + "." + fieldName + ":" + ex.Message));
				}
			}
		}

		private static void FixDictionaryValues(Assembly mod, string typeName, string fieldName, ManualLogSource log)
		{
			try
			{
				Type type = mod.GetType(typeName);
				FieldInfo fieldInfo = ((type == null) ? null : type.GetField(fieldName, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic));
				if (fieldInfo == null || !(fieldInfo.GetValue(null) is IDictionary dictionary) || !Table.OriginalsByMethod.TryGetValue(typeName + "::.cctor()", out var value))
				{
					return;
				}
				object[] array = new object[dictionary.Count];
				dictionary.Keys.CopyTo(array, 0);
				object[] array2 = array;
				foreach (object key in array2)
				{
					if (dictionary[key] is string text && value.TryGetValue(text, out var value2) && value2 != text)
					{
						dictionary[key] = value2;
					}
				}
			}
			catch (Exception ex)
			{
				if (log != null)
				{
					log.LogWarning((object)("汉化:无法修正静态文本 " + typeName + "." + fieldName + ":" + ex.Message));
				}
			}
		}

		private static void FixTupleArray(Assembly mod, string typeName, string fieldName, ManualLogSource log)
		{
			try
			{
				Type type = mod.GetType(typeName);
				FieldInfo fieldInfo = ((type == null) ? null : type.GetField(fieldName, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic));
				if (fieldInfo == null || !(fieldInfo.GetValue(null) is Array { Rank: 1 } array))
				{
					return;
				}
				Type elementType = array.GetType().GetElementType();
				FieldInfo fieldInfo2 = ((elementType == null) ? null : elementType.GetField("Item1"));
				FieldInfo fieldInfo3 = ((elementType == null) ? null : elementType.GetField("Item2"));
				if (fieldInfo2 == null || fieldInfo3 == null || fieldInfo2.FieldType != typeof(string) || fieldInfo3.FieldType != typeof(string) || !Table.OriginalsByMethod.TryGetValue(typeName + "::.cctor()", out var value))
				{
					return;
				}
				for (int i = 0; i < array.Length; i++)
				{
					object value2 = array.GetValue(i);
					if (fieldInfo3.GetValue(value2) is string text && value.TryGetValue(text, out var value3) && value3 != text)
					{
						array.SetValue(Activator.CreateInstance(elementType, fieldInfo2.GetValue(value2), value3), i);
					}
				}
			}
			catch (Exception ex)
			{
				if (log != null)
				{
					log.LogWarning((object)("汉化:无法修正静态文本 " + typeName + "." + fieldName + ":" + ex.Message));
				}
			}
		}
	}
	internal readonly struct Entry
	{
		internal readonly string Original;

		internal readonly string Replacement;

		internal Entry(string original, string replacement)
		{
			Original = original;
			Replacement = replacement;
		}
	}
	internal static class Table
	{
		internal static readonly Dictionary<string, Dictionary<int, Entry>> ByMethod = Build();

		internal static readonly Dictionary<string, Dictionary<string, string>> OriginalsByMethod = BuildOriginals();

		internal static int MethodCount => ByMethod.Count;

		internal static int EntryCount => TranslationTable.Keys.Length;

		private static Dictionary<string, Dictionary<int, Entry>> Build()
		{
			Dictionary<string, Dictionary<int, Entry>> dictionary = new Dictionary<string, Dictionary<int, Entry>>(StringComparer.Ordinal);
			for (int i = 0; i < TranslationTable.Keys.Length; i++)
			{
				string key = TranslationTable.Keys[i];
				if (!dictionary.TryGetValue(key, out var value))
				{
					value = new Dictionary<int, Entry>();
					dictionary.Add(key, value);
				}
				value[TranslationTable.Indexes[i]] = new Entry(TranslationTable.Originals[i], TranslationTable.Replacements[i]);
			}
			return dictionary;
		}

		private static Dictionary<string, Dictionary<string, string>> BuildOriginals()
		{
			Dictionary<string, Dictionary<string, string>> dictionary = new Dictionary<string, Dictionary<string, string>>(StringComparer.Ordinal);
			foreach (KeyValuePair<string, Dictionary<int, Entry>> item in ByMethod)
			{
				Dictionary<string, string> dictionary2 = new Dictionary<string, string>(StringComparer.Ordinal);
				foreach (Entry value in item.Value.Values)
				{
					if (!dictionary2.ContainsKey(value.Original))
					{
						dictionary2.Add(value.Original, value.Replacement);
					}
				}
				dictionary.Add(item.Key, dictionary2);
			}
			return dictionary;
		}
	}
	internal static class TranslationTable
	{
		internal static readonly string[] Keys = new string[737]
		{
			"PeakSentinel.SentinelPlugin::OpenWindow(UnityEngine.GameObject,PeakSentinel.Settings.SentinelSettings,PeakSentinel.Ui.WindowServices)", "PeakSentinel.Ui.FeedOptions::.ctor(PeakSentinel.Ui.UiFactory,UnityEngine.Transform,PeakSentinel.Ui.FeedFilter,PeakSentinel.Reporting.FindingLog,UnityEngine.Events.UnityAction)", "PeakSentinel.Ui.FeedOptions::.ctor(PeakSentinel.Ui.UiFactory,UnityEngine.Transform,PeakSentinel.Ui.FeedFilter,PeakSentinel.Reporting.FindingLog,UnityEngine.Events.UnityAction)", "PeakSentinel.Ui.FeedOptions::.ctor(PeakSentinel.Ui.UiFactory,UnityEngine.Transform,PeakSentinel.Ui.FeedFilter,PeakSentinel.Reporting.FindingLog,UnityEngine.Events.UnityAction)", "PeakSentinel.Ui.FeedOptions::.ctor(PeakSentinel.Ui.UiFactory,UnityEngine.Transform,PeakSentinel.Ui.FeedFilter,PeakSentinel.Reporting.FindingLog,UnityEngine.Events.UnityAction)", "PeakSentinel.Ui.FindingFeed::Rebuild(PeakSentinel.Reporting.FindingLog,System.Boolean,System.String)", "PeakSentinel.Ui.FindingFeed::Rebuild(PeakSentinel.Reporting.FindingLog,System.Boolean,System.String)", "PeakSentinel.Ui.FindingFeed::AddFixRow(System.String,PeakSentinel.Reporting.FindingLog/Finding)", "PeakSentinel.Ui.FindingFeed::AddFixRow(System.String,PeakSentinel.Reporting.FindingLog/Finding)", "PeakSentinel.Ui.FindingFeed::AddFixRow(System.String,PeakSentinel.Reporting.FindingLog/Finding)",
			"PeakSentinel.Ui.FindingFeed::LineOf(PeakSentinel.Reporting.FindingLog/Finding)", "PeakSentinel.Ui.FindingFeed::LineOf(PeakSentinel.Reporting.FindingLog/Finding)", "PeakSentinel.Ui.HotkeyButton::StartListening()", "PeakSentinel.Ui.HotkeyButton::ShowKey()", "PeakSentinel.Ui.HotkeyButton::ShowKey()", "PeakSentinel.Ui.LuckText::OneIn(System.Double)", "PeakSentinel.Ui.LuckText::OneIn(System.Double)", "PeakSentinel.Ui.LuckText::OneIn(System.Double)", "PeakSentinel.Ui.LuckText::OneIn(System.Double)", "PeakSentinel.Ui.LuckText::OneIn(System.Double)",
			"PeakSentinel.Ui.PlayerActions::MuteLabelOf(Photon.Realtime.Player)", "PeakSentinel.Ui.PlayerActions::MuteLabelOf(Photon.Realtime.Player)", "PeakSentinel.Ui.PlayerActions::KickLabelOf(System.Int32)", "PeakSentinel.Ui.PlayerActions::KickLabelOf(System.Int32)", "PeakSentinel.Ui.PlayerActions::BanLabelOf(System.Int32)", "PeakSentinel.Ui.PlayerActions::BanLabelOf(System.Int32)", "PeakSentinel.Ui.PlayerActions::BringLabelOf(System.Int32)", "PeakSentinel.Ui.PlayerActions::BringLabelOf(System.Int32)", "PeakSentinel.Ui.PlayerActions::SwitchMute(Photon.Realtime.Player)", "PeakSentinel.Ui.PlayerActions::SwitchMute(Photon.Realtime.Player)",
			"PeakSentinel.Ui.PlayerActions::SwitchMute(Photon.Realtime.Player)", "PeakSentinel.Ui.PlayerActions::Trust(Photon.Realtime.Player)", "PeakSentinel.Ui.PlayerActions::Distrust(Photon.Realtime.Player)", "PeakSentinel.Ui.PlayerActions::Kick(Photon.Realtime.Player)", "PeakSentinel.Ui.PlayerListView::.ctor(PeakSentinel.Ui.UiFactory,UnityEngine.Transform,PeakSentinel.Ui.FeedFilter,PeakSentinel.Ui.WindowServices,PeakSentinel.Ui.AvatarCache,System.Action`1<PeakSentinel.Reporting.FindingLog/Finding>)", "PeakSentinel.Ui.PlayerListView::RefreshList()", "PeakSentinel.Ui.PlayerListView::ShowRows()", "PeakSentinel.Ui.PlayerListView::ShowRows()", "PeakSentinel.Ui.PlayerListView::ShowRows()", "PeakSentinel.Ui.PlayerListView::ShowRows()",
			"PeakSentinel.Ui.PlayerListView::ShowRows()", "PeakSentinel.Ui.PlayerListView::ShowRows()", "PeakSentinel.Ui.PlayerListView::ShowRows()", "PeakSentinel.Ui.PlayerListView::AddButtons(UnityEngine.Transform,Photon.Realtime.Player)", "PeakSentinel.Ui.PlayerListView::AddButtons(UnityEngine.Transform,Photon.Realtime.Player)", "PeakSentinel.Ui.PlayerLooks::LifeOf(Photon.Realtime.Player)", "PeakSentinel.Ui.PlayerLooks::LifeOf(Photon.Realtime.Player)", "PeakSentinel.Ui.PlayerLooks::LifeOf(Photon.Realtime.Player)", "PeakSentinel.Ui.PlayerLooks::LifeOf(Photon.Realtime.Player)", "PeakSentinel.Ui.PlayerProfileView::.ctor(PeakSentinel.Ui.UiFactory,UnityEngine.Transform,PeakSentinel.Reporting.FindingLog,PeakSentinel.Ui.FeedFilter,PeakSentinel.Ui.PlayerActions,PeakSentinel.Ui.PlayerLooks,PeakSentinel.Ui.VoiceLevels,System.Action`1<PeakSentinel.Reporting.FindingLog/Finding>,System.Action)",
			"PeakSentinel.Ui.PlayerProfileView::.ctor(PeakSentinel.Ui.UiFactory,UnityEngine.Transform,PeakSentinel.Reporting.FindingLog,PeakSentinel.Ui.FeedFilter,PeakSentinel.Ui.PlayerActions,PeakSentinel.Ui.PlayerLooks,PeakSentinel.Ui.VoiceLevels,System.Action`1<PeakSentinel.Reporting.FindingLog/Finding>,System.Action)", "PeakSentinel.Ui.PlayerProfileView::.ctor(PeakSentinel.Ui.UiFactory,UnityEngine.Transform,PeakSentinel.Reporting.FindingLog,PeakSentinel.Ui.FeedFilter,PeakSentinel.Ui.PlayerActions,PeakSentinel.Ui.PlayerLooks,PeakSentinel.Ui.VoiceLevels,System.Action`1<PeakSentinel.Reporting.FindingLog/Finding>,System.Action)", "PeakSentinel.Ui.PlayerProfileView::Refresh()", "PeakSentinel.Ui.PlayerProfileView::Refresh()", "PeakSentinel.Ui.PlayerProfileView::Refresh()", "PeakSentinel.Ui.ScopeHint::Text(System.String,System.Func`2<System.Boolean,PeakSentinel.Ui.HintScope>)", "PeakSentinel.Ui.ScopeHint::Text(System.String,System.Func`2<System.Boolean,PeakSentinel.Ui.HintScope>)", "PeakSentinel.Ui.ScopeHint::Chip(PeakSentinel.Ui.HintScope)", "PeakSentinel.Ui.ScopeHint::Chip(PeakSentinel.Ui.HintScope)", "PeakSentinel.Ui.ScopeHint::Chip(PeakSentinel.Ui.HintScope)",
			"PeakSentinel.Ui.ScopeHint::Chip(PeakSentinel.Ui.HintScope)", "PeakSentinel.Ui.ScopeHint::Chip(PeakSentinel.Ui.HintScope)", "PeakSentinel.Ui.SentinelWindow::ShowLobby()", "PeakSentinel.Ui.SentinelWindow::ShowLobby()", "PeakSentinel.Ui.SentinelWindow::ShowLobby()", "PeakSentinel.Ui.SentinelWindow::ShowLobby()", "PeakSentinel.Ui.SentinelWindow::ShowLobby()", "PeakSentinel.Ui.SentinelWindow::.cctor()", "PeakSentinel.Ui.SentinelWindow::.cctor()", "PeakSentinel.Ui.SentinelWindow::.cctor()",
			"PeakSentinel.Ui.SentinelWindow::.cctor()", "PeakSentinel.Ui.SentinelWindow::.cctor()", "PeakSentinel.Ui.SentinelWindow::.cctor()", "PeakSentinel.Ui.SentinelWindow::.cctor()", "PeakSentinel.Ui.SettingsBinder::HostNote(UnityEngine.Transform)", "PeakSentinel.Ui.SpeedrunOverlay::Show(System.Boolean,System.Boolean,System.Boolean)", "PeakSentinel.Ui.SpeedrunOverlay::Show(System.Boolean,System.Boolean,System.Boolean)", "PeakSentinel.Ui.SpeedrunOverlay::Show(System.Boolean,System.Boolean,System.Boolean)", "PeakSentinel.Ui.SpeedrunOverlay::Show(System.Boolean,System.Boolean,System.Boolean)", "PeakSentinel.Ui.SpeedrunOverlay::Show(System.Boolean,System.Boolean,System.Boolean)",
			"PeakSentinel.Ui.SpeedrunOverlay::Show(System.Boolean,System.Boolean,System.Boolean)", "PeakSentinel.Ui.SpeedrunOverlay::Part(System.String,PeakSentinel.Speedrun.LootTally)", "PeakSentinel.Ui.Pages.BansPage::.ctor(PeakSentinel.Ui.UiFactory,UnityEngine.Transform,PeakSentinel.Protection.BanList,PeakSentinel.Reporting.SuspicionReport)", "PeakSentinel.Ui.Pages.BansPage::.ctor(PeakSentinel.Ui.UiFactory,UnityEngine.Transform,PeakSentinel.Protection.BanList,PeakSentinel.Reporting.SuspicionReport)", "PeakSentinel.Ui.Pages.BansPage::Refresh()", "PeakSentinel.Ui.Pages.BansPage::Refresh()", "PeakSentinel.Ui.Pages.BansPage::Refresh()", "PeakSentinel.Ui.Pages.BansPage::AddRow(PeakSentinel.Protection.BanEntry)", "PeakSentinel.Ui.Pages.BansPage::AddRow(PeakSentinel.Protection.BanEntry)", "PeakSentinel.Ui.Pages.BansPage::AddRow(PeakSentinel.Protection.BanEntry)",
			"PeakSentinel.Ui.Pages.BansPage::CopyList()", "PeakSentinel.Ui.Pages.BansPage::AddFromClipboard()", "PeakSentinel.Ui.Pages.BansPage::Unban(System.String)", "PeakSentinel.Ui.Pages.BansPage::Unban(System.String)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)",
			"PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)",
			"PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)",
			"PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)",
			"PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.CheatsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.DetectionSettings)", "PeakSentinel.Ui.Pages.ItemsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.ProtectionSettings)",
			"PeakSentinel.Ui.Pages.ItemsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.ProtectionSettings)", "PeakSentinel.Ui.Pages.ItemsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.ProtectionSettings)", "PeakSentinel.Ui.Pages.ItemsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.ProtectionSettings)", "PeakSentinel.Ui.Pages.ItemsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.ProtectionSettings)", "PeakSentinel.Ui.Pages.ItemsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.ProtectionSettings)", "PeakSentinel.Ui.Pages.ItemsPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.ProtectionSettings)", "PeakSentinel.Ui.Pages.LogPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform)", "PeakSentinel.Ui.Pages.LogPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform)", "PeakSentinel.Ui.Pages.LogPage::Refresh()", "PeakSentinel.Ui.Pages.LogPage::AddLegend(PeakSentinel.Ui.UiFactory,UnityEngine.Transform)",
			"PeakSentinel.Ui.Pages.LogPage::AddLegend(PeakSentinel.Ui.UiFactory,UnityEngine.Transform)", "PeakSentinel.Ui.Pages.LogPage::AddLegend(PeakSentinel.Ui.UiFactory,UnityEngine.Transform)", "PeakSentinel.Ui.Pages.LogPage::AddLegend(PeakSentinel.Ui.UiFactory,UnityEngine.Transform)", "PeakSentinel.Ui.Pages.LogPage::Export()", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)",
			"PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)",
			"PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.OtherPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Settings.OtherSettings)", "PeakSentinel.Ui.Pages.SpeedrunPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Ui.WindowServices,PeakSentinel.Settings.SpeedrunSettings)", "PeakSentinel.Ui.Pages.SpeedrunPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Ui.WindowServices,PeakSentinel.Settings.SpeedrunSettings)", "PeakSentinel.Ui.Pages.SpeedrunPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Ui.WindowServices,PeakSentinel.Settings.SpeedrunSettings)", "PeakSentinel.Ui.Pages.SpeedrunPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Ui.WindowServices,PeakSentinel.Settings.SpeedrunSettings)", "PeakSentinel.Ui.Pages.SpeedrunPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Ui.WindowServices,PeakSentinel.Settings.SpeedrunSettings)", "PeakSentinel.Ui.Pages.SpeedrunPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Ui.WindowServices,PeakSentinel.Settings.SpeedrunSettings)",
			"PeakSentinel.Ui.Pages.SpeedrunPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Ui.WindowServices,PeakSentinel.Settings.SpeedrunSettings)", "PeakSentinel.Ui.Pages.SpeedrunPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Ui.WindowServices,PeakSentinel.Settings.SpeedrunSettings)", "PeakSentinel.Ui.Pages.SpeedrunPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Ui.WindowServices,PeakSentinel.Settings.SpeedrunSettings)", "PeakSentinel.Ui.Pages.SpeedrunPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Ui.WindowServices,PeakSentinel.Settings.SpeedrunSettings)", "PeakSentinel.Ui.Pages.SpeedrunPage::.ctor(PeakSentinel.Ui.Pages.PageContext,UnityEngine.Transform,PeakSentinel.Ui.WindowServices,PeakSentinel.Settings.SpeedrunSettings)", "PeakSentinel.Ui.Pages.SpeedrunPage::Refresh()", "PeakSentinel.Ui.Pages.SpeedrunPage::Refresh()", "PeakSentinel.Ui.Pages.SpeedrunPage::Refresh()", "PeakSentinel.Ui.Pages.SpeedrunPage::Refresh()", "PeakSentinel.Ui.Pages.SpeedrunPage::Refresh()",
			"PeakSentinel.Ui.Pages.SpeedrunPage::Refresh()", "PeakSentinel.Ui.Pages.SpeedrunPage::Refresh()", "PeakSentinel.Ui.Pages.SpeedrunPage::ShowLuck(TMPro.TextMeshProUGUI,System.String,System.Collections.Generic.IReadOnlyList`1<PeakSentinel.Speedrun.LootDraw>)", "PeakSentinel.Ui.Pages.SpeedrunPage::AlertList()", "PeakSentinel.Ui.Pages.SpeedrunPage::AlertList()", "PeakSentinel.Ui.Pages.SpeedrunPage::MapList()", "PeakSentinel.Ui.Pages.SpeedrunPage::MapList()", "PeakSentinel.Ui.Pages.SpeedrunPage::IntegrityList()", "PeakSentinel.Ui.Pages.SpeedrunPage::IntegrityList()", "PeakSentinel.Ui.Pages.SpeedrunPage::IntegrityList()",
			"PeakSentinel.Ui.Pages.SpeedrunPage::IntegrityList()", "PeakSentinel.Ui.Pages.SpeedrunPage::IntegrityList()", "PeakSentinel.Ui.Pages.SpeedrunPage::IntegrityList()", "PeakSentinel.Ui.Pages.SpeedrunPage::IntegrityList()", "PeakSentinel.Ui.Pages.SpeedrunPage::MushroomList()", "PeakSentinel.Ui.Pages.SpeedrunPage::MushroomList()", "PeakSentinel.Ui.Pages.SpeedrunPage::MushroomList()", "PeakSentinel.Ui.Pages.SpeedrunPage::MapItemsLine()", "PeakSentinel.Ui.Pages.SpeedrunPage::MapItemsLine()", "PeakSentinel.Ui.Pages.SpeedrunPage::ItemsList(PeakSentinel.Speedrun.LuckReport)",
			"PeakSentinel.Ui.Pages.SpeedrunPage::ItemsList(PeakSentinel.Speedrun.LuckReport)", "PeakSentinel.Ui.Pages.SpeedrunPage::DrawsList(System.Collections.Generic.IReadOnlyList`1<PeakSentinel.Speedrun.LootDraw>)", "PeakSentinel.Ui.Pages.SpeedrunPage::DrawsList(System.Collections.Generic.IReadOnlyList`1<PeakSentinel.Speedrun.LootDraw>)", "PeakSentinel.Ui.Pages.SpeedrunPage::Export()", "PeakSentinel.Ui.Pages.SpeedrunPage::Export()", "PeakSentinel.Speedrun.ConstantsWatch::Check()", "PeakSentinel.Speedrun.FallWatch::Settle(Character)", "PeakSentinel.Speedrun.MushroomTable::Refresh()", "PeakSentinel.Speedrun.MushroomTable::.cctor()", "PeakSentinel.Speedrun.MushroomTable::.cctor()",
			"PeakSentinel.Speedrun.MushroomTable::.cctor()", "PeakSentinel.Speedrun.MushroomTable::.cctor()", "PeakSentinel.Speedrun.MushroomTable::.cctor()", "PeakSentinel.Speedrun.MushroomTable::.cctor()", "PeakSentinel.Speedrun.MushroomTable::.cctor()", "PeakSentinel.Speedrun.MushroomTable::.cctor()", "PeakSentinel.Speedrun.MushroomTable::.cctor()", "PeakSentinel.Speedrun.MushroomTable::.cctor()", "PeakSentinel.Speedrun.RunJournal::StartAttempt(System.String)", "PeakSentinel.Speedrun.RunReport::Write(System.String,System.String,PeakSentinel.Speedrun.SpeedrunMonitor,PeakSentinel.Speedrun.LootLedger,PeakSentinel.Reporting.FindingLog,System.Boolean,PeakSentinel.Speedrun.RunCategory)",
			"PeakSentinel.Speedrun.RunReport::Write(System.String,System.String,PeakSentinel.Speedrun.SpeedrunMonitor,PeakSentinel.Speedrun.LootLedger,PeakSentinel.Reporting.FindingLog,System.Boolean,PeakSentinel.Speedrun.RunCategory)", "PeakSentinel.Speedrun.RunReport::Write(System.String,System.String,PeakSentinel.Speedrun.SpeedrunMonitor,PeakSentinel.Speedrun.LootLedger,PeakSentinel.Reporting.FindingLog,System.Boolean,PeakSentinel.Speedrun.RunCategory)", "PeakSentinel.Speedrun.RunReport::Write(System.String,System.String,PeakSentinel.Speedrun.SpeedrunMonitor,PeakSentinel.Speedrun.LootLedger,PeakSentinel.Reporting.FindingLog,System.Boolean,PeakSentinel.Speedrun.RunCategory)", "PeakSentinel.Speedrun.RunReport::Write(System.String,System.String,PeakSentinel.Speedrun.SpeedrunMonitor,PeakSentinel.Speedrun.LootLedger,PeakSentinel.Reporting.FindingLog,System.Boolean,PeakSentinel.Speedrun.RunCategory)", "PeakSentinel.Speedrun.RunReport::Write(System.String,System.String,PeakSentinel.Speedrun.SpeedrunMonitor,PeakSentinel.Speedrun.LootLedger,PeakSentinel.Reporting.FindingLog,System.Boolean,PeakSentinel.Speedrun.RunCategory)", "PeakSentinel.Speedrun.RunReport::Write(System.String,System.String,PeakSentinel.Speedrun.SpeedrunMonitor,PeakSentinel.Speedrun.LootLedger,PeakSentinel.Reporting.FindingLog,System.Boolean,PeakSentinel.Speedrun.RunCategory)", "PeakSentinel.Speedrun.RunReport::Write(System.String,System.String,PeakSentinel.Speedrun.SpeedrunMonitor,PeakSentinel.Speedrun.LootLedger,PeakSentinel.Reporting.FindingLog,System.Boolean,PeakSentinel.Speedrun.RunCategory)", "PeakSentinel.Speedrun.RunReport::AppendMap(PeakSentinel.Speedrun.SpeedrunMonitor)", "PeakSentinel.Speedrun.RunReport::AppendMap(PeakSentinel.Speedrun.SpeedrunMonitor)", "PeakSentinel.Speedrun.RunReport::AppendMap(PeakSentinel.Speedrun.SpeedrunMonitor)",
			"PeakSentinel.Speedrun.RunReport::AppendMap(PeakSentinel.Speedrun.SpeedrunMonitor)", "PeakSentinel.Speedrun.RunReport::AppendIntegrity(PeakSentinel.Speedrun.SpeedrunMonitor,System.Boolean)", "PeakSentinel.Speedrun.RunReport::AppendIntegrity(PeakSentinel.Speedrun.SpeedrunMonitor,System.Boolean)", "PeakSentinel.Speedrun.RunReport::AppendIntegrity(PeakSentinel.Speedrun.SpeedrunMonitor,System.Boolean)", "PeakSentinel.Speedrun.RunReport::AppendIntegrity(PeakSentinel.Speedrun.SpeedrunMonitor,System.Boolean)", "PeakSentinel.Speedrun.RunReport::AppendIntegrity(PeakSentinel.Speedrun.SpeedrunMonitor,System.Boolean)", "PeakSentinel.Speedrun.RunReport::AppendIntegrity(PeakSentinel.Speedrun.SpeedrunMonitor,System.Boolean)", "PeakSentinel.Speedrun.RunReport::AppendIntegrity(PeakSentinel.Speedrun.SpeedrunMonitor,System.Boolean)", "PeakSentinel.Speedrun.RunReport::AppendIntegrity(PeakSentinel.Speedrun.SpeedrunMonitor,System.Boolean)", "PeakSentinel.Speedrun.RunReport::AppendFindings(PeakSentinel.Reporting.FindingLog,System.DateTime)",
			"PeakSentinel.Speedrun.RunReport::AppendFindings(PeakSentinel.Reporting.FindingLog,System.DateTime)", "PeakSentinel.Speedrun.RunReport::AppendMushrooms(PeakSentinel.Speedrun.MushroomTable)", "PeakSentinel.Speedrun.RunReport::AppendMushrooms(PeakSentinel.Speedrun.MushroomTable)", "PeakSentinel.Speedrun.RunReport::AppendMushrooms(PeakSentinel.Speedrun.MushroomTable)", "PeakSentinel.Speedrun.RunReport::AppendMushrooms(PeakSentinel.Speedrun.MushroomTable)", "PeakSentinel.Speedrun.RunReport::AppendLuck(PeakSentinel.Speedrun.LootLedger)", "PeakSentinel.Speedrun.RunReport::AppendLuck(PeakSentinel.Speedrun.LootLedger)", "PeakSentinel.Speedrun.RunReport::AppendLuck(PeakSentinel.Speedrun.LootLedger)", "PeakSentinel.Speedrun.RunReport::AppendLuck(PeakSentinel.Speedrun.LootLedger)", "PeakSentinel.Speedrun.RunReport::AppendLuck(PeakSentinel.Speedrun.LootLedger)",
			"PeakSentinel.Speedrun.RunReport::AppendLuck(PeakSentinel.Speedrun.LootLedger)", "PeakSentinel.Speedrun.RunReport::AppendTally(System.String,System.Collections.Generic.IReadOnlyList`1<PeakSentinel.Speedrun.LootDraw>,PeakSentinel.Speedrun.LootLedger)", "PeakSentinel.Speedrun.RunReport::AppendTally(System.String,System.Collections.Generic.IReadOnlyList`1<PeakSentinel.Speedrun.LootDraw>,PeakSentinel.Speedrun.LootLedger)", "PeakSentinel.Speedrun.RunReport::AppendTally(System.String,System.Collections.Generic.IReadOnlyList`1<PeakSentinel.Speedrun.LootDraw>,PeakSentinel.Speedrun.LootLedger)", "PeakSentinel.Speedrun.RunReport::AppendTally(System.String,System.Collections.Generic.IReadOnlyList`1<PeakSentinel.Speedrun.LootDraw>,PeakSentinel.Speedrun.LootLedger)", "PeakSentinel.Speedrun.RunRules::HintOf(PeakSentinel.Speedrun.RunCategory)", "PeakSentinel.Speedrun.RunRules::HintOf(PeakSentinel.Speedrun.RunCategory)", "PeakSentinel.Speedrun.RunRules::HintOf(PeakSentinel.Speedrun.RunCategory)", "PeakSentinel.Speedrun.SpeedrunMonitor::Update()", "PeakSentinel.Speedrun.SpeedrunMonitor::PassportLine()",
			"PeakSentinel.Speedrun.SpeedrunMonitor::PassportLine()", "PeakSentinel.Speedrun.SpeedrunMonitor::CheckIntegrity()", "PeakSentinel.Speedrun.SpeedrunMonitor::CheckIntegrity()", "PeakSentinel.Speedrun.SpeedrunMonitor::CheckIntegrity()", "PeakSentinel.Speedrun.SpeedrunMonit