BepInEx/plugins/Piggy-LCKR/LCKR.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using BepInEx;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using LCKR.Patches;
using Microsoft.CodeAnalysis;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using UnityEngine.Video;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("RadiationIsCool")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RadiationIsCool")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8ee335db-0cbe-470c-8fbc-69263f01b35a")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
public static class Const
{
	public const int ImageDiv = 16;

	public const int ImageCompareSize = 64;
}
namespace LCKorean.Patches
{
	[HarmonyPatch(typeof(ShipTeleporter))]
	internal class ShipTeleporterPatch
	{
	}
	[HarmonyPatch(typeof(ShipBuildModeManager))]
	internal class ShipBuildModeManagerPatch
	{
		[HarmonyPostfix]
		[HarmonyPatch("CreateGhostObjectAndHighlight")]
		private static void CreateGhostObjectAndHighlight_Postfix()
		{
			string text = ((TMP_Text)HUDManager.Instance.buildModeControlTip).text.Replace("Confirm", "배치");
			text = text.Replace("Rotate", "회전");
			text = text.Replace("Store", "보관");
			((TMP_Text)HUDManager.Instance.buildModeControlTip).text = text;
		}
	}
	[HarmonyPatch(typeof(UnlockableSuit))]
	internal class UnlockableSuitPatch
	{
	}
	[HarmonyPatch(typeof(TMP_Dropdown))]
	internal class TMP_DropdownPatch
	{
		[HarmonyPostfix]
		[HarmonyPatch("Awake")]
		private static void Awake_Postfix(TMP_Dropdown __instance)
		{
			if (__instance.options[0].text == "Sort: near")
			{
				__instance.options[0].text = "정렬: 가까운 서버";
				__instance.options[1].text = "정렬: 먼 서버";
				__instance.options[2].text = "정렬: 전 세계";
			}
			else if (__instance.options[0].text == "Use monitor (V-Sync)")
			{
				__instance.options[0].text = "모니터 사용 (수직 동기화)";
				__instance.options[1].text = "제한 없음";
			}
			else if (__instance.options[0].text == "Fullscreen")
			{
				__instance.options[0].text = "전체 화면";
				__instance.options[1].text = "테두리 없는 창";
				__instance.options[2].text = "최대화된 창";
				__instance.options[3].text = "창 모드";
			}
			else if (__instance.options[0].text == "Inside")
			{
				__instance.options[0].text = "내부 적";
				__instance.options[1].text = "외부 적";
				__instance.options[2].text = "주간 적";
			}
		}
	}
}
namespace LCKR
{
	[BepInPlugin("Piggy.LCKR", "LCKR", "2.0.4")]
	public class Plugin : BaseUnityPlugin
	{
		private const string modGUID = "Piggy.LCKR";

		private const string modName = "LCKR";

		public const string modVersion = "2.0.4";

		public static string modVerType = "a";

		private readonly Harmony harmony = new Harmony("Piggy.LCKR");

		private static Plugin Instance;

		public static ManualLogSource mls;

		public static AssetBundle Bundle;

		public static TMP_FontAsset font3270_HUDIngame;

		public static TMP_FontAsset font3270_HUDIngame_Variant;

		public static TMP_FontAsset font3270_HUDIngameB;

		public static TMP_FontAsset font3270_Regular_SDF;

		public static TMP_FontAsset font3270_b;

		public static TMP_FontAsset font3270_DialogueText;

		public static TMP_FontAsset fontEdunline;

		public static TMP_FontAsset fontAds;

		public static VideoClip snareKorean;

		public static bool fullyKoreanMoons;

		public static string confirmString;

		public static string denyString;

		public static GameObject resetPanel;

		public static bool patchFont;

		public static bool toKG;

		public static bool showVersion;

		public static string deathText;

		public static string quotaReached;

		public static string firedText;

		public static string sellText;

		public static string injuryText;

		public static string systemOnlineText;

		public static string allDead1;

		public static string allDead2;

		public static string autoTakeoff1;

		public static string autoTakeoff2;

		public static string midnightWarning;

		public static string PluginDirectory;

		public static string TranslationFilePath;

		public static string DefTranslationFilePath;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			PluginDirectory = ((BaseUnityPlugin)this).Info.Location;
			TranslationFilePath = ((BaseUnityPlugin)this).Config.ConfigFilePath.Replace("Piggy.LCKR.cfg", "") + "\\LCKR_Translation";
			DefTranslationFilePath = ((BaseUnityPlugin)this).Config.ConfigFilePath.Replace("Piggy.LCKR.cfg", "") + "LCKR_Translation\\Default";
			LoadAssets();
			TextureReplacer.Setup();
			TranslationManager.Setup();
			patchFont = ((BaseUnityPlugin)this).Config.Bind<bool>("폰트", "폰트 변경", true, "기본값은 true입니다.\nFontPatcher 등 외부 폰트 모드를 사용하려면 이 값을 false로 설정하세요. false로 설정하면 본 모드에서 폰트를 변경하지 않습니다.").Value;
			showVersion = ((BaseUnityPlugin)this).Config.Bind<bool>("일반", "버전 표시", true, "기본값은 true입니다.\ntrue로 설정하면 메인 화면에 모드의 버전을 표시합니다..").Value;
			fullyKoreanMoons = ((BaseUnityPlugin)this).Config.Bind<bool>("접근성", "단말기 카탈로그 한글 입력", false, "기본값은 false입니다.\n위성 카탈로그 \"MOONS\"나 상점 카탈로그 \"STORE\"같은 키워드를 \"위성\", \"상점\"으로 변경합니다.\n(help => 도움말, moons => 위성, store => 상점, bestiary => 도감, other => 기타, eject => 사출, sigurd는 그대로입니다.)").Value;
			confirmString = ((BaseUnityPlugin)this).Config.Bind<string>("접근성", "확정 키워드", "confirm", "기본값은 confirm입니다.\n컨펌 노드 (Confirm)를 설정합니다. *초성, 띄어쓰기와 한 글자는 인식하지 못합니다!*").Value;
			denyString = ((BaseUnityPlugin)this).Config.Bind<string>("접근성", "취소 키워드", "deny", "기본값은 deny입니다.\n디나이 노드 (Deny)를 설정합니다. *초성, 띄어쓰기와 한 글자는 인식하지 못합니다!*").Value;
			toKG = ((BaseUnityPlugin)this).Config.Bind<bool>("번역", "KG 변환", true, "기본값은 true입니다.\ntrue로 설정하면 무게 수치를 kg으로 변환합니다.").Value;
			mls = Logger.CreateLogSource("Piggy.LCKR");
			mls.LogInfo((object)"LCKR is loaded");
			mls.LogInfo((object)("base.Config.ConfigFilePath: " + ((BaseUnityPlugin)this).Config.ConfigFilePath));
			Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), (string)null);
		}

		private void LoadAssets()
		{
			try
			{
				Bundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(PluginDirectory), "lckorean"));
			}
			catch (Exception ex)
			{
				mls.LogError((object)("Couldn't load asset bundle: " + ex.Message));
				return;
			}
			try
			{
				font3270_HUDIngame = Bundle.LoadAsset<TMP_FontAsset>("3270-HUDIngame.asset");
				font3270_HUDIngame_Variant = Bundle.LoadAsset<TMP_FontAsset>("3270-HUDIngame - Variant.asset");
				font3270_HUDIngameB = Bundle.LoadAsset<TMP_FontAsset>("3270-HUDIngameB.asset");
				font3270_Regular_SDF = Bundle.LoadAsset<TMP_FontAsset>("3270-Regular SDF.asset");
				font3270_b = Bundle.LoadAsset<TMP_FontAsset>("b.asset");
				font3270_DialogueText = Bundle.LoadAsset<TMP_FontAsset>("DialogueText.asset");
				fontEdunline = Bundle.LoadAsset<TMP_FontAsset>("edunline SDF.asset");
				fontAds = Bundle.LoadAsset<TMP_FontAsset>("HakgyoansimMalgeunnalB SDF.asset");
				snareKorean = Bundle.LoadAsset<VideoClip>("SnareFleaTipChannel2.m4v");
				resetPanel = Bundle.LoadAsset<GameObject>("LCKRComponent.prefab");
				((BaseUnityPlugin)this).Logger.LogInfo((object)"Successfully loaded assets!");
			}
			catch (Exception ex2)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)("Couldn't load assets: " + ex2.Message));
			}
		}

		private void ReplaceImageFile()
		{
			string location = Assembly.GetExecutingAssembly().Location;
			string directoryName = Path.GetDirectoryName(location);
			string text = "example.png";
			string text2 = Path.Combine(directoryName, text);
			if (!File.Exists(text2))
			{
				((BaseUnityPlugin)this).Logger.LogError((object)("이미지 파일이 " + text2 + "에 없습니다."));
				return;
			}
			string text3 = Path.Combine("게임_이미지_파일_경로", text);
			if (!File.Exists(text3))
			{
				((BaseUnityPlugin)this).Logger.LogError((object)("게임 내 이미지 파일이 " + text3 + "에 없습니다."));
				return;
			}
			try
			{
				File.Copy(text2, text3, overwrite: true);
				((BaseUnityPlugin)this).Logger.LogInfo((object)("이미지 파일 " + text + "이 " + text3 + "에 성공적으로 덮어쓰기되었습니다."));
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)("이미지 파일 덮어쓰기 중 오류 발생: " + ex.Message));
			}
		}
	}
}
namespace LCKR.Patches
{
	public static class CoroutineManager
	{
		internal class CoroutineManagerBehaviour : MonoBehaviour
		{
		}

		private static MonoBehaviour _instance;

