From 6521e16a1ea126b57443d788156d42eb83702646 Mon Sep 17 00:00:00 2001 From: RattleSN4K3 Date: Sun, 18 May 2025 20:14:25 +0200 Subject: [PATCH] Ability to set base game to standalone mods/expansions as well --- LANCommander.Server/UI/Pages/Games/Edit/General.razor | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/LANCommander.Server/UI/Pages/Games/Edit/General.razor b/LANCommander.Server/UI/Pages/Games/Edit/General.razor index 7be16f3c..7375a206 100644 --- a/LANCommander.Server/UI/Pages/Games/Edit/General.razor +++ b/LANCommander.Server/UI/Pages/Games/Edit/General.razor @@ -185,6 +185,8 @@ private async Task LoadData() { + var allowedTypes = new[] { GameType.MainGame, GameType.StandaloneExpansion, GameType.StandaloneMod }; + Engines = await EngineService.SortBy(g => g.Name).GetAsync(); Companies = await CompanyService.SortBy(g => g.Name).GetAsync(); Genres = await GenreService.SortBy(g => g.Name).GetAsync(); @@ -193,7 +195,8 @@ Collections = await CollectionService.SortBy(g => g.Name).GetAsync(); Games = (await GameService .Include(g => g.Media.Where(m => m.Type == MediaType.Icon)) - .GetAsync(g => g.Type == GameType.MainGame)).OrderByTitle(g => String.IsNullOrWhiteSpace(g.SortTitle) ? g.Title : g.SortTitle); + .GetAsync(g => allowedTypes.Contains(g.Type))) + .OrderByTitle(g => String.IsNullOrWhiteSpace(g.SortTitle) ? g.Title : g.SortTitle); Redistributables = (await RedistributableService.GetAsync()).OrderByTitle(r => r.Name); Loaded = true;