mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Merge pull request #1340 from LostDragonist/gallery_alpha
Minor improvements to the gallery
This commit is contained in:
commit
5f53ecaab9
@ -36,14 +36,21 @@ namespace Wabbajack.Common
|
||||
[Description("Darkest Dungeon")]
|
||||
DarkestDungeon,
|
||||
Dishonored,
|
||||
[Description("Witcher 3")]
|
||||
Witcher3,
|
||||
[Description("Stardew Valley")]
|
||||
StardewValley,
|
||||
[Description("Kingdom Come: Deliverance")]
|
||||
KingdomComeDeliverance,
|
||||
[Description("MechWarrior 5: Mercenaries")]
|
||||
MechWarrior5Mercenaries,
|
||||
[Description("No Man's Sky")]
|
||||
NoMansSky,
|
||||
[Description("Dragon Age: Origins")]
|
||||
DragonAgeOrigins,
|
||||
[Description("Dragon Age 2")]
|
||||
DragonAge2,
|
||||
[Description("Dragon Age: Inquisition")]
|
||||
DragonAgeInquisition,
|
||||
[Description("Kerbal Space Program")]
|
||||
KerbalSpaceProgram,
|
||||
|
@ -92,7 +92,13 @@ namespace Wabbajack.Lib.ModListRegistry
|
||||
// ignored
|
||||
}
|
||||
|
||||
return metadata.OrderBy(m => (m.ValidationSummary?.HasFailures ?? false ? 1 : 0, m.Title)).ToList();
|
||||
var random = new Random();
|
||||
return metadata
|
||||
// Sort randomly initially, just to give each list a fair shake
|
||||
.Shuffle(random)
|
||||
// Put broken lists at bottom
|
||||
.OrderBy(m => (m.ValidationSummary?.HasFailures ?? false ? 1 : 0))
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public static async Task<List<ModlistMetadata>> LoadUnlistedFromGithub()
|
||||
|
@ -95,7 +95,6 @@ namespace Wabbajack
|
||||
})
|
||||
.DisposeWith(CompositeDisposable);
|
||||
|
||||
var random = new Random();
|
||||
var sourceList = Observable.Return(Unit.Default)
|
||||
.ObserveOn(RxApp.TaskpoolScheduler)
|
||||
.SelectTask(async _ =>
|
||||
@ -106,8 +105,6 @@ namespace Wabbajack
|
||||
var list = await ModlistMetadata.LoadFromGithub();
|
||||
Error = ErrorResponse.Success;
|
||||
return list
|
||||
// Sort randomly initially, just to give each list a fair shake
|
||||
.Shuffle(random)
|
||||
.AsObservableChangeSet(x => x.DownloadMetadata?.Hash ?? Hash.Empty);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -170,8 +167,6 @@ namespace Wabbajack
|
||||
return GameType == vm.Metadata.Game.GetDescription<Game>().ToString();
|
||||
|
||||
}))
|
||||
// Put broken lists at bottom
|
||||
.Sort(Comparer<ModListMetadataVM>.Create((a, b) => a.IsBroken.CompareTo(b.IsBroken)))
|
||||
.Bind(ModLists)
|
||||
.Subscribe()
|
||||
.DisposeWith(CompositeDisposable);
|
||||
@ -197,6 +192,7 @@ namespace Wabbajack
|
||||
{
|
||||
List<string> gameEntries = new List<string> { ALL_GAME_TYPE };
|
||||
gameEntries.AddRange(EnumExtensions.GetAllItems<Game>().Select(gameType => gameType.GetDescription<Game>()));
|
||||
gameEntries.Sort();
|
||||
return gameEntries;
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@
|
||||
VerticalAlignment="Center"
|
||||
Content="Game" />
|
||||
<ComboBox
|
||||
Width="130"
|
||||
Width="150"
|
||||
Margin="0,0,10,0"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{StaticResource ForegroundBrush}"
|
||||
|
Loading…
Reference in New Issue
Block a user