Esempio n. 1
0
 internal static bool IsOfficialDLCInstalled(ModJob.JobHeader header, GameTarget gameTarget)
 {
     if (header == ModJob.JobHeader.BALANCE_CHANGES)
     {
         return(true);                                            //Don't check balance changes
     }
     if (header == ModJob.JobHeader.ME2_RCWMOD)
     {
         return(true);                                       //Don't check
     }
     if (header == ModJob.JobHeader.ME1_CONFIG)
     {
         return(true);                                       //Don't check
     }
     if (header == ModJob.JobHeader.BASEGAME)
     {
         return(true);                                     //Don't check basegame
     }
     if (header == ModJob.JobHeader.CUSTOMDLC)
     {
         return(true);                                      //Don't check custom dlc
     }
     if (header == ModJob.JobHeader.LOCALIZATION)
     {
         return(true);                                         //Don't check localization
     }
     if (header == ModJob.JobHeader.TESTPATCH)
     {
         return(File.Exists(ME3Directory.GetTestPatchPath(gameTarget)));
     }
     else
     {
         return(MEDirectories.GetInstalledDLC(gameTarget).Contains(ModJob.GetHeadersToDLCNamesMap(gameTarget.Game)[header]));
     }
 }
Esempio n. 2
0
        public static string ASIPath(GameTarget target)
        {
            switch (target.Game)
            {
            case Mod.MEGame.ME1:
                return(ME1Directory.ASIPath(target));

            case Mod.MEGame.ME2:
                return(ME2Directory.ASIPath(target));

            case Mod.MEGame.ME3:
                return(ME3Directory.ASIPath(target));

            default:
                throw new ArgumentOutOfRangeException(nameof(target.Game), target.Game, null);
            }
        }
Esempio n. 3
0
        public static string CookedPath(Mod.MEGame game, string forcedPath = null)
        {
            switch (game)
            {
            case Mod.MEGame.ME1:
                return(forcedPath != null?ME1Directory.CookedPath(forcedPath) : ME1Directory.cookedPath);

            case Mod.MEGame.ME2:
                return(forcedPath != null?ME2Directory.CookedPath(forcedPath) : ME2Directory.cookedPath);

            case Mod.MEGame.ME3:
                return(forcedPath != null?ME3Directory.CookedPath(forcedPath) : ME3Directory.cookedPath);

            default:
                throw new ArgumentOutOfRangeException(nameof(game), game, null);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Gets path to executable for the specified Game Target
        /// </summary>
        /// <param name="game"></param>
        /// <returns></returns>
        public static string ExecutablePath(GameTarget game)
        {
            switch (game.Game)
            {
            case Mod.MEGame.ME1:
                return(ME1Directory.ExecutablePath(game.TargetPath));

            case Mod.MEGame.ME2:
                return(ME2Directory.ExecutablePath(game.TargetPath));

            case Mod.MEGame.ME3:
                return(ME3Directory.ExecutablePath(game.TargetPath));

            default:
                throw new ArgumentOutOfRangeException(nameof(game), game, null);
            }
        }
Esempio n. 5
0
 /// <summary>
 /// Refreshes the registry active paths for all three games
 /// </summary>
 public static void ReloadGamePaths()
 {
     ME1Directory.ReloadActivePath();
     ME2Directory.ReloadActivePath();
     ME3Directory.ReloadActivePath();
 }