feat: loader specific enabled handling - #2282
Open
WilsontheWolf wants to merge 2 commits into
Open
WilsontheWolf wants to merge 2 commits into
WilsontheWolf wants to merge 2 commits into
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
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.
This adds the ability for PackageInstallers to control mod enabled/disabled states. This is done via the following methods:
Which allows a package installer to indicate whether a mod is enabled or disabled (or if r2mm should handle it,
undefined), if the method has been defined, and:which is used to get the value of the aformentiond isLoaderDisabled for a specific mod, handling loaders that don't define the method.
This is then used when querying the list of mods to force enable or disable a mod if isModLoaderDisabled returns true/false.
The
LovelyPluginInstallernow providesisLoaderDisabled, and it now opts to rely soley on lovely's built in disabling mechanims rather than r2mm's, which improves compatbility with mods that rely on this (for example, Steamodded's mod menu now shows disabled mods correctly, and they can be (dis/en)abled from there and sync to r2mm).When disabling a mod it adds a .lovelyignore, and when enabling it will handle both .lovelyignore and the blacklist correctly.
This might cause some issues if a user disables a mod in an old version of r2mm, and updates to this new version as the mechanism has been changed. I didn't really know how to solve this so I just didn't