Skip to content

Conversation

@SoulGateKey
Copy link

@SoulGateKey SoulGateKey commented Aug 10, 2025

Sourcery 总结

新特性:

  • 当 GameVersion 大于等于 25000 且 GameId 为 "SDEZ" 时,在 PostDecideEntry 中触发乐谱下载
Original summary in English

Summary by Sourcery

New Features:

  • Trigger music score download in PostDecideEntry when GameVersion is >= 25000 and GameId is "SDEZ"

SoulGateKey and others added 3 commits August 10, 2025 23:50
Add judgement for GameId and GameVersion
# Conflicts:
#	AquaMai.Mods/GameSystem/SinglePlayer.cs
@sourcery-ai
Copy link

sourcery-ai bot commented Aug 10, 2025

<details>
<summary>评审指南 (在小型 PR 上折叠)</summary>

## 评审指南

在单人游戏入口流程中引入音乐分数下载 API 的条件调用,并修正文件格式。

#### 单人游戏入口中条件性音乐分数下载的时序图

```mermaid
sequenceDiagram
    participant EntryMonitor
    participant TimeManager
    participant EventManager
    participant ScoreRankingManager
    participant OperationManager
    participant GameInfo
    participant SharedInstances
    participant Process
    participant ProcessManager

    EntryMonitor->>TimeManager: MarkGameStartTime()
    EntryMonitor->>EventManager: UpdateEvent()
    EntryMonitor->>ScoreRankingManager: UpdateData()
    EntryMonitor->>GameInfo: Check GameVersion and GameId
    alt GameVersion >= 25000 and GameId == "SDEZ"
        EntryMonitor->>OperationManager: DownloadMusicScore()
    end
    EntryMonitor->>SharedInstances: StartCoroutine(LaterDisableCardReader())
    EntryMonitor->>Process: CreateDownloadProcess()
    EntryMonitor->>ProcessManager: SendMessage(CommonProcess, 30001)

更新后的单人游戏入口流程的类图

classDiagram
    class SinglePlayer {
        +PostDecideEntry(EntryMonitor __instance)
        +OnAfterPatch()
    }
    class OperationManager {
        +DownloadMusicScore()
    }
    class GameInfo {
        +GameVersion
        +GameId
    }
    SinglePlayer --> OperationManager : calls DownloadMusicScore conditionally
    SinglePlayer --> GameInfo : checks GameVersion and GameId
Loading

文件级别变更

变更 详情 文件
为新的 GameMusicScore API 支持调用 DownloadMusicScore
  • 在 PostDecideEntry 中插入版本 (>=25000) 和 GameId ("SDEZ") 检查
  • 当条件匹配时调用 Singleton.Instance.DownloadMusicScore()
AquaMai.Mods/GameSystem/SinglePlayer.cs
在文件末尾添加缺失的换行符
  • 确保文件以末尾换行符结尾
AquaMai.Mods/GameSystem/SinglePlayer.cs

提示和命令

与 Sourcery 交互

  • 触发新的评审: 在拉取请求上评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的评审评论。
  • 从评审评论生成 GitHub issue: 回复评审评论,要求 Sourcery 从中创建 issue。您也可以回复评审评论并输入 @sourcery-ai issue 来从中创建 issue。
  • 生成拉取请求标题: 在拉取请求标题的任何位置写入 @sourcery-ai,即可随时生成标题。您也可以在拉取请求上评论 @sourcery-ai title,即可随时(重新)生成标题。
  • 生成拉取请求摘要: 在拉取请求正文的任何位置写入 @sourcery-ai summary,即可随时在您想要的位置生成 PR 摘要。您也可以在拉取请求上评论 @sourcery-ai summary,即可随时(重新)生成摘要。
  • 生成评审指南: 在拉取请求上评论 @sourcery-ai guide,即可随时(重新)生成评审指南。
  • 解决所有 Sourcery 评论: 在拉取请求上评论 @sourcery-ai resolve,即可解决所有 Sourcery 评论。如果您已处理所有评论并且不想再看到它们,这会很有用。
  • 驳回所有 Sourcery 评审: 在拉取请求上评论 @sourcery-ai dismiss,即可驳回所有现有 Sourcery 评审。如果您想重新开始新的评审,这会特别有用——别忘了评论 @sourcery-ai review 来触发新的评审!

自定义您的体验

访问您的 仪表板 以:

  • 启用或禁用评审功能,例如 Sourcery 生成的拉取请求摘要、评审指南等。
  • 更改评审语言。
  • 添加、删除或编辑自定义评审说明。
  • 调整其他评审设置。

获取帮助

```
Original review guide in English
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Introduce conditional invocation of the music score download API in the single‐player entry flow and correct file formatting.

