-
Notifications
You must be signed in to change notification settings - Fork 52
[O] DontRuinMyAccount的一些增强 #113
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
Conversation
现在实现: 1. 判定表会被清空显示为全0(我认为这是最合理的,而不是转为全miss。不然就和开局直接trackskip的情况无法区分了。或者说“判定表全0”可以作为DontRuinMyAccount的标志) 2. 达成率、DX分、连击、同步、是否clear都是0/None 3. 自然的,isAchieveNewRecord和isDeluxscoreNewRecord就不可能为true,beforeRating/afterRating等肯定也保持不变。
…/DebugFeature相关功能,也开启防毁号。
Summary of ChangesHello @Starrah, 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! 此拉取请求旨在通过扩展“DontRuinMyAccount”功能的适用范围并改进其成绩重置机制,来增强用户体验。现在,除了自动播放外,练习模式和调试功能的使用也将触发防毁号,确保在非标准游戏过程中不会意外保存成绩。同时,成绩重置逻辑也变得更加彻底,能够将更多成绩相关数据清零。 Highlights
Using Gemini Code AssistThe 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
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 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
|
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.
Code Review
这个 PR 很好地增强了 DontRuinMyAccount 功能。它将分数保护扩展到了练习模式,并增加了新的配置选项,这很有用。当分数保护被触发时,重置分数的逻辑现在更加全面,能够清除更多的成绩相关字段。代码重构,特别是 trigger 方法的提取,使得逻辑更清晰、更易于维护。我发现了一些可以轻微改进的地方,并已在代码中提出了具体建议。总的来说,这是一次高质量的更新。
|
哇 好耶! |
AquaMai.Mods/UX/DontRuinMyAccount.cs
Outdated
| [ConfigEntry(zh: "AutoPlay 激活后显示提示", en: "Show notice when AutoPlay is activated")] | ||
| public static readonly bool showNotice = true; | ||
| [ConfigEntry(zh: "使用练习模式/DebugFeature相关功能也不保存成绩", en: "Also not save scores when using PracticeMode/DebugFeature")] | ||
| public static readonly bool forPracticeMode = false; |
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.
我觉得其实这个默认开启好了
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.
好 我一会改一下推上来,刚好发现了一个bug(功能在调速的情况下不生效)我修一下
|
发现了一些练习模式原有的bug,导致本Mod的部分功能(调速时trigger不保存成绩)不工作。 正在尝试调查和解决。 |
|
我昨天也发现我用外部 dll 调用 PractiseMode 的 SetSpeed 会 null reference exception,我没看出来为什么,但是从练习模式 ui 里面调速似乎就没问题 |
@clansty 已经查明了,是 稍后会发PR上来,里面会附具体的分析。 |
这部分问题已经在#114 中解决。然后已将forPracticeMode改为默认true。可以合并了。 |
|
诶,可是,PractiseModeUI.Update 也并没有套 try catch 呀 |
这是因为, AquaMai/AquaMai.Mods/Utils/ShowErrorLog.cs Lines 35 to 46 in 3cfcab0
分析下面的分析可以很直观的说明原因:我在 为什么游戏内Process的异常可以被捕获先说为什么下面的 public void Update()
{
if (this._isException) return; // 只要曾发生过异常,就不再对任何Process进行Update了。这算是“游戏会崩溃”的一部分原因(详见下方备注)
try
{
for (; linkedListNode != null; linkedListNode = linkedListNode.Next) // 注:linkedListNode是由所有Process构成的链表
{
// ......
linkedListNode.Value.Process.OnUpdate();
// ......
}
}
catch (Exception ex)
{
// ......
this._errorHandler(ex); // 调用游戏内置的错误处理函数
}
}
其中,
public void ExceptionHandler(Exception e)
{
// ......
stringBuilder.AppendLine("Monitor List");
foreach (UnityEngine.Object @object in Resources.FindObjectsOfTypeAll(typeof (MonitorBase)))
{
if (@object.hideFlags != HideFlags.NotEditable || @object.hideFlags != HideFlags.HideAndDontSave)
stringBuilder.AppendLine(@object.name);
}
string str2 = this._processManager.Dump();
// ......
string errorLogPath = MAI2System.Path.ErrorLogPath;
using (StreamWriter streamWriter = new StreamWriter($"{errorLogPath}{str3}.log", false))
{
streamWriter.WriteLine(e.Message);
streamWriter.WriteLine(str1);
streamWriter.Write(str2);
// ......
}
// ......
this._container.monoBehaviour.StartCoroutine(MAI2.Log.takeCrashScreenShot($"{errorLogPath}{str3}.png"));
this._createError = true;
}为什么
|
|
哇 原来是这样 |
forPracticeMode,默认为false。当它开启时,对PracticeMode和DebugFeature的相关功能,如暂停、变速、快进、快退等,也开启防毁号。