Exemplo n.º 1
0
        public static IEnumerable <string> GetDLCFiles(MEGame game, string dlcName)
        {
            var dlcPath = MEDirectories.GetDLCPath(game);

            if (dlcPath != null)
            {
                string specificDlcPath = Path.Combine(dlcPath, dlcName);
                if (Directory.Exists(specificDlcPath))
                {
                    return(GetCookedFiles(game, specificDlcPath));
                }
            }

            return(Enumerable.Empty <string>());
        }
Exemplo n.º 2
0
 public static IEnumerable <string> GetOfficialDLCFolders(MEGame game) =>
 Directory.Exists(MEDirectories.GetDLCPath(game))
         ? Directory.EnumerateDirectories(MEDirectories.GetDLCPath(game)).Where(dir => IsOfficialDLC(dir, game))
         : Enumerable.Empty <string>();
Exemplo n.º 3
0
        // These methods should check DLCPath to avoid throwing exception

        /// <summary>
        /// Gets the base DLC directory of each unpacked DLC/mod that will load in game (eg. C:\Program Files (x86)\Origin Games\Mass Effect 3\BIOGame\DLC\DLC_EXP_Pack001)
        /// Directory Override is used to use a custom path, for things like TFC Compactor, where the directory ME3Exp is pointing to may not be the one you want to use.
        /// </summary>
        /// <returns></returns>
        public static IEnumerable <string> GetEnabledDLCFolders(MEGame game, string gameDirectoryOverride = null) =>
        Directory.Exists(MEDirectories.GetDLCPath(game, gameDirectoryOverride))
                ? Directory.EnumerateDirectories(MEDirectories.GetDLCPath(game, gameDirectoryOverride)).Where(dir => IsEnabledDLC(dir, game))
                : Enumerable.Empty <string>();