Skip to content

Commit

Permalink
Merge #4154 Add mod support links to Help menu
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Aug 10, 2024
2 parents 9bbff6b + 4697c4d commit 5ae3f23
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ All notable changes to this project will be documented in this file.
- [Multiple] Recommendation suppression for modpacks (#4147 by: HebaruSan; reviewed: JonnyOThan)
- [GUI] Search by licenses (#4148 by: HebaruSan)
- [CLI] Make `ckan compat add` take multiple versions, add `clear` and `set` (#4151 by: HebaruSan)
- [GUI] Add mod support links to Help menu (#4154 by: HebaruSan)

### Bugfixes

Expand Down
1 change: 1 addition & 0 deletions Core/Games/IGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ public interface IGame
Uri DefaultRepositoryURL { get; }
Uri RepositoryListURL { get; }
Uri MetadataBugtrackerURL { get; }
Uri ModSupportURL { get; }
}
}
2 changes: 2 additions & 0 deletions Core/Games/KerbalSpaceProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ public GameVersion DetectVersion(DirectoryInfo where)

public Uri MetadataBugtrackerURL => new Uri("https://github.com/KSP-CKAN/NetKAN/issues/new/choose");

public Uri ModSupportURL => new Uri("https://forum.kerbalspaceprogram.com/forum/70-ksp1-technical-support-pc-modded-installs/");

private static string Missions(GameInstance inst)
=> CKANPathUtils.NormalizePath(Path.Combine(inst.GameDir(), "Missions"));

Expand Down
2 changes: 2 additions & 0 deletions Core/Games/KerbalSpaceProgram2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ private static GameVersion VersionFromExecutable(string exePath)

public Uri MetadataBugtrackerURL => new Uri("https://github.com/KSP-CKAN/KSP2-NetKAN/issues/new/choose");

public Uri ModSupportURL => new Uri("https://forum.kerbalspaceprogram.com/forum/137-ksp2-technical-support-pc-modded-installs/");

private const string DataDir = "KSP2_x64_Data";

// Key: Allowed value of install_to
Expand Down
12 changes: 11 additions & 1 deletion Core/HelpURLs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ namespace CKAN
/// </summary>
public static class HelpURLs
{
#region CKAN documentation

public const string UserGuide = "https://github.com/KSP-CKAN/CKAN/wiki/User-guide";
public const string ManageInstances = "https://github.com/KSP-CKAN/CKAN/wiki/User-guide#adding-game-folders";
public const string CompatibleGameVersions = "https://github.com/KSP-CKAN/CKAN/wiki/User-guide#choosing-compatible-game-versions";
Expand All @@ -23,6 +25,14 @@ public static class HelpURLs
public const string UnmanagedFiles = "https://github.com/KSP-CKAN/CKAN/pull/3833";
public const string InstallationHistory = "https://github.com/KSP-CKAN/CKAN/pull/3834";

public const string Discord = "https://discord.gg/Mb4nXQD";
#endregion

#region Support

// See IGame.ModSupportURL for in-game support links
public const string CKANDiscord = "https://discord.gg/Mb4nXQD";
public const string CKANIssues = "https://github.com/KSP-CKAN/CKAN/issues/new/choose";

#endregion
}
}
2 changes: 1 addition & 1 deletion GUI/Dialogs/PluginsDialog.resx
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,5 @@
<data name="ActivatePluginButton.Text" xml:space="preserve"><value>Activate</value></data>
<data name="AddNewPluginButton.Text" xml:space="preserve"><value>Add new...</value></data>
<data name="UnloadPluginButton.Text" xml:space="preserve"><value>Unload</value></data>
<data name="$this.Text" xml:space="preserve"><value>CKAN Plugins</value></data>
<data name="$this.Text" xml:space="preserve"><value>Plugins</value></data>
</root>
10 changes: 10 additions & 0 deletions GUI/Main/Main.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions GUI/Main/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -952,12 +952,17 @@ private void userGuideToolStripMenuItem_Click(object sender, EventArgs e)

private void discordToolStripMenuItem_Click(object sender, EventArgs e)
{
Utilities.ProcessStartURL(HelpURLs.Discord);
Utilities.ProcessStartURL(HelpURLs.CKANDiscord);
}

private void modSupportToolStripMenuItem_Click(object sender, EventArgs e)
{
Utilities.ProcessStartURL(Manager.CurrentInstance.game.ModSupportURL.ToString());
}

private void reportClientIssueToolStripMenuItem_Click(object sender, EventArgs e)
{
Utilities.ProcessStartURL("https://github.com/KSP-CKAN/CKAN/issues/new/choose");
Utilities.ProcessStartURL(HelpURLs.CKANIssues);
}

private void reportMetadataIssueToolStripMenuItem_Click(object sender, EventArgs e)
Expand Down
7 changes: 4 additions & 3 deletions GUI/Main/Main.resx
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,15 @@
<data name="ExitToolButton.Text" xml:space="preserve"><value>E&amp;xit</value></data>
<data name="settingsToolStripMenuItem.Text" xml:space="preserve"><value>&amp;Settings</value></data>
<data name="cKANSettingsToolStripMenuItem.Text" xml:space="preserve"><value>CKAN &amp;settings</value></data>
<data name="pluginsToolStripMenuItem.Text" xml:space="preserve"><value>CKAN &amp;plugins</value></data>
<data name="pluginsToolStripMenuItem.Text" xml:space="preserve"><value>&amp;Plugins</value></data>
<data name="preferredHostsToolStripMenuItem.Text" xml:space="preserve"><value>Preferred &amp;hosts</value></data>
<data name="installFiltersToolStripMenuItem.Text" xml:space="preserve"><value>Installation &amp;filters</value></data>
<data name="GameCommandlineToolStripMenuItem.Text" xml:space="preserve"><value>&amp;Game command lines</value></data>
<data name="compatibleGameVersionsToolStripMenuItem.Text" xml:space="preserve"><value>&amp;Compatible game versions</value></data>
<data name="helpToolStripMenuItem.Text" xml:space="preserve"><value>&amp;Help</value></data>
<data name="userGuideToolStripMenuItem.Text" xml:space="preserve"><value>&amp;User guide</value></data>
<data name="discordToolStripMenuItem.Text" xml:space="preserve"><value>&amp;Discord</value></data>
<data name="userGuideToolStripMenuItem.Text" xml:space="preserve"><value>CKAN &amp;user guide</value></data>
<data name="discordToolStripMenuItem.Text" xml:space="preserve"><value>CKAN &amp;Discord</value></data>
<data name="modSupportToolStripMenuItem.Text" xml:space="preserve"><value>Get help for an in-game problem with mods</value></data>
<data name="reportClientIssueToolStripMenuItem.Text" xml:space="preserve"><value>Report an issue with the CKAN &amp;client</value></data>
<data name="reportMetadataIssueToolStripMenuItem.Text" xml:space="preserve"><value>Report an issue with mod &amp;metadata</value></data>
<data name="aboutToolStripMenuItem.Text" xml:space="preserve"><value>&amp;About</value></data>
Expand Down

0 comments on commit 5ae3f23

Please sign in to comment.