Skip to content

v1.8.8: 新增版本更新检测功能#17

Merged
BAKAOLC merged 4 commits into
mainfrom
develop
Nov 22, 2025
Merged

v1.8.8: 新增版本更新检测功能#17
BAKAOLC merged 4 commits into
mainfrom
develop

Conversation

@BAKAOLC
Copy link
Copy Markdown
Collaborator

@BAKAOLC BAKAOLC commented Nov 22, 2025

更新内容

  • 新增版本更新检测功能,自动检测是否有新版本可用
  • 新增手动检测更新机制,可在设置界面手动触发更新检测
  • 新增新版本提示功能,当检测到新版本时会在版本显示处显示提示信息

变更文件

  • 更新版本号至 v1.8.8
  • 更新 CHANGELOG.md 和 CHANGELOG_EN.md

- 在 ModEntry 中初始化 UpdateChecker,确保在启动时检查更新
- 新增 UpdateInfoConfig 类以存储更新信息
- 实现 UpdateChecker 类,定期检查更新并处理更新信息
- 更新 UI 组件以显示更新状态和信息,包括更新指示器和检查按钮
- 增强多语言支持,添加更新相关的本地化文本
- 在 ModEntry 中初始化 GameVersionDisplayPatches,确保在启动时显示游戏版本
- 新增 GameVersionDisplayPatches 类,负责创建和更新游戏版本显示
- 更新 UpdateChecker 以传递最新版本信息,确保 UI 组件正确显示更新状态
- 修改 ConfigWindow 和 SettingsTab 中的版本信息显示格式,统一版本前缀
Copilot AI review requested due to automatic review settings November 22, 2025 00:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a comprehensive version update detection system for the Duckov Custom Model mod (v1.8.8). The implementation includes automatic periodic update checks, manual update triggers, and user-facing notifications across multiple UI locations. Additionally, the PR performs a significant migration from Unity's legacy UI Text components to TextMeshPro (TMP) throughout the entire UI framework.

Key Changes:

  • New UpdateChecker manager with periodic checking, retry logic, and semantic version comparison
  • Update notifications integrated into settings panel, config window, and game version display
  • Complete UI framework migration from Unity UI Text to TextMeshPro for improved text rendering
  • Localization support for update-related strings across 4 languages (Chinese, English, Japanese, Traditional Chinese)

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
UpdateChecker.cs New manager implementing version checking with retry logic, periodic updates, and semantic version comparison
UpdateInfoConfig.cs Configuration class for persisting update check results and metadata
GameVersionDisplayPatches.cs Harmony patch to display update notifications in the game's version display
SettingsTab.cs Added update check panel with manual trigger button and status display; migrated to TMP
ConfigWindow.cs Added update indicators in title bar and settings button; migrated to TMP
UIFactory.cs Core migration to TextMeshPro with conversion helpers for text alignment and font styles
TargetSettingsPanel.cs Migrated input fields from InputField to TMP_InputField
TargetListPanel.cs Migrated text components to TextMeshProUGUI
TabSystem.cs Migrated tab text components to TextMeshProUGUI
SearchField.cs Migrated search input to TMP_InputField
ModelListPanel.cs Migrated text overflow and wrapping properties to TMP equivalents
LocalizedText.cs Updated to work with TextMeshProUGUI instead of Text
LocalizedDropdown.cs Updated to work with TMP_Dropdown
Localization.cs Added 10 new localization keys for update functionality
Chinese.json Added Chinese translations for update strings
English.json Added English translations for update strings
Japanese.json Added Japanese translations for update strings
ChineseTraditional.json Added Traditional Chinese translations for update strings
ModEntry.cs Integrated UpdateChecker initialization and event handling
Constant.cs Version bump to 1.8.8
CHANGELOG.md Documented v1.8.8 changes in Chinese
CHANGELOG_EN.md Documented v1.8.8 changes in English

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread DuckovCustomModel/Configs/UpdateInfoConfig.cs
Comment thread DuckovCustomModel/UI/Tabs/SettingsTab.cs Outdated
Comment thread DuckovCustomModel/UI/ConfigWindow.cs
Comment thread DuckovCustomModel/UI/Tabs/SettingsTab.cs Outdated
Comment thread DuckovCustomModel/UI/ConfigWindow.cs
Comment thread DuckovCustomModel/UI/Tabs/SettingsTab.cs Outdated
Comment thread DuckovCustomModel/ModEntry.cs
Comment thread DuckovCustomModel/UI/Base/UIFactory.cs
Comment thread DuckovCustomModel/Managers/UpdateChecker.cs
Comment thread DuckovCustomModel/HarmonyPatches/GameVersionDisplayPatches.cs Outdated
- 在 GameVersionDisplayPatches 中简化版本信息显示逻辑,使用三元运算符提高代码简洁性
- 在 LocalizedText 中优化文本初始化逻辑,减少嵌套层级
- 在 ConfigWindow 和 TargetSettingsPanel 中合并重复的配置保存逻辑,提升代码复用性
- 在 SettingsTab 中重构更新时间信息刷新逻辑,使用早期返回减少代码复杂度
@BAKAOLC BAKAOLC merged commit 6181830 into main Nov 22, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants