Add dragons dogma, update the UI to match 2.5's unofficial list interface

This commit is contained in:
Timothy Baldridge 2022-05-15 14:17:36 -06:00
parent fc060a365a
commit f00ace3b66
5 changed files with 34 additions and 16 deletions

View File

@ -40,7 +40,7 @@ namespace Wabbajack
[Reactive] public bool ShowNSFW { get; set; } [Reactive] public bool ShowNSFW { get; set; }
[Reactive] public bool ShowUtilityLists { get; set; } [Reactive] public bool ShowUnofficialLists { get; set; }
[Reactive] public string GameType { get; set; } [Reactive] public string GameType { get; set; }
@ -71,7 +71,7 @@ namespace Wabbajack
{ {
OnlyInstalled = false; OnlyInstalled = false;
ShowNSFW = false; ShowNSFW = false;
ShowUtilityLists = false; ShowUnofficialLists = false;
Search = string.Empty; Search = string.Empty;
GameType = ALL_GAME_TYPE; GameType = ALL_GAME_TYPE;
}); });
@ -110,14 +110,14 @@ namespace Wabbajack
}) })
.StartWith(_ => true); .StartWith(_ => true);
var onlyUtilityListsFilter = this.ObservableForProperty(vm => vm.ShowUtilityLists) var showUnofficial = this.ObservableForProperty(vm => vm.ShowUnofficialLists)
.Select(v => v.Value) .Select(v => v.Value)
.Select<bool, Func<ModListMetadataVM, bool>>(utility => .StartWith(false)
.Select<bool, Func<ModListMetadataVM, bool>>(unoffical =>
{ {
if (utility == false) return item => item.Metadata.UtilityList == false; if (unoffical) return x => true;
return item => item.Metadata.UtilityList; return x => x.Metadata.Official;
}) });
.StartWith(item => item.Metadata.UtilityList == false);
var showNSFWFilter = this.ObservableForProperty(vm => vm.ShowNSFW) var showNSFWFilter = this.ObservableForProperty(vm => vm.ShowNSFW)
.Select(v => v.Value) .Select(v => v.Value)
@ -137,7 +137,7 @@ namespace Wabbajack
.ObserveOn(RxApp.MainThreadScheduler) .ObserveOn(RxApp.MainThreadScheduler)
.Filter(searchTextPredicates) .Filter(searchTextPredicates)
.Filter(onlyInstalledGamesFilter) .Filter(onlyInstalledGamesFilter)
.Filter(onlyUtilityListsFilter) .Filter(showUnofficial)
.Filter(showNSFWFilter) .Filter(showNSFWFilter)
.Filter(gameFilter) .Filter(gameFilter)
.Bind(out _filteredModLists) .Bind(out _filteredModLists)
@ -150,7 +150,7 @@ namespace Wabbajack
{ {
public string GameType { get; set; } public string GameType { get; set; }
public bool ShowNSFW { get; set; } public bool ShowNSFW { get; set; }
public bool ShowUtilityLists { get; set; } public bool ShowUnofficialLists { get; set; }
public bool OnlyInstalled { get; set; } public bool OnlyInstalled { get; set; }
public string Search { get; set; } public string Search { get; set; }
} }
@ -166,7 +166,7 @@ namespace Wabbajack
{ {
GameType = GameType, GameType = GameType,
ShowNSFW = ShowNSFW, ShowNSFW = ShowNSFW,
ShowUtilityLists = ShowUtilityLists, ShowUnofficialLists = ShowUnofficialLists,
Search = Search, Search = Search,
OnlyInstalled = OnlyInstalled, OnlyInstalled = OnlyInstalled,
}); });
@ -180,7 +180,7 @@ namespace Wabbajack
{ {
GameType = s.GameType; GameType = s.GameType;
ShowNSFW = s.ShowNSFW; ShowNSFW = s.ShowNSFW;
ShowUtilityLists = s.ShowUtilityLists; ShowUnofficialLists = s.ShowUnofficialLists;
Search = s.Search; Search = s.Search;
OnlyInstalled = s.OnlyInstalled; OnlyInstalled = s.OnlyInstalled;
return Disposable.Empty; return Disposable.Empty;

View File

@ -118,10 +118,10 @@
Foreground="{StaticResource ForegroundBrush}" /> Foreground="{StaticResource ForegroundBrush}" />
<CheckBox <CheckBox
x:Name="ShowUtilityLists" x:Name="ShowUnofficialLists"
Margin="10,0,10,0" Margin="10,0,10,0"
VerticalAlignment="Center" VerticalAlignment="Center"
Content="Only Utility Lists" Content="Show Unofficial Lists"
Foreground="{StaticResource ForegroundBrush}" /> Foreground="{StaticResource ForegroundBrush}" />
<CheckBox <CheckBox

View File

@ -49,7 +49,7 @@ namespace Wabbajack
.DisposeWith(dispose); .DisposeWith(dispose);
this.BindStrict(ViewModel, vm => vm.ShowNSFW, x => x.ShowNSFW.IsChecked) this.BindStrict(ViewModel, vm => vm.ShowNSFW, x => x.ShowNSFW.IsChecked)
.DisposeWith(dispose); .DisposeWith(dispose);
this.BindStrict(ViewModel, vm => vm.ShowUtilityLists, x => x.ShowUtilityLists.IsChecked) this.BindStrict(ViewModel, vm => vm.ShowUnofficialLists, x => x.ShowUnofficialLists.IsChecked)
.DisposeWith(dispose); .DisposeWith(dispose);
this.WhenAny(x => x.ViewModel.ClearFiltersCommand) this.WhenAny(x => x.ViewModel.ClearFiltersCommand)

View File

@ -43,5 +43,6 @@ public enum Game
[Description("Terraria")] Terraria, [Description("Terraria")] Terraria,
[Description("Cyberpunk 2077")] Cyberpunk2077, [Description("Cyberpunk 2077")] Cyberpunk2077,
[Description("The Sims 4")] Sims4 [Description("The Sims 4")] Sims4,
[Description("Dragons Dogma Dark Arisen")] DragonsDogma
} }

View File

@ -432,6 +432,23 @@ public static class GameRegistry
}, },
MainExecutable = @"Game\Bin\TS4_x64.exe".ToRelativePath() MainExecutable = @"Game\Bin\TS4_x64.exe".ToRelativePath()
} }
},
{
Game.DragonsDogma, new GameMetaData
{
Game = Game.DragonsDogma,
SteamIDs = new[] {367500 },
MO2Name = "Dragon's Dogma: Dark Arisen",
NexusName = "dragonsdogma",
NexusGameId = 1249,
IsGenericMO2Plugin = true,
RequiredFiles = new []
{
@"DDDA.exe".ToRelativePath()
},
MainExecutable = @"DDDA.exe".ToRelativePath()
}
} }
}; };