Throw exception when installing if game has no actions defined

pull/19/head
Pat Hartl 2023-03-15 17:44:01 -05:00
parent 4ae2e273ff
commit c32126f286
1 changed files with 3 additions and 0 deletions

View File

@ -334,6 +334,9 @@ namespace LANCommander.PlaynitePlugin
game.Icon = $"{Settings.ServerAddress}{manifest.Icon}";
if (manifest.Actions == null)
throw new Exception("The game has no actions defined.");
foreach (var action in manifest.Actions.OrderBy(a => a.SortOrder))
{
bool isFirstAction = !manifest.Actions.Any(a => a.IsPrimaryAction) && manifest.Actions.First().Name == action.Name;