		private static MonoBehaviour instance
		{
			get
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)_instance == (Object)null)
				{
					_instance = (MonoBehaviour)(object)new GameObject("CoroutineManager").AddComponent<CoroutineManagerBehaviour>();
				}
				return _instance;
			}
		}

		public static Coroutine StartCoroutine(IEnumerator routine)
		{
			return instance.StartCoroutine(routine);
		}
	}
	public class LCKRPanel : MonoBehaviour
	{
		public Button resetButton;

		public Button resetCancelButton;

		public Button resetHoldButton;

		public static Animator animPanel;

		private void Start()
		{
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Expected O, but got Unknown
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Expected O, but got Unknown
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Expected O, but got Unknown
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Expected O, but got Unknown
			resetButton = GameObject.Find("LCKRResetButton").GetComponent<Button>();
			resetCancelButton = GameObject.Find("LCKRNO").GetComponent<Button>();
			resetHoldButton = GameObject.Find("LCKRYES").GetComponent<Button>();
			((Component)resetHoldButton).gameObject.AddComponent<ResetHoldButton>();
			animPanel = GameObject.Find("LCKRAnimPanel").GetComponent<Animator>();
			MenuManager menuManager = Object.FindObjectOfType<MenuManager>();
			((UnityEvent)resetButton.onClick).AddListener((UnityAction)delegate
			{
				TogglePanel(on: true);
			});
			((UnityEvent)resetButton.onClick).AddListener((UnityAction)delegate
			{
				menuManager.PlayConfirmSFX();
			});
			((UnityEvent)resetCancelButton.onClick).AddListener((UnityAction)delegate
			{
				TogglePanel(on: false);
			});
			((UnityEvent)resetCancelButton.onClick).AddListener((UnityAction)delegate
			{
				menuManager.PlayCancelSFX();
			});
		}

		public void TogglePanel(bool on)
		{
			animPanel.SetBool("Open", on);
		}
	}
	public class ResetHoldButton : MonoBehaviour, IPointerDownHandler, IEventSystemHandler, IPointerUpHandler
	{
		[SerializeField]
		private float holdTime = 2.5f;

		private float time;

		private bool isHolding;

		public void OnPointerDown(PointerEventData eventData)
		{
			isHolding = true;
			time = 0f;
		}

		public void OnPointerUp(PointerEventData eventData)
		{
			isHolding = false;
			time = 0f;
		}

		private void Update()
		{
			if (!isHolding)
			{
				return;
			}
			time += Time.deltaTime;
			if (time >= holdTime)
			{
				TranslationManager.ResetTranslation();
				if ((Object)(object)LCKRPanel.animPanel != (Object)null)
				{
					LCKRPanel.animPanel.SetBool("Open", false);
				}
				isHolding = false;
				time = 0f;
			}
		}
	}
	public class TranslationManager : MonoBehaviour
	{
		public static string translationPath = "";

		public static string defTranslationPath = "";

		private static bool isDownloadingFiles;

		public static Dictionary<string, string[]> TipTranslations = new Dictionary<string, string[]>();

		public static Dictionary<string, string[]> ScanNodeTranslations = new Dictionary<string, string[]>();

		public static Dictionary<string, string[]> OtherHudTranslations = new Dictionary<string, string[]>();

		public static Dictionary<string, string[]> PlanetsTranslations = new Dictionary<string, string[]>();

		public static Dictionary<string, string[]> ItemTranslations = new Dictionary<string, string[]>();

		public static Dictionary<string, string[]> DialogueTranslations = new Dictionary<string, string[]>();

		public static Dictionary<string, string[]> ControlTipTranslations = new Dictionary<string, string[]>();

		public static Dictionary<string, string[]> CursorTipTranslations = new Dictionary<string, string[]>();

		public static Dictionary<string, string[]> PlayerLevelsTranslations = new Dictionary<string, string[]>();

		public static Dictionary<string, string[]> IngameTranslations = new Dictionary<string, string[]>();

		public static Dictionary<string, string[]> DeathReasonsTranslations = new Dictionary<string, string[]>();

		public static Dictionary<string, string[]> UnlockableItemTranslations = new Dictionary<string, string[]>();

		public static Dictionary<string, string[]> TerminalTranslations = new Dictionary<string, string[]>();

		public static Dictionary<string, string[]> SigurdTranslations = new Dictionary<string, string[]>();

		private static readonly string[] TranslationFiles = new string[14]
		{
			"ControlTip.txt", "CursorTip.txt", "DeathReasons.txt", "Dialogue.txt", "HUD_Others.txt", "Ingame.txt", "Item.txt", "Planets.txt", "PlayerLevel.txt", "ScanNode.txt",
			"Sigurd.txt", "Terminal.txt", "UnlockableItem.txt", "Tip.txt"
		};

		private static string[] translationFileLink = new string[14]
		{
			"https://drive.google.com/uc?export=download&id=1d6BYFC8sIdamPGJx5RPLeGgqP8LCDFd3", "https://drive.google.com/uc?export=download&id=1ZH59zRmXEV8wEgLSKt6dcjhQiMOo7sV2", "https://drive.google.com/uc?export=download&id=147nKj6q_CAsjFjM496epWH4531CFpLxS", "https://drive.google.com/uc?export=download&id=1_EROnz5l15jWUxJoTQmxWNbTTJWZB3zi", "https://drive.google.com/uc?export=download&id=1kVNZpQDf-sDwRtfBUbsXSJO-zsxWTOSq", "https://drive.google.com/uc?export=download&id=1x5P4_WBp0h7IJCWW4dF3DNcUgVlJcBrg", "https://drive.google.com/uc?export=download&id=1sMxKzaT4VI9ON5DcyULRKN3L-vo4YlUG", "https://drive.google.com/uc?export=download&id=1HbEWYrtkECHLSdOPQ4OFSdGe7a28BPeV", "https://drive.google.com/uc?export=download&id=1s_NOPyG3KQeQcweS5xP8zVGS8Sgl13am", "https://drive.google.com/uc?export=download&id=1hUjXj2CD4HEGUXsGmD9ctNt221xIKm7t",
			"https://drive.google.com/uc?export=download&id=1J8a21DRbKktY2VyjQMSnkFh4W2N5aH5l", "https://drive.google.com/uc?export=download&id=1IX3r6fh6Rw4yVovB07dT_sbldIjYDEUv", "https://drive.google.com/uc?export=download&id=1eE-IalX3ApXf7lNdSVZW00qJOVAyL_Rb", "https://drive.google.com/uc?export=download&id=1F9NQ6r0yIgDz2UgGUPfs3Tfw4Izya1tf"
		};

		public static async void DownloadDefaultTranslation()
		{
			if (isDownloadingFiles)
			{
				return;
			}
			isDownloadingFiles = true;
			try
			{
				for (int i = 0; i < translationFileLink.Length; i++)
				{
					string url = translationFileLink[i];
					string fileName = TranslationFiles[i];
					await DownloadSingleFileAsync(fileName, url);
				}
			}
			finally
			{
				isDownloadingFiles = false;
				Plugin.mls.LogInfo((object)"모든 번역 파일을 다운로드했습니다.");
			}
		}

		private static async Task DownloadSingleFileAsync(string fileName, string url)
		{
			UnityWebRequest request = UnityWebRequest.Get(url);
			try
			{
				UnityWebRequestAsyncOperation op = request.SendWebRequest();
				while (!((AsyncOperation)op).isDone)
				{
					await Task.Yield();
				}
				if ((int)request.result != 1)
				{
					Plugin.mls.LogError((object)("번역 기본값 파일을 다운로드하는데 실패했습니다: " + url + "\n" + request.error));
					return;
				}
				try
				{
					File.WriteAllBytes(defTranslationPath + "\\" + fileName, request.downloadHandler.data);
					Plugin.mls.LogInfo((object)("번역 파일을 다운로드했습니다 - " + fileName));
				}
				catch (Exception e)
				{
					Plugin.mls.LogError((object)$"파일 저장 실패: {defTranslationPath}\n{e}");
				}
			}
			finally
			{
				((IDisposable)request)?.Dispose();
			}
		}

		public static void Setup()
		{
			string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
			DownloadDefaultTranslation();
			TipTranslations = new Dictionary<string, string[]>();
			ScanNodeTranslations = new Dictionary<string, string[]>();
			OtherHudTranslations = new Dictionary<string, string[]>();
			PlanetsTranslations = new Dictionary<string, string[]>();
			ItemTranslations = new Dictionary<string, string[]>();
			DialogueTranslations = new Dictionary<string, string[]>();
			ControlTipTranslations = new Dictionary<string, string[]>();
			CursorTipTranslations = new Dictionary<string, string[]>();
			PlayerLevelsTranslations = new Dictionary<string, string[]>();
			IngameTranslations = new Dictionary<string, string[]>();
			DeathReasonsTranslations = new Dictionary<string, string[]>();
			UnlockableItemTranslations = new Dictionary<string, string[]>();
			TerminalTranslations = new Dictionary<string, string[]>();
			SigurdTranslations = new Dictionary<string, string[]>();
			translationPath = Plugin.TranslationFilePath;
			defTranslationPath = Plugin.DefTranslationFilePath;
			LoadArrayDictionary(TipTranslations, "Tip.txt");
			LoadArrayDictionary(ScanNodeTranslations, "ScanNode.txt");
			LoadArrayDictionary(OtherHudTranslations, "HUD_Others.txt");
			LoadArrayDictionary(PlanetsTranslations, "Planets.txt");
			LoadArrayDictionary(ItemTranslations, "Item.txt");
			LoadArrayDictionary(DialogueTranslations, "Dialogue.txt");
			LoadArrayDictionary(ControlTipTranslations, "ControlTip.txt");
			LoadArrayDictionary(CursorTipTranslations, "CursorTip.txt");
			LoadArrayDictionary(PlayerLevelsTranslations, "PlayerLevel.txt");
			LoadArrayDictionary(IngameTranslations, "Ingame.txt");
			LoadArrayDictionary(DeathReasonsTranslations, "DeathReasons.txt");
			LoadArrayDictionary(UnlockableItemTranslations, "UnlockableItem.txt");
			LoadArrayDictionary(TerminalTranslations, "Terminal.txt");
			LoadArrayDictionary(SigurdTranslations, "Sigurd.txt");
		}

		public static void ResetTranslation()
		{
			try
			{
				if (string.IsNullOrEmpty(translationPath))
				{
					translationPath = Plugin.TranslationFilePath;
				}
				if (string.IsNullOrEmpty(defTranslationPath))
				{
					defTranslationPath = Plugin.DefTranslationFilePath;
				}
				OverwriteTranslationsWithDefaults();
			}
			catch (Exception arg)
			{
				Debug.LogError((object)$"LCKR ResetTranslation 중 오류: {arg}");
			}
			finally
			{
				Setup();
			}
		}

		private static void OverwriteTranslationsWithDefaults()
		{
			MenuManager val = Object.FindObjectOfType<MenuManager>();
			if (string.IsNullOrEmpty(defTranslationPath) || !Directory.Exists(defTranslationPath))
			{
				val.DisplayMenuNotification("번역 기본값 폴더를 찾을 수 없습니다!", "[ 뒤로 ]");
				Debug.LogError((object)("LCKR 기본 번역 폴더가 존재하지 않습니다: " + defTranslationPath));
				return;
			}
			if (string.IsNullOrEmpty(translationPath))
			{
				val.DisplayMenuNotification("번역 폴더를 찾을 수 없습니다!", "[ 뒤로 ]");
				return;
			}
			if (!Directory.Exists(translationPath))
			{
				Directory.CreateDirectory(translationPath);
			}
			List<string> list = new List<string>();
			string[] translationFiles = TranslationFiles;
			foreach (string text in translationFiles)
			{
				string text2 = Path.Combine(defTranslationPath, text);
				string destFileName = Path.Combine(translationPath, text);
				if (!File.Exists(text2))
				{
					list.Add(text);
				}
				else
				{
					File.Copy(text2, destFileName, overwrite: true);
				}
			}
			if (list.Count > 0)
			{
				val.DisplayMenuNotification("누락된 기본 번역 파일 목록:\n" + string.Join(", ", list), "[ 뒤로 ]");
			}
		}

		private static void LoadArrayDictionary(Dictionary<string, string[]> dict, string fileName)
		{
			string path = Path.Combine(translationPath, fileName);
			if (!File.Exists(path))
			{
				if (!Directory.Exists(translationPath))
				{
					Directory.CreateDirectory(translationPath);
				}
				return;
			}
			try
			{
				string text = File.ReadAllText(path);
				text = RemoveComments(text);
				foreach (KeyValuePair<string, string> item in ParseEntries(text))
				{
					string key = item.Key;
					string value = item.Value;
					if (string.IsNullOrEmpty(key) || dict.ContainsKey(key))
					{
						continue;
					}
					if (value.StartsWith("{") && value.EndsWith("}"))
					{
						string input = value.Substring(1, value.Length - 2);
						MatchCollection matchCollection = Regex.Matches(input, "\"(.*?)\"");
						List<string> list = new List<string>();
						foreach (Match item2 in matchCollection)
						{
							list.Add(item2.Groups[1].Value);
						}
						dict.Add(key, list.ToArray());
					}
					else
					{
						string text2 = value;
						if (text2.StartsWith("\"") && text2.EndsWith("\""))
						{
							text2 = text2.Substring(1, text2.Length - 2);
						}
						dict.Add(key, new string[1] { text2 });
					}
				}
			}
			catch (Exception arg)
			{
				Debug.LogError((object)$"LCKR이 {fileName} 번역을 불러오는 도중 오류가 발생했습니다: {arg}");
			}
		}

		private static string RemoveComments(string text)
		{
			return Regex.Replace(text, "//.*?$", "", RegexOptions.Multiline);
		}

		private static IEnumerable<KeyValuePair<string, string>> ParseEntries(string text)
		{
			List<KeyValuePair<string, string>> list = new List<KeyValuePair<string, string>>();
			bool flag = false;
			int num = 0;
			int num2 = 0;
			for (int i = 0; i < text.Length; i++)
			{
				char c = text[i];
				if (c == '"' && (i == 0 || text[i - 1] != '\\'))
				{
					flag = !flag;
				}
				else if (c == '{' && !flag)
				{
					num++;
				}
				else if (c == '}' && !flag)
				{
					num--;
				}
				else if (c == ',' && !flag && num == 0)
				{
					string text2 = text.Substring(num2, i - num2).Trim();
					if (!string.IsNullOrEmpty(text2))
					{
						AddEntry(list, text2);
					}
					num2 = i + 1;
				}
			}
			if (num2 < text.Length)
			{
				string text3 = text.Substring(num2).Trim();
				if (!string.IsNullOrEmpty(text3))
				{
					AddEntry(list, text3);
				}
			}
			return list;
		}

		private static void AddEntry(List<KeyValuePair<string, string>> entries, string entry)
		{
			int num = entry.IndexOf('=');
			if (num > 0)
			{
				string text = entry.Substring(0, num).Trim();
				if (text.StartsWith("\"") && text.EndsWith("\"") && text.Length >= 2)
				{
					text = text.Substring(1, text.Length - 2);
				}
				string value = entry.Substring(num + 1).Trim();
				entries.Add(new KeyValuePair<string, string>(text, value));
			}
		}

		public static string ReplaceArrayText(string fullText, string type, string key, int index = 0)
		{
			return fullText.Replace(key, GetArrayTranslation(type, key, index));
		}

		public static string ReplaceArrayTextAll(string fullText, string type, int index = 0)
		{
			if (string.IsNullOrEmpty(fullText))
			{
				return fullText;
			}
			return GetArrayTranslation(type, fullText, index, partialMatch: true);
		}

		public static string GetArrayTranslation(string type, string key, int index = 0, bool partialMatch = false, string orgText = "")
		{
			if (string.IsNullOrEmpty(key))
			{
				return key;
			}
			Dictionary<string, string[]> dictionary = null;
			switch (type)
			{
			case "Tip":
				dictionary = TipTranslations;
				break;
			case "ScanNode":
				dictionary = ScanNodeTranslations;
				break;
			case "HUD":
				dictionary = OtherHudTranslations;
				break;
			case "Planets":
				dictionary = PlanetsTranslations;
				break;
			case "Item":
				dictionary = ItemTranslations;
				break;
			case "Dialogue":
				dictionary = DialogueTranslations;
				break;
			case "ControlTip":
				dictionary = ControlTipTranslations;
				break;
			case "CursorTip":
				dictionary = CursorTipTranslations;
				break;
			case "PlayerLevel":
				dictionary = PlayerLevelsTranslations;
				break;
			case "Ingame":
				dictionary = IngameTranslations;
				break;
			case "DeathReasons":
				dictionary = DeathReasonsTranslations;
				break;
			case "UnlockableItem":
				dictionary = UnlockableItemTranslations;
				break;
			case "Sigurd":
				dictionary = SigurdTranslations;
				break;
			case "Terminal":
				dictionary = TerminalTranslations;
				break;
			}
			if (dictionary != null)
			{
				if (partialMatch)
				{
					string text = key;
					IOrderedEnumerable<string> orderedEnumerable = dictionary.Keys.OrderByDescending((string k) => k.Length);
					foreach (string item in orderedEnumerable)
					{
						string[] array = dictionary[item];
						if (index >= 0 && index < array.Length && text.Contains(item))
						{
							text = text.Replace(item, array[index]);
						}
					}
					return text;
				}
				if (dictionary.TryGetValue(key, out var value) && index >= 0 && index < value.Length)
				{
					return Regex.Unescape(value[index]);
				}
			}
			if (type == "Terminal" || type == "Sigurd")
			{
				return orgText;
			}
			return key;
		}
	}
	[HarmonyPatch(typeof(IngamePlayerSettings))]
	internal class IngamePlayerSettingsPatch
	{
		[HarmonyPrefix]
		[HarmonyPatch("SetSettingsOptionsText")]
		private static void SetSettingsOptionsText_Prefix(SettingsOptionType optionType, string setToText)
		{
			setToText = setToText.Replace("Current input device:", "현재 입력 장치:");
			setToText = setToText.Replace("No device found \n (click to refresh)", "장치 발견되지 않음 \n (클릭하여 새로고침)");
			setToText = setToText.Replace("MODE: Push to talk", "모드: 눌러서 말하기");
			setToText = setToText.Replace("MODE: Voice activation", "모드: 음성 감지");
		}
	}
	[HarmonyPatch(typeof(EntranceTeleport))]
	internal class EntranceTeleportPatch
	{
	}
	[HarmonyPatch(typeof(QuickMenuManager))]
	internal class QuickMenuManagerPatch
	{
		[HarmonyPrefix]
		[HarmonyPatch("Update")]
		private static void Update_Prefix(ref TextMeshProUGUI ___settingsBackButton)
		{
			if ((Object)(object)___settingsBackButton != (Object)null)
			{
				((TMP_Text)___settingsBackButton).text = ((TMP_Text)___settingsBackButton).text.Replace("Discard changes", "변경 사항 취소");
				((TMP_Text)___settingsBackButton).text = ((TMP_Text)___settingsBackButton).text.Replace("Back", "뒤로");
			}
		}
	}
	[HarmonyPatch(typeof(ShotgunItem))]
	internal class ShotgunItemPatch
	{
	}
	[HarmonyPatch(typeof(GameNetworkManager))]
	internal class GameNetworkManagerPatch
	{
	}
	[HarmonyPatch]
	internal class FontLoader
	{
		[HarmonyPrefix]
		[HarmonyPatch(typeof(TextMeshProUGUI), "Awake")]
		private static void PatchTextAwake(TextMeshProUGUI __instance)
		{
			if ((Object)(object)((TMP_Text)__instance).font == (Object)null || !Plugin.patchFont)
			{
				return;
			}
			string name = ((Object)((TMP_Text)__instance).font).name;
			switch (name)
			{
			case "3270-HUDIngame":
				((TMP_Text)__instance).font = Plugin.font3270_HUDIngame;
				break;
			case "3270-HUDIngame - Variant":
				if (((Object)((Component)__instance).gameObject).name == "BodyText" && ((Object)((Component)((TMP_Text)__instance).transform.parent.parent).gameObject).name == "GlobalNotification")
				{
					((TMP_Asset)((TMP_Text)__instance).font).material = ((TMP_Asset)Plugin.font3270_HUDIngame_Variant).material;
					((TMP_Text)__instance).fontSize = ((TMP_Text)__instance).fontSize - 0.2f;
					((TMP_Text)__instance).characterSpacing = -3.5f;
					((TMP_Text)__instance).font.fallbackFontAssetTable.Add(Plugin.font3270_HUDIngame_Variant);
				}
				break;
			case "3270-HUDIngameB":
				((TMP_Text)__instance).font = Plugin.font3270_HUDIngameB;
				break;
			case "3270-Regular SDF":
				((TMP_Text)__instance).font = Plugin.font3270_Regular_SDF;
				break;
			case "b":
				((TMP_Text)__instance).font = Plugin.font3270_b;
				break;
			case "DialogueText":
				((TMP_Text)__instance).font = Plugin.font3270_DialogueText;
				break;
			default:
				if (name.Contains("edunline"))
				{
					((TMP_Text)__instance).font = Plugin.fontEdunline;
				}
				else if (name.Contains("Bangers-Regular SDF"))
				{
					((TMP_Text)__instance).font = Plugin.fontAds;
				}
				break;
			}
		}

		private static void DisableFont(TMP_FontAsset font)
		{
			font.characterLookupTable.Clear();
			font.atlasPopulationMode = (AtlasPopulationMode)0;
		}
	}
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatch
	{
		public static string cursorTip;

		[HarmonyPostfix]
		[HarmonyPatch("SetHoverTipAndCurrentInteractTrigger")]
		private static void SetHoverTipAndCurrentInteractTrigger_Postfix(ref TextMeshProUGUI ___cursorTip)
		{
			string text = ((TMP_Text)___cursorTip).text;
			if (text != cursorTip)
			{
				cursorTip = TranslationManager.GetArrayTranslation("CursorTip", text, 0, partialMatch: true);
				((TMP_Text)___cursorTip).text = cursorTip;
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch("SpawnDeadBody")]
		private static void SpawnDeadBody_Postfix()
		{
			DeadBodyInfo[] array = Object.FindObjectsOfType<DeadBodyInfo>();
			DeadBodyInfo[] array2 = array;
			foreach (DeadBodyInfo val in array2)
			{
				ScanNodeProperties componentInChildren = ((Component)val).gameObject.GetComponentInChildren<ScanNodeProperties>();
				if (!componentInChildren.headerText.Contains(TranslationManager.GetArrayTranslation("DeathReasons", "PlayerBody")))
				{
					componentInChildren.headerText = componentInChildren.headerText.Replace("Body of ", "");
					componentInChildren.headerText += TranslationManager.GetArrayTranslation("DeathReasons", "PlayerBody");
				}
				string[] array3 = componentInChildren.subText.Split(':');
				string key = array3[0].Trim();
				string key2 = array3[1].Trim();
				componentInChildren.subText = TranslationManager.ReplaceArrayText(componentInChildren.subText, "DeathReasons", key);
				componentInChildren.subText = TranslationManager.ReplaceArrayText(componentInChildren.subText, "DeathReasons", key2);
			}
		}
	}
	[HarmonyPatch(typeof(GrabbableObject))]
	internal class GrabbableObjectPatch
	{
	}
	[HarmonyPatch(typeof(RoundManager))]
	internal class RoundManagerPatch
	{
		[HarmonyPostfix]
		[HarmonyPatch("GenerateNewLevelClientRpc")]
		private static void GenerateNewLevelClientRpc_Postfix()
		{
			if (((TMP_Text)HUDManager.Instance.loadingText).text.Contains("Random seed"))
			{
				TextMeshProUGUI loadingText = HUDManager.Instance.loadingText;
				((TMP_Text)loadingText).text = TranslationManager.ReplaceArrayText(((TMP_Text)loadingText).text, "HUD", "Random seed");
			}
		}
	}
	[HarmonyPatch(typeof(ManualCameraRenderer))]
	internal class ManualCameraRendererPatch
	{
		[HarmonyPostfix]
		[HarmonyPatch("Update")]
		private static void Update_Postfix(UnlockableSuit __instance)
		{
			TextMeshProUGUI mapScreenPlayerName = StartOfRound.Instance.mapScreenPlayerName;
			((TMP_Text)mapScreenPlayerName).text = TranslationManager.ReplaceArrayText(((TMP_Text)mapScreenPlayerName).text, "Ingame", "MONITORING");
		}
	}
	public class TextureReplacer : MonoBehaviour
	{
		private static TextureReplacer _instance;

		public static string imagesPath = "";

		public static string imagesPath_str = "LCKR_Tex";

		public static Dictionary<string, string> images = new Dictionary<string, string>();

		public static Dictionary<string, string> unique_keys = new Dictionary<string, string>();

		public static List<string> doCheckMD5_keys = new List<string>();

		public static HashSet<int> checked_instanceID = new HashSet<int>();

		public TimeSpan LoopTimeLimit = new TimeSpan(0, 0, 0, 0, 1);

		public static DateTime? next_check = null;

		public static TimeSpan check_span = new TimeSpan(0, 0, 0, 2);

		public static Texture2D[] Textures = (Texture2D[])(object)new Texture2D[0];

		public static int TextureIndex = -1;

		public static int TextureCount = -1;

		public static char[] invalid = Path.GetInvalidFileNameChars();

		private static bool scanRequested = true;

		public static void Setup()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			if (!((Object)(object)_instance != (Object)null))
			{
				GameObject val = new GameObject("TextureReplacer");
				Object.DontDestroyOnLoad((Object)(object)val);
				((Object)val).hideFlags = (HideFlags)61;
				_instance = val.AddComponent<TextureReplacer>();
				string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
				imagesPath = Path.Combine(directoryName, imagesPath_str);
				getImages();
				SceneManager.sceneLoaded += delegate
				{
					scanRequested = true;
					next_check = null;
				};
			}
		}

		private static void getImages()
		{
			if (!Directory.Exists(imagesPath))
			{
				Directory.CreateDirectory(imagesPath);
			}
			images = new Dictionary<string, string>();
			unique_keys = new Dictionary<string, string>();
			doCheckMD5_keys = new List<string>();
			string[] files = Directory.GetFiles(imagesPath, "*.png", SearchOption.AllDirectories);
			Array.Sort(files);
			string[] array = files;
			foreach (string text in array)
			{
				string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(text);
				string key = fileNameWithoutExtension;
				if (!images.ContainsKey(fileNameWithoutExtension))
				{
					images.Add(fileNameWithoutExtension, text);
				}
				int num = fileNameWithoutExtension.LastIndexOf('_');
				if (num > 0)
				{
					string text2 = fileNameWithoutExtension.Substring(0, num);
					string text3 = ((fileNameWithoutExtension.Length > num + 1) ? fileNameWithoutExtension.Substring(num + 1) : "");
					if (text3.Length == 32)
					{
						if (!doCheckMD5_keys.Contains(text2))
						{
							doCheckMD5_keys.Add(text2);
						}
						if (!unique_keys.ContainsKey(text2))
						{
							unique_keys.Add(text2, text);
						}
					}
					else if (!unique_keys.ContainsKey(text2))
					{
						unique_keys.Add(text2, text);
					}
				}
				else if (!unique_keys.ContainsKey(key))
				{
					unique_keys.Add(key, text);
				}
			}
		}

		private static string toValidFilename(string fileName)
		{
			char[] array = invalid;
			foreach (char oldChar in array)
			{
				fileName = fileName.Replace(oldChar, '_');
			}
			return fileName;
		}

		private static void ReplaceFile(Texture2D tex, string path)
		{
			ImageConversion.LoadImage(tex, File.ReadAllBytes(path));
		}

		private static string MakeCheckSum(Texture2D source)
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			using MD5 mD = MD5.Create();
			RenderTexture temporary = RenderTexture.GetTemporary(64, 64, 0, (RenderTextureFormat)7, (RenderTextureReadWrite)2);
			temporary.DiscardContents();
			RenderTexture active = RenderTexture.active;
			RenderTexture.active = temporary;
			((Texture)temporary).filterMode = (FilterMode)0;
			Graphics.Blit((Texture)(object)source, temporary);
			Texture2D val = new Texture2D(64, 64, (TextureFormat)5, false, false);
			((Texture)val).filterMode = (FilterMode)0;
			val.ReadPixels(new Rect(0f, 0f, (float)((Texture)temporary).width, (float)((Texture)temporary).height), 0, 0);
			val.Apply(true);
			RenderTexture.active = active;
			float[] array = new float[3];
			int[] array2 = new int[12288];
			float num = 6f;
			for (int i = 0; i < 64; i++)
			{
				for (int j = 0; j < 64; j++)
				{
					int num2 = j + i * 64;
					Color pixel = val.GetPixel(j, i);
					float num3 = num * pixel.r;
					float num4 = num * pixel.g;
					float num5 = num * pixel.b;
					array2[num2 * 3] = (int)Math.Round(num3);
					array2[num2 * 3 + 1] = (int)Math.Round(num4);
					array2[num2 * 3 + 2] = (int)Math.Round(num5);
					array[0] += num3;
					array[1] += num4;
					array[2] += num5;
				}
			}
			array[0] /= 4096f;
			array[1] /= 4096f;
			array[2] /= 4096f;
			byte[] array3 = new byte[4096];
			for (int k = 0; k < 64; k++)
			{
				for (int l = 0; l < 64; l++)
				{
					int num6 = l + k * 64;
					byte b = 0;
					if (array[0] < (float)array2[num6 * 3])
					{
						b = (byte)(b | 1u);
					}
					if (array[1] < (float)array2[num6 * 3 + 1])
					{
						b = (byte)(b | 2u);
					}
					if (array[2] < (float)array2[num6 * 3 + 2])
					{
						b = (byte)(b | 4u);
					}
					array3[num6] = b;
				}
			}
			byte[] array4 = mD.ComputeHash(array3);
			Object.Destroy((Object)(object)val);
			RenderTexture.ReleaseTemporary(temporary);
			return BitConverter.ToString(array4).Replace("-", "").ToLowerInvariant();
		}

		private void Update()
		{
			if (!scanRequested)
			{
				return;
			}
			if ((!next_check.HasValue || next_check < DateTime.Now) && (TextureIndex == -1 || TextureIndex >= TextureCount))
			{
				Textures = Resources.FindObjectsOfTypeAll<Texture2D>() ?? Array.Empty<Texture2D>();
				TextureCount = Textures.Length;
				TextureIndex = ((TextureCount <= 0) ? (-1) : 0);
				next_check = DateTime.Now + check_span;
			}
			if (TextureCount <= 0 || TextureIndex < 0 || TextureIndex >= TextureCount)
			{
				scanRequested = false;
				return;
			}
			DateTime now = DateTime.Now;
			while (TextureIndex < TextureCount)
			{
				try
				{
					Texture2D val = Textures[TextureIndex];
					if ((Object)(object)val != (Object)null && ((Texture)val).width > 16 && ((Texture)val).height > 16)
					{
						int instanceID = ((Object)val).GetInstanceID();
						if (!checked_instanceID.Contains(instanceID))
						{
							checked_instanceID.Add(instanceID);
							string text = toValidFilename(((Object)val).name);
							if (!string.IsNullOrEmpty(text))
							{
								if (unique_keys.TryGetValue(text, out var value))
								{
									ReplaceFile(val, value);
								}
								else if (doCheckMD5_keys.Contains(text))
								{
									string key = text + "_" + MakeCheckSum(val);
									if (images.TryGetValue(key, out var value2))
									{
										ReplaceFile(val, value2);
									}
								}
							}
						}
					}
				}
				catch
				{
				}
				TextureIndex++;
				if (DateTime.Now - now >= LoopTimeLimit)
				{
					return;
				}
			}
			scanRequested = false;
		}
	}
	[HarmonyPatch(typeof(TVScript))]
	internal class TVScriptPatch
	{
		[HarmonyPostfix]
		[HarmonyPatch("SetTVScreenMaterial")]
		private static void SetTVScreenMaterial_Postfix(ref VideoClip[] ___tvClips)
		{
			for (int i = 0; i < ___tvClips.Length; i++)
			{
				if (((Object)___tvClips[i]).name == "SnareFleaTipChannel2")
				{
					___tvClips[i] = Plugin.snareKorean;
				}
			}
		}
	}
	[HarmonyPatch(typeof(TimeOfDay))]
	internal class TimeOfDayPatch
	{
		[HarmonyPostfix]
		[HarmonyPatch("UpdateProfitQuotaCurrentTime")]
		private static void UpdateProfitQuotaCurrentTime_Postfix(ref int ___daysUntilDeadline, ref float ___timeUntilDeadline, ref float ___totalTime, ref int ___hoursUntilDeadline, ref float ___lengthOfHours, ref int ___numberOfHours, ref int ___quotaFulfilled, ref int ___profitQuota)
		{
			if (StartOfRound.Instance.isChallengeFile)
			{
				((TMP_Text)StartOfRound.Instance.deadlineMonitorText).text = TranslationManager.GetArrayTranslation("Ingame", "CH_DeadlineMonitor") + "\n" + TranslationManager.GetArrayTranslation("Ingame", "CH_DeadlineMonitor", 1) + "\n" + TranslationManager.GetArrayTranslation("Ingame", "CH_DeadlineMonitor", 2);
				((TMP_Text)StartOfRound.Instance.deadlineMonitorText).text = TranslationManager.GetArrayTranslation("Ingame", "CH_QuotaMonitor") + "\n" + TranslationManager.GetArrayTranslation("Ingame", "CH_QuotaMonitor", 1) + "\n" + GameNetworkManager.Instance.GetNameForWeekNumber(-1);
			}
			else
			{
				((TMP_Text)StartOfRound.Instance.deadlineMonitorText).text = TranslationManager.ReplaceArrayText(((TMP_Text)StartOfRound.Instance.deadlineMonitorText).text, "Ingame", "Days");
				((TMP_Text)StartOfRound.Instance.deadlineMonitorText).text = TranslationManager.ReplaceArrayText(((TMP_Text)StartOfRound.Instance.deadlineMonitorText).text, "Ingame", "DEADLINE");
				if (___timeUntilDeadline <= 0f)
				{
					((TMP_Text)StartOfRound.Instance.deadlineMonitorText).text = TranslationManager.ReplaceArrayText(((TMP_Text)StartOfRound.Instance.deadlineMonitorText).text, "Ingame", "Now");
				}
				else
				{
					((TMP_Text)StartOfRound.Instance.deadlineMonitorText).text = TranslationManager.ReplaceArrayText(((TMP_Text)StartOfRound.Instance.deadlineMonitorText).text, "Ingame", "CL_DeadlineMonitor");
				}
				((TMP_Text)StartOfRound.Instance.profitQuotaMonitorText).text = string.Format("{0}:\n${1} / ${2}", TranslationManager.GetArrayTranslation("Ingame", "QuotaMonitor"), ___quotaFulfilled, ___profitQuota);
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch("Update")]
		private static void Update_Postfix()
		{
			TextMeshProUGUI clockNumber = HUDManager.Instance.clockNumber;
			((TMP_Text)clockNumber).text = TranslationManager.ReplaceArrayText(((TMP_Text)clockNumber).text, "Ingame", "AM");
			((TMP_Text)clockNumber).text = TranslationManager.ReplaceArrayText(((TMP_Text)clockNumber).text, "Ingame", "PM");
		}

		[HarmonyPostfix]
		[HarmonyPatch("VoteShipToLeaveEarly")]
		private static void VoteShipToLeaveEarly_Postfix(ref DialogueSegment[] ___shipLeavingEarlyDialogue)
		{
			___shipLeavingEarlyDialogue[0].bodyText = TranslationManager.ReplaceArrayText(___shipLeavingEarlyDialogue[0].bodyText, "Ingame", "AM");
			___shipLeavingEarlyDialogue[0].bodyText = TranslationManager.ReplaceArrayText(___shipLeavingEarlyDialogue[0].bodyText, "Ingame", "AM");
		}
	}
	[HarmonyPatch(typeof(InteractTrigger))]
	internal class InteractTriggerPatch
	{
	}
	[HarmonyPatch(typeof(SaveFileUISlot))]
	internal class SaveFileUISlotPatch
	{
		[HarmonyPostfix]
		[HarmonyPatch("OnEnable")]
		private static void OnEnable_Postfix(SaveFileUISlot __instance, ref string ___fileString)
		{
			if (__instance.fileNum == -1)
			{
				((TMP_Text)__instance.fileNameText).text = GameNetworkManager.Instance.GetNameForWeekNumber(-1);
			}
			if (ES3.FileExists(___fileString) && __instance.fileNum != -1)
			{
				int num = ES3.Load<int>("GroupCredits", ___fileString, 0);
				int num2 = ES3.Load<int>("Stats_DaysSpent", ___fileString, 0);
				((TMP_Text)__instance.fileStatsText).text = $"${num}\n{num2}일차";
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch("SetFileToThis")]
		private static void SetFileToThis_Postfix(ref TextMeshProUGUI ___specialTipText)
		{
			if ((Object)(object)___specialTipText != (Object)null && ((Behaviour)___specialTipText).enabled)
			{
				((TMP_Text)___specialTipText).text = ((TMP_Text)___specialTipText).text.Replace("This is the weekly challenge moon. You have one day to make as much profit as possible.", "주간 챌린지 위성입니다. 하루 안에 가능한 한 많은 수익을 획득하세요.");
			}
		}
	}
	[HarmonyPatch(typeof(PreInitSceneScript))]
	internal class PreInitSceneScriptPatch
	{
		[HarmonyPostfix]
		[HarmonyPatch("PressContinueButton")]
		private static void PressContinueButton_Postfix(ref int ___currentLaunchSettingPanel, ref GameObject[] ___LaunchSettingsPanels, ref Animator ___blackTransition, ref GameObject ___continueButton, ref TextMeshProUGUI ___headerText)
		{
			if (((TMP_Text)___headerText).text == "LAUNCH MODE")
			{
				((TMP_Text)___headerText).text = "실행 모드";
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch("SkipToFinalSetting")]
		private static void SkipToFinalSetting_Postfix(ref TextMeshProUGUI ___headerText)
		{
			((TMP_Text)___headerText).text = "실행 모드";
		}
	}
	[HarmonyPatch(typeof(MenuManager))]
	internal class MenuManagerPatch
	{
		[HarmonyPostfix]
		[HarmonyPatch("DisplayMenuNotification")]
		private static void DisplayMenuNotification_Prefix(string notificationText, string buttonText, ref GameObject ___menuNotification, ref TextMeshProUGUI ___menuNotificationText, ref TextMeshProUGUI ___menuNotificationButtonText)
		{
			if (notificationText.Contains("Some of your save files may not be compatible"))
			{
				((TMP_Text)___menuNotificationText).text = $"일부 저장 파일은 버전 {GameNetworkManager.Instance.compatibleFileCutoffVersion}과 호환되지 않을 수 있으며, 플레이할 경우 손상될 수 있습니다.";
				((TMP_Text)___menuNotificationButtonText).text = "[ 닫기 ]";
				___menuNotification.SetActive(true);
				EventSystem.current.SetSelectedGameObject(((Component)___menuNotification.GetComponentInChildren<Button>()).gameObject);
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch("HostSetLobbyPublic")]
		private static void HostSetLobbyPublic_Postfix(ref TextMeshProUGUI ___privatePublicDescription)
		{
			if (((TMP_Text)___privatePublicDescription).text.Contains("PUBLIC"))
			{
				((TMP_Text)___privatePublicDescription).text = "공개로 설정하면 모든 사람이 볼 수 있도록 서버가 서버 목록에 표시됩니다.";
			}
			else
			{
				((TMP_Text)___privatePublicDescription).text = "비공개로 설정하면 Steam을 통해 플레이어에게 초대를 보내야 합니다.";
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch("Update")]
		private static void Update_Prefix(ref TextMeshProUGUI ___settingsBackButton)
		{
			if ((Object)(object)___settingsBackButton != (Object)null)
			{
				((TMP_Text)___settingsBackButton).text = ((TMP_Text)___settingsBackButton).text.Replace("DISCARD", "취소");
				((TMP_Text)___settingsBackButton).text = ((TMP_Text)___settingsBackButton).text.Replace("BACK", "뒤로");
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch("Start")]
		private static void Start_Postfix(MenuManager __instance, ref TextMeshProUGUI ___versionNumberText)
		{
			if (Plugin.showVersion && (Object)(object)GameNetworkManager.Instance != (Object)null && (Object)(object)___versionNumberText != (Object)null)
			{
				((TMP_Text)___versionNumberText).text = "   <size=14>LCKR 2.0.4" + Plugin.modVerType + "</size>\n" + ((TMP_Text)___versionNumberText).text;
			}
			if (!__instance.isInitScene)
			{
				Transform transform = ((Component)Object.Instantiate<GameObject>(Plugin.resetPanel, GameObject.Find("MenuContainer").transform).AddComponent<LCKRPanel>()).transform;
				transform.SetSiblingIndex(GameObject.Find("MainButtons").transform.GetSiblingIndex() + 1);
			}
		}
	}
	[HarmonyPatch(typeof(StartMatchLever))]
	internal class StartMatchLeverPatch
	{
	}
	[HarmonyPatch(typeof(TextMeshProUGUI))]
	internal class TextMeshProUGUIPatch
	{
		[HarmonyPostfix]
		[HarmonyPatch("Awake")]
		private static void Awake_Postfix(TextMeshProUGUI __instance)
		{
			try
			{
				Translate(__instance);
			}
			catch (Exception ex)
			{
				Plugin.mls.LogError((object)("TMP 텍스트를 번역하는 과정에서 오류가 발생했습니다!\n" + ex));
			}
		}

		private static void Translate(TextMeshProUGUI __instance)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0278: Unknown result type (might be due to invalid IL or missing references)
			//IL_027d: Unknown result type (might be due to invalid IL or missing references)
			Scene activeScene = SceneManager.GetActiveScene();
			if (((Scene)(ref activeScene)).name == "ColdOpen1")
			{
				((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("Detecting difficulties...", "문제 감지 중...");
				((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("Running reboot diagnostic...", "재부팅 진단 실행 중...");
				((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("UNABLE TO START.", "시작할 수 없습니다.");
				((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("PLEASE FIX ISSUES", "문제를 해결해주세요");
				((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("I BELIEVE IN YOU", "당신을 믿습니다");
			}
			else
			{
				activeScene = SceneManager.GetActiveScene();
				if (((Scene)(ref activeScene)).name == "MainMenu")
				{
					((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("Welcome back!", "돌아오신 것을 환영합니다!");
					((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("This update includes a new moon, a new creature, and a bunny suit, as well as many adjustments.", "이번 업데이트에는 새로운 위성, 생명체, 토끼 슈트와 많은 조정 사항이 포함되어 있습니다.");
					((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("This update includes the Company Cruiser truck and a couple new creatures.", "이번 업데이트에는 회사 크루저 트럭과 몇 가지 새로운 생명체가 포함되어 있습니다.");
					((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("This update introduces the mineshaft, a new creature, and new scrap to collect.", "이번 업데이트에서는 폐광, 새로운 생명체, 그리고 수집할 수 있는 새로운 폐품이 추가되었습니다.");
					((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("Others must update their game to play with you on this version.", "이 버전에서 당신과 함께 플레이하려면 다른 사람들도 게임을 업데이트해야 합니다.");
					((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("Good luck!", "행운을 빕니다!");
					((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("Have fun!", "즐거운 시간 되세요!");
					((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("Thanks to PuffoThePufferfish and Blueray901165 for helping shape this game. They were the closest with it through the entire process, helping me test and improve it every step of the way.", "이 게임을 만드는 데 도움을 준 PuffoThePufferfish와 Blueray901165에게 감사드립니다. 이 두 사람은 게임을 만드는 모든 과정에서 가장 가까이에 있었고, 게임을 테스트하고 개선하는 데 도움을 주었습니다.");
					((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("Thanks to my patrons who have generously supported me throughout this game's long and sometimes-rocky development:", "이 게임의 길고 때로는 험난했던 개발 기간 동안 아낌없는 성원을 보내주신 후원자 여러분께 감사드립니다:");
					((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("Thanks to Zenonclaw for modelling the shovel and the old elevator, which was scrapped long ago but still used for its parts.", "삽과 오래 전에 폐기되었지만 일부분 사용되고 있는 엘리베이터를 모델링해준 Zenonclaw에게 감사드립니다.");
					((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("Thanks to ZedFox for one of the boombox tracks (the good one) and the disco ball music.", "붐박스 트랙 중 하나(좋은 거)와 디스코 볼 음악을 제공한 ZedFox에게 감사드립니다.");
					((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("Thanks to youreashotgun for the snare flea TV channel.", "올무 벼룩 TV 채널을 보내주신 youreashotgun에게 감사드립니다.");
					((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("And thanks to Noah, Seth, Null, Sam, Zenonclaw, ZedFox, and Joseph for helping playtest throughout early development.", "그리고 초기 개발 기간 동안 플레이 테스트를 도와준 Noah, Seth, Null, Sam, Zenonclaw, ZedFox와 Joseph에게도 감사의 인사를 전합니다.");
					((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("Thanks to psyberartist for \"copperplate\" licensed under CC BY 2.0 Deed:", "CC BY 2.0 저작자표시허락을 받은 \"copperplate\"에 대해 psyberartist에게 감사드립니다:");
					((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("Sound effects from Freesound.org, licensed under CC-BY (Attribution). Thank you:", "CC-BY(저작자표시)에 따라 라이선스가 부여된 Freesound.org의 효과음의 저자에게도 감사의 말씀을 드립니다:");
				}
				else
				{
					activeScene = SceneManager.GetActiveScene();
					if (((Scene)(ref activeScene)).name == "InitSceneLaunchOptions")
					{
						((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("This experience has been designed for in-game voice chat, so I recommend giving it a try.", "이 게임은 게임 내 음성 채팅을 사용하는 것을 전제로 설계되었습니다. 게임 내 음성 채팅 사용을 권장합니다.");
						((TMP_Text)__instance).text = ((TMP_Text)__instance).text.Replace("Adjust screen brightness until the symbol on the right is barely visible.", "오른쪽 아이콘이 거의 보이지 않을 때까지 화면 밝기를 조정하세요.");
					}
				}
			}
			switch (((TMP_Text)__instance).text)
			{
			case "  Online":
				((TMP_Text)__instance).text = "  온라인";
				break;
			case "> Online":
				((TMP_Text)__instance).text = "> 온라인";
				break;
			case "(Recommended)":
				((TMP_Text)__instance).text = "(권장)";
				break;
			case " SET-UP":
				((TMP_Text)__instance).text = "설정";
				break;
			case "SET-UP":
				((TMP_Text)__instance).text = "설정";
				break;
			case "Tip: This may occur due to an antivirus or other software halting the save file from being read.":
				((TMP_Text)__instance).text = "팁: 이는 바이러스 백신이나 기타 소프트웨어로 인해 저장 파일 읽기가 중단되었기 때문에 발생할 수 있습니다.";
				break;
			case "Your files could not be loaded and may be corrupted. To start the game, the files can be deleted.":
				((TMP_Text)__instance).text = "파일을 불러올 수 없습니다. 저장 파일이 손상되었을 수 있습니다. 파일을 삭제하면 게임이 정상적으로 실행될 것입니다.";
				break;
			case "The game will now close so you can restart it.":
				((TMP_Text)__instance).text = "이제 게임이 종료됩니다. 게임을 재시작하세요.";
				break;
			case "[ Delete files and restart]":
				((TMP_Text)__instance).text = "[모든 저장 파일 삭제하기]";
				break;
			case "> Host":
				((TMP_Text)__instance).text = "> 호스트";
				break;
			case "> Join a crew":
				((TMP_Text)__instance).text = "> 팀에 합류하기";
				break;
			case "> Join LAN session":
				((TMP_Text)__instance).text = "> LAN 세션 합류하기";
				break;
			case "> Settings":
				((TMP_Text)__instance).text = "> 설정";
				break;
			case "> Credits":
				((TMP_Text)__instance).text = "> 크레딧";
				break;
			case "> Quit":
				((TMP_Text)__instance).text = "> 종료";
				break;
			case "> Resume":
				((TMP_Text)__instance).text = "> 계속하기";
				break;
			case "Would you like to leave the game?":
				((TMP_Text)__instance).text = "정말 게임을 떠나시겠습니까?";
				break;
			case "> Invite friends":
				((TMP_Text)__instance).text = "> 친구 초대하기";
				break;
			case "ACCESSIBILITY":
				((TMP_Text)__instance).text = "접근성";
				break;
			case "Unconfirmed changes!":
				((TMP_Text)__instance).text = "변경 사항이 저장되지 않음!";
				break;
			case "CONTROLS":
				((TMP_Text)__instance).text = "조작";
				break;
			case "REMAP CONTROLS":
				((TMP_Text)__instance).text = "조작 키 재설정";
				break;
			case "DISPLAY":
				((TMP_Text)__instance).text = "디스플레이";
				break;
			case "ENABLED":
				((TMP_Text)__instance).text = "활성화됨";
				break;
			case "Save File":
				((TMP_Text)__instance).text = "저장 파일";
				break;
			case "Server name:":
				((TMP_Text)__instance).text = "서버 이름:";
				break;
			case "Host LAN Server:":
				((TMP_Text)__instance).text = "LAN 서버 호스트하기:";
				break;
			case "Sort: worldwide":
				((TMP_Text)__instance).text = "정렬: 전 세계";
				break;
			case "Sort: Friends":
				((TMP_Text)__instance).text = "정렬: 친구";
				break;
			case "Sort: near":
				((TMP_Text)__instance).text = "정렬: 가까운 서버";
				break;
			case "Sort: far":
				((TMP_Text)__instance).text = "정렬: 먼 서버";
				break;
			case "Fullscreen":
				((TMP_Text)__instance).text = "전체 화면";
				break;
			case "Use monitor (V-Sync)":
				((TMP_Text)__instance).text = "모니터 사용 (수직 동기화)";
				break;
			case "Display mode:":
				((TMP_Text)__instance).text = "디스플레이 모드:";
				break;
			case "Frame rate cap:":
				((TMP_Text)__instance).text = "프레임 제한:";
				break;
			case "(Launched in LAN mode)":
				((TMP_Text)__instance).text = "(LAN 모드로 실행됨)";
				break;
			case "Servers":
				((TMP_Text)__instance).text = "서버";
				break;
			case "Weekly Challenge Results":
				((TMP_Text)__instance).text = "주간 챌린지 결과";
				break;
			case "Loading server list...":
				((TMP_Text)__instance).text = "서버 목록 불러오는 중...";
				break;
			case "Loading ranking...":
				((TMP_Text)__instance).text = "순위 불러오는 중...";
				break;
			case "Loading...":
				((TMP_Text)__instance).text = "불러오는 중...";
				break;
			case "Join":
				((TMP_Text)__instance).text = "참가";
				break;
			case "Version 50 is here!":
				((TMP_Text)__instance).text = "버전 50이 출시되었습니다!";
				break;
			case "Version 55 is here!":
				((TMP_Text)__instance).text = "버전 55가 출시되었습니다!";
				break;
			case "Version 60 is here!":
				((TMP_Text)__instance).text = "버전 60이 출시되었습니다!";
				break;
			case "Credits":
				((TMP_Text)__instance).text = "크레딧";
				break;
			case "An error occured!":
				((TMP_Text)__instance).text = "오류가 발생했습니다!";
				break;
			case "Do you want to delete File 1?":
				((TMP_Text)__instance).text = "정말 파일 1을 삭제할까요?";
				break;
			case "Confirm changes?":
				((TMP_Text)__instance).text = "변경 사항을 저장할까요?";
				break;
			case "You are in LAN mode. When allowing remote connections through LAN, please ensure you have sufficient network security such as a firewall and/or VPN.":
				((TMP_Text)__instance).text = "LAN 모드에 있습니다. LAN을 통한 원격 연결을 허용하는 경우 방화벽 및/또는 VPN과 같은 네트워크 보안이 충분한지 확인하십시오.";
				break;
			case "Enter a tag...":
				((TMP_Text)__instance).text = "태그를 입력하세요...";
				break;
			case "Enter server tag...":
				((TMP_Text)__instance).text = "서버 태그를 입력하세요...";
				break;
			case "Name your server...":
				((TMP_Text)__instance).text = "서버 이름을 입력하세요...";
				break;
			case "PRIVATE means you must send invites through Steam for players to join.":
				((TMP_Text)__instance).text = "비공개로 설정하면 Steam을 통해 플레이어에게 초대를 보내야 합니다.";
				break;
			case "MODE: Voice activation":
				((TMP_Text)__instance).text = "모드: 음성 감지";
				break;
			case "Push to talk:":
				((TMP_Text)__instance).text = "눌러서 말하기";
				break;
			case "Gamma/Brightness:":
				((TMP_Text)__instance).text = "감마/밝기:";
				break;
			case "Master volume:":
				((TMP_Text)__instance).text = "주 음량:";
				break;
			case "Look sensitivity:":
				((TMP_Text)__instance).text = "마우스 감도:";
				break;
			case "Invert Y-Axis":
				((TMP_Text)__instance).text = "Y축 반전";
				break;
			case "Arachnophobia Mode":
				((TMP_Text)__instance).text = "거미공포증 모드";
				break;
			case "Discard":
				((TMP_Text)__instance).text = "취소";
				break;
			case "Confirm":
				((TMP_Text)__instance).text = "확인";
				break;
			case "> Set to defaults":
				((TMP_Text)__instance).text = "> 기본값으로 설정";
				break;
			case "> Reset all to default":
				((TMP_Text)__instance).text = "> 기본값으로 재설정";
				break;
			case "> Back":
				((TMP_Text)__instance).text = "> 뒤로";
				break;
			case "> Confirm changes":
				((TMP_Text)__instance).text = "> 변경 사항 저장";
				break;
			case "> Confirm":
				((TMP_Text)__instance).text = "> 확인";
				break;
			case "> Cancel":
				((TMP_Text)__instance).text = "> 취소";
				break;
			case "> CONFIRM":
				((TMP_Text)__instance).text = "> 확인";
				break;
			case "  CONFIRM":
				((TMP_Text)__instance).text = "  확인";
				break;
			case "> Change keybinds":
				((TMP_Text)__instance).text = "> 조작 키 변경";
				break;
			case "[ Refresh ]":
				((TMP_Text)__instance).text = "[ 새로고침 ]";
				break;
			case "> Back to menu":
				((TMP_Text)__instance).text = "> 메뉴로 돌아가기";
				break;
			case "With challenge moon":
				((TMP_Text)__instance).text = "챌린지 달 포함";
				break;
			case "[ Back ]":
				((TMP_Text)__instance).text = "[ 뒤로 ]";
				break;
			case "[ Confirm ]":
				((TMP_Text)__instance).text = "[ 확인 ]";
				break;
			case "[ Remove my score ]":
				((TMP_Text)__instance).text = "[ 점수 삭제하기 ]";
				break;
			case "[ Play again ]":
				((TMP_Text)__instance).text = "[ 다시 하기 ]";
				break;
			case "Local-only":
				((TMP_Text)__instance).text = "로컬 전용";
				break;
			case "File 1":
				((TMP_Text)__instance).text = "파일 1";
				break;
			case "File 2":
				((TMP_Text)__instance).text = "파일 2";
				break;
			case "File 3":
				((TMP_Text)__instance).text = "파일 3";
				break;
			case "Input: ":
				((TMP_Text)__instance).text = "입력: ";
				break;
			case "CHALLENGE":
				((TMP_Text)__instance).text = "챌린지";
				break;
			case "[ Continue ]":
				((TMP_Text)__instance).text = "[ 계속 ]";
				break;
			case "Delete":
				((TMP_Text)__instance).text = "삭제";
				break;
			case "Public":
				((TMP_Text)__instance).text = "공개";
				break;
			case "Friends-only":
				((TMP_Text)__instance).text = "친구 전용";
				break;
			case "Allow remote connections":
				((TMP_Text)__instance).text = "원격 연결 허용";
				break;
			case "Go back":
				((TMP_Text)__instance).text = "뒤로 가기";
				break;
			case "File incompatible!":
				((TMP_Text)__instance).text = "파일 호환되지 않음!";
				break;
			case "Waiting for input":
				((TMP_Text)__instance).text = "입력 대기 중";
				break;
			case "HANDS FULL":
				((TMP_Text)__instance).text = "양 손 사용 중";
				break;
			case "Walk : [W/A/S/D]":
				((TMP_Text)__instance).text = "걷기 : [W/A/S/D]";
				break;
			case "Sprint: [Shift]":
				((TMP_Text)__instance).text = "달리기: [Shift]";
				break;
			case "Scan : [RMB]":
				((TMP_Text)__instance).text = "스캔 : [RMB]";
				break;
			case "SYSTEMS ONLINE":
				((TMP_Text)__instance).text = Plugin.systemOnlineText;
				break;
			case "Typing...":
				((TMP_Text)__instance).text = "입력 중...";
				break;
			case "Press \"/\" to talk.":
				((TMP_Text)__instance).text = "\"/\"를 눌러 대화합니다.";
				break;
			case "(Some were too far to receive your message.)":
				((TMP_Text)__instance).text = "(일부는 너무 멀어 메세지를 받지 못했습니다.)";
				break;
			case "Confirm: [V]   |   Rotate: [R]   |   Store: [X]":
				((TMP_Text)__instance).text = "확정: [V]   |   회전: [R]   |   보관: [X]";
				break;
			case "CRITICAL INJURY":
				((TMP_Text)__instance).text = Plugin.injuryText;
				break;
			case "Paycheck!":
				((TMP_Text)__instance).text = Plugin.sellText;
				break;
			case "TOTAL:":
				((TMP_Text)__instance).text = "합계:";
				break;
			case "YOU ARE FIRED.":
				((TMP_Text)__instance).text = Plugin.firedText;
				break;
			case "You will keep your employee rank. Your ship and credits will be reset.":
				((TMP_Text)__instance).text = "직원 계급은 유지되지만, 당신의 함선과 크레딧은 초기화됩니다.";
				break;
			case "You did not meet the profit quota before the deadline.":
				((TMP_Text)__instance).text = "마감일 전까지 수익 할당량을 충족하지 못했습니다.";
				break;
			case "TO MEET PROFIT QUOTA":
				((TMP_Text)__instance).text = "수익 할당량 충족까지";
				break;
			case "QUOTA REACHED!":
				((TMP_Text)__instance).text = "<size=65>" + Plugin.quotaReached + "</size>";
				break;
			case "NEW PROFIT QUOTA:":
				((TMP_Text)__instance).text = "새로운 수익 할당량:";
				break;
			case "Stats":
				((TMP_Text)__instance).text = "통계";
				break;
			case "[LIFE SUPPORT: OFFLINE]":
				((TMP_Text)__instance).text = Plugin.deathText;
				break;
			case "(Dead)":
				((TMP_Text)__instance).text = "(사망)";
				break;
			case "Tell autopilot ship to leave early : [RMB] (Hold)":
				((TMP_Text)__instance).text = "함선에게 일찍 출발하라고 지시하기\n: [RMB] (Hold)";
				break;
			case "HAZARD LEVEL:":
				((TMP_Text)__instance).text = "위험 수준:";
				break;
			case "Notes:":
				((TMP_Text)__instance).text = "노트:";
				break;
			case "PERFORMANCE REPORT":
				((TMP_Text)__instance).text = "성과 보고서";
				break;
			case "DEBUG/TEST":
				((TMP_Text)__instance).text = "디버그/테스트";
				break;
			case "Enemy type:":
				((TMP_Text)__instance).text = "적 종류:";
				break;
			case "Enemy:":
				((TMP_Text)__instance).text = "적:";
				break;
			case "Number to spawn:":
				((TMP_Text)__instance).text = "생성할 수:";
				break;
			case "Enter text...":
				((TMP_Text)__instance).text = "텍스트를 입력하세요...";
				break;
			case "Spawn creature":
				((TMP_Text)__instance).text = "생명체 생성";
				break;
			case "Spawn item":
				((TMP_Text)__instance).text = "아이템 생성";
				break;
			case "Toggle test room":
				((TMP_Text)__instance).text = "테스트 방 전환";
				break;
			case "Revive players":
				((TMP_Text)__instance).text = "플레이어 소생";
				break;
			case "Toggle invincibility":
				((TMP_Text)__instance).text = "무적 모드 전환";
				break;
			case "Item:":
				((TMP_Text)__instance).text = "아이템:";
				break;
			case "EMPLOYEE RANK":
				((TMP_Text)__instance).text = "직원 계급";
				break;
			case "RECEIVING SIGNAL":
				((TMP_Text)__instance).text = "    신호 수신 중";
				break;
			case "DOOR HYDRAULICS:":
				((TMP_Text)__instance).text = "문 유압 장치:";
				break;
			case "EMERGENCY WEATHER ALERT":
				((TMP_Text)__instance).text = "<size=50>긴급 기상 경보";
				break;
			case "METEOR SHOWERS DETECTED. UP TO 20-30 PER HOUR. TAKE SHELTER IMMEDIATELY.":
				((TMP_Text)__instance).text = "유성우가 감지되었습니다. 시간당 최대 20-30개까지 낙하할 수 있습니다. 즉시 대피하십시오.";
				break;
			case "YOUR AUTOPILOT SATELLITE\nISSUED A\nWEATHER WARNING":
				((TMP_Text)__instance).text = "<size=35>자동항법위성이\n기상 경보를\n발령했습니다";
				((TMP_Text)__instance).lineSpacing = 32f;
				break;
			case "Imperium Control Center":
				((TMP_Text)__instance).text = "Imperium 제어 센터";
				break;
			case "Emporium Control Center":
				((TMP_Text)__instance).text = "Emporium 제어 센터";
				break;
			case "Quota and Credits":
				((TMP_Text)__instance).text = "할당량 및 자금";
				break;
			case "Group Credits":
				((TMP_Text)__instance).text = "자금";
				break;
			case "Profit Quota":
				((TMP_Text)__instance).text = "수익 할당량";
				break;
			case "Quota Deadline (Days)":
				((TMP_Text)__instance).text = "할당량 마감일 (일 기준)";
				break;
			case "Disable Quota":
				((TMP_Text)__instance).text = "할당량 비활성화";
				break;
			case "Fulfill Quota":
				((TMP_Text)__instance).text = "할당량 채우기";
				break;
			case "Reset Quota":
				((TMP_Text)__instance).text = "할당량 초기화";
				break;
			case "Game Settings":
				((TMP_Text)__instance).text = "게임 설정";
				break;
			case "Unlock Shop":
				((TMP_Text)__instance).text = "가구 모두 표시";
				break;
			case "Player Settings":
				((TMP_Text)__instance).text = "플레이어 설정";
				break;
			case "Infinite Sprint":
				((TMP_Text)__instance).text = "무한 달리기";
				break;
			case "Invisibility":
				((TMP_Text)__instance).text = "투명화";
				break;
			case "Untargetable":
				((TMP_Text)__instance).text = "적 감지 불가";
				break;
			case "Pickup Overwrite":
				((TMP_Text)__instance).text = "투명화";
				break;
			case "Enable Flying":
				((TMP_Text)__instance).text = "비행 활성화";
				break;
			case "God Mode":
				((TMP_Text)__instance).text = "무적 모드";
				break;
			case "Muted":
				((TMP_Text)__instance).text = "음소거";
				break;
			case "Infinite Battery":
				((TMP_Text)__instance).text = "무한 배터리";
				break;
			case "Disable OOB":
				((TMP_Text)__instance).text = "맵 탈출 허용";
				break;
			case "Permadrunk":
				((TMP_Text)__instance).text = "TZP 항시 적용";
				break;
			case "Night Vision":
				((TMP_Text)__instance).text = "야간 투시";
				break;
			case "Field Of View":
				((TMP_Text)__instance).text = "시야각";
				break;
			case "Movement Speed":
				((TMP_Text)__instance).text = "이동 속도";
				break;
			case "Jump Force":
				((TMP_Text)__instance).text = "점프력";
				break;
			case "Flying Speed":
				((TMP_Text)__instance).text = "비행 속도";
				break;
			case "Animation Skipping":
				((TMP_Text)__instance).text = "애니메이션 건너뛰기";
				break;
			case "Player Spawn":
				((TMP_Text)__instance).text = "플레이어 스폰";
				break;
			case "Interact Hold":
				((TMP_Text)__instance).text = "길게 누르는 상호작용";
				break;
			case "Interact":
				((TMP_Text)__instance).text = "상호작용";
				break;
			case "Disable Locking":
				((TMP_Text)__instance).text = "시야 잠금 해제";
				break;
			case "Object Explorer":
				((TMP_Text)__instance).text = "물체 탐색기";
				break;
			case "Players":
				((TMP_Text)__instance).text = "플레이어";
				break;
			case "Entities":
				((TMP_Text)__instance).text = "생명체";
				break;
			case "Cruisers":
				((TMP_Text)__instance).text = "크루저";
				break;
			case "Map Hazards":
				((TMP_Text)__instance).text = "맵 함정";
				break;
			case "Items":
				((TMP_Text)__instance).text = "아이템";
				break;
			case "Vents":
				((TMP_Text)__instance).text = "환풍구";
				break;
			case "Other":
				((TMP_Text)__instance).text = "기타";
				break;
			case "Outdoor Objects":
				((TMP_Text)__instance).text = "실외 물체";
				break;
			case "Visualization":
				((TMP_Text)__instance).text = "시각화";
				break;
			case "Overlays":
				((TMP_Text)__instance).text = "오버레이";
				break;
			case "AI Nodes Indoor":
				((TMP_Text)__instance).text = "실내 AI 노드";
				break;
			case "AI Nodes Outdoor":
				((TMP_Text)__instance).text = "실외 AI 노드";
				break;
			case "Spawn Denial":
				((TMP_Text)__instance).text = "스폰 차단 지점";
				break;
			case "Bee Spawns":
				((TMP_Text)__instance).text = "벌 생성 지점";
				break;
			case "Entity Spawns":
				((TMP_Text)__instance).text = "생명체 생성 지점";
				break;
			case "Scrap Spawns":
				((TMP_Text)__instance).text = "폐품 생성 지점";
				break;
			case "Hazard Spawns":
				((TMP_Text)__instance).text = "함정 생성 지점";
				break;
			case "NavMesh Surface":
				((TMP_Text)__instance).text = "NavMesh 표면";
				break;
			case "Colliders":
				((TMP_Text)__instance).text = "충돌";
				break;
			case "Entites":
				((TMP_Text)__instance).text = "생명체";
				break;
			case "Employees":
				((TMP_Text)__instance).text = "직원";
				break;
			case "Scrap & Props":
				((TMP_Text)__instance).text = "폐품 및 물건";
				break;
			case "Foliage":
				((TMP_Text)__instance).text = "초목";
				break;
			case "Tile Borders":
				((TMP_Text)__instance).text = "타일 경계";
				break;
			case "Interact Triggers":
				((TMP_Text)__instance).text = "상호작용 트리거";
				break;
			case "Room":
				((TMP_Text)__instance).text = "방";
				break;
			case "Physics Object":
				((TMP_Text)__instance).text = "물리 객체";
				break;
			case "Triggers":
				((TMP_Text)__instance).text = "트리거";
				break;
			case "Room Light":
				((TMP_Text)__instance).text = "방 조명";
				break;
			case "Anomaly":
				((TMP_Text)__instance).text = "이상 현상";
				break;
			case "Railing":
				((TMP_Text)__instance).text = "난간";
				break;
			case "PlacementBlocker":
				((TMP_Text)__instance).text = "배치 차단기";
				break;
			case "Terrain":
				((TMP_Text)__instance).text = "지형";
				break;
			case "Ship Objects":
				((TMP_Text)__instance).text = "함선 물체";
				break;
			case "Misc Level Geo":
				((TMP_Text)__instance).text = "기타 레벨 지형";
				break;
			case "Scan Nodes":
				((TMP_Text)__instance).text = "스캔 노드";
				break;
			case "Vain Shrouds":
				((TMP_Text)__instance).text = "은폐 수풀";
				break;
			case "Line Of Sight":
				((TMP_Text)__instance).text = "시야 선";
				break;
			case "Gizmos":
				((TMP_Text)__instance).text = "기즈모";
				break;
			case "Spawn Timers":
				((TMP_Text)__instance).text = "생성 타이머";
				break;
			case "Vent Timers":
				((TMP_Text)__instance).text = "환풍구 타이머";
				break;
			case "Noise Indicators":
				((TMP_Text)__instance).text = "소음 표시기";
				break;
			case "Shotguns":
				((TMP_Text)__instance).text = "산탄총";
				break;
			case "Shovels":
				((TMP_Text)__instance).text = "철제 삽";
				break;
			case "Knives":
				((TMP_Text)__instance).text = "식칼";
				break;
			case "Landmines":
				((TMP_Text)__instance).text = "지뢰";
				break;
			case "Spike Traps":
				((TMP_Text)__instance).text = "가시 함정";
				break;
			case "Settings":
				((TMP_Text)__instance).text = "설정";
				break;
			case "General":
				((TMP_Text)__instance).text = "일반";
				break;
			case "Smooth Animations":
				((TMP_Text)__instance).text = "부드러운 애니메이션";
				break;
			case "Screen-Space Overlays":
				((TMP_Text)__instance).text = "화면 공간 오버레이";
				break;
			case "Always-On-Top":
				((TMP_Text)__instance).text = "항상 위에 표시";
				break;
			case "Auto Scale":
				((TMP_Text)__instance).text = "자동 크기 조정";
				break;
			case "Hide Inactive":
				((TMP_Text)__instance).text = "비활성화 숨기기";
				break;
			case "Overlay Scale":
				((TMP_Text)__instance).text = "오버레이 크기";
				break;
			case "Reset":
				((TMP_Text)__instance).text = "초기화";
				break;
			case "Teleportation":
				((TMP_Text)__instance).text = "순간이동";
				break;
			case "Main Entrance":
				((TMP_Text)__instance).text = "정문";
				break;
			case "Ship":
				((TMP_Text)__instance).text = "함선";
				break;
			case "To Freecam":
				((TMP_Text)__instance).text = "프리캠 위치";
				break;
			case "Apparatus":
				((TMP_Text)__instance).text = "장치";
				break;
			case "To Coordinates (X/Y/Z)":
				((TMP_Text)__instance).text = "좌표 (X/Y/Z)";
				break;
			case "Interactive":
				((TMP_Text)__instance).text = "상호작용";
				break;
			case "Fire Exits":
				((TMP_Text)__instance).text = "비상구";
				break;
			case "Waypoints":
				((TMP_Text)__instance).text = "웨이포인트";
				break;
			case "Enable Beacons":
				((TMP_Text)__instance).text = "비컨 활성화";
				break;
			case "Enable Overlay":
				((TMP_Text)__instance).text = "오버레이 활성화";
				break;
			case "Waypoint Name...":
				((TMP_Text)__instance).text = "웨이포인트 이름...";
				break;
			case "Add":
				((TMP_Text)__instance).text = "추가";
				break;
			case "Ship Control":
				((TMP_Text)__instance).text = "함선 제어";
				break;
			case "Instant Takeoff":
				((TMP_Text)__instance).text = "즉시 이륙";
				break;
			case "Instant Landing":
				((TMP_Text)__instance).text = "즉시 착륙";
				break;
			case "Override Doors":
				((TMP_Text)__instance).text = "문 재정의";
				break;
			case "Prevent Leave":
				((TMP_Text)__instance).text = "자동 출발 끄기";
				break;
			case "Mute Speaker":
				((TMP_Text)__instance).text = "스피커 음소거";
				break;
			case "Disable Abandoned":
				((TMP_Text)__instance).text = "버려진 직원 구출";
				break;
			case "Destinations":
				((TMP_Text)__instance).text = "목적지";
				break;
			case "41 Experimentation":
				((TMP_Text)__instance).text = "41 익스페리멘테이션";
				break;
			case "220 Assurance":
				((TMP_Text)__instance).text = "220 어슈어런스";
				break;
			case "56 Vow":
				((TMP_Text)__instance).text = "56 보우";
				break;
			case "21 Offense":
				((TMP_Text)__instance).text = "21 오펜스";
				break;
			case "61 March":
				((TMP_Text)__instance).text = "61 머치";
				break;
			case "20 Adamance":
				((TMP_Text)__instance).text = "20 애더먼스";
				break;
			case "85 Rend":
				((TMP_Text)__instance).text = "85 렌드";
				break;
			case "7 Dine":
				((TMP_Text)__instance).text = "7 다인";
				break;
			case "8 Titan":
				((TMP_Text)__instance).text = "8 타이탄";
				break;
			case "68 Artifice":
				((TMP_Text)__instance).text = "68 아터피스";
				break;
			case "44 Liquidation":
				((TMP_Text)__instance).text = "44 리퀴데이션";
				break;
			case "5 Embrion":
				((TMP_Text)__instance).text = "5 엠브리언";
				break;
			case "Moon Control":
				((TMP_Text)__instance).text = "위성 제어";
				break;
			case "Entity Spawning":
				((TMP_Text)__instance).text = "생명체 생성";
				break;
			case "Min Indoor Spawns":
				((TMP_Text)__instance).text = "최소 실내 생성";
				break;
			case "Min Outdoor Spawns":
				((TMP_Text)__instance).text = "최소 실외 생성";
				break;
			case "Max Indoor Power":
				((TMP_Text)__instance).text = "최대 실내 파워";
				break;
			case "Indoor Deviation":
				((TMP_Text)__instance).text = "실내 편차";
				break;
			case "Min Outdoor Power":
				((TMP_Text)__instance).text = "최대 실외 파워";
				break;
			case "Outdoor Deviation":
				((TMP_Text)__instance).text = "실외 편차";
				break;
			case "Max Daytime Power":
				((TMP_Text)__instance).text = "최대 주간 적 파워";
				break;
			case "Daytime Deviation":
				((TMP_Text)__instance).text = "주간 적 편차";
				break;
			case "Pause Indoor Spawning":
				((TMP_Text)__instance).text = "실내 적 생성 멈추기";
				break;
			case "Pause Outdoor Spawning":
				((TMP_Text)__instance).text = "실외 적 생성 멈추기";
				break;
			case "Pause Daytime Spawning":
				((TMP_Text)__instance).text = "주간 적 생성 멈추기";
				break;
			case "Generation":
				((TMP_Text)__instance).text = "맵 생성";
				break;
			case "Level Seed":
				((TMP_Text)__instance).text = "레벨 시드";
				break;
			case "Map Size Multiplier":
				((TMP_Text)__instance).text = "맵 크기 배수";
				break;
			case "Dungeon Flow":
				((TMP_Text)__instance).text = "던전 플로우";
				break;
			case "Map Obstacles":
				((TMP_Text)__instance).text = "맵 장애물";
				break;
			case "Open Doors":
				((TMP_Text)__instance).text = "문 열기";
				break;
			case "Close Doors":
				((TMP_Text)__instance).text = "문 닫기";
				break;
			case "Lock Doors":
				((TMP_Text)__instance).text = "문 잠그기";
				break;
			case "Unlock Doors":
				((TMP_Text)__instance).text = "문 잠금 해제";
				break;
			case "Open Security":
				((TMP_Text)__instance).text = "보안 문 열기";
				break;
			case "Close Security":
				((TMP_Text)__instance).text = "보안 문 닫기";
				break;
			case "Turn On Breakers":
				((TMP_Text)__instance).text = "분전반 켜기";
				break;
			case "Turn Off Breakers":
				((TMP_Text)__instance).text = "분전반 끄기";
				break;
			case "Disable Turrets":
				((TMP_Text)__instance).text = "포탑 비활성화";
				break;
			case "Enable Turrets":
				((TMP_Text)__instance).text = "포탑 활성화";
				break;
			case "Disable Landmines":
				((TMP_Text)__instance).text = "지뢰 비활성화";
				break;
			case "Enable Landmines":
				((TMP_Text)__instance).text = "지뢰 활성화";
				break;
			case "Time Settings":
				((TMP_Text)__instance).text = "시간 설정";
				break;
			case "Pause Time":
				((TMP_Text)__instance).text = "시간 멈추기";
				break;
			case "Realtime Clock":
				((TMP_Text)__instance).text = "시계 실시간 표시";
				break;
			case "Permanent Clock":
				((TMP_Text)__instance).text = "시계 항상 표시";
				break;
			case "Time Scale":
				((TMP_Text)__instance).text = "시간 속도";
				break;
			case "Weather Forecaster":
				((TMP_Text)__instance).text = "기상 표시";
				break;
			case "None":
				((TMP_Text)__instance).text = "없음";
				break;
			case "DustClouds":
				((TMP_Text)__instance).text = "DustClouds";
				break;
			case "Rainy":
				((TMP_Text)__instance).text = "우천";
				break;
			case "Stormy":
				((TMP_Text)__instance).text = "뇌우";
				break;
			case "Foggy":
				((TMP_Text)__instance).text = "안개";
				break;
			case "Flooded":
				((TMP_Text)__instance).text = "홍수";
				break;
			case "Eclipsed":
				((TMP_Text)__instance).text = "일식";
				break;
			case "Cruiser Control":
				((TMP_Text)__instance).text = "크루저 제어";
				break;
			case "Indestructible":
				((TMP_Text)__instance).text = "무적";
				break;
			case "Infinite Turbo":
				((TMP_Text)__instance).text = "무한 부스터";
				break;
			case "Instant Ignition":
				((TMP_Text)__instance).text = "즉시 시동";
				break;
			case "Push Force":
				((TMP_Text)__instance).text = "차량 밀기 강도";
				break;
			case "Acceleration":
				((TMP_Text)__instance).text = "가속력";
				break;
			case "Objects":
				((TMP_Text)__instance).text = "물체";
				break;
			case "Shotgun":
				((TMP_Text)__instance).text = "산탄총";
				break;
			case "Infinite Ammo":
				((TMP_Text)__instance).text = "무한 탄약";
				break;
			case "Full Auto":
				((TMP_Text)__instance).text = "연사";
				break;
			case "Shovel":
				((TMP_Text)__instance).text = "철제 삽";
				break;
			case "Speedy":
				((TMP_Text)__instance).text = "속도 증가";
				break;
			case "Jester":
				((TMP_Text)__instance).text = "광대";
				break;
			case "Pop Jesters":
				((TMP_Text)__instance).text = "광대 폭주";
				break;
			case "Pop Jesters (C)":
				((TMP_Text)__instance).text = "광대 폭주 (C)";
				break;
			case "Reset Jesters":
				((TMP_Text)__instance).text = "광대 초기화";
				break;
			case "Rendering":
				((TMP_Text)__instance).text = "렌더링";
				break;
			case "Resolution":
				((TMP_Text)__instance).text = "해상도";
				break;
			case "Lighting":
				((TMP_Text)__instance).text = "빛";
				break;
			case "Sunlight":
				((TMP_Text)__instance).text = "태양광";
				break;
			case "Space Sun":
				((TMP_Text)__instance).text = "우주 태양";
				break;
			case "Indirect Light":
				((TMP_Text)__instance).text = "간접광";
				break;
			case "Volumetrics":
				((TMP_Text)__instance).text = "볼류메트릭";
				break;
			case "Global Volume":
				((TMP_Text)__instance).text = "전역 볼륨";
				break;
			case "Volumetric Fog":
				((TMP_Text)__instance).text = "볼류메트릭 포그";
				break;
			case "Ground Fog":
				((TMP_Text)__instance).text = "바닥 안개";
				break;
			case "Stormy Volume":
				((TMP_Text)__instance).text = "뇌우 볼륨";
				break;
			case "Skybox Volume":
				((TMP_Text)__instance).text = "스카이박스 볼륨";
				break;
			case "Frame Settings":
				((TMP_Text)__instance).text = "프레임 설정";
				break;
			case "Decal Layers":
				((TMP_Text)__instance).text = "데칼 레이어";
				break;
			case "Ray Tracing":
				((TMP_Text)__instance).text = "레이 트레이싱";
				break;
			case "Volumetric Clouds":
				((TMP_Text)__instance).text = "볼류메트릭 구름";
				break;
			case "Subsurface S.":
				((TMP_Text)__instance).text = "서브서피스 스캐터링";
				break;
			case "Volume Reproj.":
				((TMP_Text)__instance).text = "볼륨 투영";
				break;
			case "Transp. Prepass":
				((TMP_Text)__instance).text = "투명 표면 프리패스";
				break;
			case "Transp. Postpass":
				((TMP_Text)__instance).text = "투명 표면 포스트패스";
				break;
			case "Post Processing":
				((TMP_Text)__instance).text = "포스트 프로세싱";
				break;
			case "CEL Shading":
				((TMP_Text)__instance).text = "셀 셰이딩";
				break;
			case "Player Overlays":
				((TMP_Text)__instance).text = "플레이어 오버레이";
				break;
			case "Stars Overlay":
				((TMP_Text)__instance).text = "별 오버레이";
				break;
			case "HUD Visor":
				((TMP_Text)__instance).text = "HUD 바이저";
				break;
			case "Player HUD":
				((TMP_Text)__instance).text = "플레이어 HUD";
				break;
			case "Player Filter":
				((TMP_Text)__instance).text = "플레이어 필터";
				break;
			case "Fear":
				((TMP_Text)__instance).text = "공포";
				break;
			case "Flashbang":
				((TMP_Text)__instance).text = "섬광탄";
				break;
			case "Underwater":
				((TMP_Text)__instance).text = "수중";
				break;
			case "Drunkness":
				((TMP_Text)__instance).text = "TZP 복용";
				break;
			case "Scan Sphere":
				((TMP_Text)__instance).text = "스캔 구";
				break;
			case "Save File Editor":
				((TMP_Text)__instance).text = "저장 파일 편집기";
				break;
			case "General Save File":
				((TMP_Text)__instance).text = "일반 저장 파일";
				break;
			case "Event Log":
				((TMP_Text)__instance).text = "이벤트 로그";
				break;
			case "Level Information":
				((TMP_Text)__instance).text = "레벨 정보";
				break;
			case "Current Seed":
				((TMP_Text)__instance).text = "현재 시드";
				break;
			case "Scrap Amount":
				((TMP_Text)__instance).text = "폐품 개수";
				break;
			case "Weather":
				((TMP_Text)__instance).text = "날씨";
				break;
			case "Map Objects":
				((TMP_Text)__instance).text = "맵 물체";
				break;
			case "Turrets":
				((TMP_Text)__instance).text = "포탑";
				break;
			case "Steamleaks":
				((TMP_Text)__instance).text = "증기 누출";
				break;
			case "Doors":
				((TMP_Text)__instance).text = "문";
				break;
			case "Security Doors":
				((TMP_Text)__instance).text = "보안 문";
				break;
			case "Max Outdoor Power":
				((TMP_Text)__instance).text = "최대 실외 파워";
				break;
			case "Challenge Moon":
				((TMP_Text)__instance).text = "챌린지 위성";
				break;
			case "Starting Credits":
				((TMP_Text)__instance).text = "시작 크레딧";
				break;
			case "Indoor Power Increase":
				((TMP_Text)__instance).text = "실내 파워 상승도";
				break;
			case "Outdoor Power Increase":
				((TMP_Text)__instance).text = "실외 파워 상승도";
				break;
			case "Scrap Spawn Increase":
				((TMP_Text)__instance).text = "폐품 파워 상승도";
				break;
			case "Weather #1 Multiplier":
				((TMP_Text)__instance).text = "날씨 #1 배수";
				break;
			case "Weather #2 Multiplier":
				((TMP_Text)__instance).text = "날씨 #2 배수";
				break;
			case "Spawning":
				((TMP_Text)__instance).text = "생성";
				break;
			case "Indoor Entity":
				((TMP_Text)__instance).text = "실내 생명체";
				break;
			case "Outdoor Entity":
				((TMP_Text)__instance).text = "실외 생명체";
				break;
			case "Scrap":
				((TMP_Text)__instance).text = "폐품";
				break;
			case "Map Object":
				((TMP_Text)__instance).text = "맵 물체";
				break;
			case "Map Hazard":
				((TMP_Text)__instance).text = "맵 함정";
				break;
			case "Imperium Preferences":
				((TMP_Text)__instance).text = "Imperium 개인 설정";
				break;
			case "General Logging":
				((TMP_Text)__instance).text = "일반 로깅";
				break;
			case "Oracle Logging":
				((TMP_Text)__instance).text = "Oracle 로깅";
				break;
			case "Left Handed Mode":
				((TMP_Text)__instance).text = "왼손 모드";
				break;
			case "Custom Welcome":
				((TMP_Text)__instance).text = "커스텀 환영문";
				break;
			case "Enable Tooltips":
				((TMP_Text)__instance).text = "툴팁 활성화";
				break;
			case "Enable Sounds":
				((TMP_Text)__instance).text = "소리 활성화";
				break;
			case "UE Mouse Fix":
				((TMP_Text)__instance).text = "UE 마우스 수정";
				break;
			case "Quickload":
				((TMP_Text)__instance).text = "빠른 시작";
				break;
			case "Skip Splash":
				((TMP_Text)__instance).text = "스플래시 건너뛰기";
				break;
			case "Auto Load Save":
				((TMP_Text)__instance).text = "자동 파일 로드";
				break;
			case "Auto Launch":
				((TMP_Text)__instance).text = "자동 실행 모드";
				break;
			case "Clean Save":
				((TMP_Text)__instance).text = "저장 파일 비우기";
				break;
			case "Launch Mode":
				((TMP_Text)__instance).text = "실행 모드";
				break;
			case "Online":
				((TMP_Text)__instance).text = "온라인";
				break;
			case "Save File Number":
				((TMP_Text)__instance).text = "저장 파일";
				break;
			case "Notification":
				((TMP_Text)__instance).text = "알림";
				break;
			case "Spawn Reports":
				((TMP_Text)__instance).text = "생성 보고";
				break;
			case "Oracle Updates":
				((TMP_Text)__instance).text = "Oracle 업데이트";
				break;
			case "Confirmations":
				((TMP_Text)__instance).text = "확인";
				break;
			case "Access Control":
				((TMP_Text)__instance).text = "제어 접근";
				break;
			case "Hosting":
				((TMP_Text)__instance).text = "호스팅";
				break;
			case "Allow Imperium on clients":
				((TMP_Text)__instance).text = "클라이언트가 Imperium를 사용하도록 허용";
				break;
			case "Appearance":
				((TMP_Text)__instance).text = "외관";
				break;
			case "Factory Reset":
				((TMP_Text)__instance).text = "공장 초기화";
				break;
			case "Reset UI":
				((TMP_Text)__instance).text = "UI 초기화";
				break;
			case "Enable Minimap":
				((TMP_Text)__instance).text = "미니맵 활성화";
				break;
			case "Enable Compass":
				((TMP_Text)__instance).text = "나침반 활성화";
				break;
			case "Rotation Lock":
				((TMP_Text)__instance).text = "회전 잠금";
				break;
			case "Unlock View":
				((TMP_Text)__instance).text = "시점 잠금 해제";
				break;
			case "Auto Clipping":
				((TMP_Text)__instance).text = "자동 클리핑";
				break;
			case "Target":
				((TMP_Text)__instance).text = "목표물";
				break;
			case "Layers":
				((TMP_Text)__instance).text = "레이어";
				break;
			case "Indoor":
				((TMP_Text)__instance).text = "실내";
				break;
			case "Outdoor":
				((TMP_Text)__instance).text = "실외";
				break;
			case "Daytime":
				((TMP_Text)__instance).text = "주간 적";
				break;
			case "Pos":
				((TMP_Text)__instance).text = "위치";
				break;
			case "Rot":
				((TMP_Text)__instance).text = "회전";
				break;
			case "Area":
				((TMP_Text)__instance).text = "지역";
				break;
			case "Time":
				((TMP_Text)__instance).text = "시간";
				break;
			}
			((TMP_Text)__instance).text.Replace(" collected!", " 수집함!");
			((TMP_Text)__instance).text.Replace("Value: ", "가치: ");
			if (((TMP_Text)__instance).text.Contains("Boot Distributioner Application v0.04"))
			{
				((TMP_Text)__instance).text = "      BG IG, 시스템 행동 연합\r\n      Copyright (C) 2084-2108, Halden Electronics Inc.\r\n\r\nCPU 종류       :     BORSON 300 CPU at 2500 MHz\r\n메모리 테스트  :      4521586K OK\r\n\r\n부트 분배기 애플리케이션 v0.04\r\nCopyright (C) 2107 Distributioner\r\n    Sting X 롬 감지\r\n    웹 LNV 확장기 감지\r\n    심박수 감지 OK\r\n\r\n\r\nUTGF 장치 수신 중...\r\n\r\n신체    ID     신경     장치 클래스\r\n________________________________________\r\n\r\n2      52   Jo152       H515\r\n2      52   Sa5155      H515\r\n2      52   Bo75        H515\r\n2      52   Eri510      H515\r\n1      36   Ell567      H515\r\n1      36   Jos912      H515\r\n0\r\n";
			}
			else if (((TMP_Text)__instance).text.Contains("You have one day to make as much profit as possible."))
			{
				((TMP_Text)__instance).text = "주간 챌린지 달입니다. 하루 안에 가능한 한 많은 수익을 얻으세요. 원하는 만큼 다시 시도할 수 있습니다.";
			}
		}
	}
	[HarmonyPatch(typeof(Terminal))]
	internal class TerminalPatch
	{
		public static bool vehicleChecked;

		private static FieldInfo modifyingTextField = AccessTools.Field(typeof(Terminal), "modifyingText");

		private static FieldInfo totalCostField = AccessTools.Field(typeof(Terminal), "totalCostOfItems");

		[HarmonyPostfix]
		[HarmonyPatch("Start")]
		private static void Start_Postfix(Terminal __instance, ref TerminalNodesList ___terminalNodes, ref List<TerminalNode> ___enemyFiles, ref TMP_InputField ___screenText, ref string ___currentText)
		{
			Plugin.mls.LogInfo((object)("클라이언트 버전: " + GameNetworkManager.Instance.gameVersionNum));
			TranslateKeyword(___terminalNodes, ___enemyFiles);
			TranslateNode(__instance);
		}

		private static void TranslateVehicle(Terminal instance)
		{
			BuyableVehicle[] buyableVehicles = instance.buyableVehicles;
			foreach (BuyableVehicle val in buyableVehicles)
			{
				if (val.vehicleDisplayName == "Cruiser")
				{
					val.vehicleDisplayName = "크루저";
				}
			}
		}

		private static void TranslateTerminalScreen(string key, TMP_InputField screenText, ref string ___currentText)
		{
			string text = TranslationManager.ReplaceArrayTextAll(screenText.text, "Terminal");
			text = (screenText.text = TranslationManager.ReplaceArrayTextAll(screenText.text, "Planets"));
			___currentText = text;
		}

		[HarmonyPrefix]
		[HarmonyPatch("LoadNewNode")]
		public static bool LoadNewNode_Prefix(Terminal __instance, TerminalNode node)
		{
			modifyingTextField.SetValue(__instance, true);
			__instance.RunTerminalEvents(node);
			((Selectable)__instance.screenText).interactable = true;
			string text = "";
			if (node.clearPreviousText)
			{
				text = "\n\n\n" + node.displayText.ToString();
			}
			else
			{
				text = "\n\n" + __instance.screenText.text.ToString() + "\n\n" + node.displayText.ToString();
				int num = text.Length - 250;
				text = text.Substring(Mathf.Clamp(num, 0, text.Length)).ToString();
			}
			try
			{
				text = TextPostProcess(__instance, text, node);
			}
			catch (Exception arg)
			{
				Debug.LogError((object)$"An error occured while post processing terminal text: {arg}");
			}
			__instance.screenText.text = text;
			__instance.currentText = __instance.screenText.text;
			__instance.textAdded = 0;
			if (node.playSyncedClip != -1)
			{
				__instance.PlayTerminalAudioServerRpc(node.playSyncedClip);
			}
			else if ((Object)(object)node.playClip != (Object)null)
			{
				__instance.terminalAudio.PlayOneShot(node.playClip);
			}
			__instance.LoadTerminalImage(node);
			__instance.currentNode = node;
			return false;
		}

		private static string TextPostProcess(Terminal __instance, string modifiedDisplayText, TerminalNode node)
		{
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Invalid comparison between Unknown and I4
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Invalid comparison between Unknown and I4
			int num = modifiedDisplayText.Split("[planetTime]").Length - 1;
			if (num > 0)
			{
				Regex regex = new Regex(Regex.Escape("[planetTime]"));
				for (int i = 0; i < num && __instance.moonsCatalogueList.Length > i; i++)
				{
					Debug.Log((object)$"isDemo:{GameNetworkManager.Instance.isDemo} ; {__instance.moonsCatalogueList[i].lockedForDemo}");
					string replacement = ((GameNetworkManager.Instance.isDemo && __instance.moonsCatalogueList[i].lockedForDemo) ? TranslationManager.GetArrayTranslation("Terminal", "Locked") : (((int)__instance.moonsCatalogueList[i].currentWeather != -1) ? ("(" + TranslationManager.GetArrayTranslation("Planets", ((object)(LevelWeatherType)(ref __instance.moonsCatalogueList[i].currentWeather)).ToString()) + ")") : ""));
					modifiedDisplayText = regex.Replace(modifiedDisplayText, replacement, 1);
				}
			}
			try
			{
				if (node.displayPlanetInfo != -1)
				{
					string newValue = (((int)StartOfRound.Instance.levels[node.displayPlanetInfo].currentWeather != -1) ? (TranslationManager.GetArrayTranslation("Planets", ((object)(LevelWeatherType)(ref StartOfRound.Instance.levels[node.displayPlanetInfo].currentWeather)).ToString()) ?? "") : TranslationManager.GetArrayTranslation("Planets", "mild weather"));
					modifiedDisplayText = modifiedDisplayText.Replace("[currentPlanetTime]", newValue);
				}
			}
			catch
			{
				Debug.Log((object)$"Exception occured on terminal while setting node planet info; current node displayPlanetInfo:{node.displayPlanetInfo}");
			}
			if (modifiedDisplayText.Contains("[warranty]"))
			{
				modifiedDisplayText = ((!__instance.hasWarrantyTicket) ? modifiedDisplayText.Replace("[warranty]", "") : modifiedDisplayText.Replace("[warranty]", TranslationManager.GetArrayTranslation("Terminal", "FreeWarranty", 0, partialMatch: false, "[warranty]")));
			}
			if (modifiedDisplayText.Contains("[currentScannedEnemiesList]"))
			{
				if (__instance.scannedEnemyIDs == null || __instance.scannedEnemyIDs.Count <= 0)
				{
					modifiedDisplayText = modifiedDisplayText.Replace("[currentScannedEnemiesList]", TranslationManager.GetArrayTranslation("Terminal", "NoCreatureData", 0, partialMatch: false, "No data collected on wildlife. Scans are required."));
				}
				else
				{
					StringBuilder stringBuilder = new StringBuilder();
					for (int j = 0; j < __instance.scannedEnemyIDs.Count; j++)
					{
						Debug.Log((object)$"scanID # {j}: {__instance.scannedEnemyIDs[j]}; {__instance.enemyFiles[__instance.scannedEnemyIDs[j]].creatureName}");
						Debug.Log((object)$"scanID # {j}: {__instance.scannedEnemyIDs[j]}");
						stringBuilder.Append("\n" + __instance.enemyFiles[__instance.scannedEnemyIDs[j]].creatureName);
						if (__instance.newlyScannedEnemyIDs.Contains(__instance.scannedEnemyIDs[j]))
						{
							stringBuilder.Append(" (" + TranslationManager.GetArrayTranslation("Terminal", "NEW") + ")");
						}
					}
					modifiedDisplayText = modifiedDisplayText.Replace("[currentScannedEnemiesList]", stringBuilder.ToString());
				}
			}
			if (modifiedDisplayText.Contains("[buyableItemsList]"))
			{
				if (__instance.buyableItemsList == null || __instance.buyableItemsList.Length == 0)
				{
					modifiedDisplayText = modifiedDisplayText.Replace("[buyableItemsList]", TranslationManager.GetArrayTranslation("Terminal", "NoStock"));
				}
				else
				{
					StringBuilder stringBuilder2 = new StringBuilder();
					for (int k = 0; k < __instance.buyableItemsList.Length; k++)
					{
						stringBuilder2.Append("\n* " + TranslationManager.GetArrayTranslation("Item", __instance.buyableItemsList[k].itemName) + "  //  " + TranslationManager.GetArrayTranslation("Terminal", "Price") + ": $" + (float)__instance.buyableItemsList[k].creditsWorth * ((float)__instance.itemSalesPercentages[k] / 100f));
						if (__instance.itemSalesPercentages[k] != 100)
						{
							stringBuilder2.Append(string.Format("   ({0}% " + TranslationManager.GetArrayTranslation("Terminal", "OFF!") + ")", 100 - __instance.itemSalesPercentages[k]));
						}
					}
					modifiedDisplayText = modifiedDisplayText.Rep