-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat: ✨ added load_before #185
Conversation
Adds functionality to specify a mod you want to load before your own mod. closes GodotModding#114
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.
yeah this looks good for now. I think this will work well with #122 optional dependencies, since we can just add them there and it won't complain.
Makes sure the mod with the `load_before` in the manifest, is not added a second time to the mod specified in the `load_before` array.
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.
Looks good to me, only one suggestion: The PR description says that a mod shouldn't list another mod in both its load_before
and dependencies
, so could there be an error if a mod developer tries to do this?
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.
nice, well done.
@ithinkandicode duplicate in deps and load before should be handled here, that remark is just outdated
godot-mod-loader/addons/mod_loader/mod_loader.gd
Lines 508 to 511 in ff8e9d8
# Check if it's already a dependency | |
if mod.dir_name in load_before_mod_dependencies: | |
ModLoaderUtils.log_debug("Load before - Skipping because it's already a dependency for %s" % load_before_id, LOG_NAME) | |
continue |
@ithinkandicode I opened #187 for that. |
The code from
Original Description
Adds functionality to specify a mod you want to load before your own mod.
Load before field added to manifest.json in extra -> godot -> load_before
For example:
"load_before": ["Darkly77-ContentLoader"],
Will need some more testing, this is just a naive implementation.
closes #114
I tested it a bit more
load_before
should not be added todependencies
this cancels out the effect.Because a cyclic reference is created and the dependency check will break out of the loop, so both mods end up with the same importance score.
load_before
Mod 1dependency
on Mod 1