Added StagingLocation to InstallationSettings

This commit is contained in:
erri120 2019-11-11 19:27:32 +01:00 committed by Timothy Baldridge
parent 3724d0d296
commit 7ca874551a
2 changed files with 9 additions and 3 deletions

View File

@ -53,6 +53,7 @@ namespace Wabbajack
public class InstallationSettings
{
public string InstallationLocation { get; set; }
public string StagingLocation { get; set; }
public string DownloadLocation { get; set; }
}

View File

@ -129,12 +129,15 @@ namespace Wabbajack
};
// Load settings
InstallationSettings settings = this.MWVM.Settings.InstallationSettings.TryCreate(source);
var settings = MWVM.Settings.InstallationSettings.TryCreate(source);
this.MWVM.Settings.SaveSignal
.Subscribe(_ =>
{
settings.InstallationLocation = this.Location.TargetPath;
settings.DownloadLocation = this.DownloadLocation.TargetPath;
settings.DownloadLocation = DownloadLocation.TargetPath;
if (IsMO2ModList)
settings.InstallationLocation = Location.TargetPath;
else
settings.StagingLocation = StagingLocation.TargetPath;
})
.DisposeWith(this.CompositeDisposable);
@ -163,6 +166,8 @@ namespace Wabbajack
if (modList.ModManager == ModManager.Vortex)
{
IsMO2ModList = false;
StagingLocation.TargetPath = settings.StagingLocation;
var vortexFolder =
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
"Vortex");