Fixed custom banner not being included in output

This commit is contained in:
erri120 2019-10-07 19:16:27 +02:00
parent 28ea1ef140
commit 4560d7b8e6
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135
3 changed files with 5 additions and 5 deletions

View File

@ -490,7 +490,7 @@ namespace Wabbajack
ModListName = ChangedProperties ? SplashScreenModName : null,
ModListAuthor = ChangedProperties ? SplashScreenAuthorName : null,
ModListDescription = ChangedProperties ? SplashScreenSummary : null,
ModListImage = ChangedProperties ? newImagePath : null,
ModListImage = ChangedProperties ? newImagePath ?? null : null,
ModListWebsite = ChangedProperties ? _nexusSiteURL : null
};
var th = new Thread(() =>

View File

@ -277,6 +277,8 @@ namespace Wabbajack
GatherArchives();
BuildPatches();
if (File.Exists(ModListImage) && !File.Exists(Path.Combine(MO2ProfileDir, Path.GetFileName(ModListImage)))) File.Copy(ModListImage, Path.Combine(MO2ProfileDir, Path.GetFileName(ModListImage)));
ModList = new ModList
{
GameType = GameRegistry.Games.Values.First(f => f.MO2Name == MO2Ini.General.gameName).Game,
@ -285,10 +287,9 @@ namespace Wabbajack
Name = ModListName ?? MO2Profile,
Author = ModListAuthor ?? "",
Description = ModListDescription ?? "",
Image = Path.GetFileName(ModListImage),
Image = Path.Combine("profiles", MO2Profile, Path.GetFileName(ModListImage)),
Website = ModListWebsite ?? ""
};
if(File.Exists(ModListImage)) File.Copy(ModListImage, Path.Combine(ModListOutputFolder, Path.GetFileName(ModListImage)));
ValidateModlist.RunValidation(ModList);

View File

@ -53,8 +53,7 @@ namespace Wabbajack
{
if (newBannerFile != null)
{
BitmapImage splashScreen = null;
splashScreen = new BitmapImage(new Uri(newBannerFile));
BitmapImage splashScreen = new BitmapImage(new Uri(newBannerFile));
state.newImagePath = newBannerFile;
state.SplashScreenImage = splashScreen;
}