Sequence diagram for conditional music score download in single-player entry

sequenceDiagram
    participant EntryMonitor
    participant TimeManager
    participant EventManager
    participant ScoreRankingManager
    participant OperationManager
    participant GameInfo
    participant SharedInstances
    participant Process
    participant ProcessManager

    EntryMonitor->>TimeManager: MarkGameStartTime()
    EntryMonitor->>EventManager: UpdateEvent()
    EntryMonitor->>ScoreRankingManager: UpdateData()
    EntryMonitor->>GameInfo: Check GameVersion and GameId
    alt GameVersion >= 25000 and GameId == "SDEZ"
        EntryMonitor->>OperationManager: DownloadMusicScore()
    end
    EntryMonitor->>SharedInstances: StartCoroutine(LaterDisableCardReader())
    EntryMonitor->>Process: CreateDownloadProcess()
    EntryMonitor->>ProcessManager: SendMessage(CommonProcess, 30001)
Loading

Class diagram for updated SinglePlayer entry flow

classDiagram
    class SinglePlayer {
        +PostDecideEntry(EntryMonitor __instance)
        +OnAfterPatch()
    }
    class OperationManager {
        +DownloadMusicScore()
    }
    class GameInfo {
        +GameVersion
        +GameId
    }
    SinglePlayer --> OperationManager : calls DownloadMusicScore conditionally
    SinglePlayer --> GameInfo : checks GameVersion and GameId
Loading

File-Level Changes

Change Details Files
Invoke DownloadMusicScore for new GameMusicScore API support
  • Insert version (>=25000) and GameId ("SDEZ") check in PostDecideEntry
  • Call Singleton.Instance.DownloadMusicScore() when criteria match
AquaMai.Mods/GameSystem/SinglePlayer.cs
Add missing newline at end of file
  • Ensure file ends with a trailing newline
AquaMai.Mods/GameSystem/SinglePlayer.cs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@SoulGateKey SoulGateKey changed the title Add support for GetGameMusicScoreApi [+] Add support for GetGameMusicScoreApi for #47 Aug 10, 2025
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

@SoulGateKey - 我已经审查了你的修改,它们看起来很棒!


Sourcery 对开源免费 - 如果您喜欢我们的评论,请考虑分享 ✨
帮助我更有用!请在每个评论上点击 👍 或 👎,我将使用反馈来改进您的评论。
Original comment in English

Hey @SoulGateKey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

TimeManager.MarkGameStartTime();
Singleton<EventManager>.Instance.UpdateEvent();
Singleton<ScoreRankingManager>.Instance.UpdateData();
if(GameInfo.GameVersion >= 25000 && GameInfo.GameId == "SDEZ") {Singleton<OperationManager>.Instance.DownloadMusicScore();}
Copy link
Member

Choose a reason for hiding this comment

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

这么写,在 1.45 及以下版本上测试过吗

Copy link
Author

@SoulGateKey SoulGateKey Aug 10, 2025

Choose a reason for hiding this comment

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

已在1.55测试,musicscore可以正常触发下载
以及25000不是1.50吗

Copy link
Author

Choose a reason for hiding this comment

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

如果版本低于25000(1.50)并且不是sdez的话 不会启用
这个api随着kaleidxscope的加入而加入

Copy link
Member

Choose a reason for hiding this comment

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

是啊,我说的是 1.45 及以下版本

Copy link
Author

Choose a reason for hiding this comment

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

1.45以下版本if不会被触发不就没事了(

Copy link
Author

@SoulGateKey SoulGateKey Aug 10, 2025

Choose a reason for hiding this comment

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

已在1.45 1.40 版本测试,未发现明显异常

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