Skip to content

Conversation

@Dyrox
Copy link
Contributor

@Dyrox Dyrox commented Jan 3, 2026

Fixes a calculation error in the Unstable Rate display (introduced in #101)
就是对之前某个社区功能的小修,原来如果在Mods.GameSettings.JudgeAdjust中的B判改变数值,那不会在Unstable Rate那个条上面正确反映,比如说我下面这个视频里即使所有音符几乎都是大P,但显示条显示的还是偏右的粉(我这台机子是B判=-4.0)

BEFORE.mov

现在可以mod可以读取JudgeAdjust里面的B判并自行调整了,(A判不受影响因为只是动画)

AFTER.mov

@gemini-code-assist
Copy link

Summary of Changes

Hello @Dyrox, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求旨在解决不稳定率显示功能中的一个计算错误,确保用户自定义的 B 判调整(JudgeAdjust.B)能够准确地反映在游戏界面上。通过修正这一显示偏差,玩家将获得更精确的视觉反馈,从而提升游戏体验。

Highlights

  • 不稳定率显示修复: 修复了不稳定率(Unstable Rate)显示中的计算错误,确保其能正确反映 JudgeAdjust.B 的偏移。
  • B判调整反映: 解决了当 Mods.GameSettings.JudgeAdjust 中的 B 判数值改变时,不稳定率显示条无法正确反映该偏移的问题。
  • 反射机制应用: 通过反射机制,现在可以正确读取 JudgeAdjust 中的 B 判设置并将其应用于不稳定率的计算,修正了显示偏差。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

这个 PR 修复了 Unstable Rate 显示中没有正确计算 JudgeAdjust.B 偏移量的问题。通过反射获取 JudgeAdjust 中的私有字段 b 的值,并在计算显示位置时考虑了这个偏移,使得打击点在 Unstable Rate 条上的显示更加准确。

代码改动很直接,逻辑清晰。我只对获取 b 值的反射实现方式有一个小建议,主要是为了提升代码的线程安全性和简洁性。具体请看我的评论。

@Dyrox
Copy link
Contributor Author

Dyrox commented Jan 3, 2026

ok搞定

@clansty
Copy link
Member

clansty commented Jan 4, 2026

其实应该直接把那个字段设成 public 的。我来改吧

@clansty clansty merged commit ece9020 into MuNET-OSS:main Jan 4, 2026
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