/// <summary> /// Gets the list of BSA files in the Fallout INI file. /// </summary> /// <param name="p_booInsertAI">Whether to insert the AI BSA into the returned list.</param> /// <returns>The list of BSA files in the Fallout INI file.</returns> private string GetBSAList(bool p_booInsertAI) { string strFalloutIniPath = GameMode.SettingsFiles.IniPath; List <string> bsas = new List <string>(IniMethods.GetPrivateProfileString("Archive", "SArchiveList", null, strFalloutIniPath).Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)); List <string> lstNewBSAs = new List <string>(); for (int i = 0; i < bsas.Count; i++) { bsas[i] = bsas[i].Trim(' '); if (bsas[i] == OLD_AI_BSA) { continue; } if (bsas[i].Contains("Misc")) { lstNewBSAs.Insert(0, bsas[i]); } else if (bsas[i] != AI_BSA) { lstNewBSAs.Add(bsas[i]); } } if (p_booInsertAI) { lstNewBSAs.Insert(0, AI_BSA); } return(string.Join(", ", lstNewBSAs.ToArray())); }
/// <summary> /// Gets the list of BSA files in the INI file. /// </summary> /// <returns>The list of BSA files in the INI file.</returns> private List <string> GetBSAList() { string strIniPath = ((OblivionGameMode)GameMode).SettingsFiles.IniPath; List <string> lstBsas = new List <string>(IniMethods.GetPrivateProfileString("Archive", "SArchiveList", null, strIniPath).Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)); for (int i = 0; i < lstBsas.Count; i++) { lstBsas[i] = lstBsas[i].Trim(' '); } return(lstBsas); }
/// <summary> /// Gets whether AI is enabled. /// </summary> /// <returns><c>true</c> if AI is enabled; /// <c>false</c> otherwise.</returns> public override bool IsActive() { string strFalloutIniPath = GameMode.SettingsFiles.IniPath; if (!File.Exists(strFalloutIniPath)) { return(false); } List <string> bsas = new List <string>((IniMethods.GetPrivateProfileString("Archive", "SArchiveList", null, strFalloutIniPath) ?? "").Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)); Int32 intInvalidate = IniMethods.GetPrivateProfileInt32("Archive", "bInvalidateOlderFiles", 0, strFalloutIniPath); return(bsas.Contains(AI_BSA) || (intInvalidate != 0)); }
/// <summary> /// Gets the list of BSA files in the Fallout INI file. /// </summary> /// <returns>he list of BSA files in the Fallout INI file.</returns> private string GetBSAList() { string strFalloutIniPath = GameMode.SettingsFiles.IniPath; List <string> bsas = new List <string>(IniMethods.GetPrivateProfileString("Archive", "SArchiveList", null, strFalloutIniPath).Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)); for (int i = 0; i < bsas.Count; i++) { bsas[i] = bsas[i].Trim(' '); if (bsas[i] == AI_BSA) { bsas.RemoveAt(i--); } } return(string.Join(", ", bsas.ToArray())); }