/// <summary> /// This initializes the game mode. /// </summary> /// <remarks> /// This gets the user to specify the directories where the programme will store info /// such as install logs, if the directories have not already been setup. /// This method also checks for DLCs, and cleans up any missing FOMods. /// </remarks> /// <returns> /// <lang langref="true" /> if the game mode was able to initialize; /// <lang langref="false" /> otherwise. /// </returns> public override bool Init() { if (!Properties.Settings.Default.falloutNewVegasDoneSetup) { var sfmSetup = new SetupForm(); if (sfmSetup.ShowDialog() == DialogResult.Cancel) { return(false); } Properties.Settings.Default.falloutNewVegasDoneSetup = true; Properties.Settings.Default.Save(); } ((SettingsFilesSet)SettingsFiles).FODefaultIniPath = Path.Combine(PluginsPath, @"..\fallout_default.ini"); if (File.Exists("FNVEdit.exe")) { Tools.Add(new Command <MainForm>("FNVEdit", "Launches FNVEdit, if it is installed.", LaunchFNVEdit)); } Tools.Add(new CheckedCommand <MainForm>("Archive Invalidation", "Toggles Archive Invalidation.", ArchiveInvalidation.IsActive(), ToggleArchiveInvalidation)); if (!File.Exists(((SettingsFilesSet)SettingsFiles).FOIniPath)) { MessageBox.Show( "You have no Fallout INI file. Please run Fallout: New Vegas to initialize the file before installing any mods or turning on Archive Invalidation.", "Missing INI", MessageBoxButtons.OK, MessageBoxIcon.Information); } ScanForReadonlyPlugins(); ScanForReadonlyFiles(); return(true); }
/// <summary> /// Initializes the game tools. /// </summary> protected void SetupTools() { m_lstTools.Clear(); ArchiveInvalidation aitAI = new ArchiveInvalidation((SkyrimGameMode)GameMode); aitAI.SetToolView(new ArchiveInvalidationView(aitAI)); m_lstTools.Add(aitAI); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_aitArchiveInvalidation">The <see cref="ArchiveInvalidation"/> tool /// for which we are presenting a UI.</param> public ArchiveInvalidationView(ArchiveInvalidation p_aitArchiveInvalidation) { p_aitArchiveInvalidation.ConfirmAiReset = ConfirmAiReset; }
/// <summary> /// Determines if archive invalidation is active. /// </summary> /// <returns> /// <lang langref="true" /> if archive invalidation is active; /// <lang langref="false" /> otherwise. /// </returns> public virtual bool IsAIActive() { return(ArchiveInvalidation.IsActive()); }