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(GetTestPatchSFARPath(gameTarget))); } else { return(M3Directories.GetInstalledDLC(gameTarget).Contains(ModJob.GetHeadersToDLCNamesMap(gameTarget.Game)[header])); } }
public static Dictionary <string, int> GetMountPriorities(GameTarget selectedTarget) { //make dictionary from basegame files var dlcmods = VanillaDatabaseService.GetInstalledDLCMods(selectedTarget); var mountMapping = new Dictionary <string, int>(); foreach (var dlc in dlcmods) { var mountpath = Path.Combine(M3Directories.GetDLCPath(selectedTarget), dlc); try { mountMapping[dlc] = MELoadedFiles.GetMountPriority(mountpath, selectedTarget.Game); } catch (Exception e) { Log.Error($@"Exception getting mount priority from file: {mountpath}: {e.Message}"); } } return(mountMapping); }