From c774cdaca160f8ebab8494e5f6735cee7fc3130f Mon Sep 17 00:00:00 2001 From: erri120 Date: Mon, 7 Oct 2019 19:33:34 +0200 Subject: [PATCH] Code cleanup --- Wabbajack/App.xaml.cs | 5 ++- Wabbajack/AppState.cs | 13 +++----- Wabbajack/AutoScrollBehavior.cs | 10 +++--- Wabbajack/Compiler.cs | 39 ++++++++++------------- Wabbajack/Data.cs | 4 +-- Wabbajack/Installer.cs | 30 ++++++++--------- Wabbajack/MainWindow.xaml | 26 +++++++-------- Wabbajack/MainWindow.xaml.cs | 9 +++--- Wabbajack/ModeSelectionWindow.xaml | 18 +++++------ Wabbajack/ModeSelectionWindow.xaml.cs | 16 ++-------- Wabbajack/ModlistPropertiesWindow.xaml.cs | 12 +------ Wabbajack/NexusApi/Dtos.cs | 4 --- Wabbajack/NexusApi/NexusApi.cs | 2 +- Wabbajack/NexusApi/NexusApiUtils.cs | 7 +--- Wabbajack/Properties/AssemblyInfo.cs | 8 ++--- Wabbajack/UIUtils.cs | 11 ++----- Wabbajack/Updater/CheckForUpdates.cs | 6 +--- Wabbajack/Validation/DTOs.cs | 9 +----- Wabbajack/Validation/ValidateModlist.cs | 6 ++-- Wabbajack/zEditIntegration.cs | 15 ++++----- 20 files changed, 91 insertions(+), 159 deletions(-) diff --git a/Wabbajack/App.xaml.cs b/Wabbajack/App.xaml.cs index 5e370a27..a744eacd 100644 --- a/Wabbajack/App.xaml.cs +++ b/Wabbajack/App.xaml.cs @@ -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()) { diff --git a/Wabbajack/AppState.cs b/Wabbajack/AppState.cs index 64afb9a9..4648de43 100644 --- a/Wabbajack/AppState.cs +++ b/Wabbajack/AppState.cs @@ -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(); - Status = new ObservableCollection(); - InternalStatus = new List(); ->>>>>>> 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; } diff --git a/Wabbajack/AutoScrollBehavior.cs b/Wabbajack/AutoScrollBehavior.cs index 13c2bba3..f6b86e93 100644 --- a/Wabbajack/AutoScrollBehavior.cs +++ b/Wabbajack/AutoScrollBehavior.cs @@ -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; diff --git a/Wabbajack/Compiler.cs b/Wabbajack/Compiler.cs index a85a0393..31aeb7b0 100644 --- a/Wabbajack/Compiler.cs +++ b/Wabbajack/Compiler.cs @@ -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 = "" - +CommonMarkConverter.Convert(File.ReadAllText($"{ModList.Name}.md")); + ModList.ReportHTML = "" + + CommonMarkConverter.Convert(File.ReadAllText($"{ModList.Name}.md")); } /// @@ -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)); } diff --git a/Wabbajack/Data.cs b/Wabbajack/Data.cs index 9315968e..3a308e1d 100644 --- a/Wabbajack/Data.cs +++ b/Wabbajack/Data.cs @@ -1,6 +1,6 @@ -using System; +using Newtonsoft.Json; +using System; using System.Collections.Generic; -using Newtonsoft.Json; using VFS; using Wabbajack.Common; diff --git a/Wabbajack/Installer.cs b/Wabbajack/Installer.cs index 69d6ef4a..6aeb149d 100644 --- a/Wabbajack/Installer.cs +++ b/Wabbajack/Installer.cs @@ -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(); diff --git a/Wabbajack/MainWindow.xaml b/Wabbajack/MainWindow.xaml index 0436bace..500db55c 100644 --- a/Wabbajack/MainWindow.xaml +++ b/Wabbajack/MainWindow.xaml @@ -21,8 +21,8 @@ - - + + @@ -37,34 +37,34 @@ - + - + - - - - + + + + - - - + + + Show NSFW Mods in the Slideshow diff --git a/Wabbajack/MainWindow.xaml.cs b/Wabbajack/MainWindow.xaml.cs index d2558c2a..001fe28e 100644 --- a/Wabbajack/MainWindow.xaml.cs +++ b/Wabbajack/MainWindow.xaml.cs @@ -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()); } diff --git a/Wabbajack/ModeSelectionWindow.xaml b/Wabbajack/ModeSelectionWindow.xaml index ee4da5aa..70eb1ab9 100644 --- a/Wabbajack/ModeSelectionWindow.xaml +++ b/Wabbajack/ModeSelectionWindow.xaml @@ -11,19 +11,19 @@ - - + + - + - - + + - - - - + + + + diff --git a/Wabbajack/ModeSelectionWindow.xaml.cs b/Wabbajack/ModeSelectionWindow.xaml.cs index 7ed50415..d87fad15 100644 --- a/Wabbajack/ModeSelectionWindow.xaml.cs +++ b/Wabbajack/ModeSelectionWindow.xaml.cs @@ -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; diff --git a/Wabbajack/ModlistPropertiesWindow.xaml.cs b/Wabbajack/ModlistPropertiesWindow.xaml.cs index 50167513..998b87af 100644 --- a/Wabbajack/ModlistPropertiesWindow.xaml.cs +++ b/Wabbajack/ModlistPropertiesWindow.xaml.cs @@ -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)); diff --git a/Wabbajack/NexusApi/Dtos.cs b/Wabbajack/NexusApi/Dtos.cs index b8bab50c..db5bb889 100644 --- a/Wabbajack/NexusApi/Dtos.cs +++ b/Wabbajack/NexusApi/Dtos.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Wabbajack.NexusApi { diff --git a/Wabbajack/NexusApi/NexusApi.cs b/Wabbajack/NexusApi/NexusApi.cs index d1cbc7d1..a3925b1d 100644 --- a/Wabbajack/NexusApi/NexusApi.cs +++ b/Wabbajack/NexusApi/NexusApi.cs @@ -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 { diff --git a/Wabbajack/NexusApi/NexusApiUtils.cs b/Wabbajack/NexusApi/NexusApiUtils.cs index c94228dc..f1003084 100644 --- a/Wabbajack/NexusApi/NexusApiUtils.cs +++ b/Wabbajack/NexusApi/NexusApiUtils.cs @@ -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 { diff --git a/Wabbajack/Properties/AssemblyInfo.cs b/Wabbajack/Properties/AssemblyInfo.cs index b0be77a6..f129c063 100644 --- a/Wabbajack/Properties/AssemblyInfo.cs +++ b/Wabbajack/Properties/AssemblyInfo.cs @@ -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) )] diff --git a/Wabbajack/UIUtils.cs b/Wabbajack/UIUtils.cs index bcc9c10e..cf82aece 100644 --- a/Wabbajack/UIUtils.cs +++ b/Wabbajack/UIUtils.cs @@ -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) diff --git a/Wabbajack/Updater/CheckForUpdates.cs b/Wabbajack/Updater/CheckForUpdates.cs index 6f06cbf3..ba417ba0 100644 --- a/Wabbajack/Updater/CheckForUpdates.cs +++ b/Wabbajack/Updater/CheckForUpdates.cs @@ -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 diff --git a/Wabbajack/Validation/DTOs.cs b/Wabbajack/Validation/DTOs.cs index 7c76159f..adb4e35f 100644 --- a/Wabbajack/Validation/DTOs.cs +++ b/Wabbajack/Validation/DTOs.cs @@ -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 { diff --git a/Wabbajack/Validation/ValidateModlist.cs b/Wabbajack/Validation/ValidateModlist.cs index eef43f75..245382b7 100644 --- a/Wabbajack/Validation/ValidateModlist.cs +++ b/Wabbajack/Validation/ValidateModlist.cs @@ -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() .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() @@ -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"); diff --git a/Wabbajack/zEditIntegration.cs b/Wabbajack/zEditIntegration.cs index 01f48163..e1a28836 100644 --- a/Wabbajack/zEditIntegration.cs +++ b/Wabbajack/zEditIntegration.cs @@ -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 =