-
Notifications
You must be signed in to change notification settings - Fork 37
refactor: ♻️ API: Move Config to a dedicated class #157
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
refactor: ♻️ API: Move Config to a dedicated class #157
Conversation
Also fixes an error: `save_dictionary_to_file` should have been `save_dictionary_to_json_file`.
There's an issue here as I've used What would you guys suggest? EDIT: @KANAjetzt Suggested the method outlined in #161, which is another autoload singleton to store data. This is a perfect fix IMO. |
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.
good.
We might want to consider refactoring it work as a resource like ModManifest, but that is something for later
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.
Little thing, rest is good
Moves all config JSON methods to a dedicated class, following the discussion in #153.
Like #156, this PR also uses a new directory called
api
.I have tested this refactor and can confirm that it is working as before.
Other Changes
Adds a deprecation message to the old method.
This is currently commented, pending feat: ✨ API: Add methods for deprecation + API Folder #156
Fixes an error:
save_dictionary_to_file
should have beensave_dictionary_to_json_file
.Aside from this, there are no other changes from the version currently on the
development
branch.Breaking Changes
Deprecates
ModLoader.get_mod_config
. However, Brotato is the only game that contains this method, and its implementation ATOW is broken, such that loading a custom config JSON file does not work, so there aren't any mods that use it.