Skip to content

Commit

Permalink
Remote: Format content types better
Browse files Browse the repository at this point in the history
  • Loading branch information
suchmememanyskill committed Jun 9, 2024
1 parent 1f5d322 commit 84819fa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
7 changes: 1 addition & 6 deletions RemoteDownloaderPlugin/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,7 @@ public List<Command> GetGameCommands(IGame game)

if (installedGame.IsEmu)
{
commands.Add(new());
commands.Add(new($"Base: {installedGame.InstalledContentTypes.Base}"));
commands.Add(new($"Update: {installedGame.InstalledContentTypes.Update}"));
commands.Add(new($"Dlc: {installedGame.InstalledContentTypes.Dlc}"));
commands.Add(new($"Extra: {installedGame.InstalledContentTypes.Extra}"));
commands.Add(new());
commands.Add(new Command(installedGame.InstalledContentTypes.ToString()));
}

commands.Add(new Command("Uninstall", () =>
Expand Down
9 changes: 9 additions & 0 deletions RemoteDownloaderPlugin/Store.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ public void Add(string type)
break;
}
}

public override string ToString()
=> "Content: " + string.Join(", ", new List<string>()
{
(Base > 0) ? $"{Base} Base" : "",
(Update > 0) ? $"{Update} Update" : "",
(Dlc > 0) ? $"{Dlc} Dlc" : "",
(Extra > 0) ? $"{Extra} Extra" : ""
}.Where(x => !string.IsNullOrEmpty(x)));
}

public class InstalledEmuGame : IInstalledGame
Expand Down

0 comments on commit 84819fa

Please sign in to comment.