Skip to content

Commit 21e48d6

Browse files
Removed unused variable, updated comments on CheckDependencies rework.
1 parent 6efbf4b commit 21e48d6

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

SA-Mod-Manager/ModsCommon/ModDependency.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,16 @@ public static bool CheckDependencies(List<string> enabledMods, Dictionary<string
8383
// Loop through enabled mods and check for dependencies.
8484
foreach (SAModInfo mod in enabledModInfoList)
8585
{
86-
bool check = false;
87-
// If Dependencies are 0, we return false.
86+
// If Dependencies are 0, we move on to the next one.
8887
if (mod.Dependencies.Count <= 0)
8988
continue;
9089

9190
int modIndex = enabledModInfoList.IndexOf(mod); // Current mod's index in the list.
9291

9392
foreach (string dep in mod.Dependencies)
9493
{
95-
bool validated = false;
94+
// This variable is used to check if the mod was validated before running further checks after checking the enabled mods list.
95+
bool validated = false;
9696
ModDependency dependency = new ModDependency(dep);
9797
StringBuilder sb = new StringBuilder();
9898

@@ -165,6 +165,7 @@ public static bool CheckDependencies(List<string> enabledMods, Dictionary<string
165165
}
166166
}
167167

168+
// If we get here, return false so the game will boot as usual.
168169
return false;
169170
}
170171
}

0 commit comments

Comments
 (0)