/// <summary> /// Gets the path where mod files should be installed. /// </summary> /// <remarks> /// This method uses the given path to the installed game /// to determine the installaiton path for mods. /// </remarks> /// <returns>The path where mod files should be installed, or /// <c>null</c> if the path could be be determined.</returns> public string GetInstallationPath(string p_strGameInstallPath) { string strVersion = WoTGameMode.ReadVersion(p_strGameInstallPath); strVersion = (strVersion == null) ? "0.0.0.0" : strVersion; string strPath = Path.Combine(Path.Combine(p_strGameInstallPath, "res_mods"), strVersion.ToString()); return(strPath); }
/// <summary> /// Builds the game mode. /// </summary> /// <param name="p_futFileUtility">The file utility class to be used by the game mode.</param> /// <param name="p_imsWarning">The resultant warning resultant from the creation of the game mode. /// <c>null</c> if there are no warnings.</param> /// <returns>The game mode.</returns> public IGameMode BuildGameMode(FileUtil p_futFileUtility, out ViewMessage p_imsWarning) { if (EnvironmentInfo.Settings.CustomGameModeSettings[GameModeDescriptor.ModeId] == null) { EnvironmentInfo.Settings.CustomGameModeSettings[GameModeDescriptor.ModeId] = new PerGameModeSettings <object>(); } if (!EnvironmentInfo.Settings.CustomGameModeSettings[GameModeDescriptor.ModeId].ContainsKey("AskAboutReadOnlySettingsFiles")) { EnvironmentInfo.Settings.CustomGameModeSettings[GameModeDescriptor.ModeId]["AskAboutReadOnlySettingsFiles"] = true; EnvironmentInfo.Settings.CustomGameModeSettings[GameModeDescriptor.ModeId]["UnReadOnlySettingsFiles"] = true; EnvironmentInfo.Settings.Save(); } WoTGameMode gmdGameMode = InstantiateGameMode(p_futFileUtility); p_imsWarning = null; return(gmdGameMode); }