From b473b79781266c988036688d9fdf5c7dfdc5f541 Mon Sep 17 00:00:00 2001 From: Justin Swanson Date: Tue, 26 May 2020 21:09:21 -0500 Subject: [PATCH] LoadOrder.ImportFactory --- Mutagen.Bethesda.Core/Load Order/LoadOrder.cs | 19 +++++++++++++++++++ .../Mutagen.Bethesda.Core.csproj | 2 +- Mutagen.Bethesda/Mutagen.Bethesda.csproj | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Mutagen.Bethesda.Core/Load Order/LoadOrder.cs b/Mutagen.Bethesda.Core/Load Order/LoadOrder.cs index 1f3f0f3824..9d0c6bfc28 100644 --- a/Mutagen.Bethesda.Core/Load Order/LoadOrder.cs +++ b/Mutagen.Bethesda.Core/Load Order/LoadOrder.cs @@ -327,6 +327,25 @@ public void Import( } } + /// + /// Creates a load order and fills it with mods constructed by given importer + /// + /// Path data folder containing mods + /// Unique list of mod keys to import + /// Function used to construct a mod + public static LoadOrder ImportFactory( + DirectoryPath dataFolder, + IReadOnlyList loadOrder, + Importer importer) + { + var ret = new LoadOrder(); + ret.Import( + dataFolder, + loadOrder, + importer); + return ret; + } + /// /// Iterates through all mod listings in load order /// diff --git a/Mutagen.Bethesda.Core/Mutagen.Bethesda.Core.csproj b/Mutagen.Bethesda.Core/Mutagen.Bethesda.Core.csproj index 2f1317a4d9..b7218ea857 100644 --- a/Mutagen.Bethesda.Core/Mutagen.Bethesda.Core.csproj +++ b/Mutagen.Bethesda.Core/Mutagen.Bethesda.Core.csproj @@ -28,7 +28,7 @@ Mutagen.Bethesda.Core - 0.7 + 0.8 Noggog Mutagen Mutagen diff --git a/Mutagen.Bethesda/Mutagen.Bethesda.csproj b/Mutagen.Bethesda/Mutagen.Bethesda.csproj index 3fa3830f6f..44ac1b9e44 100644 --- a/Mutagen.Bethesda/Mutagen.Bethesda.csproj +++ b/Mutagen.Bethesda/Mutagen.Bethesda.csproj @@ -4,7 +4,7 @@ netstandard2.1 False true - 0.7 + 0.8 Mutagen Mutagen A C# library for manipulating, creating, and analyzing Bethesda mods.