Merge pull request #174 from Noggog/random-refactors

Random refactors
This commit is contained in:
Timothy Baldridge 2019-11-15 05:23:01 -07:00 committed by GitHub
commit 4ffb533bc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 35 deletions

View File

@ -22,9 +22,9 @@ namespace Wabbajack.Common
Starbound,
SWKOTOR,
SWKOTOR2,
WITCHER,
WITCHER2,
WITCHER3
Witcher,
Witcher2,
Witcher3
}
public class GameMetaData
@ -71,8 +71,7 @@ namespace Wabbajack.Common
return Games.Values.FirstOrDefault(g => g.NexusName == gameName.ToLower());
}
public static Dictionary<Game, GameMetaData> Games = new Dictionary<Game, GameMetaData>
public static IReadOnlyDictionary<Game, GameMetaData> Games = new Dictionary<Game, GameMetaData>
{
/*{
Game.Morrowind, new GameMetaData()
@ -242,30 +241,30 @@ namespace Wabbajack.Common
}
},
{
Game.WITCHER, new GameMetaData
Game.Witcher, new GameMetaData
{
SupportedModManager = ModManager.Vortex,
Game = Game.WITCHER,
Game = Game.Witcher,
NexusName = "witcher",
SteamIDs = new List<int>{20900},
GOGIDs = new List<int>{1207658924}
}
},
{
Game.WITCHER2, new GameMetaData
Game.Witcher2, new GameMetaData
{
SupportedModManager = ModManager.Vortex,
Game = Game.WITCHER2,
Game = Game.Witcher2,
NexusName = "witcher2",
SteamIDs = new List<int>{20920},
GOGIDs = new List<int>{1207658930}
}
},
{
Game.WITCHER3, new GameMetaData
Game.Witcher3, new GameMetaData
{
SupportedModManager = ModManager.Vortex,
Game = Game.WITCHER3,
Game = Game.Witcher3,
NexusName = "witcher3",
SteamIDs = new List<int>{292030, 499450}, // normal and GotY
GOGIDs = new List<int>{1207664643, 1495134320, 1207664663, 1640424747} // normal, GotY and both in packages

View File

@ -18,13 +18,13 @@ namespace Wabbajack.Lib
public string ModListOutputFolder;
public string ModListOutputFile;
public List<Archive> SelectedArchives;
public List<Directive> InstallDirectives;
public List<RawSourceFile> AllFiles;
public ModList ModList;
public VirtualFileSystem VFS;
public List<IndexedArchive> IndexedArchives;
public Dictionary<string, IEnumerable<VirtualFile>> IndexedFiles;
public List<Archive> SelectedArchives = new List<Archive>();
public List<Directive> InstallDirectives = new List<Directive>();
public List<RawSourceFile> AllFiles = new List<RawSourceFile>();
public ModList ModList = new ModList();
public VirtualFileSystem VFS = VirtualFileSystem.VFS;
public List<IndexedArchive> IndexedArchives = new List<IndexedArchive>();
public Dictionary<string, IEnumerable<VirtualFile>> IndexedFiles = new Dictionary<string, IEnumerable<VirtualFile>>();
public abstract void Info(string msg);
public abstract void Status(string msg);

View File

@ -50,19 +50,9 @@ namespace Wabbajack.Lib
ModListOutputFolder = "output_folder";
ModListOutputFile = MO2Profile + ExtensionManager.Extension;
SelectedArchives = new List<Archive>();
InstallDirectives = new List<Directive>();
AllFiles = new List<RawSourceFile>();
ModList = new ModList();
VFS = VirtualFileSystem.VFS;
IndexedArchives = new List<IndexedArchive>();
IndexedFiles = new Dictionary<string, IEnumerable<VirtualFile>>();
}
public dynamic MO2Ini { get; }
public string GamePath { get; }
public bool ShowReportWhenFinished { get; set; } = true;

View File

@ -55,13 +55,6 @@ namespace Wabbajack.Lib
// TODO: add custom modlist name
ModListOutputFile = $"VORTEX_TEST_MODLIST{ExtensionManager.Extension}";
VFS = VirtualFileSystem.VFS;
SelectedArchives = new List<Archive>();
AllFiles = new List<RawSourceFile>();
IndexedArchives = new List<IndexedArchive>();
IndexedFiles = new Dictionary<string, IEnumerable<VirtualFile>>();
}
public override void Info(string msg)