Skip to content

Commit

Permalink
rename method, clean up linq
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnCorby committed Jul 4, 2024
1 parent 2513570 commit b2f8f37
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/OWML.Launcher/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ private List<string> ExecutePatchers(IEnumerable<IModData> mods)
return mods
.Where(ShouldExecutePatcher)
.Where(mod => !ExecutePatcher(mod))
.Select(mod => mod.Manifest.UniqueName).ToList();
.Select(mod => mod.Manifest.UniqueName)
.ToList();
}

private static bool ShouldExecutePatcher(IModData modData) =>
Expand All @@ -158,12 +159,12 @@ private string[] ExecuteUnpatchers(IEnumerable<IModData> mods, string[] needUnpa
return mods
.Where(modData => !string.IsNullOrEmpty(modData.Manifest.Unpatcher) && !modData.Enabled &&
needUnpatch.Contains(modData.Manifest.UniqueName))
.ToList()
.Where(UnpatchMod)
.Select(modData => modData.Manifest.UniqueName).ToArray();
.Where(ExecuteUnpatcher)
.Select(modData => modData.Manifest.UniqueName)
.ToArray();
}

private bool UnpatchMod(IModData modData)
private bool ExecuteUnpatcher(IModData modData)
{
_writer.WriteLine($"Executing patcher for {modData.Manifest.UniqueName} v{modData.Manifest.Version}", MessageType.Message);

Expand Down

0 comments on commit b2f8f37

Please sign in to comment.