Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
38 changes: 20 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
8 changes: 0 additions & 8 deletions SFS_Chinese_Toolv2.0/README.md

This file was deleted.

Binary file removed SFS_Chinese_Toolv2.0/SFS_Chinese.zip
Binary file not shown.
Binary file removed SFS_Chinese_Toolv2.0/SFS_HAN_MODv5.1.0.zip
Binary file not shown.
23 changes: 0 additions & 23 deletions SFS_FontFix_Plugin/README.md

This file was deleted.

Loading
Loading