using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using Mono.Cecil; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("FontPatcher")] [assembly: AssemblyProduct("FontPatcher")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: ComVisible(false)] [assembly: Guid("fb65bb4e-b8f2-4af6-ae12-6bb122f56123")] [assembly: AssemblyFileVersion("1.1.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.1.0.0")] public static class FontPatcher { private static ManualLogSource _Logger = Logger.CreateLogSource("FontPatcher"); public static IEnumerable TargetDlls { get; } = Array.Empty(); public static void Finish() { string text = "notosans_custom"; string text2 = Path.Combine(Paths.ConfigPath, "Translation", text); string destFileName = Path.Combine(Paths.GameRootPath, text); if (!File.Exists(text2)) { _Logger.LogError((object)"字體檔案遺失,需要重新安裝模組!"); return; } try { _Logger.LogInfo((object)"正在複製字體..."); File.Copy(text2, destFileName, overwrite: true); _Logger.LogInfo((object)"成功複製字體!"); } catch (Exception arg) { _Logger.LogError((object)$"字體複製失敗: {arg}"); } } public static void Patch(AssemblyDefinition _) { } }