Throw exception when installing if game has no actions defined
This commit is contained in:
parent
4ae2e273ff
commit
c32126f286
1 changed files with 3 additions and 0 deletions
|
@ -334,6 +334,9 @@ namespace LANCommander.PlaynitePlugin
|
||||||
|
|
||||||
game.Icon = $"{Settings.ServerAddress}{manifest.Icon}";
|
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))
|
foreach (var action in manifest.Actions.OrderBy(a => a.SortOrder))
|
||||||
{
|
{
|
||||||
bool isFirstAction = !manifest.Actions.Any(a => a.IsPrimaryAction) && manifest.Actions.First().Name == action.Name;
|
bool isFirstAction = !manifest.Actions.Any(a => a.IsPrimaryAction) && manifest.Actions.First().Name == action.Name;
|
||||||
|
|
Loading…
Add table
Reference in a new issue