mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Code cleanup
This commit is contained in:
parent
8ca8ef1d7d
commit
c774cdaca1
@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using Wabbajack.Common;
|
||||
using Wabbajack.Updater;
|
||||
@ -16,8 +15,8 @@ namespace Wabbajack
|
||||
var args = Environment.GetCommandLineArgs();
|
||||
if (args.Length > 1)
|
||||
{
|
||||
Utils.SetLoggerFn(f => {});
|
||||
WorkQueue.Init((a, b, c) => {}, (a, b) => {});
|
||||
Utils.SetLoggerFn(f => { });
|
||||
WorkQueue.Init((a, b, c) => { }, (a, b) => { });
|
||||
var updater = new CheckForUpdates(args[1]);
|
||||
if (updater.FindOutdatedMods())
|
||||
{
|
||||
|
@ -56,7 +56,6 @@ namespace Wabbajack
|
||||
Mode = mode;
|
||||
Dirty = false;
|
||||
dispatcher = d;
|
||||
<<<<<<< HEAD
|
||||
|
||||
var th = new Thread(() => UpdateLoop())
|
||||
{
|
||||
@ -64,11 +63,6 @@ namespace Wabbajack
|
||||
IsBackground = true
|
||||
};
|
||||
th.Start();
|
||||
=======
|
||||
Log = new ObservableCollection<string>();
|
||||
Status = new ObservableCollection<CPUStatus>();
|
||||
InternalStatus = new List<CPUStatus>();
|
||||
>>>>>>> Update loop for slideshow will be called when installing
|
||||
}
|
||||
|
||||
private void SetupSlideshow()
|
||||
@ -185,7 +179,8 @@ namespace Wabbajack
|
||||
public bool ChangedProperties;
|
||||
private void OpenModListProperties()
|
||||
{
|
||||
if (UIReady) {
|
||||
if (UIReady)
|
||||
{
|
||||
if (modlistPropertiesWindow == null)
|
||||
{
|
||||
modlistPropertiesWindow = new ModlistPropertiesWindow(this);
|
||||
@ -305,7 +300,7 @@ namespace Wabbajack
|
||||
try
|
||||
{
|
||||
var element = SlideShowElements[idx];
|
||||
if(!element.Adult || (element.Adult && SplashShowNSFW))
|
||||
if (!element.Adult || (element.Adult && SplashShowNSFW))
|
||||
{
|
||||
var data = new MemoryStream();
|
||||
using (var stream = new HttpClient().GetStreamSync(element.ImageURL))
|
||||
@ -357,7 +352,7 @@ namespace Wabbajack
|
||||
SplashScreenAuthorName = modlist.Author;
|
||||
_nexusSiteURL = modlist.Website;
|
||||
SplashScreenSummary = modlist.Description;
|
||||
if(modlist.Image != "")
|
||||
if (modlist.Image != "")
|
||||
{
|
||||
//TODO: if(modlist.Image != null) SplashScreenImage = modlist.Image;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ namespace Wabbajack
|
||||
|
||||
public static bool GetScrollOnNewItem(DependencyObject obj)
|
||||
{
|
||||
return (bool) obj.GetValue(ScrollOnNewItemProperty);
|
||||
return (bool)obj.GetValue(ScrollOnNewItemProperty);
|
||||
}
|
||||
|
||||
public static void SetScrollOnNewItem(DependencyObject obj, bool value)
|
||||
@ -35,7 +35,7 @@ namespace Wabbajack
|
||||
{
|
||||
var listBox = d as ListBox;
|
||||
if (listBox == null) return;
|
||||
bool oldValue = (bool) e.OldValue, newValue = (bool) e.NewValue;
|
||||
bool oldValue = (bool)e.OldValue, newValue = (bool)e.NewValue;
|
||||
if (newValue == oldValue) return;
|
||||
if (newValue)
|
||||
{
|
||||
@ -57,7 +57,7 @@ namespace Wabbajack
|
||||
|
||||
private static void ListBox_ItemsSourceChanged(object sender, EventArgs e)
|
||||
{
|
||||
var listBox = (ListBox) sender;
|
||||
var listBox = (ListBox)sender;
|
||||
if (Associations.ContainsKey(listBox))
|
||||
Associations[listBox].Dispose();
|
||||
Associations[listBox] = new Capture(listBox);
|
||||
@ -65,7 +65,7 @@ namespace Wabbajack
|
||||
|
||||
private static void ListBox_Unloaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var listBox = (ListBox) sender;
|
||||
var listBox = (ListBox)sender;
|
||||
if (Associations.ContainsKey(listBox))
|
||||
Associations[listBox].Dispose();
|
||||
listBox.Unloaded -= ListBox_Unloaded;
|
||||
@ -73,7 +73,7 @@ namespace Wabbajack
|
||||
|
||||
private static void ListBox_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var listBox = (ListBox) sender;
|
||||
var listBox = (ListBox)sender;
|
||||
var incc = listBox.Items as INotifyCollectionChanged;
|
||||
if (incc == null) return;
|
||||
listBox.Loaded -= ListBox_Loaded;
|
||||
|
@ -1,20 +1,16 @@
|
||||
using System;
|
||||
using CommonMark;
|
||||
using Compression.BSA;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
using CommonMark;
|
||||
using Compression.BSA;
|
||||
using K4os.Compression.LZ4;
|
||||
using K4os.Compression.LZ4.Streams;
|
||||
using Newtonsoft.Json;
|
||||
using System.IO.Compression;
|
||||
using VFS;
|
||||
using Wabbajack.Common;
|
||||
using Wabbajack.NexusApi;
|
||||
@ -23,7 +19,6 @@ using Directory = Alphaleonis.Win32.Filesystem.Directory;
|
||||
using File = Alphaleonis.Win32.Filesystem.File;
|
||||
using FileInfo = Alphaleonis.Win32.Filesystem.FileInfo;
|
||||
using Path = Alphaleonis.Win32.Filesystem.Path;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace Wabbajack
|
||||
{
|
||||
@ -44,7 +39,7 @@ namespace Wabbajack
|
||||
{
|
||||
MO2Folder = mo2_folder;
|
||||
MO2Ini = Path.Combine(MO2Folder, "ModOrganizer.ini").LoadIniFile();
|
||||
GamePath = ((string) MO2Ini.General.gamePath).Replace("\\\\", "\\");
|
||||
GamePath = ((string)MO2Ini.General.gamePath).Replace("\\\\", "\\");
|
||||
}
|
||||
|
||||
public dynamic MO2Ini { get; }
|
||||
@ -145,12 +140,12 @@ namespace Wabbajack
|
||||
|
||||
var mo2_files = Directory.EnumerateFiles(MO2Folder, "*", SearchOption.AllDirectories)
|
||||
.Where(p => p.FileExists())
|
||||
.Select(p => new RawSourceFile(VFS.Lookup(p)) {Path = p.RelativeTo(MO2Folder)});
|
||||
.Select(p => new RawSourceFile(VFS.Lookup(p)) { Path = p.RelativeTo(MO2Folder) });
|
||||
|
||||
var game_files = Directory.EnumerateFiles(GamePath, "*", SearchOption.AllDirectories)
|
||||
.Where(p => p.FileExists())
|
||||
.Select(p => new RawSourceFile(VFS.Lookup(p))
|
||||
{Path = Path.Combine(Consts.GameFolderFilesDir, p.RelativeTo(GamePath))});
|
||||
{ Path = Path.Combine(Consts.GameFolderFilesDir, p.RelativeTo(GamePath)) });
|
||||
|
||||
var loot_path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
|
||||
"LOOT");
|
||||
@ -165,7 +160,7 @@ namespace Wabbajack
|
||||
loot_files = Directory.EnumerateFiles(loot_path, "userlist.yaml", SearchOption.AllDirectories)
|
||||
.Where(p => p.FileExists())
|
||||
.Select(p => new RawSourceFile(VFS.Lookup(p))
|
||||
{ Path = Path.Combine(Consts.LOOTFolderFilesDir, p.RelativeTo(loot_path)) });
|
||||
{ Path = Path.Combine(Consts.LOOTFolderFilesDir, p.RelativeTo(loot_path)) });
|
||||
}
|
||||
|
||||
|
||||
@ -277,7 +272,7 @@ namespace Wabbajack
|
||||
GatherArchives();
|
||||
BuildPatches();
|
||||
|
||||
if(ModList != null)
|
||||
if (ModList != null)
|
||||
if (File.Exists(ModListImage) && !File.Exists(Path.Combine(MO2ProfileDir, Path.GetFileName(ModListImage)))) File.Copy(ModListImage, Path.Combine(MO2ProfileDir, Path.GetFileName(ModListImage)));
|
||||
|
||||
ModList = new ModList
|
||||
@ -367,8 +362,8 @@ namespace Wabbajack
|
||||
}
|
||||
}
|
||||
|
||||
ModList.ReportHTML = "<style>"+css+"</style>"
|
||||
+CommonMarkConverter.Convert(File.ReadAllText($"{ModList.Name}.md"));
|
||||
ModList.ReportHTML = "<style>" + css + "</style>"
|
||||
+ CommonMarkConverter.Convert(File.ReadAllText($"{ModList.Name}.md"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -494,7 +489,7 @@ namespace Wabbajack
|
||||
}
|
||||
else if (general.directURL != null && general.directURL.StartsWith("https://www.dropbox.com/"))
|
||||
{
|
||||
var uri = new UriBuilder((string) general.directURL);
|
||||
var uri = new UriBuilder((string)general.directURL);
|
||||
var query = HttpUtility.ParseQueryString(uri.Query);
|
||||
|
||||
if (query.GetValues("dl").Count() > 0)
|
||||
@ -943,9 +938,9 @@ namespace Wabbajack
|
||||
{
|
||||
To = source.Path,
|
||||
TempID = id,
|
||||
Type = (uint) bsa.HeaderType,
|
||||
FileFlags = (uint) bsa.FileFlags,
|
||||
ArchiveFlags = (uint) bsa.ArchiveFlags
|
||||
Type = (uint)bsa.HeaderType,
|
||||
FileFlags = (uint)bsa.FileFlags,
|
||||
ArchiveFlags = (uint)bsa.ArchiveFlags
|
||||
};
|
||||
}
|
||||
|
||||
@ -1091,8 +1086,8 @@ namespace Wabbajack
|
||||
{
|
||||
var lines = File.ReadAllLines(absolutePath);
|
||||
lines = (from line in lines
|
||||
where !(line.StartsWith("-") && !line.EndsWith("_separator"))
|
||||
select line).ToArray();
|
||||
where !(line.StartsWith("-") && !line.EndsWith("_separator"))
|
||||
select line).ToArray();
|
||||
return Encoding.UTF8.GetBytes(string.Join("\r\n", lines));
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using VFS;
|
||||
using Wabbajack.Common;
|
||||
|
||||
|
@ -1,18 +1,14 @@
|
||||
using System;
|
||||
using CG.Web.MegaApiClient;
|
||||
using Compression.BSA;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows;
|
||||
using CG.Web.MegaApiClient;
|
||||
using Compression.BSA;
|
||||
using K4os.Compression.LZ4.Streams;
|
||||
using System.IO.Compression;
|
||||
using VFS;
|
||||
using Wabbajack.Common;
|
||||
using Wabbajack.NexusApi;
|
||||
@ -76,7 +72,7 @@ namespace Wabbajack
|
||||
private byte[] LoadBytesFromPath(string path)
|
||||
{
|
||||
using (var fs = new FileStream(ModListArchive, FileMode.Open, FileAccess.Read, FileShare.Read))
|
||||
using (var ar = new ZipArchive(fs,ZipArchiveMode.Read))
|
||||
using (var ar = new ZipArchive(fs, ZipArchiveMode.Read))
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
var entry = ar.GetEntry(path);
|
||||
@ -218,7 +214,7 @@ namespace Wabbajack
|
||||
{
|
||||
HashedArchives.Do(a => VFS.AddKnown(new VirtualFile
|
||||
{
|
||||
Paths = new[] {a.Value},
|
||||
Paths = new[] { a.Value },
|
||||
Hash = a.Key
|
||||
}));
|
||||
VFS.RefreshIndexes();
|
||||
@ -231,7 +227,7 @@ namespace Wabbajack
|
||||
var updated_path = new string[f.ArchiveHashPath.Length];
|
||||
f.ArchiveHashPath.CopyTo(updated_path, 0);
|
||||
updated_path[0] = VFS.HashIndex[updated_path[0]].Where(e => e.IsConcrete).First().FullPath;
|
||||
VFS.AddKnown(new VirtualFile {Paths = updated_path});
|
||||
VFS.AddKnown(new VirtualFile { Paths = updated_path });
|
||||
});
|
||||
|
||||
VFS.BackfillMissing();
|
||||
@ -254,9 +250,9 @@ namespace Wabbajack
|
||||
using (var a = new BSABuilder())
|
||||
{
|
||||
//a.Create(Path.Combine(Outputfolder, bsa.To), (bsa_archive_type_t)bsa.Type, entries);
|
||||
a.HeaderType = (VersionType) bsa.Type;
|
||||
a.FileFlags = (FileFlags) bsa.FileFlags;
|
||||
a.ArchiveFlags = (ArchiveFlags) bsa.ArchiveFlags;
|
||||
a.HeaderType = (VersionType)bsa.Type;
|
||||
a.FileFlags = (FileFlags)bsa.FileFlags;
|
||||
a.ArchiveFlags = (ArchiveFlags)bsa.ArchiveFlags;
|
||||
|
||||
source_files.PMap(f =>
|
||||
{
|
||||
@ -292,9 +288,9 @@ namespace Wabbajack
|
||||
var out_path = Path.Combine(Outputfolder, directive.To);
|
||||
if (File.Exists(out_path)) File.Delete(out_path);
|
||||
if (directive is RemappedInlineFile)
|
||||
WriteRemappedFile((RemappedInlineFile) directive);
|
||||
WriteRemappedFile((RemappedInlineFile)directive);
|
||||
else if (directive is CleanedESM)
|
||||
GenerateCleanedESM((CleanedESM) directive);
|
||||
GenerateCleanedESM((CleanedESM)directive);
|
||||
else
|
||||
File.WriteAllBytes(out_path, LoadBytesFromPath(directive.SourceDataID));
|
||||
});
|
||||
@ -362,7 +358,7 @@ namespace Wabbajack
|
||||
.GroupBy(e => e.ArchiveHashPath[0])
|
||||
.ToDictionary(k => k.Key);
|
||||
var archives = ModList.Archives
|
||||
.Select(a => new {Archive = a, AbsolutePath = HashedArchives.GetOrDefault(a.Hash)})
|
||||
.Select(a => new { Archive = a, AbsolutePath = HashedArchives.GetOrDefault(a.Hash) })
|
||||
.Where(a => a.AbsolutePath != null)
|
||||
.ToList();
|
||||
|
||||
|
@ -21,8 +21,8 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="700"></ColumnDefinition>
|
||||
<ColumnDefinition Width="700"></ColumnDefinition>
|
||||
<ColumnDefinition Width="700"/>
|
||||
<ColumnDefinition Width="700"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0, 16, 0, 16">
|
||||
@ -37,34 +37,34 @@
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="30"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Image Grid.Row="0" Source="{Binding SplashScreenImage}" Stretch="Fill"></Image>
|
||||
<Image Grid.Row="0" Source="{Binding SplashScreenImage}" Stretch="Fill"/>
|
||||
<Button Grid.Row="1" Height="30" Command="{Binding OpenModListPropertiesCommand}" IsEnabled="{Binding UIReady}">
|
||||
<TextBlock Text="Modlist Properties" FontSize="15" FontWeight="Bold"></TextBlock>
|
||||
<TextBlock Text="Modlist Properties" FontSize="15" FontWeight="Bold"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1" Grid.Column="0" Margin="5" Name="PropertyInstallerGrid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Image Grid.Row="0" Source="{Binding SplashScreenImage}" Stretch="Fill"></Image>
|
||||
<Image Grid.Row="0" Source="{Binding SplashScreenImage}" Stretch="Fill"/>
|
||||
</Grid>
|
||||
<!-- End Settings -->
|
||||
|
||||
<!-- Slideshow -->
|
||||
<Grid Grid.Row="1" Grid.Column="1" Margin="5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding SplashScreenModName}" Grid.Row="0" FontSize="30" FontWeight="Bold"></TextBlock>
|
||||
<TextBlock Text="{Binding SplashScreenAuthorName}" Grid.Row="1" FontSize="15" FontWeight="Bold"></TextBlock>
|
||||
<TextBlock Text="{Binding SplashScreenSummary}" TextWrapping="Wrap" Grid.Row="2" FontSize="15" FontWeight="Bold"></TextBlock>
|
||||
<TextBlock Text="{Binding SplashScreenModName}" Grid.Row="0" FontSize="30" FontWeight="Bold"/>
|
||||
<TextBlock Text="{Binding SplashScreenAuthorName}" Grid.Row="1" FontSize="15" FontWeight="Bold"/>
|
||||
<TextBlock Text="{Binding SplashScreenSummary}" TextWrapping="Wrap" Grid.Row="2" FontSize="15" FontWeight="Bold"/>
|
||||
<CheckBox Grid.Row="3" IsChecked="{Binding SplashShowNSFW}" Name="ShowNSFWContent">Show NSFW Mods in the Slideshow</CheckBox>
|
||||
<Button Height="30" Grid.Row="4" Command="{Binding VisitNexusSiteCommand}">
|
||||
<TextBlock Text="View Nexus Site" FontSize="15" FontWeight="Bold"></TextBlock>
|
||||
<TextBlock Text="View Nexus Site" FontSize="15" FontWeight="Bold"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<!-- End Slideshow-->
|
||||
|
@ -1,9 +1,8 @@
|
||||
using System;
|
||||
using Alphaleonis.Win32.Filesystem;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using Alphaleonis.Win32.Filesystem;
|
||||
using Wabbajack.Common;
|
||||
using Application = System.Windows.Application;
|
||||
using MessageBox = System.Windows.MessageBox;
|
||||
@ -44,7 +43,7 @@ namespace Wabbajack
|
||||
|
||||
_state._nexusSiteURL = "https://github.com/wabbajack-tools/wabbajack";
|
||||
|
||||
if(mode == RunMode.Compile)
|
||||
if (mode == RunMode.Compile)
|
||||
{
|
||||
PropertyCompilerGrid.Visibility = Visibility.Visible;
|
||||
PropertyInstallerGrid.Visibility = Visibility.Hidden;
|
||||
@ -104,7 +103,7 @@ namespace Wabbajack
|
||||
private void AppHandler(object sender, UnhandledExceptionEventArgs e)
|
||||
{
|
||||
_state.LogMsg("Uncaught error:");
|
||||
_state.LogMsg(((Exception) e.ExceptionObject).ExceptionToString());
|
||||
_state.LogMsg(((Exception)e.ExceptionObject).ExceptionToString());
|
||||
}
|
||||
|
||||
|
||||
|
@ -11,19 +11,19 @@
|
||||
<Grid Margin="20" ShowGridLines="False">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition Width="30"></ColumnDefinition>
|
||||
<ColumnDefinition Width="30"></ColumnDefinition>
|
||||
<ColumnDefinition Width="30"/>
|
||||
<ColumnDefinition Width="30"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30"></RowDefinition>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition Height="70"></RowDefinition>
|
||||
<RowDefinition Height="70"></RowDefinition>
|
||||
<RowDefinition Height="70"/>
|
||||
<RowDefinition Height="70"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Image MouseLeftButtonDown="GitHub_MouseLeftButtonDown" Margin="5,0,0,0" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" Name="GitHub"></Image>
|
||||
<Image MouseLeftButtonDown="Patreon_MouseLeftButtonDown" Margin="5,0,0,0" Grid.Row="0" Grid.Column="1" Name="Patreon"></Image>
|
||||
<Image MouseLeftButtonDown="Discord_MouseLeftButtonDown" Margin="5,0,0,0" Grid.Row="0" Grid.Column="2" Name="Discord"></Image>
|
||||
<Image Grid.Row="1" Grid.ColumnSpan="3" Name="Banner"></Image>
|
||||
<Image MouseLeftButtonDown="GitHub_MouseLeftButtonDown" Margin="5,0,0,0" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" Name="GitHub"/>
|
||||
<Image MouseLeftButtonDown="Patreon_MouseLeftButtonDown" Margin="5,0,0,0" Grid.Row="0" Grid.Column="1" Name="Patreon"/>
|
||||
<Image MouseLeftButtonDown="Discord_MouseLeftButtonDown" Margin="5,0,0,0" Grid.Row="0" Grid.Column="2" Name="Discord"/>
|
||||
<Image Grid.Row="1" Grid.ColumnSpan="3" Name="Banner"/>
|
||||
<Button Name="InstallModlist" Grid.ColumnSpan="3" Grid.Row="2" Margin="2" Click="InstallModlist_Click">
|
||||
<TextBlock FontSize="40">Install a ModList</TextBlock>
|
||||
</Button>
|
||||
|
@ -1,19 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using Wabbajack.Common;
|
||||
using static Wabbajack.MainWindow;
|
||||
|
||||
|
@ -1,17 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Wabbajack
|
||||
{
|
||||
@ -40,7 +30,7 @@ namespace Wabbajack
|
||||
private void SetSplashScreen_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var file = UIUtils.OpenFileDialog("Banner image|*.png");
|
||||
if(file != null)
|
||||
if (file != null)
|
||||
{
|
||||
newBannerFile = file;
|
||||
SplashScreenProperty.Source = new BitmapImage(new Uri(file));
|
||||
|
@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Wabbajack.NexusApi
|
||||
{
|
||||
|
@ -11,8 +11,8 @@ using System.Reflection;
|
||||
using System.Security.Authentication;
|
||||
using System.Threading.Tasks;
|
||||
using Wabbajack.Common;
|
||||
using static Wabbajack.NexusApi.NexusApiUtils;
|
||||
using WebSocketSharp;
|
||||
using static Wabbajack.NexusApi.NexusApiUtils;
|
||||
|
||||
namespace Wabbajack.NexusApi
|
||||
{
|
||||
|
@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Wabbajack.Common;
|
||||
using Wabbajack.Common;
|
||||
|
||||
namespace Wabbajack.NexusApi
|
||||
{
|
||||
|
@ -31,11 +31,11 @@ using System.Windows;
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
|
||||
|
||||
|
@ -1,22 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.WindowsAPICodePack.Dialogs;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Threading;
|
||||
using Microsoft.WindowsAPICodePack.Dialogs;
|
||||
using Wabbajack.Common;
|
||||
|
||||
namespace Wabbajack
|
||||
{
|
||||
public static class UIUtils
|
||||
{
|
||||
|
||||
|
||||
public static string ShowFolderSelectionDialog(string prompt)
|
||||
{
|
||||
if (Dispatcher.Thread != Thread.CurrentThread)
|
||||
|
@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
using Wabbajack.Common;
|
||||
|
||||
namespace Wabbajack.Updater
|
||||
|
@ -1,11 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Wabbajack.Common;
|
||||
using YamlDotNet.Serialization;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wabbajack.Validation
|
||||
{
|
||||
|
@ -4,8 +4,6 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Wabbajack.Common;
|
||||
using YamlDotNet.Serialization;
|
||||
using YamlDotNet.Serialization.NamingConventions;
|
||||
@ -115,7 +113,7 @@ namespace Wabbajack.Validation
|
||||
var nexus_mod_permissions = modlist.Archives
|
||||
.OfType<NexusMod>()
|
||||
.PMap(a => (a.Hash, FilePermissions(a), a))
|
||||
.ToDictionary(a => a.Hash, a => new { permissions = a.Item2, archive = a.a});
|
||||
.ToDictionary(a => a.Hash, a => new { permissions = a.Item2, archive = a.a });
|
||||
|
||||
modlist.Directives
|
||||
.OfType<PatchedFromArchive>()
|
||||
@ -141,7 +139,7 @@ namespace Wabbajack.Validation
|
||||
{
|
||||
if (nexus_mod_permissions.TryGetValue(p.ArchiveHashPath[0], out var archive))
|
||||
{
|
||||
if (!(archive.permissions.CanExtractBSAs ?? true) &&
|
||||
if (!(archive.permissions.CanExtractBSAs ?? true) &&
|
||||
p.ArchiveHashPath.Skip(1).ButLast().Any(a => Consts.SupportedBSAs.Contains(Path.GetExtension(a))))
|
||||
{
|
||||
ValidationErrors.Push($"{p.To} from {archive.archive.NexusURL} is set to disallow BSA Extraction");
|
||||
|
@ -1,12 +1,8 @@
|
||||
using System;
|
||||
using Alphaleonis.Win32.Filesystem;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Alphaleonis.Win32.Filesystem;
|
||||
using VFS;
|
||||
using Wabbajack.Common;
|
||||
using Directory = Alphaleonis.Win32.Filesystem.Directory;
|
||||
using File = Alphaleonis.Win32.Filesystem.File;
|
||||
@ -49,9 +45,10 @@ namespace Wabbajack
|
||||
.GroupBy(f => (f.name, f.filename));
|
||||
|
||||
merges.Where(m => m.Count() > 1)
|
||||
.Do(m => {
|
||||
Utils.Warning(
|
||||
$"WARNING, you have two patches named {m.Key.name}\\{m.Key.filename} in your zEdit profiles. We'll pick one at random, this probably isn't what you want.");
|
||||
.Do(m =>
|
||||
{
|
||||
Utils.Warning(
|
||||
$"WARNING, you have two patches named {m.Key.name}\\{m.Key.filename} in your zEdit profiles. We'll pick one at random, this probably isn't what you want.");
|
||||
});
|
||||
|
||||
var mergesIndexed =
|
||||
|
Loading…
Reference in New Issue
Block a user