Skip to content

feat: loader specific enabled handling - #2282

Open
WilsontheWolf wants to merge 2 commits into
ebkr:developfrom
WilsontheWolf:loader-disabling
Open

WilsontheWolf wants to merge 2 commits into
ebkr:developfrom
WilsontheWolf:loader-disabling

Conversation

@WilsontheWolf

Copy link
Copy Markdown

This adds the ability for PackageInstallers to control mod enabled/disabled states. This is done via the following methods:

PackageInstaller.isLoaderDisabled?(args: InstallArgs): Promise<boolean|undefined>;

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:

ProfileInstallerProvider.isModLoaderDisabled(mod: ManifestV2, profile: ImmutableProfile): Promise<R2Error | boolean | undefined> ;

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 LovelyPluginInstaller now provides isLoaderDisabled, 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

@CLAassistant

CLAassistant commented Sep 9, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants