Skip to content

修复多语言加载失败问题 (v1.8.0-fix1)#7

Merged
BAKAOLC merged 1 commit into
mainfrom
fix/v1.8.0-fix1
Nov 16, 2025
Merged

修复多语言加载失败问题 (v1.8.0-fix1)#7
BAKAOLC merged 1 commit into
mainfrom
fix/v1.8.0-fix1

Conversation

@BAKAOLC

@BAKAOLC BAKAOLC commented Nov 16, 2025

Copy link
Copy Markdown
Collaborator

修复了因修改加载方式导致的多语言加载失败问题

Copilot AI review requested due to automatic review settings November 16, 2025 06:38

Copilot AI left a comment

Copy link
Copy Markdown

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 fixes a multilingual loading failure issue introduced by changes to the mod loading mechanism. The fix passes the mod directory path explicitly to the initialization method instead of relying on assembly location detection.

  • Modified ModEntry.Initialize() to accept a modDirectory parameter and store it in a static property
  • Updated Localization class to use the stored mod directory path with a fallback to assembly location
  • Enhanced ModLoader to invoke the updated Initialize method with proper null checks and error handling
  • Updated version to 1.8.0-fix1 with corresponding changelog entries

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
DuckovCustomModel/ModEntry.cs Added ModDirectory property and updated Initialize() method signature to accept mod directory path parameter
DuckovCustomModel/Localizations/Localization.cs Modified LocalizationDirectory to prioritize ModEntry.ModDirectory over assembly location detection
DuckovCustomModel.ModLoader/ModLoader.cs Rewrote InvokeModEntryMethodInitialize() to explicitly pass mod directory parameter with comprehensive null checks and error handling
DuckovCustomModel/Constant.cs Updated ModVersion constant from "1.8.0" to "1.8.0-fix1"
CHANGELOG_EN.md Added v1.8.0-fix1 release notes describing the multilingual loading fix
CHANGELOG.md Added v1.8.0-fix1 release notes in Chinese

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

Comment thread DuckovCustomModel/ModEntry.cs
Comment thread DuckovCustomModel/Localizations/Localization.cs
Comment thread DuckovCustomModel.ModLoader/ModLoader.cs Outdated
Comment thread DuckovCustomModel.ModLoader/ModLoader.cs Outdated
Comment thread DuckovCustomModel.ModLoader/ModLoader.cs Outdated
@BAKAOLC BAKAOLC merged commit b6b0548 into main Nov 16, 2025
1 check passed
@BAKAOLC BAKAOLC deleted the fix/v1.8.0-fix1 branch November 16, 2025 06:48
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