diff --git a/ModManager_Classes/Validation/CyclicDependencyValidator.cs b/ModManager_Classes/Validation/CyclicDependencyValidator.cs index a2f2b4f..df137b5 100644 --- a/ModManager_Classes/Validation/CyclicDependencyValidator.cs +++ b/ModManager_Classes/Validation/CyclicDependencyValidator.cs @@ -13,6 +13,8 @@ internal class CyclicDependencyValidator : IModValidator { public void Validate(IEnumerable changed, IReadOnlyCollection all) { + foreach (Mod x in all) + x.Attributes.RemoveAttributesByType(AttributeType.CyclicDependency); foreach (Mod x in changed) { var cyclics = CyclicDependencies(x, all); @@ -25,8 +27,11 @@ public void Validate(IEnumerable changed, IReadOnlyCollection all) private IEnumerable CyclicDependencies(Mod x, IReadOnlyCollection others) { + if (!x.IsActive) + return Enumerable.Empty(); + return others.Where(y => - (y.Modinfo?.LoadAfterIds?.Contains(x.ModID) ?? false) + y.IsActive && (y.Modinfo?.LoadAfterIds?.Contains(x.ModID) ?? false) && (x.Modinfo?.LoadAfterIds?.Contains(y.ModID) ?? false)); } }