Skip to content
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

[+] Fancy.CustomCreditsString #17

Merged
merged 2 commits into from
Jan 31, 2025
Merged

[+] Fancy.CustomCreditsString #17

merged 2 commits into from
Jan 31, 2025

Conversation

Menci
Copy link
Contributor

@Menci Menci commented Jan 27, 2025

Summary by Sourcery

新功能:

  • 添加了一个可配置的选项,用于在游戏界面中隐藏信用文本。
Original summary in English

Summary by Sourcery

New Features:

  • Added a configurable option to hide the credit text from the game UI.

Copy link

sourcery-ai bot commented Jan 27, 2025

Here's the translation of the review guide to Chinese:

审阅者指南 by Sourcery

此拉取请求引入了一个新的配置选项,用于隐藏游戏中的"CREDIT(s)"文本。同时还将一些方法重构为公共方法。

信用文本隐藏过程的序列图

sequenceDiagram
    participant CC as CreditController
    participant TC as TextMeshProUGUI
    Note over CC,TC: When credits update
    CC->>TC: SetCredits()
    CC->>TC: Update text
    Note over TC: Text set to empty string
    Note over CC,TC: When free play mode changes
    CC->>TC: SetFreePlayMode()
    CC->>TC: Update text
    Note over TC: Text set to empty string
Loading

显示 CreditConfig 变更的类图

classDiagram
    class CreditConfig {
        -bool hideCreditsText
        +bool PreIsFreePlay(ref bool __result)
        +bool PreIsGameCostEnough(ref bool __result)
        +bool PreCredit(ref uint __result)
        +void PostSetFreePlayMode(TextMeshProUGUI ____creditText)
        +void PostSetCredits(TextMeshProUGUI ____creditText)
    }
    note for CreditConfig "方法从私有改为公共
新增 hideCreditsText 配置
新增用于隐藏信用文本的后缀方法"
Loading

文件级变更

变更 详情 文件
重构方法为公共方法。
  • PreIsFreePlay 的访问修饰符从 private 改为 public
  • PreIsGameCostEnough 的访问修饰符从 private 改为 public
  • PreCredit 的访问修饰符从 private 改为 public
AquaMai.Mods/GameSettings/CreditConfig.cs
添加隐藏"CREDIT(s)"文本的配置选项。
  • 添加新的 hideCreditsText 配置选项。
  • SetFreePlayMode 添加后缀补丁以隐藏信用文本。
  • SetCredits 添加后缀补丁以隐藏信用文本。
AquaMai.Mods/GameSettings/CreditConfig.cs

提示和命令

与 Sourcery 交互

  • 触发新的审阅: 在拉取请求中评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审阅评论。
  • 从审阅评论生成 GitHub 问题: 通过回复审阅评论要求 Sourcery 创建问题。您也可以用 @sourcery-ai 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-ai plan 以生成问题的行动计划。

自定义您的体验

访问您的仪表板以:

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

获取帮助

Original review guide in English

Reviewer's Guide by Sourcery

This pull request introduces a new configuration option to hide the "CREDIT(s)" text in the game. It also refactors some methods to be public.

Sequence diagram for credit text hiding process

sequenceDiagram
    participant CC as CreditController
    participant TC as TextMeshProUGUI
    Note over CC,TC: When credits update
    CC->>TC: SetCredits()
    CC->>TC: Update text
    Note over TC: Text set to empty string
    Note over CC,TC: When free play mode changes
    CC->>TC: SetFreePlayMode()
    CC->>TC: Update text
    Note over TC: Text set to empty string
Loading

Class diagram showing changes to CreditConfig

classDiagram
    class CreditConfig {
        -bool hideCreditsText
        +bool PreIsFreePlay(ref bool __result)
        +bool PreIsGameCostEnough(ref bool __result)
        +bool PreCredit(ref uint __result)
        +void PostSetFreePlayMode(TextMeshProUGUI ____creditText)
        +void PostSetCredits(TextMeshProUGUI ____creditText)
    }
    note for CreditConfig "Methods changed from private to public
New hideCreditsText config added
New postfix methods for hiding credits text"
Loading

File-Level Changes

Change Details Files
Refactor methods to be public.
  • Changed the access modifier of PreIsFreePlay from private to public.
  • Changed the access modifier of PreIsGameCostEnough from private to public.
  • Changed the access modifier of PreCredit from private to public.
AquaMai.Mods/GameSettings/CreditConfig.cs
Add a configuration option to hide the "CREDIT(s)" text.
  • Added a new hideCreditsText configuration option.
  • Added a postfix patch to SetFreePlayMode to hide the credit text.
  • Added a postfix patch to SetCredits to hide the credit text.
AquaMai.Mods/GameSettings/CreditConfig.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!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

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

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.

@Menci - 我已经审查了你的更改 - 以下是一些反馈:

整体评论

  • 除非有特定需要公开可见,否则考虑将方法保持为私有。这有助于维护封装性。
  • hideCreditsText 的默认值可能应该为 false,以保持默认的用户界面可见性。用户可以选择隐藏。
以下是我在审查期间查看的内容
  • 🟢 一般问题:一切看起来都很好
  • 🟢 安全性:一切看起来都很好
  • 🟢 测试:一切看起来都很好
  • 🟢 复杂性:一切看起来都很好
  • 🟢 文档:一切看起来都很好

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

Hey @Menci - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider keeping the methods private unless there's a specific need for public visibility. This helps maintain encapsulation.
  • The default value for hideCreditsText should probably be false to maintain UI visibility by default. Users can opt-in to hiding if desired.
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

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.

@clansty
Copy link
Contributor

clansty commented Jan 28, 2025

这个我的想法是做在 fancy 里面,做成自定义点数文本,打开之后就是自定义,留空就是不显示

@Menci Menci changed the title [+] CreditConfig.HideCreditsText [+] Fancy.CustomCreditsString Jan 31, 2025
@clansty clansty merged commit 030ed99 into main Jan 31, 2025
2 checks passed
@clansty clansty deleted the hide-credits branch January 31, 2025 18:00
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