mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Updated GOGHandler with new check for RequiredFiles
This commit is contained in:
parent
76db3cafea
commit
ed2a6c5592
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
|
|
||||||
@ -66,7 +67,9 @@ namespace Wabbajack.Common
|
|||||||
};
|
};
|
||||||
|
|
||||||
game.Game = GameRegistry.Games.Values
|
game.Game = GameRegistry.Games.Values
|
||||||
.FirstOrDefault(g => g.GOGIDs != null && g.GOGIDs.Contains(game.GameID))?.Game;
|
.FirstOrDefault(g => g.GOGIDs != null && g.GOGIDs.Contains(game.GameID)
|
||||||
|
&&
|
||||||
|
g.RequiredFiles.TrueForAll(s => File.Exists(Path.Combine(game.Path, s))))?.Game;
|
||||||
|
|
||||||
Games.Add(game);
|
Games.Add(game);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user