Skip to content

Commit

Permalink
don't show disabled addons in downloadable list
Browse files Browse the repository at this point in the history
  • Loading branch information
fgsfds committed Jun 11, 2024
1 parent 3025d7e commit 9a5067f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Mods/Providers/DownloadableAddonsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ public async Task CreateCacheAsync()

var addons = await _apiInterface.GetAddonsAsync(_game.GameEnum).ConfigureAwait(false);

if (addons is null || addons.Count == 0)
if (addons is null || addons.Count == 0)
{
_semaphore.Release();
return;
}

_cache = [];

addons = [.. addons.OrderBy(a => a.Title).OrderBy(a => a.Version)];
addons = [.. addons.Where(a => !a.IsDisabled).OrderBy(a => a.Title).OrderBy(a => a.Version)];

foreach (var addon in addons)
{
Expand Down
3 changes: 1 addition & 2 deletions src/Ports/Ports/EDuke32/EDuke32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ protected override void BeforeStart(IGame game, IAddon campaign)
/// <inheritdoc/>
protected override void GetStartCampaignArgs(StringBuilder sb, IGame game, IAddon addon)
{
//don't search for steam/gog installs
sb.Append($@" -usecwd");
sb.Append($@" -usecwd"); //don't search for steam/gog installs
sb.Append($@" -cachesize 262144"); //set cache to 256MiB

if (addon.MainDef is not null)
Expand Down

0 comments on commit 9a5067f

Please sign in to comment.