-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[F] Set ForceAsSserver to default ON #92
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private void MapBooleanTrueOrUndefinedToSectionEnable(IConfigView src, ConfigView dst, string srcKey, string dstKey)
{
if(!src.TryGetValue<bool>(srcKey, out var value) || value)
{
dst.EnsureDictionary(dstKey);
}
}
我是想这么写的
以及改过的迁移脚本貌似也没有判断原先到底是没有写这个选项还是写了 false,应该只有写了 false 才是关
审核指南由 Sourcery 提供此 PR 通过默认启用 ForceAsServer 功能来更改其默认行为。实现涉及修改配置迁移逻辑和更新 ConfigSection 属性。 配置迁移过程的序列图sequenceDiagram
participant src as Source Config
participant dst as Destination Config
src->>dst: GetValueOrDefault("Fix.ForceAsServer")
alt ForceAsServer is false
dst->>dst: SetValue("GameSettings.ForceAsServer.Disabled", true)
end
dst->>dst: EnsureDictionary("GameSettings.ForceAsServer")
note right of dst: ForceAsServer 在 V2 中默认启用
ForceAsServer 配置的更新类图classDiagram
class ForceAsServer {
+defaultOn: true
+HarmonyPrefix()
}
note for ForceAsServer "defaultOn 属性现在设置为 true,默认启用 ForceAsServer。"
文件级更改
提示和命令与 Sourcery 互动
自定义您的体验访问您的仪表板以:
获取帮助Original review guide in EnglishReviewer's Guide by SourceryThis PR changes the default behavior of the ForceAsServer feature by enabling it by default. The implementation involves modifying the configuration migration logic and updating the ConfigSection attribute. Sequence diagram for configuration migration processsequenceDiagram
participant src as Source Config
participant dst as Destination Config
src->>dst: GetValueOrDefault("Fix.ForceAsServer")
alt ForceAsServer is false
dst->>dst: SetValue("GameSettings.ForceAsServer.Disabled", true)
end
dst->>dst: EnsureDictionary("GameSettings.ForceAsServer")
note right of dst: ForceAsServer is enabled by default in V2
Updated class diagram for ForceAsServer configurationclassDiagram
class ForceAsServer {
+defaultOn: true
+HarmonyPrefix()
}
note for ForceAsServer "The defaultOn attribute is now set to true, enabling ForceAsServer by default."
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗨 @Menci - 我已经审查了你的更改 - 这里有一些反馈:
总体评论:
- 请在 PR 描述中提供关于为什么需要默认启用 ForceAsServer 的背景信息。
- 考虑在推出此默认更改时,添加关于对现有部署可能影响的文档。
这是我在审查期间查看的内容
- 🟢 一般问题:一切看起来都很好
- 🟢 安全性:一切看起来都很好
- 🟢 测试:一切看起来都很好
- 🟢 复杂性:一切看起来都很好
- 🟢 文档:一切看起来都很好
嗨 @Menci! 👋
@sourcery-ai 现在已安装在此存储库中。
我们找到了你最近的这个 PR 并进行了审查,以向你展示 Sourcery 的功能。
如果你想审查另一个 PR,只需评论 @sourcery-ai review
✨
Original comment in English
Hey @Menci - I've reviewed your changes - here's some feedback:
Overall Comments:
- Please provide context in the PR description about why ForceAsServer needs to be enabled by default.
- Consider adding documentation about potential impacts on existing deployments when this default change is rolled out.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Hi @Menci! 👋
@sourcery-ai is now installed on this repository.
We found this recent PR of yours and reviewed it to show you what Sourcery can do.
If you want to review another PR, just comment with @sourcery-ai review
✨
* Set ForceAsSserver to default ON * work as origin --------- Co-authored-by: Clansty <i@gao4.pw>
Summary by Sourcery
在版本2中,将“ForceAsServer”配置设置为默认启用,并确保在迁移过程中创建相应的字典。
新功能:
增强功能:
Original summary in English
Summary by Sourcery
Set the 'ForceAsServer' configuration to be enabled by default in version 2 and ensure the corresponding dictionary is created during migration.
New Features:
Enhancements: