-
-
Notifications
You must be signed in to change notification settings - Fork 303
feat: use json for game config #803
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
base: dev
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @HardyNLee, 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! 此拉取请求旨在通过将游戏配置文件从旧的 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 很好地将游戏配置从自定义的 .txt 格式迁移到了更标准、更易于扩展的 JSON 格式。相关的代码修改, 如统一命名为小驼峰, 也做得很好, 增强了代码的一致性。我发现了一些可以改进的地方, 主要涉及类型安全和代码健壮性, 请查看我的具体评论。
| import { getFastSaveFromStorage, getSavesFromStorage } from '@/Core/controller/storage/savesController'; | ||
| import { logger } from '@/Core/util/logger'; | ||
| import axios from 'axios'; | ||
| import { IWebgalConfig } from 'webgal-parser/build/types/configParser/configParser'; |
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.
| } else { | ||
| dispatch( | ||
| setGlobalVar({ | ||
| key: key, | ||
| value: String(value), | ||
| }), | ||
| ); | ||
| } |
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.
78cd6d6 to
4f258c3
Compare
4f258c3 to
8565d40
Compare
介绍
将游戏配置文件
config.txt更改为 JSON 文件, 并统一命名格式为小驼峰, 以便未来更好地拓展更改
config.txt改为config.json, 位置不变, 修改相关加载路径与逻辑IWebgalConfig接口, 以便以后与编辑器对齐其他
IWebgalConfig在 parser 里, 故需要先 build 一下 parser 否则拿不到新的接口