using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("RPKP_Notifier")] [assembly: AssemblyDescription("Show a notification for RPKP info")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("RPKP_Notifier")] [assembly: AssemblyCopyright("© 2025 whiteline7. All rights reserved")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("fd6795f8-22c5-4871-8f05-f6832b875355")] [assembly: AssemblyFileVersion("6.0.1.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("6.0.1.0")] [module: UnverifiableCode] [BepInPlugin("whiteline7.rpkp_notifier", "RPKP_Notifier", "1.0.0")] public class RPKPTranslationPatcherNotice : BaseUnityPlugin { private sealed class NoticeRunner : MonoBehaviour { private ManualLogSource logSource; private bool uiShown; private bool uiCreated; private GameObject rootObject; public void Init(ManualLogSource logger) { logSource = logger; } private void Start() { Log("런너 Start 진입"); ((MonoBehaviour)this).Invoke("ShowNotice", 10f); Log("10초 지연 예약 완료"); } private void ShowNotice() { Log("표시 처리 시작"); if (uiShown) { Log("이미 표시되어 있음"); return; } uiShown = true; CreateNoticeUI(); } private void CreateNoticeUI() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Expected O, but got Unknown //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Expected O, but got Unknown //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) if (uiCreated) { Log("UI가 이미 생성되어 있음"); return; } EnsureEventSystem(); rootObject = new GameObject("RPKP_Translation_Patcher_Notice"); ((Object)rootObject).hideFlags = (HideFlags)52; Object.DontDestroyOnLoad((Object)(object)rootObject); Canvas obj = rootObject.AddComponent(); obj.renderMode = (RenderMode)0; obj.sortingOrder = 32767; CanvasScaler obj2 = rootObject.AddComponent(); obj2.uiScaleMode = (ScaleMode)1; obj2.referenceResolution = new Vector2(1920f, 1080f); obj2.matchWidthOrHeight = 0.5f; rootObject.AddComponent(); GameObject val = new GameObject("Panel"); val.transform.SetParent(rootObject.transform, false); ((Graphic)val.AddComponent()).color = new Color(0f, 0f, 0f, 0.78f); RectTransform component = val.GetComponent(); component.anchorMin = new Vector2(0.5f, 0.5f); component.anchorMax = new Vector2(0.5f, 0.5f); component.pivot = new Vector2(0.5f, 0.5f); component.sizeDelta = new Vector2(1120f, 420f); component.anchoredPosition = Vector2.zero; GameObject val2 = new GameObject("MessageText"); val2.transform.SetParent(val.transform, false); Text obj3 = val2.AddComponent(); obj3.text = "RPKP 한글패치가 스팀 로컬 폴더 위치에 한글화 파일을 설치했습니다!\r\n이 파일은 RPKP를 제거해도 사라지지 않으며 스팀에서 게임을 실행해도 한글로 실행됩니다.\r\n만약 언어를 영어로 되돌리고 싶다면 모드매니저의 config editor에서\r\nwhiteline7.rpkp_translation_patcher.cfg 를 찾아서 Install 설정을 Delete로 변경하고\r\n게임을 실행하십쇼. 그런 후에 RPKP를 제거하시면 게임이 완전히 영어로 복구됩니다.\r\n혹은 게임 파일 리셋이나 파일 전체 삭제 후 무결성 검사로 복구하기도 가능합니다."; obj3.font = Resources.GetBuiltinResource("Arial.ttf"); obj3.fontSize = 24; obj3.alignment = (TextAnchor)4; ((Graphic)obj3).color = Color.white; obj3.horizontalOverflow = (HorizontalWrapMode)0; obj3.verticalOverflow = (VerticalWrapMode)1; obj3.resizeTextForBestFit = true; obj3.resizeTextMinSize = 18; obj3.resizeTextMaxSize = 24; RectTransform component2 = val2.GetComponent(); component2.anchorMin = new Vector2(0f, 0f); component2.anchorMax = new Vector2(1f, 1f); component2.offsetMin = new Vector2(28f, 96f); component2.offsetMax = new Vector2(-28f, -28f); GameObject val3 = new GameObject("ConfirmButton"); val3.transform.SetParent(val.transform, false); Image val4 = val3.AddComponent(); ((Graphic)val4).color = new Color(1f, 1f, 1f, 0.16f); Button obj4 = val3.AddComponent