diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0de6c7d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,82 @@ +name: CI + +on: + push: + branches: [main, develop, feature/**] + pull_request: + branches: [main] + workflow_dispatch: + +jobs: + build-mod: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.x' + + - name: Build SFS_HAN_MOD (Native) + run: dotnet build mod/SFS_HAN_MOD.csproj -c Release + + - name: Build SFS_FontFix (BepInEx) + run: dotnet build mod/SFS_FontFix.csproj -c Release + + - name: Copy DLLs to tool assets + run: | + Copy-Item dist/SFS_HAN_MOD.dll tool/rust/assets/SFS_HAN_MOD.dll -Force + Copy-Item dist/SFS_FontFix.dll tool/rust/assets/SFS_FontFix.dll -Force + + - name: Upload MOD artifacts + uses: actions/upload-artifact@v4 + with: + name: mod-dlls + path: dist/ + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Python syntax check + run: python -c "import py_compile; py_compile.compile('tool/python/SFS_Chinese_Tool.py', doraise=True)" + + build-tool: + needs: build-mod + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - name: Download MOD artifacts + uses: actions/download-artifact@v4 + with: + name: mod-dlls + path: tool/rust/assets/ + + - name: Setup Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + cache: true + + - name: Build Rust tool + run: cargo build --release + working-directory: tool/rust + + - name: Package release + run: | + New-Item -ItemType Directory -Force -Path dist + Copy-Item tool/rust/target/release/SFS_Language_TOOL.exe dist/ + Copy-Item tool/rust/assets/NotoSansSC.ttf dist/ + Copy-Item tool/rust/assets/SFS_HAN_MOD.dll dist/ + Compress-Archive -Path dist/* -DestinationPath dist/SFS_Chinese_Tool.zip + + - name: Upload release artifact + uses: actions/upload-artifact@v4 + with: + name: SFS_Chinese_Tool + path: dist/SFS_Chinese_Tool.zip diff --git a/.gitignore b/.gitignore index 62532f7..4ef972c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,24 +1,26 @@ -# Rust -/target/ -Cargo.lock +# Build outputs +dist/ +target/ +*.zip +*.exe + +# Rust tool bundled MOD DLLs (built by CI from mod/ source) +tool/rust/assets/SFS_HAN_MOD.dll +tool/rust/assets/SFS_FontFix.dll # IDE -.vscode/ .idea/ +.vs/ +.vscode/ +*.swp *.suo *.user +obj/ +bin/ -# OS -.DS_Store -Thumbs.db - -# Build outputs -SFS_HAN_MOD/SFS_HAN_MOD/bin/ -SFS_HAN_MOD/SFS_HAN_MOD/lib/ -SFS_HAN_MOD/SFS_HAN_MOD/obj/ -SFS_Language_TOOL/target/ -SFS_Language_TOOL/assets/ - -# Release -release/ -*.zip +# Legacy BepInEx distribution binaries (reference only, not built) +legacy/**/BepInEx_win_x64_5.4.23.5/ +legacy/**/*.dll +legacy/**/*.ttf +legacy/**/*.ttc +legacy/**/SFS_FontFix.dll diff --git a/README.md b/README.md index 6961f5b..1a0299f 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,23 @@ # SFS 汉化 -本项目使用官方汉化,加上字体修复MOD,进行汉化,可以使用我们最新的 **SFS_Chinese_Toolv2.0**,的工具进行快速汉化 -## 声明 -从SFS_Chinese_Toolv2.0开始,将不再使用 **BepInEx** - -- **BepInEx 集成与许可**: - - 本项目已包含 BepInEx 的发布文件。 - - 文件来源:[BepInEx v5.4.23.5](https://github.com/BepInEx/BepInEx/releases/tag/v5.4.23.5) - - BepInEx 采用 **LGPL-2.1** 许可证,详情请参见:[BepInEx/LICENSE](https://github.com/BepInEx/BepInEx/blob/master/LICENSE) +本项目提供 Spaceflight Simulator 的字体修复 MOD 与汉化工具 解决游戏中文字符显示为口的问题 ## 原理 -- **V1.0版本**:游戏的 `normal` 字体不含中文字形。此 MOD 将其替换为 Noto Sans SC,并创建 TextMeshPro 动态字体。 +游戏的 normal 字体不含中文字形 MOD 在运行时将其替换为 Noto Sans SC 并创建 TextMeshPro 动态字体 -- **V2.0版本**:使用字体文件修复"口",再使用官方汉化 +## 项目结构 -## 使用 +``` +mod/ MOD 源码 (C# Harmony Patch) +tool/rust/ Rust 桌面安装工具 +tool/python/ Python 桌面工具 +legacy/ 旧版本参考 +``` -将 `SFS_FontFix.dll` 和 `NotoSansSC.ttf` 放入 `BepInEx/plugins/SFS_FontFix/`。 +## 参与 -## SFS I'M SB +欢迎提交 Issue 和 Pull Request 帮助改进翻译 修复 Bug 或优化性能 -我没招了 我只能说SFS的PC版本就是没想过多语言化 甚至资源直接挪用了PE 且一些设置与其他内容是没有在翻译文件中有对照键的(后续会写中文补齐补丁) ;做游戏的时候至少考虑一下多语言支持吧 +项目地址 https://github.com/Dere3046/SFS_Chinese +翻译仓库 https://github.com/sTheNight/Spaceflight-Simulator-CNlang diff --git a/SFS_Chinese_Toolv2.0/README.md b/SFS_Chinese_Toolv2.0/README.md deleted file mode 100644 index 7e0aef6..0000000 --- a/SFS_Chinese_Toolv2.0/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# SFS 汉化工具 -- **SFS_Chinese_Toolv2.0**,工具可以帮助您进行快速汉化或使用自定义文本 - -## 声明 -从SFS_Chinese_Toolv2.0开始,将不再使用 **BepInEx** - -## 原理 -使用字体文件修复"口",再使用官方汉化 diff --git a/SFS_Chinese_Toolv2.0/SFS_Chinese.zip b/SFS_Chinese_Toolv2.0/SFS_Chinese.zip deleted file mode 100644 index 39a9cdc..0000000 Binary files a/SFS_Chinese_Toolv2.0/SFS_Chinese.zip and /dev/null differ diff --git a/SFS_Chinese_Toolv2.0/SFS_HAN_MODv5.1.0.zip b/SFS_Chinese_Toolv2.0/SFS_HAN_MODv5.1.0.zip deleted file mode 100644 index 781682f..0000000 Binary files a/SFS_Chinese_Toolv2.0/SFS_HAN_MODv5.1.0.zip and /dev/null differ diff --git a/SFS_FontFix_Plugin/README.md b/SFS_FontFix_Plugin/README.md deleted file mode 100644 index e70b88b..0000000 --- a/SFS_FontFix_Plugin/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# SFS 字体修复 MOD - -BepInEx 插件,替换游戏默认字体解决中文显示 `口` 的问题。 - -## 声明 - -- **技术栈说明**:本部分内容/相关操作并非本人主要技术领域,可能存在不完善之处。 -- **BepInEx 集成与许可**: - - 本项目已包含 BepInEx 的发布文件。 - - 文件来源:[BepInEx v5.4.23.5](https://github.com/BepInEx/BepInEx/releases/tag/v5.4.23.5) - - BepInEx 采用 **LGPL-2.1** 许可证,详情请参见:[BepInEx/LICENSE](https://github.com/BepInEx/BepInEx/blob/master/LICENSE) - -## 原理 - -游戏的 `normal` 字体不含中文字形。此 MOD 将其替换为 Noto Sans SC,并创建 TextMeshPro 动态字体。 - -## 使用 - -将 `SFS_FontFix.dll` 和 `NotoSansSC.ttf` 放入 `BepInEx/plugins/SFS_FontFix/`。 - -## SFS I'M SB - -我没招了 我只能说SFS的PC版本就是没想过多语言化 甚至资源直接挪用了PE 且一些设置与其他内容是没有在翻译文件中有对照键的(后续会写中文补齐补丁) ;做游戏的时候至少考虑一下多语言支持吧 \ No newline at end of file diff --git a/SFS_FontFix_Plugin/SFS_FontFix/FontFixPlugin.cs b/SFS_FontFix_Plugin/SFS_FontFix/FontFixPlugin.cs deleted file mode 100644 index de87a90..0000000 --- a/SFS_FontFix_Plugin/SFS_FontFix/FontFixPlugin.cs +++ /dev/null @@ -1,226 +0,0 @@ -using BepInEx; -using BepInEx.Logging; -using HarmonyLib; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using TMPro; -using UnityEngine; -using UnityEngine.UI; -using UnityEngine.TextCore.LowLevel; - -namespace SFS_FontFix -{ - [BepInPlugin("com.sfs.fontfix", "SFS Font Fix", "5.1.0")] - public class FontFixPlugin : BaseUnityPlugin - { - public static FontFixPlugin Instance; - public static ManualLogSource Log => Instance?.Logger; - - private Font chineseUnityFont; - private string chineseFontFilePath; - private TMP_FontAsset chineseTMPFont; - private bool isInitialized; - private Font originalNormalFont; - - private void Awake() - { - Instance = this; - Logger.LogInfo("SFS Font Fix v5.1.0 loaded"); - new Harmony("com.sfs.fontfix").PatchAll(); - } - - private void LateUpdate() - { - if (!isInitialized && SFS.Translations.TranslationManager.main != null) - LoadAndReplaceFont(); - - if (isInitialized && chineseTMPFont != null) - ApplyTMPFontEveryFrame(); - } - - private void ApplyTMPFontEveryFrame() - { - foreach (var tmp in FindObjectsOfType()) - { - if (tmp == null) continue; - if (tmp.font != chineseTMPFont) - { - tmp.font = chineseTMPFont; - tmp.SetAllDirty(); - tmp.ForceMeshUpdate(); - } - if (tmp.text != null && tmp.text.Contains(":")) - { - tmp.text = tmp.text.Replace(':', ':'); - tmp.SetAllDirty(); - tmp.ForceMeshUpdate(); - } - } - } - - private void LoadAndReplaceFont() - { - if (isInitialized) return; - var manager = SFS.Translations.TranslationManager.main; - if (manager?.fonts == null || manager.fonts.Count == 0) return; - - string fontPath = FindFontFile(); - if (fontPath == null) return; - - chineseUnityFont = new Font(fontPath); - chineseFontFilePath = fontPath; - - CreateTMPFont(); - ReplaceNormalFont(manager); - ApplyTMPFontEveryFrame(); - - isInitialized = true; - } - - private string FindFontFile() - { - string pluginPath = Path.GetDirectoryName(typeof(FontFixPlugin).Assembly.Location); - foreach (var name in new[] { "NotoSansSC-Bold.ttf", "NotoSansSC-Bold.otf", "NotoSansSC.ttf", "NotoSansSC.otf", "Font.ttf", "Font.otf" }) - { - string path = Path.Combine(pluginPath, name); - if (File.Exists(path)) return path; - } - return null; - } - - private void CreateTMPFont() - { - if (chineseUnityFont == null) return; - try - { - chineseTMPFont = TMP_FontAsset.CreateFontAsset( - chineseUnityFont, 90, 9, GlyphRenderMode.SDFAA, 4096, 4096, - AtlasPopulationMode.Dynamic, true); - if (chineseTMPFont == null) return; - chineseTMPFont.name = "NotoSansSC SDF"; - chineseTMPFont.fallbackFontAssetTable = new List(); - } - catch (Exception e) { Logger.LogError("Failed to create TMP font: " + e); } - } - - private void ReplaceNormalFont(SFS.Translations.TranslationManager manager) - { - var fonts = manager.fonts; - for (int i = 0; i < fonts.Count; i++) - { - if (fonts[i] != null && fonts[i].name.ToLower() == "normal") - { - originalNormalFont = fonts[i]; - fonts[i] = chineseUnityFont; - if (manager.currentFont == originalNormalFont) - manager.currentFont = chineseUnityFont; - return; - } - } - if (fonts.Count > 0 && fonts[0] != null) - { - originalNormalFont = fonts[0]; - fonts[0] = chineseUnityFont; - } - } - - public void RefreshFonts() - { - if (!isInitialized) return; - var manager = SFS.Translations.TranslationManager.main; - if (manager != null) ReplaceNormalFont(manager); - ApplyTMPFontEveryFrame(); - } - - public static FontFixPlugin GetInstance() => Instance; - public static bool IsReady() => Instance != null && Instance.isInitialized; - public static TMP_FontAsset GetChineseTMPFont() => Instance?.chineseTMPFont; - public static Font GetChineseUnityFont() => Instance?.chineseUnityFont; - } - - [HarmonyPatch(typeof(SFS.Translations.TranslationManager), "SetLanguage")] - public class SetLanguagePatch - { - [HarmonyPostfix] - static void Postfix(SFS.Translations.TranslationManager __instance) - { - if (FontFixPlugin.GetChineseUnityFont() != null && __instance.currentFont != FontFixPlugin.GetChineseUnityFont()) - __instance.currentFont = FontFixPlugin.GetChineseUnityFont(); - } - } - - [HarmonyPatch(typeof(SFS.Translations.FontSetter), "SetFont")] - public class FontSetter_TMP_Patch - { - [HarmonyPostfix] - static void Postfix(Font font, SFS.Translations.FontSetter __instance) - { - if (!FontFixPlugin.IsReady()) return; - var tmp = __instance.GetComponentInChildren(); - if (tmp != null && tmp.font != FontFixPlugin.GetChineseTMPFont()) - { - tmp.font = FontFixPlugin.GetChineseTMPFont(); - tmp.SetAllDirty(); - tmp.ForceMeshUpdate(); - } - } - } - - [HarmonyPatch(typeof(SFS.World.FlightInfoDrawer), "Update")] - public class FlightInfoDrawer_Update_Patch - { - [HarmonyPrefix] - static bool Prefix(SFS.World.FlightInfoDrawer __instance) - { - if (!FontFixPlugin.IsReady()) return true; - var chineseFont = FontFixPlugin.GetChineseTMPFont(); - if (chineseFont == null) return true; - - try - { - if (SFS.World.PlayerController.main.player.Value is SFS.World.Rocket rocket) - { - __instance.menuHolder.SetActive(true); - float mass = rocket.rb2d.mass; - float thrust = rocket.partHolder.GetModules() - .Sum((SFS.Parts.Modules.EngineModule a) => a.thrust.Value * a.throttle_Out.Value); - - __instance.massText.Text = mass.ToString("0.00") + " t"; - __instance.thrustText.Text = thrust.ToString("0.0") + " kN"; - __instance.thrustToWeightText.Text = (mass > 0 ? (thrust / mass).ToString("0.00") : "0.00"); - __instance.partCountText.Text = rocket.partHolder.parts.Count.ToString(); - } - else - { - __instance.massText.Text = "0.00 t"; - __instance.thrustText.Text = "0.0 kN"; - __instance.thrustToWeightText.Text = "0.00"; - __instance.partCountText.Text = "0"; - } - __instance.timewarpText.Text = SFS.World.WorldTime.main.timewarpSpeed + "x"; - } - catch { } - - ForceRefresh(__instance.timewarpText, chineseFont); - ForceRefresh(__instance.massText, chineseFont); - ForceRefresh(__instance.thrustText, chineseFont); - ForceRefresh(__instance.thrustToWeightText, chineseFont); - ForceRefresh(__instance.partCountText, chineseFont); - return false; - } - - static void ForceRefresh(SFS.UI.TextAdapter adapter, TMP_FontAsset font) - { - if (adapter == null) return; - var tmp = adapter.GetComponent(); - if (tmp == null) return; - if (tmp.font != font) tmp.font = font; - if (tmp.text != null && tmp.text.Contains(":")) - tmp.text = tmp.text.Replace(':', ':'); - tmp.SetAllDirty(); - tmp.ForceMeshUpdate(); - } - } -} diff --git a/SFS_HAN_MOD/LICENSE.txt b/SFS_HAN_MOD/LICENSE.txt deleted file mode 100644 index 83afe11..0000000 --- a/SFS_HAN_MOD/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2026 Dere and WMYYL - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/SFS_HAN_MOD/README.md b/SFS_HAN_MOD/README.md deleted file mode 100644 index 310ab1f..0000000 --- a/SFS_HAN_MOD/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# SFS_HAN_MOD - SFS 字体修复 MOD - -修复 Spaceflight Simulator 中文显示为 `口` 的问题。 - -## 功能 - -- 替换游戏默认 `normal` 字体为 Noto Sans SC -- 动态创建 TextMeshPro 字体(支持所有中文字符) -- 修复 HUD 上的时间加速、质量、推力等数值显示 - -## 依赖 - -| 依赖 | 说明 | -|------|------| -| **BepInEx 5.x** | 提供 Harmony 运行时(游戏已内置 `0Harmony.dll`) | -| **NotoSansSC.ttf** | 已包含在发布包中 | -| **游戏版本 1.5.9+** | 测试通过 | - -> 游戏 `Managed/` 目录已包含 `0Harmony.dll`,MOD 通过它进行 Harmony Patch。 - -## 安装 - -1. 将 `SFS_HAN_MOD` 文件夹复制到游戏的 `Mods/` 目录下: - -``` -Spaceflight Simulator Game -└── Mods/ - └── SFS_HAN_MOD/ - ├── SFS_HAN_MOD.dll - └── NotoSansSC.ttf -``` - -## 使用 - -启动游戏后,MOD 会自动加载并修复中文显示。在游戏内 MOD 菜单中可以启用/禁用此 MOD。 - -## 版本 - -**MOD 版本**: 5.1.0 -**支持游戏版本**: 1.5.9+ - -## 编译 - -```bash -cd SFS_HAN_MOD/SFS_HAN_MOD -dotnet build SFS_HAN_MOD.csproj -c Release -``` - -输出: `bin/Release/SFS_HAN_MOD.dll` - -### 依赖说明 - -`lib/` 目录应当包含所有编译所需的 DLL 引用 包括不限于如下(来自v1.6版本游戏的 `Managed/` 目录): -- `0Harmony.dll` -- `Assembly-CSharp.dll` -- `Unity.TextMeshPro.dll` -- `UnityEngine*.dll` \ No newline at end of file diff --git a/SFS_HAN_MOD/SFS_HAN_MOD/SFS_HAN_MOD.csproj b/SFS_HAN_MOD/SFS_HAN_MOD/SFS_HAN_MOD.csproj deleted file mode 100644 index 4b2e40f..0000000 --- a/SFS_HAN_MOD/SFS_HAN_MOD/SFS_HAN_MOD.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - net472 - Library - latest - ./bin/Release - false - SFS_HAN_MOD - SFS_HAN_MOD - - - - ./lib/0Harmony.dllfalse - ./lib/UnityEngine.dllfalse - ./lib/UnityEngine.CoreModule.dllfalse - ./lib/UnityEngine.UI.dllfalse - ./lib/Unity.TextMeshPro.dllfalse - ./lib/UnityEngine.TextRenderingModule.dllfalse - ./lib/UnityEngine.TextCoreFontEngineModule.dllfalse - ./lib/UnityEngine.Physics2DModule.dllfalse - ./lib/Assembly-CSharp.dllfalse - - diff --git a/SFS_Language_TOOL/LICENSE.txt b/SFS_Language_TOOL/LICENSE.txt deleted file mode 100644 index 40b7172..0000000 --- a/SFS_Language_TOOL/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2026 Dere - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/.doorstop_version b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/.doorstop_version deleted file mode 100644 index ae15394..0000000 --- a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/.doorstop_version +++ /dev/null @@ -1 +0,0 @@ -4.5.0 \ No newline at end of file diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/0Harmony.dll b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/0Harmony.dll deleted file mode 100644 index 99daef7..0000000 Binary files a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/0Harmony.dll and /dev/null differ diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/0Harmony.xml b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/0Harmony.xml deleted file mode 100644 index 70ec413..0000000 --- a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/0Harmony.xml +++ /dev/null @@ -1,4288 +0,0 @@ - - - - 0Harmony - - - - A factory to create delegate types - - - - Instance for the delegate type factory - - - Exists for API compatibility with Harmony - - - - - Creates a delegate type for a method - - Type of the return value - Types of the arguments - The new delegate type for the given type info - - - - Creates a delegate type for a method - - Type of the return value - Types of the arguments - Calling convention. If specified, adds to the delegate type - The new delegate type for the given type info - - - Creates a delegate type for a method - The method - The new delegate type - - - Creates a delegate type for a method - The method - Calling convention. If specified, adds to the delegate type. - The new delegate type - - - A getter delegate type - Type that getter gets field/property value from - Type of the value that getter gets - The instance get getter uses - An delegate - - - - A setter delegate type - Type that setter sets field/property value for - Type of the value that setter sets - The instance the setter uses - The value the setter uses - An delegate - - - - A constructor delegate type - Type that constructor creates - An delegate - - - - A helper class for fast access to getters and setters - - - Creates an instantiation delegate - Type that constructor creates - The new instantiation delegate - - - - Creates an getter delegate for a property - Type that getter reads property from - Type of the property that gets accessed - The property - The new getter delegate - - - - Creates an getter delegate for a field - Type that getter reads field from - Type of the field that gets accessed - The field - The new getter delegate - - - - Creates an getter delegate for a field (with a list of possible field names) - Type that getter reads field/property from - Type of the field/property that gets accessed - A list of possible field names - The new getter delegate - - - - Creates an setter delegate - Type that setter assigns property value to - Type of the property that gets assigned - The property - The new setter delegate - - - - Creates an setter delegate for a field - Type that setter assigns field value to - Type of the field that gets assigned - The field - The new getter delegate - - - - A delegate to invoke a method - The instance - The method parameters - The method result - - - A helper class to invoke method with delegates - - - Creates a fast invocation handler from a method - The method to invoke - Controls if boxed value object is accessed/updated directly - The - - - The directBoxValueAccess option controls how value types passed by reference (e.g. ref int, out my_struct) are handled in the arguments array - passed to the fast invocation handler. - Since the arguments array is an object array, any value types contained within it are actually references to a boxed value object. - Like any other object, there can be other references to such boxed value objects, other than the reference within the arguments array. - For example, - - var val = 5; - var box = (object)val; - var arr = new object[] { box }; - handler(arr); // for a method with parameter signature: ref/out/in int - - - - - If directBoxValueAccess is true, the boxed value object is accessed (and potentially updated) directly when the handler is called, - such that all references to the boxed object reflect the potentially updated value. - In the above example, if the method associated with the handler updates the passed (boxed) value to 10, both box and arr[0] - now reflect the value 10. Note that the original val is not updated, since boxing always copies the value into the new boxed value object. - - - If directBoxValueAccess is false (default), the boxed value object in the arguments array is replaced with a "reboxed" value object, - such that potential updates to the value are reflected only in the arguments array. - In the above example, if the method associated with the handler updates the passed (boxed) value to 10, only arr[0] now reflects the value 10. - - - - - Patch function helpers - - - Sorts patch methods by their priority rules - The original method - Patches to sort - Use debug mode - The sorted patch methods - - - - Sorts patch methods by their priority rules - The original method - Patches to sort - Use debug mode - The sorted patch methods - - - - Creates new replacement method with the latest patches and detours the original method - The original method - Information describing the patches - The newly created replacement method - - - - - High-level IL code manipulator for MonoMod that allows to manipulate a method as a stream of CodeInstructions. - - - - - Initialize IL transpiler - - Body of the method to transpile - Whether to always log everything for this instance - - - - Adds a transpiler method that edits the IL of the given method - - Transpiler method - Currently not implemented - - - - Processes and writes IL to the provided method body. - Note that this cleans the existing method body (removes insturctions and exception handlers). - - Method body to write to. - Original method that transpiler can optionally call into - - One of IL opcodes contains a CallSide (e.g. calli), which is currently not - fully supported. - - One of IL opcodes with an operand contains a null operand. - - - - Normalizes instructions into a consistent format for passing to transpilers. - Converts short branches to long, ensures that certain fields are properly initialized. - - Enumerable of instructions - Enumerable of normalized instructions - - - - Basic safe DLL emitter for dynamically generated s. - - Based on https://github.com/MonoMod/MonoMod.Common/blob/master/Utils/DMDGenerators/DMDCecilGenerator.cs - - - - Helper wrapper around ILProcessor to allow emitting code at certain positions - - - - - Write method body to a ILDasm -like representation - - Method body to write - String representation of the method body (locals and instruction) - Unexpected exception block type - - - - Patching methods potentially messes up the stack. - Especially calls to GetExecutingAssembly won't turn in correct methods - - - - Creates a patch sorter - Array of patches that will be sorted - Use debugging - - - Sorts internal PatchSortingWrapper collection and caches the results. - After first run the result is provided from the cache. - The original method - The sorted patch methods - - - Sorts internal PatchSortingWrapper collection and caches the results. - After first run the result is provided from the cache. - The original method - The sorted patch methods as instance - - - Checks if the sorter was created with the same patch list and as a result can be reused to - get the sorted order of the patches. - List of patches to check against - true if equal - - - Removes one unresolved dependency from the least important patch. - - - Outputs all unblocked patches from the waiting list to results list - - - Adds patch to both results list and handled patches set - Patch to add - - - Wrapper used over the Patch object to allow faster dependency access and - dependency removal in case of cyclic dependencies - - - Create patch wrapper object used for sorting - Patch to wrap - - - Determines how patches sort - The other patch - integer to define sort order (-1, 0, 1) - - - Determines whether patches are equal - The other patch - true if equal - - - Hash function - A hash code - - - Bidirectionally registers Patches as after dependencies - List of dependencies to register - - - Bidirectionally registers Patches as before dependencies - List of dependencies to register - - - Bidirectionally removes Patch from after dependencies - Patch to remove - - - Bidirectionally removes Patch from before dependencies - Patch to remove - - - Specifies the type of method - - - - This is a normal method - - - This is a getter - - - This is a setter - - - This is a constructor - - - This is a static constructor - - - This is an enumerator (, or UniTask coroutine) - This path will target the method that contains the actual enumerator code - - - Specifies the type of argument - - - - This is a normal argument - - - This is a reference argument (ref) - - - This is an out argument (out) - - - This is a pointer argument (&) - - - Specifies the type of patch - - - - Any patch - - - A prefix patch - - - A postfix patch - - - A transpiler - - - A finalizer - - - A reverse patch - - - A MonoMod - - - Specifies the type of reverse patch - - - - Use the unmodified original method (directly from IL) - - - Use the original as it is right now including previous patches but excluding future ones - - - Specifies the type of method call dispatching mechanics - - - - Call the method using dynamic dispatching if method is virtual (including overriden) - - - This is the built-in form of late binding (a.k.a. dynamic binding) and is the default dispatching mechanic in C#. - This directly corresponds with the instruction. - - - For virtual (including overriden) methods, the instance type's most-derived/overriden implementation of the method is called. - For non-virtual (including static) methods, same behavior as : the exact specified method implementation is called. - - - Note: This is not a fully dynamic dispatch, since non-virtual (including static) methods are still called non-virtually. - A fully dynamic dispatch in C# involves using - the dynamic type - (actually a fully dynamic binding, since even the name and overload resolution happens at runtime), which does not support. - - - - - Call the method using static dispatching, regardless of whether method is virtual (including overriden) or non-virtual (including static) - - - a.k.a. non-virtual dispatching, early binding, or static binding. - This directly corresponds with the instruction. - - - For both virtual (including overriden) and non-virtual (including static) methods, the exact specified method implementation is called, without virtual/override mechanics. - - - - - The base class for all Harmony annotations (not meant to be used directly) - - - - The common information for all attributes - - - Annotation to define targets of your Harmony patch methods - - - - An empty annotation can be used together with TargetMethod(s) - - - - An annotation that specifies a class to patch - The declaring class/type - - - - An annotation that specifies a method, property or constructor to patch - The declaring class/type - The argument types of the method or constructor to patch - - - - An annotation that specifies a method, property or constructor to patch - The declaring class/type - The name of the method, property or constructor to patch - - - - An annotation that specifies a method, property or constructor to patch - The declaring class/type - The name of the method, property or constructor to patch - An array of argument types to target overloads - - - - An annotation that specifies a method, property or constructor to patch - The declaring class/type - The name of the method, property or constructor to patch - An array of argument types to target overloads - Array of - - - - An annotation that specifies a method, property or constructor to patch - Assembly-qualified name of the declaring class/type - The name of the method, property or constructor to patch - - - - An annotation that specifies a method, property or constructor to patch - Assembly-qualified name of the declaring class/type - The name of the method, property or constructor to patch - The - An array of argument types to target overloads - Array of - - - - An annotation that specifies a method, property or constructor to patch - The declaring class/type - The - - - - An annotation that specifies a method, property or constructor to patch - The declaring class/type - The - An array of argument types to target overloads - - - - An annotation that specifies a method, property or constructor to patch - The declaring class/type - The - An array of argument types to target overloads - Array of - - - - An annotation that specifies a method, property or constructor to patch - The declaring class/type - The name of the method, property or constructor to patch - The - - - - An annotation that specifies a method, property or constructor to patch - The name of the method, property or constructor to patch - - - - An annotation that specifies a method, property or constructor to patch - The name of the method, property or constructor to patch - An array of argument types to target overloads - - - - An annotation that specifies a method, property or constructor to patch - The name of the method, property or constructor to patch - An array of argument types to target overloads - An array of - - - - An annotation that specifies a method, property or constructor to patch - The name of the method, property or constructor to patch - The - - - - An annotation that specifies a method, property or constructor to patch - The - - - - An annotation that specifies a method, property or constructor to patch - The - An array of argument types to target overloads - - - - An annotation that specifies a method, property or constructor to patch - The - An array of argument types to target overloads - An array of - - - - An annotation that specifies a method, property or constructor to patch - An array of argument types to target overloads - - - - An annotation that specifies a method, property or constructor to patch - An array of argument types to target overloads - An array of - - - - Annotation to define the original method for delegate injection - - - - An annotation that specifies a class to patch - The declaring class/type - - - - An annotation that specifies a method, property or constructor to patch - The declaring class/type - The argument types of the method or constructor to patch - - - - An annotation that specifies a method, property or constructor to patch - The declaring class/type - The name of the method, property or constructor to patch - - - - An annotation that specifies a method, property or constructor to patch - The declaring class/type - The name of the method, property or constructor to patch - An array of argument types to target overloads - - - - An annotation that specifies a method, property or constructor to patch - The declaring class/type - The name of the method, property or constructor to patch - An array of argument types to target overloads - Array of - - - - An annotation that specifies a method, property or constructor to patch - The declaring class/type - The - - - - An annotation that specifies a method, property or constructor to patch - The declaring class/type - The - An array of argument types to target overloads - - - - An annotation that specifies a method, property or constructor to patch - The declaring class/type - The - An array of argument types to target overloads - Array of - - - - An annotation that specifies a method, property or constructor to patch - The declaring class/type - The name of the method, property or constructor to patch - The - - - - An annotation that specifies a method, property or constructor to patch - The name of the method, property or constructor to patch - - - - An annotation that specifies a method, property or constructor to patch - The name of the method, property or constructor to patch - An array of argument types to target overloads - - - - An annotation that specifies a method, property or constructor to patch - The name of the method, property or constructor to patch - An array of argument types to target overloads - An array of - - - - An annotation that specifies a method, property or constructor to patch - The name of the method, property or constructor to patch - The - - - - An annotation that specifies call dispatching mechanics for the delegate - The - - - - An annotation that specifies a method, property or constructor to patch - The - An array of argument types to target overloads - - - - An annotation that specifies a method, property or constructor to patch - The - An array of argument types to target overloads - An array of - - - - An annotation that specifies a method, property or constructor to patch - An array of argument types to target overloads - - - - An annotation that specifies a method, property or constructor to patch - An array of argument types to target overloads - An array of - - - - Annotation to define your standin methods for reverse patching - - - - An annotation that specifies the type of reverse patching - The of the reverse patch - - - - A Harmony annotation to define that all methods in a class are to be patched - - - - A Harmony annotation used to change order in which Harmony patches are applied - - - - A Harmony annotation to define patch priority - The priority - - - - A Harmony annotation to define that a patch comes before another patch - - - - A Harmony annotation to define that a patch comes before another patch - The array of harmony IDs of the other patches - - - - A Harmony annotation to define that a patch comes after another patch - - - A Harmony annotation to define that a patch comes after another patch - The array of harmony IDs of the other patches - - - - A Harmony annotation to output a debug log for a patch - - - A Harmony annotation to debug a patch (output uses to log to your Desktop) - - - - A Harmony annotation to emit IL of the patch to a DLL - - - - A Harmony annotation to emit IL of the patch to the current working directory - - - - A Harmony annotation to emit IL of the patch to the given path - Directory to which emit the patch - - - - A Harmony attribute to automatically wrap the patch into try/catch. Exceptions are logged to Harmony log and eaten. - - - - If specified on a prefix, postfix or a finalizer, the method will be automatically wrapped into try/catch. - - - - Specifies the Prepare function in a patch class - - - - Specifies the Cleanup function in a patch class - - - - Specifies the TargetMethod function in a patch class - - - - Specifies the TargetMethods function in a patch class - - - - Specifies the Prefix function in a patch class - - - - Specifies the Postfix function in a patch class - - - - Specifies the Transpiler function in a patch class - - - - Specifies the ILManipulator function in a patch class> - - - - Specifies the Finalizer function in a patch class - - - - A Harmony annotation to declare injected arguments - - - - The name of the original argument - - - - The index of the original argument - - - - The new name of the original argument - - - - An annotation to declare injected arguments by name - - - - An annotation to declare injected arguments by index - Zero-based index - - - - An annotation to declare injected arguments by renaming them - Name of the original argument - New name - - - - An annotation to declare injected arguments by index and renaming them - Zero-based index - New name - - - - An abstract wrapper around OpCode and their operands. Used by transpilers - - - - The opcode - - - - The operand - - - - All labels defined on this instruction - - - - All exception block boundaries defined on this instruction - - - - Creates a new CodeInstruction with a given opcode and optional operand - The opcode - The operand - - - - Create a full copy (including labels and exception blocks) of a CodeInstruction - The to copy - - - - Clones a CodeInstruction and resets its labels and exception blocks - A lightweight copy of this code instruction - - - - Clones a CodeInstruction, resets labels and exception blocks and sets its opcode - The opcode - A copy of this CodeInstruction with a new opcode - - - - Clones a CodeInstruction, resets labels and exception blocks and sets its operand - The operand - A copy of this CodeInstruction with a new operand - - - - Creates a CodeInstruction calling a method (CALL) - The class/type where the method is declared - The name of the method (case sensitive) - Optional parameters to target a specific overload of the method - Optional list of types that define the generic version of the method - A code instruction that calls the method matching the arguments - - - - Creates a CodeInstruction calling a method (CALL) - The target method in the form TypeFullName:MethodName, where the type name matches a form recognized by Type.GetType like Some.Namespace.Type. - Optional parameters to target a specific overload of the method - Optional list of types that define the generic version of the method - A code instruction that calls the method matching the arguments - - - - Creates a CodeInstruction calling a method (CALL) - The lambda expression using the method - - - - - Creates a CodeInstruction calling a method (CALL) - The lambda expression using the method - - - - - Creates a CodeInstruction calling a method (CALL) - The lambda expression using the method - - - - - Creates a CodeInstruction calling a method (CALL) - The lambda expression using the method - - - - - Returns an instruction to call the specified closure - The delegate type to emit - The closure that defines the method to call - A that calls the closure as a method - - - - Creates a CodeInstruction loading a field (LD[S]FLD[A]) - The class/type where the field is defined - The name of the field (case sensitive) - Use address of field - - - - Creates a CodeInstruction storing to a field (ST[S]FLD) - The class/type where the field is defined - The name of the field (case sensitive) - - - - Returns a string representation of the code instruction - A string representation of the code instruction - - - - Exception block types - - - - The beginning of an exception block - - - - The beginning of a catch block - - - - The beginning of an except filter block - - - - The beginning of a fault block - - - - The beginning of a finally block - - - - The end of an exception block - - - - An exception block - - - - Block type - - - - Catch type - - - - Creates an exception block - The - The catch type - - - - - An exception thrown when a patch argument in a Harmony patch is invalid. - - - - - Original method to be patched. - - - - - Patch that was attempted to be applied. - - - - - - - - Constructs a new exception instance. - - Message of the exception. - Original method to be patched. - Patch that was attempted to be applied. - - - - An exception thrown when a reflection member is not found. - - - - - - - The Harmony instance is the main entry to Harmony. After creating one with an unique identifier, it is used to patch and query the current application domain - - - - Set to true before instantiating Harmony to debug Harmony or use an environment variable to set HARMONY_DEBUG to '1' like this: cmd /C "set HARMONY_DEBUG=1 && game.exe" - This is for full debugging. To debug only specific patches, use the attribute - - - - Creates a new Harmony instance - A unique identifier (you choose your own) - A Harmony instance - - - - The unique identifier - - - - Searches the current assembly for Harmony annotations and uses them to create patches - This method can fail to use the correct assembly when being inlined. It calls StackTrace.GetFrame(1) which can point to the wrong method/assembly. If you are unsure or run into problems, use PatchAll(Assembly.GetExecutingAssembly()) instead. - - - - Creates a empty patch processor for an original method - The original method/constructor - A new instance - - - - Creates a patch class processor from an annotated class - The class/type - A new instance - - - - Creates a patch class processor from an annotated class - The class/type - If true, the type doesn't need to have any attributes present for processing - A new instance - - - - Creates a reverse patcher for one of your stub methods - The original method/constructor - The stand-in stub method as - A new instance - - - - Searches an assembly for Harmony annotations and uses them to create patches - The assembly - - - - Searches the given type for Harmony annotation and uses them to create patches - The type to search - - - - Creates patches by manually specifying the methods - The original method/constructor - An optional prefix method wrapped in a object - An optional postfix method wrapped in a object - An optional transpiler method wrapped in a object - An optional finalizer method wrapped in a object - An optional ilmanipulator method wrapped in a - The replacement method that was created to patch the original method - - - - Creates patches by manually specifying the methods - The original method/constructor - An optional prefix method wrapped in a object - An optional postfix method wrapped in a object - An optional transpiler method wrapped in a object - An optional finalizer method wrapped in a object - The replacement method that was created to patch the original method - - - - Patches a foreign method onto a stub method of yours and optionally applies transpilers during the process - The original method/constructor you want to duplicate - Your stub method as that will become the original. Needs to have the correct signature (either original or whatever your transpilers generates) - An optional transpiler as method that will be applied during the process - An optional ilmanipulator as method that will be applied during the process - The replacement method that was created to patch the stub method - - - - Patches a foreign method onto a stub method of yours and optionally applies transpilers during the process - The original method/constructor you want to duplicate - Your stub method as that will become the original. Needs to have the correct signature (either original or whatever your transpilers generates) - An optional transpiler as method that will be applied during the process - The replacement method that was created to patch the stub method - - - - Unpatches all methods that were patched by the specified . Unpatching is done by repatching methods without patches of this instance. - The Harmony ID to restrict unpatching to a specific Harmony instance. - Gets thrown when a null or empty HarmonyID gets passed in. - - - - Unpatches all methods that were patched by this Harmony instance's ID. Unpatching is done by repatching methods without patches of this instance. - - - - Globally unpatches ALL methods by patching them with zero patches. Complete unpatching is not supported. - - - - Unpatches methods by patching them with zero patches. Fully unpatching is not supported. Be careful, unpatching is global - The Harmony ID to restrict unpatching to a specific Harmony instance. Whether this parameter is actually optional is determined by the global flag - When is set to true, the execution of this method will be skipped when no is specified. - - - - Unpatches a method by patching it with zero patches. Fully unpatching is not supported. Be careful, unpatching is global - The original method/constructor - The - The optional Harmony ID to restrict unpatching to a specific Harmony instance - - - - Unpatches a method by patching it with zero patches. Fully unpatching is not supported. Be careful, unpatching is global - The original method/constructor - The patch method as method to remove - - - - Test for patches from a specific Harmony ID - The Harmony ID - True if patches for this ID exist - - - - Gets patch information for a given original method - The original method/constructor - The patch information as - - - - Gets the methods this instance has patched - An enumeration of original methods/constructors - - - - Gets all patched original methods in the appdomain - An enumeration of patched original methods/constructors - - - - Gets the original method from a given replacement method - A replacement method, for example from a stacktrace - The original method/constructor or null if not found - - - - Tries to get the method from a stackframe including dynamic replacement methods - The - For normal frames, frame.GetMethod() is returned. For frames containing patched methods, the replacement method is returned or null if no method can be found - - - - Gets Harmony version for all active Harmony instances - [out] The current Harmony version - A dictionary containing assembly versions keyed by Harmony IDs - - - - Creates a new Harmony instance and applies all patches specified in the type - The type to scan for patches. - The ID for the Harmony instance to create, which will be used. - - - - Applies all patches specified in the assembly - The assembly to scan. - The ID for the Harmony instance to create, which will be used. - - - - Under Mono, HarmonyException wraps IL compile errors with detailed information about the failure - - - - Default serialization constructor (not implemented) - The info - The context - - - - Get a list of IL instructions in pairs of offset+code - A list of key/value pairs which represent an offset and the code at that offset - - - - Get a list of IL instructions without offsets - A list of - - - - Get the error offset of the errornous IL instruction - The offset - - - - Get the index of the errornous IL instruction - The index into the list of instructions or -1 if not found - - - - Class that holds all Global Harmony settings - - - - Set to true to disallow executing the legacy instance method without specifying a harmonyId. - If set to true and the legacy instance method is called without passing a harmonyId, then execution of said method will be skipped. - - - A wrapper around a method to use it as a patch (for example a Prefix) - - - - The original method - - - - Class/type declaring this patch - - - - Patch method name - - - - Optional patch - - - - Array of argument types of the patch method - - - - of the patch - - - - Install this patch before patches with these Harmony IDs - - - - Install this patch after patches with these Harmony IDs - - - - Reverse patch type, see - - - - Create debug output for this patch - - - - If not null, the IL of the patch is output to this path - - - - Whether to use (true) or (false) mechanics - for -attributed delegate - - - - Whether to wrap the patch itself into a try/catch. - - - - Default constructor - - - - Creates a patch from a given method - The original method - - - - Creates a patch from a given method - The original method - The patch - A list of harmony IDs that should come after this patch - A list of harmony IDs that should come before this patch - Set to true to generate debug output - - - - Creates a patch from a given method - The patch class/type - The patch method name - The optional argument types of the patch method (for overloaded methods) - - - - Gets the names of all internal patch info fields - A list of field names - - - - Merges annotations - The list of to merge - The merged - - - - Returns a string that represents the annotation - A string representation - - - - Annotation extensions - - - - Copies annotation information - The source - The destination - - - - Clones an annotation - The to clone - A copied - - - - Merges annotations - The master - The detail - A new, merged - - - - Gets all annotations on a class/type - The class/type - A list of all - - - - Gets merged annotations on a class/type - The class/type - The merged - - - - Gets all annotations on a method - The method/constructor - A list of - - - - Gets merged annotations on a method - The method/constructor - The merged - - - - - A mutable representation of an inline signature, similar to Mono.Cecil's CallSite. - Used by the calli instruction, can be used by transpilers - - - - - See - - - - See - - - - See - - - - The list of all parameter types or function pointer signatures received by the call site - - - - The return type or function pointer signature returned by the call site - - - - Returns a string representation of the inline signature - A string representation of the inline signature - - - - - A mutable representation of a parameter type with an attached type modifier, - similar to Mono.Cecil's OptionalModifierType / RequiredModifierType and C#'s modopt / modreq - - - - - Whether this is a modopt (optional modifier type) or a modreq (required modifier type) - - - - The modifier type attached to the parameter type - - - - The modified parameter type - - - - Returns a string representation of the modifier type - A string representation of the modifier type - - - - Patch serialization - - - - Control the binding of a serialized object to a type - Specifies the assembly name of the serialized object - Specifies the type name of the serialized object - The type of the object the formatter creates a new instance of - - - - Serializes a patch info - The - The serialized data - - - - Deserialize a patch info - The serialized data - A - - - - Compare function to sort patch priorities - The patch - Zero-based index - The priority - A standard sort integer (-1, 0, 1) - - - - Serializable patch information - - - - Prefixes as an array of - - - - Postfixes as an array of - - - - Transpilers as an array of - - - - Finalizers as an array of - - - - ILManipulators as an array of - - - - Returns if any of the patches wants debugging turned on - - - - Returns a list of paths that the IL should be dumped to - - - - Adds prefixes - An owner (Harmony ID) - The patch methods - - - - Adds a prefix - - - Removes prefixes - The owner of the prefixes, or * for all - - - - Adds postfixes - An owner (Harmony ID) - The patch methods - - - - Adds a postfix - - - Removes postfixes - The owner of the postfixes, or * for all - - - - Adds transpilers - An owner (Harmony ID) - The patch methods - - - - Adds a transpiler - - - Removes transpilers - The owner of the transpilers, or * for all - - - - Adds finalizers - An owner (Harmony ID) - The patch methods - - - - Adds a finalizer - - - Removes finalizers - The owner of the finalizers, or * for all - - - - Adds ilmanipulators - An owner (Harmony ID) - The patch methods - - - - Removes ilmanipulators - The owner of the ilmanipulators, or * for all - - - - Removes a patch using its method - The method of the patch to remove - - - - Gets a concatenated list of patches - The Harmony instance ID adding the new patches - The patches to add - The current patches - - - - Gets a list of patches with any from the given owner removed - The owner of the methods, or * for all - The current patches - - - - A serializable patch - - - - Zero-based index - - - - The owner (Harmony ID) - - - - The priority, see - - - - Keep this patch before the patches indicated in the list of Harmony IDs - - - - Keep this patch after the patches indicated in the list of Harmony IDs - - - - A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future - - - - If not null, IL DLL is output to this directory - - - - Whether to wrap the patch into a general try/catch that logs the error - - - - The method of the static patch method - - - - Creates a patch - The method of the patch - Zero-based index - An owner (Harmony ID) - The priority, see - A list of Harmony IDs for patches that should run after this patch - A list of Harmony IDs for patches that should run before this patch - A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future - - - - Creates a patch - The method of the patch - Zero-based index - An owner (Harmony ID) - The priority, see - A list of Harmony IDs for patches that should run after this patch - A list of Harmony IDs for patches that should run before this patch - A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future - Whether to wrap the patch into a general try/catch that logs the error - - - - Creates a patch - The method of the patch - Zero-based index - An owner (Harmony ID) - The priority, see - A list of Harmony IDs for patches that should run after this patch - A list of Harmony IDs for patches that should run before this patch - A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future - Whether to wrap the patch into a general try/catch that logs the error - If not null, the patch IL DLL is saved to this directory - - - - Creates a patch - The method of the patch - Zero-based index - An owner (Harmony ID) - - - Get the patch method or a DynamicMethod if original patch method is a patch factory - The original method/constructor - The method of the patch - - - - Determines whether patches are equal - The other patch - true if equal - - - - Determines how patches sort - The other patch - integer to define sort order (-1, 0, 1) - - - - Hash function - A hash code - - - - A PatchClassProcessor used to turn on a class/type into patches - - - - Creates a patch class processor by pointing out a class. Similar to PatchAll() but without searching through all classes. - The Harmony instance - The class to process (need to have at least a [HarmonyPatch] attribute if allowUnannotatedType is set to false) - - - - Creates a patch class processor by pointing out a class. Similar to PatchAll() but without searching through all classes. - The Harmony instance - The class to process (need to have at least a [HarmonyPatch] attribute if allowUnannotatedType is set to false) - If true, the type doesn't need to have any attributes present for processing - - - - Applies the patches - A list of all created replacement methods or null if patch class is not annotated - - - - A group of patches - - - - A collection of prefix - - - - A collection of postfix - - - - A collection of transpiler - - - - A collection of finalizer - - - - A collection of ILManipulator - - - - Gets all owners (Harmony IDs) or all known patches - The patch owners - - - - Creates a group of patches - An array of prefixes as - An array of postfixes as - An array of transpileres as - An array of finalizeres as - An array of ilmanipulators as - - - - Creates a group of patches - An array of prefixes as - An array of postfixes as - An array of transpileres as - An array of finalizeres as - - - - - IL manipulator to create Harmony-style patches. - - - - - Initializes a new instance of the class. - - Patches to apply to the body. - - - - Manipulates a by applying Harmony patches to it. - - - Reference to the method that should be considered as original. Used to reference parameter and - return types. - - Collection of Harmony patches to apply. - Method body to manipulate as instance. Should contain instructions to patch. - - In most cases you will want to use to create or obtain global - patch info for the method that contains aggregated info of all Harmony instances. - - - - - Manipulates IL into a replacement method with Harmony patches applied to it. - - Original method that contains and other metadata. - IL to rewrite. - - - - Convert the IL code into a Harmony patch. - - IL body of the method to rewrite into a Harmony patch. - Original method to use for context. - - - - Method patcher for normal managed methods that have IL body attached to them. - Uses in order to apply hooks in a way compatible with MonoMod's own - hooking system. - - - - - - - - - - - - - - - - - - A handler for that checks if a method is a normal Managed method. - - Not used - Patch resolver arguments - - - - - A general method patcher for implementing custom Harmony patcher backends. - - - - - - Constructs a method patcher - - Original method to patch - - - - - Original method to patch. - - - - - - Prepares method body for the unpatched that simply calls - function. - - - A that contains a call to - the original method to pass to the IL manipulator. - If null, Harmony patches must be manually applied to the original via . - - - - - - Detours to the provided replacement function. If called multiple times, - is re-detoured to the new method. - - - Result of - if returned non-null. - Otherwise, this will be null, in which case you must manually generate Harmony-patched method - with . - - of the hook, if it's different from `replacement`. - - - - - Creates a copy of the original method. If not possible, creates a method that calls into the original method. - - Copy of the original method that is transpileable. If not possible, returns null. - - This method creates a pure copy of the original method that is usable with transpilers. Currently, this - method is used to generate reverse patchers. - If a purse IL copy is not possible, a best approximation should be generated - (e.g. a wrapper that calls original method). - If no best approximation is possible, this method should return null, in which case generating reverse - patchers for the method will fail. - - - - - - A method patcher that uses to patch internal calls, - methods marked with and any other managed method that CLR managed-to-native - trampolines for and which has no IL body defined. - - - - - Constructs a new instance of method patcher. - - - - - - - - - - - - - - - A handler for that checks if a method doesn't have a body - (e.g. it's icall or marked with ) and thus can be patched with - . - - Not used - Patch resolver arguments - - - - - A global manager for handling Harmony patch state. Contains information about all patched methods and all - actual instances that handle patching implementation. - - - - - - Method patcher resolve event. - - - When a method is to be patched, this resolver event is called once on the method to determine which - backend to use in order to patch the method. - To make Harmony use the specified backend, set to an - instance of the method patcher backend to use. - - - - - - Creates or gets an existing instance of that handles patching the method. - - Method to patch. - Instance of that handles patching the method. - No suitable patcher found for the method. - - - - - Gets patch info for the given target method. - - Method to get patch info for. - Current patch info of the method. - - - - - Gets or creates patch info for the given method. - - Method to get info from. - An existing or new patch info for the method containing information about the applied patches. - - - - - Gets all methods that have been patched. - - List of methods that have been patched. - - - - - Removes all method resolvers. Use with care, this removes the default ones too! - - - - - Patcher resolve event arguments. - - - - - - Original method that is to be patched. - - - - - - Method patcher to use to patch . - Set this value to specify which one to use. - - - - - A PatchProcessor handles patches on a method/constructor - - - - Creates an empty patch processor - The Harmony instance - The original method/constructor - - - - Adds a prefix - The prefix as a - A for chaining calls - - - - Adds a prefix - The prefix method - A for chaining calls - - - - Adds a postfix - The postfix as a - A for chaining calls - - - - Adds a postfix - The postfix method - A for chaining calls - - - - Adds a transpiler - The transpiler as a - A for chaining calls - - - - Adds a transpiler - The transpiler method - A for chaining calls - - - - Adds a finalizer - The finalizer as a - A for chaining calls - - - - Adds a finalizer - The finalizer method - A for chaining calls - - - - Adds an ilmanipulator - The ilmanipulator as a - A for chaining calls - - - - Adds an ilmanipulator - The ilmanipulator method - A for chaining calls - - - - Gets all patched original methods in the appdomain - An enumeration of patched method/constructor - - - - Applies all registered patches - The generated replacement method - - - - Unpatches patches of a given type and/or Harmony ID - The patch type - Harmony ID or * for any - A for chaining calls - - - - Unpatches a specific patch - The method of the patch - A for chaining calls - - - - Gets patch information on an original - The original method/constructor - The patch information as - - - - Sort patch methods by their priority rules - The original method - Patches to sort - The sorted patch methods - - - - Gets Harmony version for all active Harmony instances - [out] The current Harmony version - A dictionary containing assembly version keyed by Harmony ID - - - - Creates a new empty generator to use when reading method bodies - A new - - - - Creates a new generator matching the method/constructor to use when reading method bodies - The original method/constructor to copy method information from - A new - - - - Returns the methods unmodified list of code instructions - The original method/constructor - Optionally an existing generator that will be used to create all local variables and labels contained in the result (if not specified, an internal generator is used) - A list containing all the original - - - - Returns the methods unmodified list of code instructions - The original method/constructor - A new generator that now contains all local variables and labels contained in the result - A list containing all the original - - - - Returns the methods current list of code instructions after all existing transpilers have been applied - The original method/constructor - Apply only the first count of transpilers - Optionally an existing generator that will be used to create all local variables and labels contained in the result (if not specified, an internal generator is used) - A list of - - - - Returns the methods current list of code instructions after all existing transpilers have been applied - The original method/constructor - A new generator that now contains all local variables and labels contained in the result - Apply only the first count of transpilers - A list of - - - - A low level way to read the body of a method. Used for quick searching in methods - The original method - All instructions as opcode/operand pairs - - - - A low level way to read the body of a method. Used for quick searching in methods - The original method - An existing generator that will be used to create all local variables and labels contained in the result - All instructions as opcode/operand pairs - - - - A patch priority - - - - Patch last - - - - Patch with very low priority - - - - Patch with low priority - - - - Patch with lower than normal priority - - - - Patch with normal priority - - - - Patch with higher than normal priority - - - - Patch with high priority - - - - Patch with very high priority - - - - Patch first - - - - A reverse patcher - - - - Creates a reverse patcher - The Harmony instance - The original method/constructor - Your stand-in stub method as - - - - Applies the patch - The type of patch, see - The generated replacement method - - - - A collection of commonly used transpilers - - - - Returns an instruction to call the specified delegate - The delegate type to emit - The delegate to emit - The instruction to call the specified action - - - - A transpiler that replaces all occurrences of a given method with another one using the same signature - The enumeration of to act on - Method or constructor to search for - Method or constructor to replace with - Modified enumeration of - - - - A transpiler that alters instructions that match a predicate by calling an action - The enumeration of to act on - A predicate selecting the instructions to change - An action to apply to matching instructions - Modified enumeration of - - - - A transpiler that logs a text at the beginning of the method - The instructions to act on - The log text - Modified enumeration of - - - - A transpiler that replaces the entire body of the method with another one - The replacement method. It's up to the caller of this transpiler to make sure that the signatures match. - of the patch. This is passed via transpiler. - A collection of that contains instructions of replacement method. - The replacement method is not a managed method that contains any IL. - This transpiler has a side effect of clearing up all previous locals and previous transpilers. - Use to run this transpiler as early as possible. - - - A helper class for reflection related functions - - - - Shortcut for to simplify the use of reflections and make it work for any access level - - - - Shortcut for to simplify the use of reflections and make it work for any access level but only within the current type - - - - Enumerates all assemblies in the current app domain, excluding visual studio assemblies - An enumeration of - - - Gets a type by name. Prefers a full name with namespace but falls back to the first type matching the name otherwise - The name - A type or null if not found - - - - Gets all successfully loaded types from a given assembly - The assembly - An array of types - - This calls and returns , while catching any thrown . - If such an exception is thrown, returns the successfully loaded types (, - filtered for non-null values). - - - - - Enumerates all successfully loaded types in the current app domain, excluding visual studio assemblies - An enumeration of all in all assemblies, excluding visual studio assemblies - - - Applies a function going up the type hierarchy and stops at the first non-null result - Result type of func() - The class/type to start with - The evaluation function returning T - The first non-null result, or null if no match - - The type hierarchy of a class or value type (including struct) does NOT include implemented interfaces, - and the type hierarchy of an interface is only itself (regardless of whether that interface implements other interfaces). - The top-most type in the type hierarchy of all non-interface types (including value types) is . - - - - - Applies a function going into inner types and stops at the first non-null result - Generic type parameter - The class/type to start with - The evaluation function returning T - The first non-null result, or null if no match - - - - Gets the reflection information for a directly declared field - The class/type where the field is defined - The name of the field - A field or null when type/name is null or when the field cannot be found - - - - Gets the reflection information for a field by searching the type and all its super types - The class/type where the field is defined - The name of the field (case sensitive) - A field or null when type/name is null or when the field cannot be found - - - - Gets the reflection information for a field - The class/type where the field is declared - The zero-based index of the field inside the class definition - A field or null when type is null or when the field cannot be found - - - - Gets the reflection information for a directly declared property - The class/type where the property is declared - The name of the property (case sensitive) - A property or null when type/name is null or when the property cannot be found - - - - Gets the reflection information for the getter method of a directly declared property - The class/type where the property is declared - The name of the property (case sensitive) - A method or null when type/name is null or when the property cannot be found - - - - Gets the reflection information for the setter method of a directly declared property - The class/type where the property is declared - The name of the property (case sensitive) - A method or null when type/name is null or when the property cannot be found - - - - Gets the reflection information for a property by searching the type and all its super types - The class/type - The name - A property or null when type/name is null or when the property cannot be found - - - - Gets the reflection information for the getter method of a property by searching the type and all its super types - The class/type - The name - A method or null when type/name is null or when the property cannot be found - - - - Gets the reflection information for the setter method of a property by searching the type and all its super types - The class/type - The name - A method or null when type/name is null or when the property cannot be found - - - - Gets the reflection information for a directly declared method - The class/type where the method is declared - The name of the method (case sensitive) - Optional parameters to target a specific overload of the method - Optional list of types that define the generic version of the method - A method or null when type/name is null or when the method cannot be found - - - - Gets the reflection information for a method by searching the type and all its super types - The class/type where the method is declared - The name of the method (case sensitive) - Optional parameters to target a specific overload of the method - Optional list of types that define the generic version of the method - A method or null when type/name is null or when the method cannot be found - - - - Gets the reflection information for a method by searching the type and all its super types - The target method in the form TypeFullName:MethodName, where the type name matches a form recognized by Type.GetType like Some.Namespace.Type. - Optional parameters to target a specific overload of the method - Optional list of types that define the generic version of the method - A method or null when type/name is null or when the method cannot be found - - - - Gets method of an enumerator method. - Enumerator method from which to get its - of the enumerator or null if no valid enumerator is detected - - - Gets the names of all method that are declared in a type - The declaring class/type - A list of method names - - - - Gets the names of all method that are declared in the type of the instance - An instance of the type to search in - A list of method names - - - - Gets the names of all fields that are declared in a type - The declaring class/type - A list of field names - - - - Gets the names of all fields that are declared in the type of the instance - An instance of the type to search in - A list of field names - - - - Gets the names of all properties that are declared in a type - The declaring class/type - A list of property names - - - - Gets the names of all properties that are declared in the type of the instance - An instance of the type to search in - A list of property names - - - - Gets the type of any class member of - A member - The class/type of this member - - - - Test if a class member is actually an concrete implementation - A member - True if the member is a declared - - - - Gets the real implementation of a class member - A member - The member itself if its declared. Otherwise the member that is actually implemented in some base type - - - - Gets the reflection information for a directly declared constructor - The class/type where the constructor is declared - Optional parameters to target a specific overload of the constructor - Optional parameters to only consider static constructors - A constructor info or null when type is null or when the constructor cannot be found - - - - Gets the reflection information for a constructor by searching the type and all its super types - The class/type where the constructor is declared - Optional parameters to target a specific overload of the method - Optional parameters to only consider static constructors - A constructor info or null when type is null or when the method cannot be found - - - - Gets reflection information for all declared constructors - The class/type where the constructors are declared - Optional parameters to only consider static constructors - A list of constructor infos - - - - Gets reflection information for all declared methods - The class/type where the methods are declared - A list of methods - - - - Gets reflection information for all declared properties - The class/type where the properties are declared - A list of properties - - - - Gets reflection information for all declared fields - The class/type where the fields are declared - A list of fields - - - - Gets the return type of a method or constructor - The method/constructor - The return type - - - - Given a type, returns the first inner type matching a recursive search by name - The class/type to start searching at - The name of the inner type (case sensitive) - The inner type or null if type/name is null or if a type with that name cannot be found - - - - Given a type, returns the first inner type matching a recursive search with a predicate - The class/type to start searching at - The predicate to search with - The inner type or null if type/predicate is null or if a type with that name cannot be found - - - - Given a type, returns the first method matching a predicate - The class/type to start searching at - The predicate to search with - The method or null if type/predicate is null or if a type with that name cannot be found - - - - Given a type, returns the first constructor matching a predicate - The class/type to start searching at - The predicate to search with - The constructor info or null if type/predicate is null or if a type with that name cannot be found - - - - Given a type, returns the first property matching a predicate - The class/type to start searching at - The predicate to search with - The property or null if type/predicate is null or if a type with that name cannot be found - - - - Returns an array containing the type of each object in the given array - An array of objects - An array of types or an empty array if parameters is null (if an object is null, the type for it will be object) - - - - Creates an array of input parameters for a given method and a given set of potential inputs - The method/constructor you are planing to call - The possible input parameters in any order - An object array matching the method signature - - - - A readable/assignable reference delegate to an instance field of a class or static field (NOT an instance field of a struct) - - An arbitrary type if the field is static; otherwise the class that defines the field, or a parent class (including ), - implemented interface, or derived class of this type - - - The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), - a type that is assignable from that type; or if the field's type is an enum type, - either that type or the underlying integral type of that enum type - - The runtime instance to access the field (ignored and can be omitted for static fields) - A readable/assignable reference to the field - Null instance passed to a non-static field ref delegate - - Instance of invalid type passed to a non-static field ref delegate - (this can happen if is a parent class or interface of the field's declaring type) - - - - This delegate cannot be used for instance fields of structs, since a struct instance passed to the delegate would be passed by - value and thus would be a copy that only exists within the delegate's invocation. This is fine for a readonly reference, - but makes assignment futile. Use instead. - - - Note that is not required to be the field's declaring type. It can be a parent class (including ), - implemented interface, or a derived class of the field's declaring type ("instanceOfT is FieldDeclaringType" must be possible). - Specifically, must be assignable from OR to the field's declaring type. - Technically, this allows Nullable, although Nullable is only relevant for structs, and since only static fields of structs - are allowed for this delegate, and the instance passed to such a delegate is ignored, this hardly matters. - - - Similarly, is not required to be the field's field type, unless that type is a non-enum value type. - It can be a parent class (including object) or implemented interface of the field's field type. It cannot be a derived class. - This variance is not allowed for value types, since that would require boxing/unboxing, which is not allowed for ref values. - Special case for enum types: can also be the underlying integral type of the enum type. - Specifically, for reference types, must be assignable from - the field's field type; for non-enum value types, must be exactly the field's field type; for enum types, - must be either the field's field type or the underyling integral type of that field type. - - - This delegate supports static fields, even those defined in structs, for legacy reasons. - For such static fields, is effectively ignored. - Consider using (and StaticFieldRefAccess methods that return it) instead for static fields. - - - - - - Creates a field reference delegate for an instance field of a class - The class that defines the instance field, or derived class of this type - - The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), - a type that is assignable from that type; or if the field's type is an enum type, - either that type or the underlying integral type of that enum type - - The name of the field - A readable/assignable delegate - - - For backwards compatibility, there is no class constraint on . - Instead, the non-value-type check is done at runtime within the method. - - - - - - Creates an instance field reference for a specific instance of a class - The class that defines the instance field, or derived class of this type - - The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), - a type that is assignable from that type; or if the field's type is an enum type, - either that type or the underlying integral type of that enum type - - The instance - The name of the field - A readable/assignable reference to the field - - - This method is meant for one-off access to a field's value for a single instance. - If you need to access a field's value for potentially multiple instances, use instead. - FieldRefAccess<T, F>(instance, fieldName) is functionally equivalent to FieldRefAccess<T, F>(fieldName)(instance). - - - For backwards compatibility, there is no class constraint on . - Instead, the non-value-type check is done at runtime within the method. - - - - - - Creates a field reference delegate for an instance field of a class or static field (NOT an instance field of a struct) - - The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), - a type that is assignable from that type; or if the field's type is an enum type, - either that type or the underlying integral type of that enum type - - - The type that defines the field, or derived class of this type; must not be a struct type unless the field is static - - The name of the field - - A readable/assignable delegate with T=object - (for static fields, the instance delegate parameter is ignored) - - - - This method is meant for cases where the given type is only known at runtime and thus can't be used as a type parameter T - in e.g. . - - - This method supports static fields, even those defined in structs, for legacy reasons. - Consider using (and other overloads) instead for static fields. - - - - - - Creates a field reference delegate for an instance field of a class or static field (NOT an instance field of a struct) - - An arbitrary type if the field is static; otherwise the class that defines the field, or a parent class (including ), - implemented interface, or derived class of this type ("instanceOfT is FieldDeclaringType" must be possible) - - - The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), - a type that is assignable from that type; or if the field's type is an enum type, - either that type or the underlying integral type of that enum type - - The field - A readable/assignable delegate - - - This method is meant for cases where the field has already been obtained, avoiding the field searching cost in - e.g. . - - - This method supports static fields, even those defined in structs, for legacy reasons. - For such static fields, is effectively ignored. - Consider using (and other overloads) instead for static fields. - - - For backwards compatibility, there is no class constraint on . - Instead, the non-value-type check is done at runtime within the method. - - - - - - Creates a field reference for an instance field of a class - - The type that defines the field; or a parent class (including ), implemented interface, or derived class of this type - ("instanceOfT is FieldDeclaringType" must be possible) - - - The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), - a type that is assignable from that type; or if the field's type is an enum type, - either that type or the underlying integral type of that enum type - - The instance - The field - A readable/assignable reference to the field - - - This method is meant for one-off access to a field's value for a single instance and where the field has already been obtained. - If you need to access a field's value for potentially multiple instances, use instead. - FieldRefAccess<T, F>(instance, fieldInfo) is functionally equivalent to FieldRefAccess<T, F>(fieldInfo)(instance). - - - For backwards compatibility, there is no class constraint on . - Instead, the non-value-type check is done at runtime within the method. - - - - - - A readable/assignable reference delegate to an instance field of a struct - The struct that defines the instance field - - The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), - a type that is assignable from that type; or if the field's type is an enum type, - either that type or the underlying integral type of that enum type - - A reference to the runtime instance to access the field - A readable/assignable reference to the field - - - - Creates a field reference delegate for an instance field of a struct - The struct that defines the instance field - - The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), - a type that is assignable from that type; or if the field's type is an enum type, - either that type or the underlying integral type of that enum type - - The name of the field - A readable/assignable delegate - - - - Creates an instance field reference for a specific instance of a struct - The struct that defines the instance field - - The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), - a type that is assignable from that type; or if the field's type is an enum type, - either that type or the underlying integral type of that enum type - - The instance - The name of the field - A readable/assignable reference to the field - - - This method is meant for one-off access to a field's value for a single instance. - If you need to access a field's value for potentially multiple instances, use instead. - StructFieldRefAccess<T, F>(ref instance, fieldName) is functionally equivalent to StructFieldRefAccess<T, F>(fieldName)(ref instance). - - - - - - Creates a field reference delegate for an instance field of a struct - The struct that defines the instance field - - The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), - a type that is assignable from that type; or if the field's type is an enum type, - either that type or the underlying integral type of that enum type - - The field - A readable/assignable delegate - - - This method is meant for cases where the field has already been obtained, avoiding the field searching cost in - e.g. . - - - - - - Creates a field reference for an instance field of a struct - The struct that defines the instance field - - The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), - a type that is assignable from that type; or if the field's type is an enum type, - either that type or the underlying integral type of that enum type - - The instance - The field - A readable/assignable reference to the field - - - This method is meant for one-off access to a field's value for a single instance and where the field has already been obtained. - If you need to access a field's value for potentially multiple instances, use instead. - StructFieldRefAccess<T, F>(ref instance, fieldInfo) is functionally equivalent to StructFieldRefAccess<T, F>(fieldInfo)(ref instance). - - - - - - A readable/assignable reference delegate to a static field - - The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), - a type that is assignable from that type; or if the field's type is an enum type, - either that type or the underlying integral type of that enum type - - A readable/assignable reference to the field - - - - Creates a static field reference - The type (can be class or struct) the field is defined in - - The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), - a type that is assignable from that type; or if the field's type is an enum type, - either that type or the underlying integral type of that enum type - - The name of the field - A readable/assignable reference to the field - - - - Creates a static field reference - - The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), - a type that is assignable from that type; or if the field's type is an enum type, - either that type or the underlying integral type of that enum type - - The type (can be class or struct) the field is defined in - The name of the field - A readable/assignable reference to the field - - - - Creates a static field reference - An arbitrary type (by convention, the type the field is defined in) - - The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), - a type that is assignable from that type; or if the field's type is an enum type, - either that type or the underlying integral type of that enum type - - The field - A readable/assignable reference to the field - - The type parameter is only used in exception messaging and to distinguish between this method overload - and the overload (which returns a rather than a reference). - - - - - Creates a static field reference delegate - - The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), - a type that is assignable from that type; or if the field's type is an enum type, - either that type or the underlying integral type of that enum type - - The field - A readable/assignable delegate - - - - Creates a delegate to a given method - The delegate Type - The method to create a delegate from. - - Only applies for instance methods. If null (default), returned delegate is an open (a.k.a. unbound) instance delegate - where an instance is supplied as the first argument to the delegate invocation; else, delegate is a closed (a.k.a. bound) - instance delegate where the delegate invocation always applies to the given . - - - Only applies for instance methods. If true (default) and is virtual, invocation of the delegate - calls the instance method virtually (the instance type's most-derived/overriden implementation of the method is called); - else, invocation of the delegate calls the exact specified (this is useful for calling base class methods) - Note: if false and is an interface method, an ArgumentException is thrown. - - A delegate of given to given - - - Delegate invocation is more performant and more convenient to use than - at a one-time setup cost. - - - Works for both type of static and instance methods, both open and closed (a.k.a. unbound and bound) instance methods, - and both class and struct methods. - - - - - - Creates a delegate for a given delegate definition, attributed with [] - The delegate Type, attributed with [] - - Only applies for instance methods. If null (default), returned delegate is an open (a.k.a. unbound) instance delegate - where an instance is supplied as the first argument to the delegate invocation; else, delegate is a closed (a.k.a. bound) - instance delegate where the delegate invocation always applies to the given . - - A delegate of given to the method specified via [] - attributes on - - This calls with the method and virtualCall arguments - determined from the [] attributes on , - and the given (for closed instance delegates). - - - - - Returns who called the current method - The calling method/constructor (excluding the caller) - - - - Rethrows an exception while preserving its stack trace (throw statement typically clobbers existing stack traces) - The exception to rethrow - - - - True if the current runtime is based on Mono, false otherwise (.NET) - - - - True if the current runtime is .NET Framework, false otherwise (.NET Core or Mono, although latter isn't guaranteed) - - - - True if the current runtime is .NET Core, false otherwise (Mono or .NET Framework) - - - - Throws a missing member runtime exception - The type that is involved - A list of names - - - - Gets default value for a specific type - The class/type - The default value - - - - Creates an (possibly uninitialized) instance of a given type - The class/type - The new instance - - - - Creates an (possibly uninitialized) instance of a given type - The class/type - The new instance - - - - - A cache for the or similar Add methods for different types. - - - - Makes a deep copy of any object - The type of the instance that should be created; for legacy reasons, this must be a class or interface - The original object - A copy of the original object but of type T - - - - Makes a deep copy of any object - The type of the instance that should be created - The original object - [out] The copy of the original object - Optional value transformation function (taking a field name and src/dst instances) - The optional path root to start with - - - - Makes a deep copy of any object - The original object - The type of the instance that should be created - Optional value transformation function (taking a field name and src/dst instances) - The optional path root to start with - The copy of the original object - - - - Tests if a type is a struct - The type - True if the type is a struct - - - - Tests if a type is a class - The type - True if the type is a class - - - - Tests if a type is a value type - The type - True if the type is a value type - - - - Tests if a type is an integer type - The type - True if the type represents some integer - - - - Tests if a type is a floating point type - The type - True if the type represents some floating point - - - - Tests if a type is a numerical type - The type - True if the type represents some number - - - - Tests if a type is void - The type - True if the type is void - - - - Test whether an instance is of a nullable type - Type of instance - An instance to test - True if instance is of nullable type, false if not - - - - Tests whether a type or member is static, as defined in C# - The type or member - True if the type or member is static - - - - Tests whether a type is static, as defined in C# - The type - True if the type is static - - - - Tests whether a property is static, as defined in C# - The property - True if the property is static - - - - Tests whether an event is static, as defined in C# - The event - True if the event is static - - - - Calculates a combined hash code for an enumeration of objects - The objects - The hash code - - - - A CodeInstruction match - - - The name of the match - - - The matched opcodes - - - The matched operands - - - The matched labels - - - The matched blocks - - - The jumps from the match - - - The jumps to the match - - - The match predicate - - - Creates a code match - The optional opcode - The optional operand - The optional name - - - - Creates a code match - The CodeInstruction - An optional name - - - - Creates a code match - The predicate - An optional name - - - - Returns a string that represents the match - A string representation - - - - Creates a new code match for an opcode - Opcode to match - - - - Creates a new code match for a code instruction - Code instruction - - - - A CodeInstruction matcher - - - The current position - The index or -1 if out of bounds - - - - Gets the number of code instructions in this matcher - The count - - - - Checks whether the position of this CodeMatcher is within bounds - True if this CodeMatcher is valid - - - - Checks whether the position of this CodeMatcher is outside its bounds - True if this CodeMatcher is invalid - - - - Gets the remaining code instructions - The remaining count - - - - Gets the opcode at the current position - The opcode - - - - Gets the operand at the current position - The operand - - - - Gets the labels at the current position - The labels - - - - Gets the exception blocks at the current position - The blocks - - - - Creates an empty code matcher - - - Creates a code matcher from an enumeration of instructions - The instructions (transpiler argument) - An optional IL generator - - - - Makes a clone of this instruction matcher - A copy of this matcher - - - - Gets instructions at the current position - The instruction - - - - Gets instructions at the current position with offset - The offset - The instruction - - - - Gets all instructions - A list of instructions - - - - Gets all instructions as an enumeration - A list of instructions - - - - Gets some instructions counting from current position - Number of instructions - A list of instructions - - - - Gets all instructions within a range - The start index - The end index - A list of instructions - - - - Gets all instructions within a range (relative to current position) - The start offset - The end offset - A list of instructions - - - - Gets a list of all distinct labels - The instructions (transpiler argument) - A list of Labels - - - - Reports a failure - The method involved - The logger - True if current position is invalid and error was logged - - - - Throw an InvalidOperationException if current state is invalid (position out of bounds / last match failed) - Explanation of where/why the exception was thrown that will be added to the exception message - The same code matcher - - - - Throw an InvalidOperationException if current state is invalid (position out of bounds / last match failed), - or if the matches do not match at current position - Explanation of where/why the exception was thrown that will be added to the exception message - Some code matches - The same code matcher - - - - Throw an InvalidOperationException if current state is invalid (position out of bounds / last match failed), - or if the matches do not match at any point between current position and the end - Explanation of where/why the exception was thrown that will be added to the exception message - Some code matches - The same code matcher - - - - Throw an InvalidOperationException if current state is invalid (position out of bounds / last match failed), - or if the matches do not match at any point between current position and the start - Explanation of where/why the exception was thrown that will be added to the exception message - Some code matches - The same code matcher - - - - Throw an InvalidOperationException if current state is invalid (position out of bounds / last match failed), - or if the check function returns false - Explanation of where/why the exception was thrown that will be added to the exception message - Function that checks validity of current state. If it returns false, an exception is thrown - The same code matcher - - - - Sets an instruction at current position - The instruction to set - The same code matcher - - - - Sets instruction at current position and advances - The instruction - The same code matcher - - - - Sets opcode and operand at current position - The opcode - The operand - The same code matcher - - - - Sets opcode and operand at current position and advances - The opcode - The operand - The same code matcher - - - - Sets opcode at current position and advances - The opcode - The same code matcher - - - - Sets operand at current position and advances - The operand - The same code matcher - - - - Creates a label at current position - [out] The label - The same code matcher - - - - Creates a label at a position - The position - [out] The new label - The same code matcher - - - - Adds an enumeration of labels to current position - The labels - The same code matcher - - - - Adds an enumeration of labels at a position - The position - The labels - The same code matcher - - - - Sets jump to - Branch instruction - Destination for the jump - [out] The created label - The same code matcher - - - - Inserts some instructions - The instructions - The same code matcher - - - - Inserts an enumeration of instructions - The instructions - The same code matcher - - - - Inserts a branch - The branch opcode - Branch destination - The same code matcher - - - - Inserts some instructions and advances the position - The instructions - The same code matcher - - - - Inserts an enumeration of instructions and advances the position - The instructions - The same code matcher - - - - Inserts a branch and advances the position - The branch opcode - Branch destination - The same code matcher - - - - Removes current instruction - The same code matcher - - - - Removes some instruction from current position by count - Number of instructions - The same code matcher - - - - Removes the instructions in a range - The start - The end - The same code matcher - - - - Removes the instructions in a offset range - The start offset - The end offset - The same code matcher - - - - Advances the current position - The offset - The same code matcher - - - - Moves the current position to the start - The same code matcher - - - - Moves the current position to the end - The same code matcher - - - - Searches forward with a predicate and advances position - The predicate - The same code matcher - - - - Searches backwards with a predicate and reverses position - The predicate - The same code matcher - - - - Matches forward and advances position - True to set position to end of match, false to set it to the beginning of the match - Some code matches - The same code matcher - - - - Matches backwards and reverses position - True to set position to end of match, false to set it to the beginning of the match - Some code matches - The same code matcher - - - - Matches forward and advances position to beginning of matching sequence - Some code matches - The same code matcher - - - - Matches forward and advances position to ending of matching sequence - Some code matches - The same code matcher - - - - Matches backwards and reverses position to beginning of matching sequence - Some code matches - The same code matcher - - - - Matches backwards and reverses position to ending of matching sequence - Some code matches - The same code matcher - - - - Repeats a match action until boundaries are met - The match action - An optional action that is executed when no match is found - The same code matcher - - - - Gets a match by its name - The match name - An instruction - - - - General extensions for common cases - - - - Joins an enumeration with a value converter and a delimiter to a string - The inner type of the enumeration - The enumeration - An optional value converter (from T to string) - An optional delimiter - The values joined into a string - - - - Converts an array of types (for example methods arguments) into a human readable form - The array of types - A human readable description including brackets - - - - A full description of a type - The type - A human readable description - - - - A a full description of a method or a constructor without assembly details but with generics - The method/constructor - A human readable description - - - - A helper converting parameter infos to types - The array of parameter infos - An array of types - - - - A helper to access a value via key from a dictionary - The key type - The value type - The dictionary - The key - The value for the key or the default value (of T) if that key does not exist - - - - A helper to access a value via key from a dictionary with extra casting - The value type - The dictionary - The key - The value for the key or the default value (of T) if that key does not exist or cannot be cast to T - - - - Escapes Unicode and ASCII non printable characters - The string to convert - The string to convert - A string literal surrounded by - - - - Extensions for - - - - Shortcut for testing whether the operand is equal to a non-null value - The - The value - True if the operand has the same type and is equal to the value - - - - Shortcut for testing whether the operand is equal to a non-null value - The - The value - True if the operand is equal to the value - This is an optimized version of for - - - - Shortcut for code.opcode == opcode && code.OperandIs(operand) - The - The - The operand value - True if the opcode is equal to the given opcode and the operand has the same type and is equal to the given operand - - - - Shortcut for code.opcode == opcode && code.OperandIs(operand) - The - The - The operand value - True if the opcode is equal to the given opcode and the operand is equal to the given operand - This is an optimized version of for - - - - Tests for any form of Ldarg* - The - The (optional) index - True if it matches one of the variations - - - - Tests for Ldarga/Ldarga_S - The - The (optional) index - True if it matches one of the variations - - - - Tests for Starg/Starg_S - The - The (optional) index - True if it matches one of the variations - - - - Tests for any form of Ldloc* - The - The optional local variable - True if it matches one of the variations - - - - Tests for any form of Stloc* - The - The optional local variable - True if it matches one of the variations - - - - Tests if the code instruction branches - The - The label if the instruction is a branch operation or if not - True if the instruction branches - - - - Tests if the code instruction calls the method/constructor - The - The method - True if the instruction calls the method or constructor - - - - Tests if the code instruction loads a constant - The - True if the instruction loads a constant - - - - Tests if the code instruction loads an integer constant - The - The integer constant - True if the instruction loads the constant - - - - Tests if the code instruction loads a floating point constant - The - The floating point constant - True if the instruction loads the constant - - - - Tests if the code instruction loads an enum constant - The - The enum - True if the instruction loads the constant - - - - Tests if the code instruction loads a field - The - The field - Set to true if the address of the field is loaded - True if the instruction loads the field - - - - Tests if the code instruction stores a field - The - The field - True if the instruction stores this field - - - - Adds labels to the code instruction and return it - The - One or several to add - The same code instruction - - - Adds labels to the code instruction and return it - The - An enumeration of - The same code instruction - - - Extracts all labels from the code instruction and returns them - The - A list of - - - Moves all labels from the code instruction to a different one - The to move the labels from - The to move the labels to - The code instruction labels were moved from (now empty) - - - Moves all labels from a different code instruction to the current one - The to move the labels from - The to move the labels to - The code instruction that received the labels - - - Adds ExceptionBlocks to the code instruction and return it - The - One or several to add - The same code instruction - - - Adds ExceptionBlocks to the code instruction and return it - The - An enumeration of - The same code instruction - - - Extracts all ExceptionBlocks from the code instruction and returns them - The - A list of - - - Moves all ExceptionBlocks from the code instruction to a different one - The to move the ExceptionBlocks from - The to move the ExceptionBlocks to - The code instruction blocks were moved from (now empty) - - - Moves all ExceptionBlocks from a different code instruction to the current one - The to move the ExceptionBlocks from - The to move the ExceptionBlocks to - The code instruction that received the blocks - - - General extensions for collections - - - - A simple way to execute code for every element in a collection - The inner type of the collection - The collection - The action to execute - - - - A simple way to execute code for elements in a collection matching a condition - The inner type of the collection - The collection - The predicate - The action to execute - - - - A helper to add an item to a collection - The inner type of the collection - The collection - The item to add - The collection containing the item - - - - A helper to add an item to an array - The inner type of the collection - The array - The item to add - The array containing the item - - - - A helper to add items to an array - The inner type of the collection - The array - The items to add - The array containing the items - - - - General extensions for collections - - - - Tests a class member if it has an IL method body (external methods for example don't have a body) - The member to test - Returns true if the member has an IL body or false if not - - - A file log for debugging - - - - Full pathname of the log file, defaults to a file called harmony.log.txt on your Desktop - - - - The indent character. The default is tab - - - - The current indent level - - - - Changes the indentation level - The value to add to the indentation level - - - - Log a string in a buffered way. Use this method only if you are sure that FlushBuffer will be called - or else logging information is incomplete in case of a crash - The string to log - - - - Logs a list of string in a buffered way. Use this method only if you are sure that FlushBuffer will be called - or else logging information is incomplete in case of a crash - A list of strings to log (they will not be re-indented) - - - - Returns the log buffer and optionally empties it - True to empty the buffer - The buffer. - - - - Replaces the buffer with new lines - The lines to store - - - - Flushes the log buffer to disk (use in combination with LogBuffered) - - - - Log a string directly to disk. Slower method that prevents missing information in case of a crash - The string to log. - - - - Log a string directly to disk if Harmony.DEBUG is true. Slower method that prevents missing information in case of a crash - The string to log. - - - - Resets and deletes the log - - - - Logs some bytes as hex values - The pointer to some memory - The length of bytes to log - - - - - Default Harmony logger that writes to a file - - - - - Whether or not to enable writing the log. - - - - - Text writer to write the logs to. If not set, defaults to a file log. - - - - - File path of the log. - - - - - Main logger class that exposes log events. - - - - - A single log event that represents a single log message. - - - - - Log channel of the message. - - - - - The log message. - - - - - Log channel for the messages. - - - - - No channels (or an empty channel). - - - - - Basic information. - - - - - Full IL dumps of the generated dynamic methods. - - - - - Channel for warnings. - - - - - Channel for errors. - - - - - Additional debug information that is related to patching - - - - - All channels. - - - - - Filter for which channels should be listened to. - If the channel is in the filter, all log messages from that channel get propagated into event. - - - - - Event fired on any incoming message that passes the channel filter. - - - - - Pretty print a full type name. - - The . - The pretty printed full type name. - - - - A helper class to retrieve reflection info for non-private methods - - - - Given a lambda expression that calls a method, returns the method info - The lambda expression using the method - The method in the lambda expression - - - - Given a lambda expression that calls a method, returns the method info - The generic type - The lambda expression using the method - The method in the lambda expression - - - - Given a lambda expression that calls a method, returns the method info - The generic type - The generic result type - The lambda expression using the method - The method in the lambda expression - - - - Given a lambda expression that calls a method, returns the method info - The lambda expression using the method - The method in the lambda expression - - - - A reflection helper to read and write private elements - The result type defined by GetValue() - - - - Creates a traverse instance from an existing instance - The existing instance - - - - Gets/Sets the current value - The value to read or write - - - - A reflection helper to read and write private elements - - - - Creates a new traverse instance from a class/type - The class/type - A instance - - - - Creates a new traverse instance from a class T - The class - A instance - - - - Creates a new traverse instance from an instance - The object - A instance - - - - Creates a new traverse instance from a named type - The type name, for format see - A instance - - - - Creates a new and empty traverse instance - - - - Creates a new traverse instance from a class/type - The class/type - - - - Creates a new traverse instance from an instance - The object - - - - Gets the current value - The value - - - - Gets the current value - The type of the value - The value - - - - Invokes the current method with arguments and returns the result - The method arguments - The value returned by the method - - - - Invokes the current method with arguments and returns the result - The type of the value - The method arguments - The value returned by the method - - - - Sets a value of the current field or property - The value - The same traverse instance - - - - Gets the type of the current field or property - The type - - - - Moves the current traverse instance to a inner type - The type name - A traverse instance - - - - Moves the current traverse instance to a field - The type name - A traverse instance - - - - Moves the current traverse instance to a field - The type of the field - The type name - A traverse instance - - - - Gets all fields of the current type - A list of field names - - - - Moves the current traverse instance to a property - The type name - Optional property index - A traverse instance - - - - Moves the current traverse instance to a field - The type of the property - The type name - Optional property index - A traverse instance - - - - Gets all properties of the current type - A list of property names - - - - Moves the current traverse instance to a method - The name of the method - The arguments defining the argument types of the method overload - A traverse instance - - - - Moves the current traverse instance to a method - The name of the method - The argument types of the method - The arguments for the method - A traverse instance - - - - Gets all methods of the current type - A list of method names - - - - Checks if the current traverse instance is for a field - True if its a field - - - - Checks if the current traverse instance is for a property - True if its a property - - - - Checks if the current traverse instance is for a method - True if its a method - - - - Checks if the current traverse instance is for a type - True if its a type - - - - Iterates over all fields of the current type and executes a traverse action - Original object - The action receiving a instance for each field - - - - Iterates over all fields of the current type and executes a traverse action - Original object - Target object - The action receiving a pair of instances for each field pair - - - - Iterates over all fields of the current type and executes a traverse action - Original object - Target object - The action receiving a dot path representing the field pair and the instances - - - - Iterates over all properties of the current type and executes a traverse action - Original object - The action receiving a instance for each property - - - - Iterates over all properties of the current type and executes a traverse action - Original object - Target object - The action receiving a pair of instances for each property pair - - - - Iterates over all properties of the current type and executes a traverse action - Original object - Target object - The action receiving a dot path representing the property pair and the instances - - - - A default field action that copies fields to fields - - - - Returns a string that represents the current traverse - A string representation - - - - - Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), - so this symbol will not be reported as unused (as well as by other usage inspections). - - - - - Can be applied to attributes, type parameters, and parameters of a type assignable from . - When applied to an attribute, the decorated attribute behaves the same as . - When applied to a type parameter or to a parameter of type , indicates that the corresponding type - is used implicitly. - - - - - Specify the details of implicitly used symbol when it is marked - with or . - - - - Only entity marked with attribute considered used. - - - Indicates implicit assignment to a member. - - - - Indicates implicit instantiation of a type with fixed constructor signature. - That means any unused constructor parameters won't be reported as such. - - - - Indicates implicit instantiation of a type. - - - - Specify what is considered to be used implicitly when marked - with or . - - - - Members of entity marked with attribute are considered used. - - - Inherited entities are considered used. - - - Entity marked with attribute and all its members considered used. - - - diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/0Harmony20.dll b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/0Harmony20.dll deleted file mode 100644 index 61d42b6..0000000 Binary files a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/0Harmony20.dll and /dev/null differ diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.Harmony.dll b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.Harmony.dll deleted file mode 100644 index e248693..0000000 Binary files a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.Harmony.dll and /dev/null differ diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.Harmony.xml b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.Harmony.xml deleted file mode 100644 index 86b7dc6..0000000 --- a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.Harmony.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - BepInEx.Harmony - - - - - Specifies the indices of parameters that are ByRef. - - - - - The indices of parameters that are ByRef. - - - - The indices of parameters that are ByRef. - - - - An extension class for Harmony based operations. - - - - - Applies all patches specified in the type. - - The HarmonyInstance to use. - The type to scan. - - - - A wrapper for Harmony based operations. - - - - - Applies all patches specified in the type. - - The type to scan. - The HarmonyInstance to use. - - - - Applies all patches specified in the type. - - The type to scan. - The ID for the Harmony instance to create, which will be used. - - - - Applies all patches specified in the assembly. - - The assembly to scan. - The HarmonyInstance to use. - - - - Applies all patches specified in the assembly. - - The assembly to scan. - The ID for the Harmony instance to create, which will be used. - - - - Applies all patches specified in the calling assembly. - - The Harmony instance to use. - - - - Applies all patches specified in the calling assembly. - - The ID for the Harmony instance to create, which will be used. - - - - Returns an instruction to call the specified delegate. - - The delegate type to emit. - The delegate to emit. - The instruction to - - - diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.Preloader.dll b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.Preloader.dll deleted file mode 100644 index 3d424b6..0000000 Binary files a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.Preloader.dll and /dev/null differ diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.Preloader.xml b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.Preloader.xml deleted file mode 100644 index 159e156..0000000 --- a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.Preloader.xml +++ /dev/null @@ -1,169 +0,0 @@ - - - - BepInEx.Preloader - - - - - Doorstop environment variables, passed into the BepInEx preloader. - https://github.com/NeighTools/UnityDoorstop/wiki#environment-variables - - - - - Path to the assembly that was invoked via Doorstop. Contains the same value as in "targetAssembly" configuration option in the config file. - - - - - Full path to the game's "Managed" folder that contains all the game's managed assemblies - - - - - Full path to the game executable currently running. - - - - - Array of paths where Mono searches DLLs from before assembly resolvers are invoked. - - - - - Log listener that listens to logs during preloading time and buffers messages for output in Unity logs later. - - - - - - - - - - - - - - - - Delegate used in patching assemblies. - - The assembly that is being patched. - - - - Worker class which is used for loading and patching entire folders of assemblies, or alternatively patching and - loading assemblies one at a time. - - - - - List of all patcher plugins to be applied - - - - - Adds a single assembly patcher to the pool of applicable patches. - - Patcher to apply. - - - - Adds all patchers from all managed assemblies specified in a directory. - - Directory to search patcher DLLs from. - - - - Releases all patchers to let them be collected by GC. - - - - - Applies patchers to all assemblies in the given directory and loads patched assemblies into memory. - - Directories to load CLR assemblies from in their search order. - - - - Loads an individual assembly definition into the CLR. - - The assembly to load. - File name of the assembly being loaded. - - - - A single assembly patcher. - - - - - Target assemblies to patch. - - - - - Initializer method that is run before any patching occurs. - - - - - Finalizer method that is run after all patching is done. - - - - - The main patcher method that is called on every DLL defined in . - - - - - Type name of the patcher. - - - - - - - - - - - Recreation of MonoMod's PlatformHelper.DeterminePlatform method, but with libc calls instead of creating processes. - - - - - The main entrypoint of BepInEx, and initializes all patchers and the chainloader. - - - - - The log writer that is specific to the preloader. - - - - - Inserts BepInEx's own chainloader entrypoint into UnityEngine. - - The assembly that will be attempted to be patched. - - - - Allocates a console window for use by BepInEx safely. - - - - - This exists because the Mono implementation of is/was broken, and would call Write directly instead of calling TraceEvent. - - - - - The main entrypoint of BepInEx, called from Doorstop. - - - - diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.dll b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.dll deleted file mode 100644 index 4c749e4..0000000 Binary files a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.dll and /dev/null differ diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.xml b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.xml deleted file mode 100644 index a96d13d..0000000 --- a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/BepInEx.xml +++ /dev/null @@ -1,1737 +0,0 @@ - - - - BepInEx - - - - - The manager and loader for all plugins, and the entry point for BepInEx plugin system. - - - - - The loaded and initialized list of plugins. - - - - - List of all loaded via the chainloader. - - - - - Collection of error chainloader messages that occured during plugin loading. - Contains information about what certain plugins were not loaded. - - - - - The GameObject that all plugins are attached to as components. - - - - - Initializes BepInEx to be able to start the chainloader. - - - - - Analyzes the given type definition and attempts to convert it to a valid - - Type definition to analyze. - If the type represent a valid plugin, returns a instance. Otherwise, return null. - - - - The entrypoint for the BepInEx plugin system. - - - - - A cacheable metadata item. Can be used with and to cache plugin metadata. - - - - - Serialize the object into a binary format. - - - - - - Loads the object from binary format. - - - - - - A cached assembly. - - - - - - List of cached items inside the assembly. - - - - - Timestamp of the assembly. Used to check the age of the cache. - - - - - Provides methods for loading specified types from an assembly. - - - - - Default assembly resolved used by the - - - - - Default reader parameters used by - - - - - Event fired when fails to resolve a type during type loading. - - - - - Looks up assemblies in the given directory and locates all types that can be loaded and collects their metadata. - - The specific base type to search for. - The directory to search for assemblies. - A function to check if a type should be selected and to build the type metadata. - A filter function to quickly determine if the assembly can be loaded. - The name of the cache to get cached types from. - A dictionary of all assemblies in the directory and the list of type metadatas of types that match the selector. - - - - Loads an index of type metadatas from a cache. - - Name of the cache - Cacheable item - Cached type metadatas indexed by the path of the assembly that defines the type. If no cache is defined, return null. - - - - Saves indexed type metadata into a cache. - - Name of the cache - List of plugin metadatas indexed by the path to the assembly that contains the types - Cacheable item - - - - Converts TypeLoadException to a readable string. - - TypeLoadException - Readable representation of the exception - - - - Base type of all classes representing and enforcing acceptable values of config settings. - - - - Type of values that this class can Clamp. - - - - Change the value to be acceptable, if it's not already. - - - - - Check if the value is an acceptable value. - - - - - Type of the supported values. - - - - - Get the string for use in config files. - - - - - Specify the list of acceptable values for a setting. - - - - - List of values that a setting can take. - - - - - Specify the list of acceptable values for a setting. - If the setting does not equal any of the values, it will be set to the first one. - - - - - - - - - - - - - - Specify the range of acceptable values for a setting. - - - - Lowest acceptable value - Highest acceptable value - - - - Lowest acceptable value - - - - - Highest acceptable value - - - - - - - - - - - - - - Section and key of a setting. Used as a unique key for identification within a . - The same definition can be used in multiple config files, it will point to different settings then. - - - - - - Group of the setting. All settings within a config file are grouped by this. - - - - - Name of the setting. - - - - - Create a new definition. Definitions with same section and key are equal. - - Group of the setting, case sensitive. - Name of the setting, case sensitive. - - - - - - - Check if the definitions are the same. - - - - - - Check if the definitions are the same. - - - - - - - - Check if the definitions are the same. - - - - - Check if the definitions are the same. - - - - - - - - Metadata of a . - - - - - Create a new description. - - Text describing the function of the setting and any notes or warnings. - Range of values that this setting can take. The setting's value will be automatically clamped. - Objects that can be used by user-made classes to add functionality. - - - - Text describing the function of the setting and any notes or warnings. - - - - - Range of acceptable values for a setting. - - - - - Objects that can be used by user-made classes to add functionality. - - - - - An empty description. - - - - - Provides access to a single setting inside of a . - - Type of the setting. - - - - Fired when the setting is changed. Does not detect changes made outside from this object. - - - - - Value of this setting. - - - - - - - - Container for a single setting of a . - Each config entry is linked to one config file. - - - - - Types of defaultValue and definition.AcceptableValues have to be the same as settingType. - - - - - Config file this entry is a part of. - - - - - Category and name of this setting. Used as a unique key for identification within a . - - - - - Description / metadata of this setting. - - - - - Type of the that this setting holds. - - - - - Default value of this setting (set only if the setting was not changed before). - - - - - Get or set the value of the setting. - - - - - Get the serialized representation of the value. - - - - - Set the value by using its serialized form. - - - - - If necessary, clamp the value to acceptable value range. T has to be equal to settingType. - - - - - Trigger setting changed event. - - - - - Write a description of this setting using all available metadata. - - - - - A helper class to handle persistent data. All public methods are thread-safe. - - - - - All config entries inside - - - - - Create a list with all config entries inside of this config file. - - - - - Create an array with all config entries inside of this config file. Should be only used for metadata purposes. - If you want to access and modify an existing setting then use - instead with no description. - - - - - Full path to the config file. The file might not exist until a setting is added and changed, or is called. - - - - - If enabled, writes the config to disk every time a value is set. - If disabled, you have to manually use or the changes will be lost! - - - - - - - - Create a new config file at the specified config path. - - Full path to a file that contains settings. The file will be created as needed. - If the config file/directory doesn't exist, create it immediately. - Information about the plugin that owns this setting file. - - - - Reloads the config from disk. Unsaved changes are lost. - - - - - Writes the config to disk. - - - - - Access one of the existing settings. If the setting has not been added yet, null is returned. - If the setting exists but has a different type than T, an exception is thrown. - New settings should be added with . - - Type of the value contained in this setting. - Section and Key of the setting. - - - - Access one of the existing settings. If the setting has not been added yet, null is returned. - If the setting exists but has a different type than T, an exception is thrown. - New settings should be added with . - - Type of the value contained in this setting. - Section/category/group of the setting. Settings are grouped by this. - Name of the setting. - - - - Access one of the existing settings. If the setting has not been added yet, false is returned. Otherwise, true. - If the setting exists but has a different type than T, an exception is thrown. - New settings should be added with . - - Type of the value contained in this setting. - Section and Key of the setting. - The ConfigEntry value to return. - - - - Access one of the existing settings. If the setting has not been added yet, null is returned. - If the setting exists but has a different type than T, an exception is thrown. - New settings should be added with . - - Type of the value contained in this setting. - Section/category/group of the setting. Settings are grouped by this. - Name of the setting. - The ConfigEntry value to return. - - - - Create a new setting. The setting is saved to drive and loaded automatically. - Each definition can be used to add only one setting, trying to add a second setting will throw an exception. - - Type of the value contained in this setting. - Section and Key of the setting. - Value of the setting if the setting was not created yet. - Description of the setting shown to the user and other metadata. - - - - Create a new setting. The setting is saved to drive and loaded automatically. - Each section and key pair can be used to add only one setting, trying to add a second setting will throw an exception. - - Type of the value contained in this setting. - Section/category/group of the setting. Settings are grouped by this. - Name of the setting. - Value of the setting if the setting was not created yet. - Description of the setting shown to the user and other metadata. - - - - Create a new setting. The setting is saved to drive and loaded automatically. - Each section and key pair can be used to add only one setting, trying to add a second setting will throw an exception. - - Type of the value contained in this setting. - Section/category/group of the setting. Settings are grouped by this. - Name of the setting. - Value of the setting if the setting was not created yet. - Simple description of the setting shown to the user. - - - - Create a new setting. The setting is saved to drive and loaded automatically. - Each definition can be used to add only one setting, trying to add a second setting will throw an exception. - - Type of the value contained in this setting. - Section and Key of the setting. - Value of the setting if the setting was not created yet. - Description of the setting shown to the user and other metadata. - - - - Create a new setting. The setting is saved to drive and loaded automatically. - Each section and key pair can be used to add only one setting, trying to add a second setting will throw an exception. - - Type of the value contained in this setting. - Section/category/group of the setting. Settings are grouped by this. - Name of the setting. - Value of the setting if the setting was not created yet. - Description of the setting shown to the user and other metadata. - - - - Create a new setting. The setting is saved to drive and loaded automatically. - Each section and key pair can be used to add only one setting, trying to add a second setting will throw an exception. - - Type of the value contained in this setting. - Section/category/group of the setting. Settings are grouped by this. - Name of the setting. - Value of the setting if the setting was not created yet. - Simple description of the setting shown to the user. - - - - Access a setting. Use Bind instead. - - - - - Access a setting. Use Bind instead. - - - - - An event that is fired every time the config is reloaded. - - - - - Fired when one of the settings is changed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Returns the ConfigDefinitions that the ConfigFile contains. - Creates a new array when the property is accessed. Thread-safe. - - - - - Returns the ConfigEntryBase values that the ConfigFile contains. - Creates a new array when the property is accessed. Thread-safe. - - - - - Provides access to a single setting inside of a . - - Type of the setting. - - - - Entry of this setting in the . - - - - - Unique definition of this setting. - - - - - Config file this setting is inside of. - - - - - Fired when the setting is changed. Does not detect changes made outside from this object. - - - - - Value of this setting. - - - - - A keyboard shortcut that can be used in Update method to check if user presses a key combo. The shortcut is only - triggered when the user presses the exact combination. For example, F + LeftCtrl will trigger only if user - presses and holds only LeftCtrl, and then presses F. If any other keys are pressed, the shortcut will not trigger. - - Can be used as a value of a setting in - to allow user to change this shortcut and have the changes saved. - - How to use: Use in this class instead of in the Update loop. - - - - - Shortcut that never triggers. - - - - - All KeyCode values that can be used in a keyboard shortcut. - - - - - Create a new keyboard shortcut. - - Main key to press - Keys that should be held down before main key is registered - - - - Main key of the key combination. It has to be pressed / let go last for the combination to be triggered. - If the combination is empty, is returned. - - - - - Modifiers of the key combination, if any. - - - - - Attempt to deserialize key combination from the string. - - - - - Serialize the key combination into a user readable string. - - - - - Check if the main key was just pressed (Input.GetKeyDown), and specified modifier keys are all pressed - - - - - Check if the main key is currently held down (Input.GetKey), and specified modifier keys are all pressed - - - - - Check if the main key was just lifted (Input.GetKeyUp), and specified modifier keys are all pressed. - - - - - - - - - - - - - - Arguments for events concerning a change of a setting. - - - - - - - - - Setting that was changed - - - - - Serializer/deserializer used by the config system. - - - - - Convert object of a given type to a string using available converters. - - - - - Convert string to an object of a given type using available converters. - - - - - Convert string to an object of a given type using available converters. - - - - - Get a converter for a given type if there is any. - - - - - Add a new type converter for a given type. - If a different converter is already added, this call is ignored and false is returned. - - - - - Check if a given type can be converted to and from string. - - - - - Give a list of types with registered converters. - - - - - For types that are in assemblies that can't get loaded before preloader runs (or it won't work on these assemblies) - - - - - A serializer/deserializer combo for some type(s). Used by the config system. - - - - - Used to serialize the type into a (hopefully) human-readable string. - Object is the instance to serialize, Type is the object's type. - - - - - Used to deserialize the type from a string. - String is the data to deserialize, Type is the object's type, should return instance to an object of Type. - - - - - True if an external console has been started, false otherwise. - - - - - The stream that writes to the standard out stream of the process. Should never be null. - - - - - The stream that writes to an external console. Null if no such console exists - - - - - This attribute denotes that a class is a plugin, and specifies the required metadata. - - - - - The unique identifier of the plugin. Should not change between plugin versions. - - - - - The user friendly name of the plugin. Is able to be changed between versions. - - - - - The specfic version of the plugin. - - - - The unique identifier of the plugin. Should not change between plugin versions. - The user friendly name of the plugin. Is able to be changed between versions. - The specfic version of the plugin. - - - - This attribute specifies any dependencies that this plugin has on other plugins. - - - - - Flags that are applied to a dependency - - - - - The plugin has a hard dependency on the referenced plugin, and will not run without it. - - - - - This plugin has a soft dependency on the referenced plugin, and is able to run without it. - - - - - The GUID of the referenced plugin. - - - - - The flags associated with this dependency definition. - - - - - The minimum version of the referenced plugin. - - - - - Marks this as depenant on another plugin. The other plugin will be loaded before this one. - If the other plugin doesn't exist, what happens depends on the parameter. - - The GUID of the referenced plugin. - The flags associated with this dependency definition. - - - - Marks this as depenant on another plugin. The other plugin will be loaded before this one. - If the other plugin doesn't exist or is of a version below , this plugin will not load and an error will be logged instead. - - The GUID of the referenced plugin. - The minimum version of the referenced plugin. - When version is supplied the dependency is always treated as HardDependency - - - - This attribute specifies other plugins that are incompatible with this plugin. - - - - - The GUID of the referenced plugin. - - - - - Marks this as incompatible with another plugin. - If the other plugin exists, this plugin will not be loaded and a warning will be shown. - - The GUID of the referenced plugin. - - - - This attribute specifies which processes this plugin should be run for. Not specifying this attribute will load the plugin under every process. - - - - - The name of the process that this plugin will run under. - - - - The name of the process that this plugin will run under. - - - - Helper class to use for retrieving metadata about a plugin, defined as attributes. - - - - - Retrieves the BepInPlugin metadata from a plugin type. - - The plugin type. - The BepInPlugin metadata of the plugin type. - - - - Retrieves the BepInPlugin metadata from a plugin instance. - - The plugin instance. - The BepInPlugin metadata of the plugin instance. - - - - Gets the specified attributes of a type, if they exist. - - The attribute type to retrieve. - The plugin type. - The attributes of the type, if existing. - - - - Gets the specified attributes of an instance, if they exist. - - The attribute type to retrieve. - The plugin instance. - The attributes of the instance, if existing. - - - - Retrieves the dependencies of the specified plugin type. - - The plugin type. - A list of all plugin types that the specified plugin type depends upon. - - - - This class is appended to AssemblyInfo.cs when BepInEx is built via a CI pipeline. - It is mainly intended to signify that the current build is not a release build and is special, like for instance a bleeding edge build. - - - - - The base plugin type that is used by the BepInEx plugin loader. - - - - - Information about this plugin as it was loaded. - - - - - Logger instance tied to this plugin. - - - - - Default config file tied to this plugin. The config file will not be created until - any settings are added and changed, or is called. - - - - - Create a new instance of a plugin and all of its tied in objects. - - BepInPlugin attribute is missing. - - - - Data class that represents information about a loadable BepInEx plugin. - Contains all metadata and additional info required for plugin loading by . - - - - - General metadata about a plugin. - - - - - Collection of attributes that describe what processes the plugin can run on. - - - - - Collection of attributes that describe what plugins this plugin depends on. - - - - - Collection of attributes that describe what plugins this plugin - is incompatible with. - - - - - File path to the plugin DLL - - - - - Instance of the plugin that represents this info. NULL if no plugin is instantiated from info (yet) - - - - - - - - Logs entries using Unity specific outputs. - - - - - - - - - - - Logs entries using Unity specific outputs. - - - - - Log levels to display. - - - - - Writer for the disk log. - - - - - Timer for flushing the logs to a file. - - - - - Whether to write Unity log messages to disk log. - - - - - Creates a new disk log listener. - - Path to the log. - Log levels to display. - Whether to append logs to an already existing log file. - Whether to include Unity log into the disk log. - - - - - - - - - - Disposes of Disk logger - - - - - A generic log listener that receives log events and can route them to some output (e.g. file, console, socket). - - - - - Handle an incoming log event. - - Log source that sent the event. Don't use; instead use - Information about the log message. - - - - Log source that can output log messages. - - - - - Name of the log source. - - - - - Event that sends the log message. Call to send a log message. - - - - - Log event arguments. Contains info about the log message. - - - - - Logged data. - - - - - Log levels for the data. - - - - - Log source that emitted the log event. - - - - - Creates the log event args- - - Logged data. - Log level of the data. - Log source that emits these args. - - - - - - - Like but appends newline at the end. - - Same output as but with new line. - - - - A static Logger instance. - - - - - Collection of all log listeners that receive log events. - - - - - Collection of all log source that output log events. - - - - - Logs an entry to the current logger instance. - - The level of the entry. - The textual value of the entry. - - - - Creates a new log source with a name and attaches it to log sources. - - Name of the log source to create. - An instance of that allows to write logs. - - - - Simple thread safe list that prioritizes read speed over write speed. - Read is the same as a normal list, while write locks and allocates a copy of the list. - Logger lists are rarely updated so this tradeoff should be fine. - - - - - - The level, or severity of a log entry. - - - - - No level selected. - - - - - A fatal error has occurred, which cannot be recovered from. - - - - - An error has occured, but can be recovered from. - - - - - A warning has been produced, but does not necessarily mean that something wrong has happened. - - - - - An important message that should be displayed to the user. - - - - - A message of low importance. - - - - - A message that would likely only interest a developer. - - - - - All log levels. - - - - - Helper methods for log level handling. - - - - - Gets the highest log level when there could potentially be multiple levels provided. - - The log level(s). - The highest log level supplied. - - - - Returns a translation of a log level to it's associated console colour. - - The log level(s). - A console color associated with the highest log level supplied. - - - - A generic, multi-purpose log source. Exposes simple API to manually emit logs. - - - - - - - - - - - Creates a manual log source. - - Name of the log source. - - - - Logs a message with the specified log level. - - Log levels to attach to the message. Multiple can be used with bitwise ORing. - Data to log. - - - - Logs a message with level. - - Data to log. - - - - Logs a message with level. - - Data to log. - - - - Logs a message with level. - - Data to log. - - - - Logs a message with level. - - Data to log. - - - - Logs a message with level. - - Data to log. - - - - Logs a message with level. - - Data to log. - - - - - - - A source that routes all logs from API to BepInEx logger. - - - - - - Whether Trace logs are rerouted. - - - - - Creates a new trace log source. - - New log source (or already existing one). - - - - Internal log source. - - - - - Creates a new trace log source. - - - - - Writes a message to the underlying instance. - - The message to write. - - - - Writes a message and a newline to the underlying instance. - - The message to write. - - - - - - - - - - Logs entries using Unity specific outputs. - - - - - - - - - - - Logs entries using Unity specific outputs. - - - - - - - - - - - Creates a new Unity log source. - - - - - - - - Paths used by BepInEx - - - - - List of directories from where Mono will search assemblies before assembly resolving is invoked. - - - - - The directory that the core BepInEx DLLs reside in. - - - - - The path to the core BepInEx DLL. - - - - - The path to the main BepInEx folder. - - - - - The path of the currently executing program BepInEx is encapsulated in. - - - - - The directory that the currently executing process resides in. - On OSX however, this is the parent directory of the game.app folder. - - - - - The path to the Managed folder of the currently running Unity game. - - - - - The path to the config directory. - - - - - The path to the global BepInEx configuration file. - - - - - The path to temporary cache files. - - - - - The path to the patcher plugin folder which resides in the BepInEx folder. - - - - - The path to the plugin folder which resides in the BepInEx folder. - - This is ONLY guaranteed to be set correctly when Chainloader has been initialized. - - - - - - The name of the currently executing process. - - - - - Provides methods for running code on other threads and synchronizing with the main thread. - - - - - Current instance of the helper. - - - - - Gives methods for invoking delegates on the main unity thread, both synchronously and asynchronously. - Can be used in many built-in framework types, for example - and to make their events fire on the main unity thread. - - - - - Queue the delegate to be invoked on the main unity thread. Use to synchronize your threads. - - - - - Queue the delegate to be invoked on a background thread. Use this to run slow tasks without affecting the game. - NOTE: Most of Unity API can not be accessed while running on another thread! - - - Task to be executed on another thread. Can optionally return an Action that will be executed on the main thread. - You can use this action to return results of your work safely. Return null if this is not needed. - - - - - False if current code is executing on the main unity thread, otherwise True. - Warning: Will return true before the first frame finishes (i.e. inside plugin Awake and Start methods). - - - - - - Convenience extensions for utilizing multiple threads and using the . - - - - - - - - Apply a function to a collection of data by spreading the work on multiple threads. - Outputs of the functions are returned to the current thread and yielded one by one. - - Type of the input values. - Type of the output values. - Input values for the work function. - Function to apply to the data on multiple threads at once. - Number of worker threads. By default SystemInfo.processorCount is used. - An exception was thrown inside one of the threads, and the operation was aborted. - Need at least 1 workerCount. - - - - Abstraction layer over Unity's input systems for use in universal plugins that need to use hotkeys. - It can use either Input or Unity.InputSystem, depending on what's available. Input is preferred. - WARNING: Use only inside of Unity's main thread! - - - - - Best currently supported input system. - - - - - True if the Input class is not disabled. - - - - - Generic input system interface. Just barely good enough for hotkeys. - - - - - - - - - - - - - - - - - - - - All KeyCodes supported by the current input system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Generic helper properties and methods. - - - - - Whether current Common Language Runtime supports dynamic method generation using namespace. - - - - - An encoding for UTF-8 which does not emit a byte order mark (BOM). - - - - - Try to perform an action. - - Action to perform. - Possible exception that gets returned. - True, if action succeeded, false if an exception occured. - - - - Combines multiple paths together, as the specific method is not available in .NET 3.5. - - The multiple paths to combine together. - A combined path. - - - - Returns the parent directory of a path, optionally specifying the amount of levels. - - The path to get the parent directory of. - The amount of levels to traverse. Defaults to 1 - The parent directory. - - - - Tries to parse a bool, with a default value if unable to parse. - - The string to parse - The value to return if parsing is unsuccessful. - Boolean value of input if able to be parsed, otherwise default value. - - - - Converts a file path into a UnityEngine.WWW format. - - The file path to convert. - A converted file path. - - - - Indicates whether a specified string is null, empty, or consists only of white-space characters. - - The string to test. - True if the value parameter is null or empty, or if value consists exclusively of white-space characters. - - - - Sorts a given dependency graph using a direct toposort, reporting possible cyclic dependencies. - - Nodes to sort - Function that maps a node to a collection of its dependencies. - Type of the node in a dependency graph. - Collection of nodes sorted in the order of least dependencies to the most. - Thrown when a cyclic dependency occurs. - - - - Checks whether a given cecil type definition is a subtype of a provided type. - - Cecil type definition - Type to check against - Whether the given cecil type is a subtype of the type. - - - - Try to resolve and load the given assembly DLL. - - Name of the assembly, of the type . - Directory to search the assembly from. - The loaded assembly. - True, if the assembly was found and loaded. Otherwise, false. - - - - Try to resolve and load the given assembly DLL. - - Name of the assembly, of the type . - Directory to search the assembly from. - Reader parameters that contain possible custom assembly resolver. - The loaded assembly. - True, if the assembly was found and loaded. Otherwise, false. - - - - Tries to create a file with the given name - - Path of the file to create - File open mode - Resulting filestream - File access options - File share options - - - - - Try to parse given string as an assembly name - - Fully qualified assembly name - Resulting instance - true, if parsing was successful, otherwise false - - On some versions of mono, using fails because it runs on unmanaged side - which has problems with encoding. - Using solves this by doing parsing on managed side instead. - - - - - Gets unique files in all given directories. If the file with the same name exists in multiple directories, - only the first occurrence is returned. - - Directories to search from. - File pattern to search. - Collection of all files in the directories. - - - - Console class with safe handlers for Unity 4.x, which does not have a proper Console implementation - - - - diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/HarmonyXInterop.dll b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/HarmonyXInterop.dll deleted file mode 100644 index 1ac6ec0..0000000 Binary files a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/HarmonyXInterop.dll and /dev/null differ diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/Mono.Cecil.Mdb.dll b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/Mono.Cecil.Mdb.dll deleted file mode 100644 index bddf5cb..0000000 Binary files a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/Mono.Cecil.Mdb.dll and /dev/null differ diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/Mono.Cecil.Pdb.dll b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/Mono.Cecil.Pdb.dll deleted file mode 100644 index 9227f6d..0000000 Binary files a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/Mono.Cecil.Pdb.dll and /dev/null differ diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/Mono.Cecil.Rocks.dll b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/Mono.Cecil.Rocks.dll deleted file mode 100644 index a77ac87..0000000 Binary files a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/Mono.Cecil.Rocks.dll and /dev/null differ diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/Mono.Cecil.dll b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/Mono.Cecil.dll deleted file mode 100644 index 18735f9..0000000 Binary files a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/Mono.Cecil.dll and /dev/null differ diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/MonoMod.RuntimeDetour.dll b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/MonoMod.RuntimeDetour.dll deleted file mode 100644 index 5709bbb..0000000 Binary files a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/MonoMod.RuntimeDetour.dll and /dev/null differ diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/MonoMod.RuntimeDetour.xml b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/MonoMod.RuntimeDetour.xml deleted file mode 100644 index 45e9d3b..0000000 --- a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/MonoMod.RuntimeDetour.xml +++ /dev/null @@ -1,178 +0,0 @@ - - - - MonoMod.RuntimeDetour - - - - - A fully managed detour. - Multiple Detours for a method to detour from can exist at any given time. Detours can be layered. - If you're writing your own detour manager or need to detour native functions, it's better to create instances of NativeDetour instead. - - - - - Mark the detour as applied in the detour chain. This can be done automatically when creating an instance. - - - - - Undo the detour without freeing it, allowing you to reapply it later. - - - - - Free the detour, while also permanently undoing it. This makes any further operations on this detour invalid. - - - - - Undo and free this temporary detour. - - - - - Generate a new DynamicMethod with which you can invoke the previous state. - - - - - Generate a new DynamicMethod with which you can invoke the previous state. - - - - - Generate a new DynamicMethod with which you can invoke the previous state. - - - - - A "raw" native detour, acting as a wrapper around NativeDetourData with a few helpers. - Only one NativeDetour for a method to detour from can exist at any given time. NativeDetours cannot be layered. - If you don't need the trampoline generator or any of the management helpers, use DetourManager.Native directly. - Unless you're writing your own detour manager or need to detour native functions, it's better to create instances of Detour instead. - - - - - Apply the native detour. This can be done automatically when creating an instance. - - - - - Undo the native detour without freeing the detour native data, allowing you to reapply it later. - - - - - Changes the source of this native detour to a new source address. This does not repair the old source location. - This also assumes that is simply a new address for the same method as this was constructed with. - - The new source location. - - - - Changed the target of this native detour to a new target. - - The new target address. - - - - Free the detour's data without undoing it. This makes any further operations on this detour invalid. - - - - - Undo and free this temporary detour. - - - - - Generate a new DynamicMethod with which you can invoke the previous state. - If the NativeDetour holds a reference to a managed method, a copy of the original method is returned. - If the NativeDetour holds a reference to a native function, an "undo-call-redo" trampoline with a matching signature is returned. - - - - - Generate a new delegate with which you can invoke the previous state. - If the NativeDetour holds a reference to a managed method, a copy of the original method is returned. - If the NativeDetour holds a reference to a native function, an "undo-call-redo" trampoline with a matching signature is returned. - - - - - Write the given value at the address to + offs, afterwards advancing offs by sizeof(byte). - - - - - Write the given value at the address to + offs, afterwards advancing offs by sizeof(ushort). - - - - - Write the given value at the address to + offs, afterwards advancing offs by sizeof(ushort). - - - - - Write the given value at the address to + offs, afterwards advancing offs by sizeof(ulong). - - - - - Generate a DynamicMethod to easily call the given native function from another DynamicMethod. - - The pointer to the native function to call. - A MethodBase with the target function's signature. - The detoured DynamicMethod. - - - - Fill the DynamicMethodDefinition with a throw. - - - - - Emit a call to DetourManager.Native.Copy using the given parameters. - - - - - Emit a call to DetourManager.Native.Apply using a copy of the given data. - - - - - The data forming a "raw" native detour, created and consumed by DetourManager.Native. - - - - - The method to detour from. Set when the structure is created by the IDetourNativePlatform. - - - - - The target method to be called instead. Set when the structure is created by the IDetourNativePlatform. - - - - - The type of the detour. Determined when the structure is created by the IDetourNativePlatform. - - - - - The size of the detour. Calculated when the structure is created by the IDetourNativePlatform. - - - - - DetourManager.Native-specific data. - - - - diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/MonoMod.Utils.dll b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/MonoMod.Utils.dll deleted file mode 100644 index 1d9fb35..0000000 Binary files a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/MonoMod.Utils.dll and /dev/null differ diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/MonoMod.Utils.xml b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/MonoMod.Utils.xml deleted file mode 100644 index 96ba37f..0000000 --- a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/BepInEx/core/MonoMod.Utils.xml +++ /dev/null @@ -1,1470 +0,0 @@ - - - - MonoMod.Utils - - - - - An IL manipulation "context" with various helpers and direct access to the MethodBody. - - - - - The manipulator callback, accepted by the Invoke method. - - - - - - The manipulated method. - - - - - The manipulated method's IL processor. - - - - - The manipulated method body. - - - - - The manipulated method's module. - - - - - The manipulated method instructions. - - - - - A readonly list of all defined labels. - - - - - Has the context been made read-only? No further method access is possible, but the context has not yet been disposed. - - - - - Events which run when the context will be disposed. - - - - - The current reference bag. Used for methods such as EmitReference and EmitDelegate. - - - - - Invoke a given manipulator callback. - - The manipulator to run in this context. - - - - Mark this ILContext as read-only and prevent this context from further accessing the originally passed method. - - - If the method is altered prior to calling MakeReadOnly or afterwards by accessing the method directly, the results are undefined. - - - - - See - - - - - See - - - - - See - - - - - Define a new label to be marked with a cursor. - - A label without a target instruction. - - - - Define a new label pointing at a given instruction. - - The instruction the label will point at. - A label pointing at the given instruction. - - - - Determine the index of a given instruction. - - The instruction to get the index of. - The instruction index, or the end of the method body if it hasn't been found. - - - - Obtain all labels pointing at the given instruction. - - The instruction to get all labels for. - All labels targeting the given instruction. - - - - Bind an arbitary object to an ILContext for static retrieval. - - The type of the object. The combination of typeparam and id provides the unique static reference. - The object to store. - The id to use in combination with the typeparam for object retrieval. - - - - Dispose this context, making it read-only and invoking all OnDispose event listeners. - - - - - Obtain a string representation of this context (method ID and body). - - A string representation of this context. - - - - Specifies where a ILCursor should be positioned in relation to the target of a search function - - - - - Move the cursor before the first instruction in the match - - - - - Equivalent to Before with `cursor.MoveAfterLabels()` causing emitted instructions to become the target of incoming labels - - - - - Move the cursor after the last instruction in the match - - - - - Indicates whether the position of a ILCursor is the result of a search function and - if the next search should ignore the instruction preceeding or following this cursor. - - SearchTarget.Next is the result of searching with MoveType.Before, and SearchTarget.Prev from MoveType.After - - - - - A foward searching function cannot match the Next instruction and must move the cursor forward - - - - - A reverse searching function cannot match the Next instruction and must move the cursor backward - - - - - A cursor used to manipulate a method body in an ILContext. - - - - - The context to which this cursor belongs to. - - - - - The instruction immediately following the cursor position or null if the cursor is at the end of the instruction list. - - - - - The instruction immediately preceding the cursor position or null if the cursor is at the start of the instruction list. - - - - - The instruction immediately preceding the cursor position or null if the cursor is at the start of the instruction list. - - - - - The index of the instruction immediately following the cursor position. Range: 0 to Instrs.Count - Setter accepts negative indexing by adding Instrs.Count to the operand - - - - - Indicates whether the position of a MMILCursor is the result of a search function and - if the next search should ignore the instruction preceeding or following this cursor. - - See - - - - - Enumerates all labels which point to the current instruction (label.Target == Next) - - - - - See - - - - - See - - - - - See - - - - - See - - - - - See - - - - - Create a clone of this cursor. - - The cloned cursor. - - - - Is this cursor before the given instruction? - - The instruction to check. - True if this cursor is before the given instruction, false otherwise. - - - - Is this cursor after the given instruction? - - The instruction to check. - True if this cursor is after the given instruction, false otherwise. - - - - Obtain a string representation of this cursor (method ID, index, search target, surrounding instructions). - - A string representation of this cursor. - - - - Move the cursor to a target instruction. All other movements go through this. - - The target instruction - Where to move in relation to the target instruction and incoming labels (branches) - Whether to set the `SearchTarget` and skip the target instruction with the next search function - this - - - - Move the cursor after incoming labels (branches). If an instruction is emitted, all labels which currently point to Next, will point to the newly emitted instruction. - - this - - - - Move the cursor before incoming labels (branches). This is the default behaviour. Emitted instructions will not cause labels to change targets. - - this - - - - Move the cursor to a target index. Supports negative indexing. See - - this - - - - Overload for Goto(label.Target). defaults to MoveType.AfterLabel - - this - - - - Search forward and moves the cursor to the next sequence of instructions matching the corresponding predicates. See also - - this - If no match is found - - - - Search forward and moves the cursor to the next sequence of instructions matching the corresponding predicates. - - True if a match was found - - - - Search backward and moves the cursor to the next sequence of instructions matching the corresponding predicates. See also - - this - If no match is found - - - - Search backward and moves the cursor to the next sequence of instructions matching the corresponding predicates. - - True if a match was found - - - - Find the next occurences of a series of instructions matching the given set of predicates with gaps permitted. - - An array of cursors corresponding to each found instruction (MoveType.Before) - If no match is found - - - - Find the next occurences of a series of instructions matching the given set of predicates with gaps permitted. - - An array of cursors corresponding to each found instruction (MoveType.Before) - True if a match was found - - - - Search backwards for occurences of a series of instructions matching the given set of predicates with gaps permitted. - - An array of cursors corresponding to each found instruction (MoveType.Before) - If no match is found - - - - Search backwards for occurences of a series of instructions matching the given set of predicates with gaps permitted. - - An array of cursors corresponding to each found instruction (MoveType.Before) - True if a match was found - - - - Set the target of a label to the current position (label.Target = Next) and moves after it. - - The label to mark - - - - Create a new label targetting the current position (label.Target = Next) and moves after it. - - The newly created label - - - - Create a new label for use with - - A new label with no target - - - - Remove the Next instruction - - - - - Remove several instructions - - - - - Move the cursor and all labels the cursor is positioned after to a target instruction - - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position. - - The instruction opcode. - The instruction operand. - this - - - - Emit a new instruction at this cursor's current position, accessing a given member. - - The type in which the member is defined. - The instruction opcode. - The accessed member name. - this - - - - Bind an arbitary object to an ILContext for static retrieval. See - - - - - Emit the IL to retrieve a stored reference of type with the given and place it on the stack. - - - - - Store an object in the reference store, and emit the IL to retrieve it and place it on the stack. - - - - - Emit the IL to invoke a delegate as if it were a method. Stack behaviour matches OpCodes.Call - - - - - A label to be used in ILContexts. - - - - - The target instruction this label points at. - - - - - All instructions using this label. - - - - - An IL inline reference bag used for ILContexts. - - - - - Get the object for the given ID. - - The object type. - The object ID. - The stored object. - - - - Get a MethodInfo for the getter. - - The object type. - The getter method. - - - - Store a new object. - - The object type. - The object to be stored. - An ID to be used for all further operations. - - - - Remove the object with the given ID from the bag, essentially clearing the ID's slot. - - The object type. - The object ID. - - - - Get a MethodInfo invoking a delegate of the given type, with the delegate at the top of the stack. Used by . - - The delegate type. - A MethodInfo invoking a delegate of the given type. - - - - The default IL reference bag. Throws NotSupportedException for every operation. - - - - - An IL reference bag implementation to be used for runtime-generated methods. - - - - - Collection of extensions used by MonoMod and other projects. - - - - - Create a hexadecimal string for the given bytes. - - The input bytes. - The output hexadecimal string. - - - - Invokes all delegates in the invocation list, passing on the result to the next. - - Type of the result. - The multicast delegate. - The initial value and first parameter. - Any other arguments that may be passed. - The result of all delegates. - - - - Invokes all delegates in the invocation list, as long as the previously invoked delegate returns true. - - - - - Invokes all delegates in the invocation list, as long as the previously invoked delegate returns false. - - - - - Invokes all delegates in the invocation list, as long as the previously invoked delegate returns null. - - - - - Split PascalCase words to become Pascal Case instead. - - PascalCaseString - Pascal Case String - - - - Read the string from the BinaryReader BinaryWriter in a C-friendly format. - - The input which the method reads from. - The output string. - - - - Write the string to the BinaryWriter in a C-friendly format. - - The output which the method writes to. - The input string. - - - - Cast a delegate from one type to another. Compatible with delegates holding an invocation list (combined delegates). - - The input delegate. - The output delegate. - - - - Cast a delegate from one type to another. Compatible with delegates holding an invocation list (combined delegates). - - The input delegate. - The wanted output delegate type. - The output delegate. - - - - Print the exception to the console, including extended loading / reflection data useful for mods. - - - - - Get the method of interest for a given state machine method. - - The method creating the state machine. - The "main" method in the state machine. - - - - Gets the actual generic method definition of a method, as defined on the fully open type. - - The potentially instantiated method to find the definition of. - The original method definition, with no generic arguments filled in. - - - - Safely resolve a reference, silently discarding any exceptions. - - The reference to resolve. - The resolved definition or null. - - - - Safely resolve a reference, silently discarding any exceptions. - - The reference to resolve. - The resolved definition or null. - - - - Safely resolve a reference, silently discarding any exceptions. - - The reference to resolve. - The resolved definition or null. - - - - Safely resolve a reference, silently discarding any exceptions. - - The reference to resolve. - The resolved definition or null. - - - - Get a certain custom attribute from an attribute provider. - - The attribute provider. - The custom attribute name. - The first matching custom attribute, or null if no matching attribute has been found. - - - - Determine if an attribute provider has got a specific custom attribute. - - The attribute provider. - The custom attribute name. - true if the attribute provider contains the given custom attribute, false otherwise. - - - - Get the integer value pushed onto the stack with this instruction. - - The instruction to get the pushed integer value for. - The pushed integer value. - - - - Get the integer value pushed onto the stack with this instruction. - - The instruction to get the pushed integer value for. - The pushed integer value or null. - - - - Determine if the method call is a base method call. - - The caller method body. - The called method. - True if the called method is a base method of the caller method, false otherwise. - - - - Determine if the given method can be preferably called using callvirt. - - The called method. - True if the called method can be called using callvirt, false otherwise. - - - - Determine if the given type is a struct (also known as "value type") or struct-alike (f.e. primitive). - - The type to check. - True if the type is a struct, primitive or similar, false otherwise. - - - - Get the long form opcode for any short form opcode. - - The short form opcode. - The long form opcode. - - - - Get the short form opcode for any long form opcode. - - The long form opcode. - The short form opcode. - - - - Calculate updated instruction offsets. Required for certain manual fixes. - - The method to recalculate the IL instruction offsets for. - - - - Fix (and optimize) any instructions which should use the long / short form opcodes instead. - - The method to apply the fixes to. - - - - Check if the signatures of a given System.Reflection and Mono.Cecil member reference match. - - The System.Reflection member reference. - The Mono.Cecil member reference. - True if both references share the same signature, false otherwise. - - - - Check if the signatures of a given System.Reflection and Mono.Cecil member reference match. - - The Mono.Cecil member reference. - The System.Reflection member reference. - True if both references share the same signature, false otherwise. - - - - See - - - - - See - - - - - See - - - - - See - - - - - See - - - - - Determine if two types are compatible with each other (f.e. object with string, or enums with their underlying integer type). - - The first type. - The second type. - True if both types are compatible with each other, false otherwise. - - - - Creates a delegate of the specified type from this method. - - The method to create the delegate from. - The type of the delegate to create. - The delegate for this method. - - - - Creates a delegate of the specified type with the specified target from this method. - - The method to create the delegate from. - The type of the delegate to create. - The object targeted by the delegate. - The delegate for this method. - - - - Creates a delegate of the specified type from this method. - - The method to create the delegate from. - The type of the delegate to create. - The delegate for this method. - - - - Creates a delegate of the specified type with the specified target from this method. - - The method to create the delegate from. - The type of the delegate to create. - The object targeted by the delegate. - The delegate for this method. - - - - Find a method for a given ID. - - The type to search in. - The method ID. - Whether to perform a simple search pass as well or not. - The first matching method or null. - - - - Find a method for a given ID recursively (including the passed type's base types). - - The type to search in. - The method ID. - Whether to perform a simple search pass as well or not. - The first matching method or null. - - - - Find a method for a given ID. - - The type to search in. - The method ID. - Whether to perform a simple search pass as well or not. - The first matching method or null. - - - - Find a method for a given ID recursively (including the passed type's base types). - - The type to search in. - The method ID. - Whether to perform a simple search pass as well or not. - The first matching method or null. - - - - Find a property for a given name. - - The type to search in. - The property name. - The first matching property or null. - - - - Find a property for a given name recursively (including the passed type's base types). - - The type to search in. - The property name. - The first matching property or null. - - - - Find a field for a given name. - - The type to search in. - The field name. - The first matching field or null. - - - - Find a field for a given name recursively (including the passed type's base types). - - The type to search in. - The field name. - The first matching field or null. - - - - Find an event for a given name. - - The type to search in. - The event name. - The first matching event or null. - - - - Find an event for a given name recursively (including the passed type's base types). - - The type to search in. - The event name. - The first matching event or null. - - - - Get a reference ID that is similar to the full name, but consistent between System.Reflection and Mono.Cecil. - - The method to get the ID for. - The name to use instead of the reference's own name. - The ID to use instead of the reference's declaring type ID. - Whether the type ID should be included or not. System.Reflection avoids it by default. - Whether the ID should be "simple" (name only). - The ID. - - - - Get a reference ID that is similar to the full name, but consistent between System.Reflection and Mono.Cecil. - - The call site to get the ID for. - The ID. - - - - Get a reference ID that is similar to the full name, but consistent between System.Reflection and Mono.Cecil. - - The method to get the ID for. - The name to use instead of the reference's own name. - The ID to use instead of the reference's declaring type ID. - Whether the type ID should be included or not. System.Reflection avoids it by default. - Whether the method is regarded as a proxy method or not. Setting this paramater to true will skip the first parameter. - Whether the ID should be "simple" (name only). - The ID. - - - - Get the "patch name" - the name of the target to patch - for the given member. - - The member to get the patch name for. - The patch name. - - - - Get the "patch name" - the name of the target to patch - for the given member. - - The member to get the patch name for. - The patch name. - - - - Clone the given method definition. - - The original method. - The method definition to apply the cloning process onto, or null to create a new method. - A clone of the original method. - - - - Clone the given method body. - - The original method body. - The method which will own the newly cloned method body. - A clone of the original method body. - - - - Force-update a generic parameter's position and type. - - The generic parameter to update. - The new position. - The new type. - The updated generic parameter. - - - - Resolve a given generic parameter in another context. - - The new context. - The original generic parameter. - A generic parameter provided by the given context which matches the original generic parameter. - - - - Relink the given member reference (metadata token provider). - - The reference to relink. - The relinker to use during the relinking process. - The generic context provided to relink generic references. - A relinked reference. - - - - Relink the given type reference. - - The reference to relink. - The relinker to use during the relinking process. - The generic context provided to relink generic references. - A relinked reference. - - - - Relink the given method reference. - - The reference to relink. - The relinker to use during the relinking process. - The generic context provided to relink generic references. - A relinked reference. - - - - Relink the given callsite. - - The reference to relink. - The relinker to use during the relinking process. - The generic context provided to relink generic references. - A relinked reference. - - - - Relink the given field reference. - - The reference to relink. - The relinker to use during the relinking process. - The generic context provided to relink generic references. - A relinked reference. - - - - Relink the given parameter definition. - - The reference to relink. - The relinker to use during the relinking process. - The generic context provided to relink generic references. - A relinked reference. - - - - Clone the given parameter definition. - - The original parameter definition. - A clone of the original parameter definition. - - - - Relink the given custom attribute. - - The reference to relink. - The relinker to use during the relinking process. - The generic context provided to relink generic references. - A relinked reference. - - - - Clone the given custom attribute. - - The original custom attribute. - A clone of the original custom attribute. - - - - Relink the given generic parameter reference. - - The reference to relink. - The relinker to use during the relinking process. - The generic context provided to relink generic references. - A relinked reference. - - - - Clone the given generic parameter. - - The original generic parameter. - A clone of the original generic parameter. - - - - Get the managed size of a given type. This matches an IL-level sizeof(t), even if it cannot be determined normally in C#. - Note that sizeof(t) != Marshal.SizeOf(t), f.e. when t is char. - - The type to get the size from. - The managed type size. - - - - Get a type which matches what the method should receive via ldarg.0 - - The method to obtain the "this" parameter type from. - The "this" parameter type. - - - - Get a native function pointer for a given method. This matches an IL-level ldftn. - - - The result of ldftn doesn't always match that of MethodHandle.GetFunctionPointer(). - For example, ldftn doesn't JIT-compile the method on mono, which thus keeps the class constructor untouched. - And on .NET, struct overrides (f.e. ToString) have got multiple entry points pointing towards the same code. - - The method to get a native function pointer for. - The native function pointer. - - - - A variant of ILGenerator which uses Mono.Cecil under the hood. - - - - - The underlying Mono.Cecil.Cil.ILProcessor. - - - - - Abstract version of System.Reflection.Emit.ILGenerator. See for proper documentation. - - - - - Get a "real" ILGenerator for this ILGeneratorShim. - - A "real" ILGenerator. - - - - Get the proxy type for a given ILGeneratorShim type. The proxy type implements ILGenerator. - - The ILGeneratorShim type. - The "real" ILGenerator type. - - - - Get the proxy type for a given ILGeneratorShim type. The proxy type implements ILGenerator. - - The ILGeneratorShim type. - The "real" ILGenerator type. - - - - Get the non-generic proxy type implementing ILGenerator. - - The "real" ILGenerator type, non-generic. - - - - A DynamicMethodDefinition "generator", responsible for generating a runtime MethodInfo from a DMD MethodDefinition. - - - - - - A DMDGenerator implementation using Mono.Cecil to build an in-memory assembly. - - - - - Fill the DynamicMethod with a stub. - - - - - Fill the DynamicMethod with a stub. - - - - - Emit a reference to an arbitrary object. Note that the references "leak." - - - - - Emit a reference to an arbitrary object. Note that the references "leak." - - - - - Emit a reference to an arbitrary object. Note that the references "leak." - - - - - Emit a reference to an arbitrary object. Note that the references "leak." - - - - - Allows you to remap library paths / names and specify loading flags. Useful for cross-platform compatibility. Applies only to DynDll. - - - - - Open a given library and get its handle. - - The library name. - Whether to skip using the mapping or not. - Any optional platform-specific flags. - The library handle. - - - - Try to open a given library and get its handle. - - The library name. - The library handle, or null if it failed loading. - Whether to skip using the mapping or not. - Any optional platform-specific flags. - True if the handle was obtained, false otherwise. - - - - Release a library handle obtained via OpenLibrary. Don't release the result of OpenLibrary(null)! - - The library handle. - - - - Get a function pointer for a function in the given library. - - The library handle. - The function name. - The function pointer. - - - - Get a function pointer for a function in the given library. - - The library handle. - The function name. - The function pointer, or null if it wasn't found. - True if the function pointer was obtained, false otherwise. - - - - Extension method wrapping Marshal.GetDelegateForFunctionPointer - - - - - Fill all static delegate fields with the DynDllImport attribute. - Call this early on in the static constructor. - - The type containing the DynDllImport delegate fields. - Any optional mappings similar to the static mappings. - - - - Fill all instance delegate fields with the DynDllImport attribute. - Call this early on in the constructor. - - An instance of a type containing the DynDllImport delegate fields. - Any optional mappings similar to the static mappings. - - - - Similar to DllImport, but requires you to run typeof(DeclaringType).ResolveDynDllImports(); - - - - - The library or library alias to use. - - - - - A list of possible entrypoints that the function can be resolved to. Implicitly includes the field name and delegate name. - - - - The library or library alias to use. - A list of possible entrypoints that the function can be resolved to. Implicitly includes the field name and delegate name. - - - - A mapping entry, to be used by . - - - - - The name as which the library will be resolved as. Useful to remap libraries or to provide full paths. - - - - - Platform-dependent loading flags. - - - - The name as which the library will be resolved as. Useful to remap libraries or to provide full paths. - Platform-dependent loading flags. - - - - The relinker callback delegate type. - - The reference (metadata token provider) to relink. - The generic context provided to relink generic references. - A relinked reference. - - - - Generic platform enum. - - - - - Bit applied to all OSes (Unknown, Windows, MacOS, ...). - - - - - On demand 64-bit platform bit. - - - - - Applied to all NT and NT-oid platforms (Windows). - - - - - Applied to all Unix and Unix-oid platforms (macOS, Linux, ...). - - - - - On demand ARM platform bit. - - - - - On demand Wine bit. DON'T RELY ON THIS. - - - - - Unknown OS. - - - - - Windows, using the NT kernel. - - - - - macOS, using the Darwin kernel. - - - - - Linux. - - - - - Android, using the Linux kernel. - - - - - iOS, sharing components with macOS. - - - - diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/changelog.txt b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/changelog.txt deleted file mode 100644 index 9d3f018..0000000 --- a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/changelog.txt +++ /dev/null @@ -1,7 +0,0 @@ -4 commits since v5.4.23.4 - -Changelog (excluding merges): -* (57f1fb85) [ManlyMarco] Bump version number -* (37f0a9aa) [Soggy_Pancake] v5: Fix log writer errors for Unity 6 (#1264) -* (3e8aebdb) [Arrowmaster] Upgrade Doorstop to version 4.5.0 (#1259) -* (8e9afa93) [Ploo] Fix for unity 2022.3.62f3 not having get_graphicsDeviceID (#1235) \ No newline at end of file diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/doorstop_config.ini b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/doorstop_config.ini deleted file mode 100644 index 97f55df..0000000 --- a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/doorstop_config.ini +++ /dev/null @@ -1,39 +0,0 @@ -# General options for Unity Doorstop -[General] - -# Enable Doorstop? -enabled = true - -# Path to the assembly to load and execute -# NOTE: The entrypoint must be of format `static void Doorstop.Entrypoint.Start()` -target_assembly=BepInEx\core\BepInEx.Preloader.dll - -# If true, Unity's output log is redirected to \output_log.txt -redirect_output_log = false - -# Overrides the default boot.config file path -boot_config_override = - -# If enabled, DOORSTOP_DISABLE env var value is ignored -# USE THIS ONLY WHEN ASKED TO OR YOU KNOW WHAT THIS MEANS -ignore_disable_switch = false - -# Options specific to running under Unity Mono runtime -[UnityMono] - -# Overrides default Mono DLL search path -# Sometimes it is needed to instruct Mono to seek its assemblies from a different path -# (e.g. mscorlib is stripped in original game) -# This option causes Mono to seek mscorlib and core libraries from a different folder before Managed -# Original Managed folder is added as a secondary folder in the search path -# To specify multiple paths, separate them with semicolons (;) -dll_search_path_override = - -# If true, Mono debugger server will be enabled -debug_enabled = false - -# When debug_enabled is true, specifies the address to use for the debugger server -debug_address = 127.0.0.1:10000 - -# If true and debug_enabled is true, Mono debugger server will suspend the game execution until a debugger is attached -debug_suspend = false \ No newline at end of file diff --git a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/winhttp.dll b/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/winhttp.dll deleted file mode 100644 index cb11845..0000000 Binary files a/SFS_Language_TOOL/assets/BepInEx_win_x64_5.4.23.5/winhttp.dll and /dev/null differ diff --git a/SFS_Language_TOOL/assets/SFS_FontFix.dll b/SFS_Language_TOOL/assets/SFS_FontFix.dll deleted file mode 100644 index f46d89b..0000000 Binary files a/SFS_Language_TOOL/assets/SFS_FontFix.dll and /dev/null differ diff --git a/SFS_Language_TOOL/assets/fonts/arial.ttf b/SFS_Language_TOOL/assets/fonts/arial.ttf deleted file mode 100644 index 8682d94..0000000 Binary files a/SFS_Language_TOOL/assets/fonts/arial.ttf and /dev/null differ diff --git a/SFS_Language_TOOL/assets/NotoSansSC.ttf b/assets/NotoSansSC.ttf similarity index 100% rename from SFS_Language_TOOL/assets/NotoSansSC.ttf rename to assets/NotoSansSC.ttf diff --git a/SFS_Language_TOOL/Cargo.toml b/legacy/SFS_Language_TOOL/Cargo.toml similarity index 100% rename from SFS_Language_TOOL/Cargo.toml rename to legacy/SFS_Language_TOOL/Cargo.toml diff --git a/SFS_FontFix_Plugin/LICENSE.txt b/legacy/SFS_Language_TOOL/LICENSE.txt similarity index 100% rename from SFS_FontFix_Plugin/LICENSE.txt rename to legacy/SFS_Language_TOOL/LICENSE.txt diff --git a/SFS_Language_TOOL/README.md b/legacy/SFS_Language_TOOL/README.md similarity index 100% rename from SFS_Language_TOOL/README.md rename to legacy/SFS_Language_TOOL/README.md diff --git a/SFS_Language_TOOL/build.rs b/legacy/SFS_Language_TOOL/build.rs similarity index 100% rename from SFS_Language_TOOL/build.rs rename to legacy/SFS_Language_TOOL/build.rs diff --git a/SFS_Language_TOOL/src/app.rs b/legacy/SFS_Language_TOOL/src/app.rs similarity index 100% rename from SFS_Language_TOOL/src/app.rs rename to legacy/SFS_Language_TOOL/src/app.rs diff --git a/SFS_Language_TOOL/src/file_manager.rs b/legacy/SFS_Language_TOOL/src/file_manager.rs similarity index 100% rename from SFS_Language_TOOL/src/file_manager.rs rename to legacy/SFS_Language_TOOL/src/file_manager.rs diff --git a/SFS_Language_TOOL/src/language.rs b/legacy/SFS_Language_TOOL/src/language.rs similarity index 100% rename from SFS_Language_TOOL/src/language.rs rename to legacy/SFS_Language_TOOL/src/language.rs diff --git a/SFS_Language_TOOL/src/main.rs b/legacy/SFS_Language_TOOL/src/main.rs similarity index 100% rename from SFS_Language_TOOL/src/main.rs rename to legacy/SFS_Language_TOOL/src/main.rs diff --git a/mod/FontFixPlugin.cs b/mod/FontFixPlugin.cs new file mode 100644 index 0000000..c7be6ac --- /dev/null +++ b/mod/FontFixPlugin.cs @@ -0,0 +1,202 @@ +using BepInEx; +using BepInEx.Logging; +using HarmonyLib; +using System; +using System.Collections.Generic; +using System.IO; +using TMPro; +using UnityEngine; +using UnityEngine.TextCore.LowLevel; + +namespace SFS_FontFix +{ + [BepInPlugin("com.sfs.fontfix", "SFS Font Fix", "6.1.0")] + public class FontFixPlugin : BaseUnityPlugin + { + public static FontFixPlugin Instance; + public static ManualLogSource Log => Instance?.Logger; + + public Font chineseUnityFont; + public TMP_FontAsset chineseTMPFont; + public bool isInitialized; + + private void Awake() + { + Instance = this; + Logger.LogInfo("SFS Font Fix v6.1.0 loaded"); + new Harmony("com.sfs.fontfix").PatchAll(); + } + + private void Start() + { + TryReplaceFont(); + if (!isInitialized) + { + var go = new GameObject("FontFixInit"); + go.AddComponent().mod = this; + DontDestroyOnLoad(go); + } + } + + public void TryReplaceFont() + { + if (isInitialized) return; + var manager = SFS.Translations.TranslationManager.main; + if (manager?.fonts == null || manager.fonts.Count == 0) return; + + string fontPath = FindFontFile(); + if (fontPath == null) return; + + chineseUnityFont = new Font(fontPath); + ReplaceNormalFont(manager); + CreateTMPFont(); + ApplyFontToExistingTMP(); + + isInitialized = true; + Logger.LogInfo("Font replacement complete"); + } + + private string FindFontFile() + { + string pluginPath = Path.GetDirectoryName(typeof(FontFixPlugin).Assembly.Location); + foreach (var name in new[] { "NotoSansSC-Bold.ttf", "NotoSansSC.ttf", "Font.ttf" }) + { + string path = Path.Combine(pluginPath, name); + if (File.Exists(path)) return path; + } + return null; + } + + private void CreateTMPFont() + { + if (chineseUnityFont == null) return; + try + { + chineseTMPFont = TMP_FontAsset.CreateFontAsset( + chineseUnityFont, 90, 9, GlyphRenderMode.SDFAA, 4096, 4096, + AtlasPopulationMode.Dynamic, true); + if (chineseTMPFont == null) return; + chineseTMPFont.name = "NotoSansSC SDF"; + chineseTMPFont.fallbackFontAssetTable = new List(); + } + catch (Exception e) { Logger.LogError("CreateFontAsset error: " + e); } + } + + private void ReplaceNormalFont(SFS.Translations.TranslationManager manager) + { + var fonts = manager.fonts; + for (int i = 0; i < fonts.Count; i++) + { + if (fonts[i] != null && fonts[i].name.ToLower() == "normal") + { + fonts[i] = chineseUnityFont; + if (manager.currentFont == fonts[i]) + manager.currentFont = chineseUnityFont; + return; + } + } + if (fonts.Count > 0 && fonts[0] != null) + fonts[0] = chineseUnityFont; + } + + private void ApplyFontToExistingTMP() + { + if (chineseTMPFont == null) return; + var tmps = UnityEngine.Object.FindObjectsByType(FindObjectsSortMode.None); + foreach (var tmp in tmps) + { + if (tmp != null) + tmp.font = chineseTMPFont; + } + Logger.LogInfo("Applied font to " + tmps.Length + " existing TMP_Text objects"); + } + + public static void ApplyFontToTMP(TextMeshProUGUI tmp) + { + var mod = Instance; + if (mod?.chineseTMPFont == null) return; + if (tmp.font != mod.chineseTMPFont) + tmp.font = mod.chineseTMPFont; + } + } + + public class FontFixRetry : MonoBehaviour + { + public FontFixPlugin mod; + + void Update() + { + if (mod.isInitialized) + { + Destroy(gameObject); + return; + } + mod.TryReplaceFont(); + } + } + + [HarmonyPatch(typeof(SFS.Translations.TranslationManager), "Awake")] + public class TranslationManager_Awake_Patch + { + [HarmonyPostfix] + static void Postfix(SFS.Translations.TranslationManager __instance) + { + var mod = FontFixPlugin.Instance; + if (mod == null) return; + mod.TryReplaceFont(); + } + } + + [HarmonyPatch(typeof(SFS.Translations.TranslationManager), "SetLanguage")] + public class SetLanguagePatch + { + [HarmonyPostfix] + static void Postfix(SFS.Translations.TranslationManager __instance) + { + if (FontFixPlugin.Instance?.chineseUnityFont != null && __instance.currentFont != FontFixPlugin.Instance.chineseUnityFont) + __instance.currentFont = FontFixPlugin.Instance.chineseUnityFont; + } + } + + [HarmonyPatch(typeof(SFS.Translations.FontSetter), "SetFont")] + public class FontSetter_SetFont_Patch + { + [HarmonyPostfix] + static void Postfix(SFS.Translations.FontSetter __instance) + { + if (FontFixPlugin.Instance?.chineseTMPFont == null) return; + var tmp = __instance.GetComponentInChildren(); + if (tmp != null && tmp.font != FontFixPlugin.Instance.chineseTMPFont) + tmp.font = FontFixPlugin.Instance.chineseTMPFont; + } + } + + [HarmonyPatch(typeof(TextMeshProUGUI), "OnEnable")] + public class TMP_OnEnable_Patch + { + [HarmonyPostfix] + static void Postfix(TextMeshProUGUI __instance) + { + FontFixPlugin.ApplyFontToTMP(__instance); + } + } + + [HarmonyPatch(typeof(SFS.Translations.Loc), "SetLanguage")] + public class Loc_SetLanguage_Patch + { + [HarmonyPostfix] + static void Postfix() + { + foreach (var field in SFS.Translations.Loc.fields.Values) + { + if (field?.subs == null) continue; + for (int i = 0; ; i++) + { + if (!field.subs.TryGetValue(i, out var v)) break; + if (v != null && v.Contains(":")) + field.subs[i] = v.Replace(':', ':'); + } + } + } + } +} diff --git a/SFS_FontFix_Plugin/SFS_FontFix/SFS_FontFix_modern.csproj b/mod/SFS_FontFix.csproj similarity index 91% rename from SFS_FontFix_Plugin/SFS_FontFix/SFS_FontFix_modern.csproj rename to mod/SFS_FontFix.csproj index 1497a30..3fa397a 100644 --- a/SFS_FontFix_Plugin/SFS_FontFix/SFS_FontFix_modern.csproj +++ b/mod/SFS_FontFix.csproj @@ -3,13 +3,17 @@ net472 Library latest - ../../SFS_Language_TOOL + ../dist false + SFS_FontFix + SFS_FontFix - lib/BepInEx.dllfalse + + lib/0Harmony.dllfalse + lib/BepInEx.dllfalse lib/BepInEx.Harmony.dllfalse lib/UnityEngine.dllfalse lib/UnityEngine.CoreModule.dllfalse diff --git a/SFS_HAN_MOD/SFS_HAN_MOD/SFS_HAN_MOD.cs b/mod/SFS_HAN_MOD.cs similarity index 57% rename from SFS_HAN_MOD/SFS_HAN_MOD/SFS_HAN_MOD.cs rename to mod/SFS_HAN_MOD.cs index b2a7790..d093030 100644 --- a/SFS_HAN_MOD/SFS_HAN_MOD/SFS_HAN_MOD.cs +++ b/mod/SFS_HAN_MOD.cs @@ -1,11 +1,8 @@ using HarmonyLib; using ModLoader; -using SFS.UI.ModGUI; -using SFS.World; using System; using System.Collections.Generic; using System.IO; -using System.Linq; using TMPro; using UnityEngine; using UnityEngine.TextCore.LowLevel; @@ -15,14 +12,12 @@ namespace SFS_HAN_MOD public class SFS_HAN_MOD : Mod { public static SFS_HAN_MOD Instance; - private FontFixHelper helper; static void Log(string msg) => UnityEngine.Debug.Log("[SFS_HAN_MOD] " + msg); - static void Log(object msg) => UnityEngine.Debug.Log("[SFS_HAN_MOD] " + msg); public override string ModNameID => "sfs_font_fix"; public override string DisplayName => "SFS Font Fix"; public override string Author => "Dere3046"; - public override string ModVersion => "5.1.0"; + public override string ModVersion => "6.1.0"; public override string MinimumGameVersionNecessary => "1.5.9"; public override string Description => "Fixes missing Chinese characters by replacing the normal font with Noto Sans SC"; @@ -38,15 +33,13 @@ public override void Early_Load() public override void Load() { - var go = GameObject.Find("FontFixHelper"); - if (go != null) GameObject.Destroy(go); - - go = new GameObject("FontFixHelper"); - helper = go.AddComponent(); - helper.mod = this; - GameObject.DontDestroyOnLoad(go); - TryReplaceFont(); + if (!isInitialized) + { + var go = new GameObject("FontFixInit"); + go.AddComponent().mod = this; + GameObject.DontDestroyOnLoad(go); + } } public void TryReplaceFont() @@ -61,6 +54,8 @@ public void TryReplaceFont() chineseUnityFont = new Font(fontPath); ReplaceNormalFont(manager); CreateTMPFont(); + ApplyFontToExistingTMP(); + isInitialized = true; Log("Font replacement complete"); } @@ -97,7 +92,7 @@ private void CreateTMPFont() chineseTMPFont.name = "NotoSansSC SDF"; chineseTMPFont.fallbackFontAssetTable = new List(); } - catch (System.Exception e) { Log("CreateFontAsset error: " + e.Message); } + catch (Exception e) { Log("CreateFontAsset error: " + e.Message); } } private void ReplaceNormalFont(SFS.Translations.TranslationManager manager) @@ -117,35 +112,51 @@ private void ReplaceNormalFont(SFS.Translations.TranslationManager manager) fonts[0] = chineseUnityFont; } - public void ApplyFontToAllTMP() + private void ApplyFontToExistingTMP() { if (chineseTMPFont == null) return; - int count = 0; - foreach (var tmp in UnityEngine.Object.FindObjectsOfType()) + var tmps = UnityEngine.Object.FindObjectsByType(FindObjectsSortMode.None); + foreach (var tmp in tmps) { - if (tmp == null) continue; - tmp.font = chineseTMPFont; - tmp.SetAllDirty(); - tmp.ForceMeshUpdate(); - count++; + if (tmp != null) + tmp.font = chineseTMPFont; } + Log("Applied font to " + tmps.Length + " existing TMP_Text objects"); + } + + public static void ApplyFontToTMP(TextMeshProUGUI tmp) + { + var mod = Instance; + if (mod?.chineseTMPFont == null) return; + if (tmp.font != mod.chineseTMPFont) + tmp.font = mod.chineseTMPFont; } } - public class FontFixHelper : MonoBehaviour + public class FontFixRetry : MonoBehaviour { public SFS_HAN_MOD mod; void Update() { - if (mod == null || mod.isInitialized) return; + if (mod.isInitialized) + { + Destroy(gameObject); + return; + } mod.TryReplaceFont(); } + } - void LateUpdate() + [HarmonyPatch(typeof(SFS.Translations.TranslationManager), "Awake")] + public class TranslationManager_Awake_Patch + { + [HarmonyPostfix] + static void Postfix(SFS.Translations.TranslationManager __instance) { - if (mod == null || !mod.isInitialized || mod.chineseTMPFont == null) return; - mod.ApplyFontToAllTMP(); + var mod = SFS_HAN_MOD.Instance; + if (mod == null) return; + mod.TryReplaceFont(); } } @@ -162,74 +173,45 @@ static void Postfix(SFS.Translations.TranslationManager __instance) } [HarmonyPatch(typeof(SFS.Translations.FontSetter), "SetFont")] - public class FontSetter_TMP_Patch + public class FontSetter_SetFont_Patch { [HarmonyPostfix] - static void Postfix(Font font, SFS.Translations.FontSetter __instance) + static void Postfix(SFS.Translations.FontSetter __instance) { var mod = SFS_HAN_MOD.Instance; if (mod?.chineseTMPFont == null) return; var tmp = __instance.GetComponentInChildren(); if (tmp != null && tmp.font != mod.chineseTMPFont) - { tmp.font = mod.chineseTMPFont; - tmp.SetAllDirty(); - tmp.ForceMeshUpdate(); - } } } - [HarmonyPatch(typeof(SFS.World.FlightInfoDrawer), "Update")] - public class FlightInfoDrawer_Update_Patch + [HarmonyPatch(typeof(TextMeshProUGUI), "OnEnable")] + public class TMP_OnEnable_Patch { - [HarmonyPrefix] - static bool Prefix(FlightInfoDrawer __instance) + [HarmonyPostfix] + static void Postfix(TextMeshProUGUI __instance) { - var mod = SFS_HAN_MOD.Instance; - if (mod?.chineseTMPFont == null) return true; + SFS_HAN_MOD.ApplyFontToTMP(__instance); + } + } - try + [HarmonyPatch(typeof(SFS.Translations.Loc), "SetLanguage")] + public class Loc_SetLanguage_Patch + { + [HarmonyPostfix] + static void Postfix() + { + foreach (var field in SFS.Translations.Loc.fields.Values) { - if (PlayerController.main.player.Value is SFS.World.Rocket rocket) - { - __instance.menuHolder.SetActive(true); - float mass = rocket.rb2d.mass; - float thrust = rocket.partHolder.GetModules() - .Sum((SFS.Parts.Modules.EngineModule a) => a.thrust.Value * a.throttle_Out.Value); - __instance.massText.Text = mass.ToString("0.00") + " t"; - __instance.thrustText.Text = thrust.ToString("0.0") + " kN"; - __instance.thrustToWeightText.Text = (mass > 0 ? (thrust / mass).ToString("0.00") : "0.00"); - __instance.partCountText.Text = rocket.partHolder.parts.Count.ToString(); - } - else + if (field?.subs == null) continue; + for (int i = 0; ; i++) { - __instance.massText.Text = "0.00 t"; - __instance.thrustText.Text = "0.0 kN"; - __instance.thrustToWeightText.Text = "0.00"; - __instance.partCountText.Text = "0"; + if (!field.subs.TryGetValue(i, out var v)) break; + if (v != null && v.Contains(":")) + field.subs[i] = v.Replace(':', ':'); } - __instance.timewarpText.Text = WorldTime.main.timewarpSpeed + "x"; } - catch { } - - ForceRefresh(__instance.timewarpText, mod.chineseTMPFont); - ForceRefresh(__instance.massText, mod.chineseTMPFont); - ForceRefresh(__instance.thrustText, mod.chineseTMPFont); - ForceRefresh(__instance.thrustToWeightText, mod.chineseTMPFont); - ForceRefresh(__instance.partCountText, mod.chineseTMPFont); - return false; - } - - static void ForceRefresh(SFS.UI.TextAdapter adapter, TMP_FontAsset font) - { - if (adapter == null) return; - var tmp = adapter.GetComponent(); - if (tmp == null) return; - if (tmp.font != font) tmp.font = font; - if (tmp.text != null && tmp.text.Contains(":")) - tmp.text = tmp.text.Replace(':', ':'); - tmp.SetAllDirty(); - tmp.ForceMeshUpdate(); } } } diff --git a/mod/SFS_HAN_MOD.csproj b/mod/SFS_HAN_MOD.csproj new file mode 100644 index 0000000..98f7db1 --- /dev/null +++ b/mod/SFS_HAN_MOD.csproj @@ -0,0 +1,25 @@ + + + net472 + Library + latest + ../dist + false + SFS_HAN_MOD + SFS_HAN_MOD + + + + + + lib/0Harmony.dllfalse + lib/UnityEngine.dllfalse + lib/UnityEngine.CoreModule.dllfalse + lib/UnityEngine.UI.dllfalse + lib/Unity.TextMeshPro.dllfalse + lib/UnityEngine.TextRenderingModule.dllfalse + lib/UnityEngine.TextCoreFontEngineModule.dllfalse + lib/UnityEngine.Physics2DModule.dllfalse + lib/Assembly-CSharp.dllfalse + + diff --git a/SFS_FontFix_Plugin/SFS_FontFix/lib/0Harmony.dll b/mod/lib/0Harmony.dll similarity index 100% rename from SFS_FontFix_Plugin/SFS_FontFix/lib/0Harmony.dll rename to mod/lib/0Harmony.dll diff --git a/SFS_FontFix_Plugin/SFS_FontFix/lib/Assembly-CSharp.dll b/mod/lib/Assembly-CSharp.dll similarity index 100% rename from SFS_FontFix_Plugin/SFS_FontFix/lib/Assembly-CSharp.dll rename to mod/lib/Assembly-CSharp.dll diff --git a/SFS_FontFix_Plugin/SFS_FontFix/lib/BepInEx.Harmony.dll b/mod/lib/BepInEx.Harmony.dll similarity index 100% rename from SFS_FontFix_Plugin/SFS_FontFix/lib/BepInEx.Harmony.dll rename to mod/lib/BepInEx.Harmony.dll diff --git a/SFS_FontFix_Plugin/SFS_FontFix/lib/BepInEx.dll b/mod/lib/BepInEx.dll similarity index 100% rename from SFS_FontFix_Plugin/SFS_FontFix/lib/BepInEx.dll rename to mod/lib/BepInEx.dll diff --git a/SFS_FontFix_Plugin/SFS_FontFix/lib/Unity.TextMeshPro.dll b/mod/lib/Unity.TextMeshPro.dll similarity index 100% rename from SFS_FontFix_Plugin/SFS_FontFix/lib/Unity.TextMeshPro.dll rename to mod/lib/Unity.TextMeshPro.dll diff --git a/SFS_FontFix_Plugin/SFS_FontFix/lib/UnityEngine.CoreModule.dll b/mod/lib/UnityEngine.CoreModule.dll similarity index 100% rename from SFS_FontFix_Plugin/SFS_FontFix/lib/UnityEngine.CoreModule.dll rename to mod/lib/UnityEngine.CoreModule.dll diff --git a/SFS_FontFix_Plugin/SFS_FontFix/lib/UnityEngine.Physics2DModule.dll b/mod/lib/UnityEngine.Physics2DModule.dll similarity index 100% rename from SFS_FontFix_Plugin/SFS_FontFix/lib/UnityEngine.Physics2DModule.dll rename to mod/lib/UnityEngine.Physics2DModule.dll diff --git a/SFS_FontFix_Plugin/SFS_FontFix/lib/UnityEngine.TextCoreFontEngineModule.dll b/mod/lib/UnityEngine.TextCoreFontEngineModule.dll similarity index 100% rename from SFS_FontFix_Plugin/SFS_FontFix/lib/UnityEngine.TextCoreFontEngineModule.dll rename to mod/lib/UnityEngine.TextCoreFontEngineModule.dll diff --git a/SFS_FontFix_Plugin/SFS_FontFix/lib/UnityEngine.TextRenderingModule.dll b/mod/lib/UnityEngine.TextRenderingModule.dll similarity index 100% rename from SFS_FontFix_Plugin/SFS_FontFix/lib/UnityEngine.TextRenderingModule.dll rename to mod/lib/UnityEngine.TextRenderingModule.dll diff --git a/SFS_FontFix_Plugin/SFS_FontFix/lib/UnityEngine.UI.dll b/mod/lib/UnityEngine.UI.dll similarity index 100% rename from SFS_FontFix_Plugin/SFS_FontFix/lib/UnityEngine.UI.dll rename to mod/lib/UnityEngine.UI.dll diff --git a/SFS_FontFix_Plugin/SFS_FontFix/lib/UnityEngine.dll b/mod/lib/UnityEngine.dll similarity index 100% rename from SFS_FontFix_Plugin/SFS_FontFix/lib/UnityEngine.dll rename to mod/lib/UnityEngine.dll diff --git a/SFS_Chinese_Toolv2.0/ICO.ico b/tool/python/ICO.ico similarity index 100% rename from SFS_Chinese_Toolv2.0/ICO.ico rename to tool/python/ICO.ico diff --git a/SFS_Chinese_Toolv2.0/SFS_Chinese_Tool.py b/tool/python/SFS_Chinese_Tool.py similarity index 100% rename from SFS_Chinese_Toolv2.0/SFS_Chinese_Tool.py rename to tool/python/SFS_Chinese_Tool.py diff --git a/tool/rust/Cargo.toml b/tool/rust/Cargo.toml new file mode 100644 index 0000000..f828199 --- /dev/null +++ b/tool/rust/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "SFS_Language_TOOL" +version = "2.0.0" +edition = "2021" + +[dependencies] +eframe = "0.27" +egui = "0.27" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +rfd = "0.14" +image = "0.25" + +[build-dependencies] +winres = "0.1" \ No newline at end of file diff --git a/SFS_Language_TOOL/assets/fonts/msyh.ttc b/tool/rust/assets/NotoSansSC.ttf similarity index 50% rename from SFS_Language_TOOL/assets/fonts/msyh.ttc rename to tool/rust/assets/NotoSansSC.ttf index ea174b2..4c4da76 100644 Binary files a/SFS_Language_TOOL/assets/fonts/msyh.ttc and b/tool/rust/assets/NotoSansSC.ttf differ diff --git a/tool/rust/assets/app.ico b/tool/rust/assets/app.ico new file mode 100644 index 0000000..98ca527 Binary files /dev/null and b/tool/rust/assets/app.ico differ diff --git a/tool/rust/build.rs b/tool/rust/build.rs new file mode 100644 index 0000000..ba09c0e --- /dev/null +++ b/tool/rust/build.rs @@ -0,0 +1,10 @@ +use std::env; + +fn main() { + if env::var("CARGO_CFG_TARGET_OS").unwrap() == "windows" { + let mut res = winres::WindowsResource::new(); + res.set_icon("assets/app.ico"); + res.compile().unwrap(); + } + println!("cargo:rerun-if-changed=assets/"); +} \ No newline at end of file diff --git a/tool/rust/src/app.rs b/tool/rust/src/app.rs new file mode 100644 index 0000000..4401d17 --- /dev/null +++ b/tool/rust/src/app.rs @@ -0,0 +1,235 @@ +use eframe::egui; +use std::path::PathBuf; +use crate::file_manager::FileManager; + +pub struct SfsLanguageApp { + game_dir: Option, + mod_installed: bool, + status_message: String, + show_about: bool, + found_dirs: Vec, + show_found_dirs: bool, +} + +impl SfsLanguageApp { + pub fn new() -> Self { + Self { + game_dir: None, + mod_installed: false, + status_message: String::new(), + show_about: false, + found_dirs: Vec::new(), + show_found_dirs: false, + } + } + + fn set_status(&mut self, msg: impl Into) { + self.status_message = msg.into(); + } + + fn update_mod_status(&mut self) { + if let Some(dir) = &self.game_dir { + self.mod_installed = FileManager::is_mod_installed(dir); + } else { + self.mod_installed = false; + } + } + + fn is_valid_game_dir(dir: &PathBuf) -> bool { + dir.join("Spaceflight Simulator.exe").exists() || dir.join("Spaceflight Simulator_Data").exists() + } + + fn find_game_dirs(start_dir: &PathBuf, max_depth: u32) -> Vec { + let mut results = Vec::new(); + Self::search_dir(start_dir, 0, max_depth, &mut results); + results + } + + fn search_dir(dir: &PathBuf, depth: u32, max_depth: u32, results: &mut Vec) { + if depth > max_depth { + return; + } + if let Ok(entries) = std::fs::read_dir(dir) { + for entry in entries.flatten() { + let path = entry.path(); + if path.is_dir() { + if Self::is_valid_game_dir(&path) { + results.push(path); + } else { + Self::search_dir(&path, depth + 1, max_depth, results); + } + } + } + } + } + + fn license_text() -> &'static str { + r#"MIT License + +Copyright (c) 2026 Dere and WMYYL + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE."# + } +} + +impl eframe::App for SfsLanguageApp { + fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { + egui::TopBottomPanel::top("menu_bar").show(ctx, |ui| { + egui::menu::bar(ui, |ui| { + ui.label("SFS 语言工具"); + ui.separator(); + if ui.button("关于").clicked() { + self.show_about = true; + } + }); + }); + + egui::CentralPanel::default().show(ctx, |ui| { + ui.heading("游戏目录"); + ui.horizontal(|ui| { + ui.label("路径:"); + if let Some(dir) = &self.game_dir { + ui.label(dir.display().to_string()); + } else { + ui.label("未选择"); + } + }); + + ui.horizontal(|ui| { + if ui.button("手动选择").clicked() { + if let Some(dir) = rfd::FileDialog::new().pick_folder() { + if Self::is_valid_game_dir(&dir) { + self.game_dir = Some(dir.clone()); + self.update_mod_status(); + self.set_status("游戏目录已加载"); + } else { + self.set_status("所选目录不是有效的游戏目录(缺少 Spaceflight Simulator.exe 或 Spaceflight Simulator_Data)"); + } + } + } + + if ui.button("自动查找").clicked() { + if let Some(start_dir) = rfd::FileDialog::new().pick_folder() { + self.set_status("正在搜索,请稍候..."); + let found = Self::find_game_dirs(&start_dir, 4); + if found.is_empty() { + self.set_status("在选定目录及其子目录中未找到游戏"); + } else { + self.found_dirs = found; + self.show_found_dirs = true; + self.set_status(&format!("找到 {} 个游戏目录,请选择一个", self.found_dirs.len())); + } + } + } + }); + + if self.show_found_dirs && !self.found_dirs.is_empty() { + ui.separator(); + ui.label("找到的游戏目录(点击选择):"); + egui::ScrollArea::vertical().max_height(150.0).show(ui, |ui| { + let dirs = self.found_dirs.clone(); + for dir in dirs { + if ui.button(dir.display().to_string()).clicked() { + self.game_dir = Some(dir); + self.update_mod_status(); + self.show_found_dirs = false; + self.set_status("游戏目录已加载"); + } + } + }); + if ui.button("关闭列表").clicked() { + self.show_found_dirs = false; + } + } + + ui.separator(); + + ui.horizontal(|ui| { + ui.label("MOD 状态:"); + if self.mod_installed { + ui.colored_label(egui::Color32::GREEN, format!("已安装 (版本 {})", FileManager::MOD_VERSION)); + } else { + ui.colored_label(egui::Color32::YELLOW, "未安装"); + } + }); + + ui.separator(); + + ui.horizontal(|ui| { + if ui.button("一键设置中文").clicked() { + if let Some(dir) = &self.game_dir { + FileManager::set_chinese_language(dir); + self.set_status("语言已设置为中文"); + } else { + self.set_status("请先选择游戏目录"); + } + } + + let mod_btn_text = if self.mod_installed { + "卸载 MOD" + } else { + "安装 MOD" + }; + if ui.button(mod_btn_text).clicked() { + if let Some(dir) = &self.game_dir { + if self.mod_installed { + FileManager::uninstall_mod(dir); + self.set_status("MOD 已卸载"); + } else { + FileManager::install_mod(dir); + self.set_status("MOD 已安装"); + } + self.update_mod_status(); + } else { + self.set_status("请先选择游戏目录"); + } + } + }); + + ui.separator(); + + if !self.status_message.is_empty() { + ui.colored_label(egui::Color32::LIGHT_BLUE, &self.status_message); + } + }); + + if self.show_about { + egui::Window::new("关于") + .collapsible(false) + .resizable(true) + .show(ctx, |ui| { + ui.label("SFS Language Tool v2.0.0"); + ui.label("开发者: Dere3046, WMYYL (我没有油了)"); + ui.hyperlink_to("项目地址: SFS_Chinese", "https://github.com/Dere3046/SFS_Chinese"); + ui.separator(); + ui.label("本工具用于一键切换游戏语言为中文,并安装字体修复 MOD。"); + ui.label("MOD 版本: 5.1.0"); + ui.separator(); + ui.label("许可证 (MIT):"); + egui::ScrollArea::vertical().max_height(200.0).show(ui, |ui| { + ui.monospace(Self::license_text()); + }); + ui.separator(); + if ui.button("关闭").clicked() { + self.show_about = false; + } + }); + } + } +} \ No newline at end of file diff --git a/tool/rust/src/file_manager.rs b/tool/rust/src/file_manager.rs new file mode 100644 index 0000000..7fa3d09 --- /dev/null +++ b/tool/rust/src/file_manager.rs @@ -0,0 +1,52 @@ +use serde::{Deserialize, Serialize}; +use std::fs; +use std::path::Path; + +#[derive(Debug, Serialize, Deserialize)] +pub struct LanguageSettings { + #[serde(rename = "codeName")] + pub code_name: String, + pub custom: bool, +} + +pub struct FileManager; + +impl FileManager { + pub const MOD_VERSION: &str = "6.1.0"; + + pub fn is_mod_installed(game_dir: &Path) -> bool { + let m = game_dir.join("Mods").join("SFS_HAN_MOD"); + m.join("version.txt").exists() && m.join("SFS_HAN_MOD.dll").exists() + } + + pub fn install_mod(game_dir: &Path) { + let m = game_dir.join("Mods").join("SFS_HAN_MOD"); + fs::create_dir_all(&m).ok(); + let dll = include_bytes!("../assets/SFS_HAN_MOD.dll"); + let font = include_bytes!("../assets/NotoSansSC.ttf"); + fs::write(m.join("SFS_HAN_MOD.dll"), dll).ok(); + fs::write(m.join("NotoSansSC.ttf"), font).ok(); + fs::write(m.join("version.txt"), Self::MOD_VERSION).ok(); + } + + pub fn uninstall_mod(game_dir: &Path) { + let m = game_dir.join("Mods").join("SFS_HAN_MOD"); + if m.exists() { + fs::remove_dir_all(m).ok(); + } + } + + pub fn set_chinese_language(game_dir: &Path) { + let settings = game_dir + .join("Saving") + .join("Settings") + .join("LanguageSettings_2.txt"); + let config = LanguageSettings { + code_name: "Chinese".to_string(), + custom: false, + }; + if let Ok(json) = serde_json::to_string_pretty(&config) { + fs::write(settings, json).ok(); + } + } +} \ No newline at end of file diff --git a/tool/rust/src/main.rs b/tool/rust/src/main.rs new file mode 100644 index 0000000..f3d25a2 --- /dev/null +++ b/tool/rust/src/main.rs @@ -0,0 +1,58 @@ +#![windows_subsystem = "windows"] + +mod app; +mod file_manager; + +use eframe::egui; +use app::SfsLanguageApp; + +fn main() -> eframe::Result<()> { + let options = eframe::NativeOptions { + viewport: egui::ViewportBuilder::default() + .with_inner_size([700.0, 400.0]) + .with_min_inner_size([600.0, 350.0]) + .with_icon(load_icon()), + ..Default::default() + }; + + eframe::run_native( + "SFS Language Tool", + options, + Box::new(|cc| { + let mut fonts = egui::FontDefinitions::default(); + let font_data = egui::FontData::from_static(include_bytes!("../assets/NotoSansSC.ttf")); + fonts.font_data.insert("noto_sc".to_owned(), font_data); + fonts + .families + .get_mut(&egui::FontFamily::Proportional) + .unwrap() + .insert(0, "noto_sc".to_owned()); + fonts + .families + .get_mut(&egui::FontFamily::Monospace) + .unwrap() + .insert(0, "noto_sc".to_owned()); + cc.egui_ctx.set_fonts(fonts); + + Box::new(SfsLanguageApp::new()) + }), + ) +} + +fn load_icon() -> egui::IconData { + let (icon_rgba, icon_width, icon_height) = { + let image = image::load_from_memory(include_bytes!("../assets/app.ico")) + .unwrap_or_else(|_| { + image::DynamicImage::ImageRgba8(image::RgbaImage::from_pixel(1, 1, image::Rgba([0, 0, 0, 0]))) + }) + .into_rgba8(); + let (width, height) = image.dimensions(); + let rgba = image.into_raw(); + (rgba, width, height) + }; + egui::IconData { + rgba: icon_rgba, + width: icon_width, + height: icon_height, + } +} \ No newline at end of file