Skip to content
This repository has been archived by the owner on Nov 29, 2020. It is now read-only.

Commit

Permalink
Made some improvements to modpack import.
Browse files Browse the repository at this point in the history
  • Loading branch information
Artentus committed Oct 12, 2018
1 parent 1bc1c81 commit a811ca6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions ModMyFactory/ModMyFactory/Lang/Strings.de.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@
<sys:String x:Key="UpdatingFactorioStage2Description">Update wird angewendet</sys:String>

<sys:String x:Key="ExportingAction">Modpacks werden exportiert</sys:String>
<sys:String x:Key="ImportingAction">Modpacks werden importiert</sys:String>
<sys:String x:Key="ImportingDownloadingDescription">Mods werden heruntergeladen</sys:String>



Expand Down
2 changes: 2 additions & 0 deletions ModMyFactory/ModMyFactory/Lang/Strings.en.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@
<sys:String x:Key="UpdatingFactorioStage2Description">Applying update</sys:String>

<sys:String x:Key="ExportingAction">Exporting modpacks</sys:String>
<sys:String x:Key="ImportingAction">Importing modpacks</sys:String>
<sys:String x:Key="ImportingDownloadingDescription">Downloading mods</sys:String>



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ private async Task AddMod(ModExportTemplate modTemplate, DirectoryInfo fileLocat
{
if (ModFile.TryLoadFromFile(file, out var modFile, true))
{
Mod mod = await Mod.Add(modFile, Mods, Modpacks, false);
Mod mod = await Mod.Add(modFile, Mods, Modpacks, false, true);
modTemplate.Mod = mod;
return;
}
Expand All @@ -164,7 +164,7 @@ private async Task AddMod(ModExportTemplate modTemplate, DirectoryInfo fileLocat
{
if (ModFile.TryLoadFromDirectory(directory, out var modFile, true))
{
Mod mod = await Mod.Add(modFile, Mods, Modpacks, false);
Mod mod = await Mod.Add(modFile, Mods, Modpacks, false, true);
modTemplate.Mod = mod;
return;
}
Expand Down Expand Up @@ -204,7 +204,8 @@ private async Task ImportModpackFileV2(ExportTemplate template, DirectoryInfo fi
{
var progressWindow = new ProgressWindow() { Owner = Window };
var progressViewModel = (ProgressViewModel)progressWindow.ViewModel;
progressViewModel.ActionName = App.Instance.GetLocalizedResourceString("DownloadingAction");
progressViewModel.ActionName = App.Instance.GetLocalizedResourceString("ImportingAction");
progressViewModel.ProgressDescription = App.Instance.GetLocalizedResourceString("Downloading mods");

var progress = new Progress<double>(p => progressViewModel.Progress = p);

Expand Down

0 comments on commit a811ca6

Please sign in to comment.