-
Notifications
You must be signed in to change notification settings - Fork 12
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
[+] add global jacket as Movie #16
Conversation
审阅者指南 by Sourcery此拉取请求引入了一个新功能,允许游戏从游戏源、本地 mp4 文件或封面图像作为备选方案加载电影。优先级依次为:游戏源电影、本地 mp4,然后是封面。 电影加载优先级流程序列图sequenceDiagram
participant GameCtrl
participant DataManager
participant OptionDataManager
participant FileSystem
participant LoadLocalImages
participant AssetManager
GameCtrl->>DataManager: GetMusic(SelectMusicID)
alt loadSourceMovie enabled
GameCtrl->>OptionDataManager: GetMovieDataPath(movieName.id)
alt source movie exists
Note over GameCtrl: Use source movie
Note over GameCtrl: Exit loading sequence
end
end
alt loadMp4Movie enabled
GameCtrl->>FileSystem: ResolvePath(movieAssetsDir)
GameCtrl->>FileSystem: Check MP4 existence
alt MP4 exists
Note over GameCtrl: Use MP4 movie
end
end
alt jacketAsMovie enabled
GameCtrl->>LoadLocalImages: GetJacketTexture2D(movieName.id)
alt local jacket not found
GameCtrl->>AssetManager: GetJacketTexture2D(filename)
end
end
文件级更改
提示和命令与 Sourcery 交互
自定义您的体验访问您的仪表板以:
获取帮助Original review guide in EnglishReviewer's Guide by SourceryThis pull request introduces a new feature that allows the game to load a movie from the game source, a local mp4 file, or a jacket image as a fallback. The priority is source movie, local mp4, and then jacket. Sequence diagram for movie loading priority flowsequenceDiagram
participant GameCtrl
participant DataManager
participant OptionDataManager
participant FileSystem
participant LoadLocalImages
participant AssetManager
GameCtrl->>DataManager: GetMusic(SelectMusicID)
alt loadSourceMovie enabled
GameCtrl->>OptionDataManager: GetMovieDataPath(movieName.id)
alt source movie exists
Note over GameCtrl: Use source movie
Note over GameCtrl: Exit loading sequence
end
end
alt loadMp4Movie enabled
GameCtrl->>FileSystem: ResolvePath(movieAssetsDir)
GameCtrl->>FileSystem: Check MP4 existence
alt MP4 exists
Note over GameCtrl: Use MP4 movie
end
end
alt jacketAsMovie enabled
GameCtrl->>LoadLocalImages: GetJacketTexture2D(movieName.id)
alt local jacket not found
GameCtrl->>AssetManager: GetJacketTexture2D(filename)
end
end
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.
嘿 @ck2739046 - 我已经审查了你的更改 - 这里有一些反馈:
总体评论:
- 在源电影加载部分的提前返回(
if (!moviePath.Contains("dummy")) return;
)将阻止在源电影存在但加载失败时回退到 MP4/jacket 选项。考虑处理这种情况。 - 考虑添加更详细的日志记录,以指示成功加载了哪个电影源(source/MP4/jacket),以帮助进行故障排除。
这是我在审查期间查看的内容
- 🟡 一般问题:发现 2 个问题
- 🟢 安全性:一切看起来都很好
- 🟢 测试:一切看起来都很好
- 🟢 复杂性:一切看起来都很好
- 🟢 文档:一切看起来都很好
帮助我变得更有用!请点击每条评论上的 👍 或 👎,我将使用反馈来改进你的评论。
Original comment in English
Hey @ck2739046 - I've reviewed your changes - here's some feedback:
Overall Comments:
- The early return in the source movie loading section (
if (!moviePath.Contains("dummy")) return;
) will prevent falling back to MP4/jacket options when a source movie exists but fails to load. Consider handling this case. - Consider adding more detailed logging to indicate which movie source was successfully loaded (source/MP4/jacket) to help with troubleshooting.
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
} | ||
|
||
var mp4Exists = File.Exists(mp4Path); | ||
var jacket = LoadLocalImages.GetJacketTexture2D(music.movieName.id); | ||
if (!mp4Exists && jacket is null) | ||
{ | ||
MelonLogger.Msg("No jacket found for music " + music); |
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.
issue: 当 mp4Exists 为 false 但 jacket 存在时,错误信息具有误导性
考虑使消息更准确,例如 '未找到音乐的电影或 jacket'
Original comment in English
issue: Error message is misleading when mp4Exists is false but jacket exists
Consider making the message more accurate, e.g. 'No movie or jacket found for music'
Summary by Sourcery
新功能:
Original summary in English
Summary by Sourcery
New Features: