Skip to content

Commit

Permalink
LoadOrder.ImportFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
Noggog committed May 27, 2020
1 parent f7b020f commit b473b79
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
19 changes: 19 additions & 0 deletions Mutagen.Bethesda.Core/Load Order/LoadOrder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,25 @@ public void Import(
}
}

/// <summary>
/// Creates a load order and fills it with mods constructed by given importer
/// </summary>
/// <param name="dataFolder">Path data folder containing mods</param>
/// <param name="loadOrder">Unique list of mod keys to import</param>
/// <param name="importer">Function used to construct a mod</param>
public static LoadOrder<TMod> ImportFactory(
DirectoryPath dataFolder,
IReadOnlyList<ModKey> loadOrder,
Importer importer)
{
var ret = new LoadOrder<TMod>();
ret.Import(
dataFolder,
loadOrder,
importer);
return ret;
}

/// <summary>
/// Iterates through all mod listings in load order
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Mutagen.Bethesda.Core/Mutagen.Bethesda.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</ItemGroup>
<PropertyGroup>
<PackageId>Mutagen.Bethesda.Core</PackageId>
<Version>0.7</Version>
<Version>0.8</Version>
<Authors>Noggog</Authors>
<Company>Mutagen</Company>
<Product>Mutagen</Product>
Expand Down
2 changes: 1 addition & 1 deletion Mutagen.Bethesda/Mutagen.Bethesda.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netstandard2.1</TargetFramework>
<EnableDefaultCompileItems>False</EnableDefaultCompileItems>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>0.7</Version>
<Version>0.8</Version>
<Company>Mutagen</Company>
<Product>Mutagen</Product>
<Description>A C# library for manipulating, creating, and analyzing Bethesda mods.</Description>
Expand Down

0 comments on commit b473b79

Please sign in to comment.