-
Couldn't load subscription status.
- Fork 44
refactor: ♻️ mod loading refactor #485
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0fdb773 to
8bdf229
Compare
and use it for `get_mod_paths_from_all_sources()`, also removed the logging from `get_zip_paths_in()` and moved it to `ModLoader`
and used it in `ModData`
8bdf229 to
47b1409
Compare
Qubus0
approved these changes
Jan 6, 2025
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.
really nice job, way cleaner. thank you 😄
This was referenced Jan 8, 2025
Closed
This was referenced Jan 28, 2025
This was referenced Feb 6, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the introduction of zippeeking®™, the mod loading flow has changed.
This refactor aims to fully leverage zippeeking®™ and streamline the mod loading process along the way.
Change Overview
check_autoload_positions()to./internal/godot.gdget_mod_paths_from_all_sources()to_ModLoaderPathis_zip(path: String)to_ModLoaderPathget_mod_dir_name_in_zip()to_ModLoaderFile_reload_mods()_reset_mods()_disable_mods()_disable_mod()DEBUG_ENABLE_STORING_FILEPATHSand its associated logicModDataget_zip_paths_in()from_ModLoaderFileto_ModLoaderPathModDatavalidate_game_version_compatibility()fromModDatatoModManifestModManifestto always return a new instance instead ofnullvalidation_messages_errorandvalidation_messages_warningvalidation_messages_errorandvalidation_messages_warningand logged at the end, with no more early returnsModManifestDev Notes
ModData._init()ModData._init()if the structure is incorrect this checks will fail.godot-mod-loader/addons/mod_loader/mod_loader.gd
Lines 296 to 317 in b18acd9
🔦I think I currently don't add mod_data to the store if the manifest or mod structure is invalid. I'm pretty sure we still want that data so it can be properly displayed in a mod menu.
Check if
_exit_tree()cache saving got lostCheck if
_on_new_hooks_created()got lost