Browse Source

Do not mark disabled mods as ignored

pull/100/head
Meivyn 1 year ago
parent
commit
4e9cc1e683
No known key found for this signature in database GPG Key ID: 8BDD3E48158B2F71
1 changed files with 3 additions and 5 deletions
  1. +3
    -5
      IPA.Loader/Loader/PluginLoader.cs

+ 3
- 5
IPA.Loader/Loader/PluginLoader.cs View File

@ -598,7 +598,7 @@ namespace IPA.Loader
Logger.Loader.Trace($"- Found already processed"); Logger.Loader.Trace($"- Found already processed");
return true; return true;
} }
if (metadataCache!.TryGetValue(id, out var plugin))
if (metadataCache.TryGetValue(id, out var plugin))
{ {
Logger.Loader.Trace($"- In metadata cache"); Logger.Loader.Trace($"- In metadata cache");
if (partial) if (partial)
@ -609,11 +609,11 @@ namespace IPA.Loader
disabled = !plugin.Enabled; disabled = !plugin.Enabled;
meta = plugin.Meta; meta = plugin.Meta;
ignored = false;
if (!disabled) if (!disabled)
{ {
try try
{ {
ignored = false;
Resolve(plugin.Meta, ref disabled, out ignored); Resolve(plugin.Meta, ref disabled, out ignored);
} }
catch (Exception e) catch (Exception e)
@ -715,8 +715,7 @@ namespace IPA.Loader
if (depDisabled) if (depDisabled)
{ {
Logger.Loader.Warn($"Dependency '{id}' for '{plugin.Id}' disabled; disabling"); Logger.Loader.Warn($"Dependency '{id}' for '{plugin.Id}' disabled; disabling");
disabledPlugins!.Add(plugin);
_ = disabledIds!.Add(plugin.Id);
disabledPlugins.Add(plugin);
disabled = true; disabled = true;
} }
@ -770,7 +769,6 @@ namespace IPA.Loader
&& range.Matches(meta.HVersion) && range.Matches(meta.HVersion)
&& !conflIgnored && !conflDisabled) // the conflict is only *actually* a problem if it is both not ignored and not disabled && !conflIgnored && !conflDisabled) // the conflict is only *actually* a problem if it is both not ignored and not disabled
{ {
Logger.Loader.Warn($"Plugin '{plugin.Id}' conflicts with {meta.Id}@{meta.HVersion}; ignoring '{plugin.Id}'"); Logger.Loader.Warn($"Plugin '{plugin.Id}' conflicts with {meta.Id}@{meta.HVersion}; ignoring '{plugin.Id}'");
ignoredPlugins.Add(plugin, new(Reason.Conflict) ignoredPlugins.Add(plugin, new(Reason.Conflict)
{ {


Loading…
Cancel
Save