diff --git a/SynthEBD.Tests/SetViaFormKeyReplacementTests.cs b/SynthEBD.Tests/SetViaFormKeyReplacementTests.cs index 9629a5a5..97067495 100644 --- a/SynthEBD.Tests/SetViaFormKeyReplacementTests.cs +++ b/SynthEBD.Tests/SetViaFormKeyReplacementTests.cs @@ -13,7 +13,7 @@ public class SetViaFormKeyReplacementTests [Fact] public void ArrayDynamic() { - var mod = new SkyrimMod(ModKey.Null, SkyrimGameType.SkyrimSE); + var mod = new SkyrimMod(ModKey.Null, SkyrimRelease.SkyrimSE); var arm = mod.Armors.AddNew(); arm.Armature.Add(mod.ArmorAddons.AddNew()); dynamic list = arm.Armature; @@ -25,7 +25,7 @@ public void ArrayDynamic() [Fact] public void ArrayStraight() { - var mod = new SkyrimMod(ModKey.Null, SkyrimGameType.SkyrimSE); + var mod = new SkyrimMod(ModKey.Null, SkyrimRelease.SkyrimSE); var arm = mod.Armors.AddNew(); arm.Armature.Add(mod.ArmorAddons.AddNew()); var list = arm.Armature; @@ -37,7 +37,7 @@ public void ArrayStraight() [Fact] public void SingleDynamic() { - var mod = new SkyrimMod(ModKey.Null, SkyrimGameType.SkyrimSE); + var mod = new SkyrimMod(ModKey.Null, SkyrimRelease.SkyrimSE); var arm = mod.Armors.AddNew(); arm.Race.SetTo(mod.Races.AddNew()); dynamic dyn = arm; @@ -49,7 +49,7 @@ public void SingleDynamic() [Fact] public void SingleStraight() { - var mod = new SkyrimMod(ModKey.Null, SkyrimGameType.SkyrimSE); + var mod = new SkyrimMod(ModKey.Null, SkyrimRelease.SkyrimSE); var arm = mod.Armors.AddNew(); arm.Race.SetTo(mod.Races.AddNew()); var race = new Race(mod); diff --git a/SynthEBD/Installer/ConfigInstaller.cs b/SynthEBD/Installer/ConfigInstaller.cs index 21d5e5f1..056fef27 100644 --- a/SynthEBD/Installer/ConfigInstaller.cs +++ b/SynthEBD/Installer/ConfigInstaller.cs @@ -60,6 +60,7 @@ public static List InstallConfigFile() if (!File.Exists(manifestPath)) { System.Windows.MessageBox.Show("Could not find Manifest.json in " + tempFolderPath + ". Installation aborted."); + return installedConfigs; } Manifest manifest = JSONhandler.LoadJSONFile(manifestPath, out bool parsed, out string exceptionStr); diff --git a/SynthEBD/Settings/SettingsIO/SettingsIO_AssetPack.cs b/SynthEBD/Settings/SettingsIO/SettingsIO_AssetPack.cs index 488b7fb5..8b8e9461 100644 --- a/SynthEBD/Settings/SettingsIO/SettingsIO_AssetPack.cs +++ b/SynthEBD/Settings/SettingsIO/SettingsIO_AssetPack.cs @@ -123,6 +123,12 @@ public static List LoadRecordTemplates(out bool loadSuccess) if (Directory.Exists(PatcherSettings.Paths.RecordTemplatesDirPath)) { filePaths = Directory.GetFiles(PatcherSettings.Paths.RecordTemplatesDirPath, "*.esp"); + + // load any available record templates in the fallback folder since they may not have been copied over and missing them will screw up the config files + var fileNames = filePaths.Select(x => Path.GetFileName(x)); + var fallBackFilePaths = Directory.GetFiles(PatcherSettings.Paths.GetFallBackPath(PatcherSettings.Paths.RecordTemplatesDirPath), "*.esp"); + var additionalFilePaths = fallBackFilePaths.Where(x => !fileNames.Contains(Path.GetFileName(x))); + filePaths = filePaths.Concat(additionalFilePaths).ToArray(); } else {