Skip to content

Commit

Permalink
Multi-game for metadata bug report links
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Dec 11, 2023
1 parent aa2106a commit 01d5177
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Core/Games/IGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public interface IGame
string[] BuildIDFiles { get; }

// How to get metadata
Uri DefaultRepositoryURL { get; }
Uri RepositoryListURL { get; }
Uri DefaultRepositoryURL { get; }
Uri RepositoryListURL { get; }
Uri MetadataBugtrackerURL { get; }
}
}
2 changes: 2 additions & 0 deletions Core/Games/KerbalSpaceProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ public GameVersion DetectVersion(DirectoryInfo where)

public Uri RepositoryListURL => new Uri("https://raw.githubusercontent.com/KSP-CKAN/CKAN-meta/master/repositories.json");

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

private 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 @@ -218,6 +218,8 @@ private GameVersion VersionFromFile(string path)

public Uri RepositoryListURL => new Uri("https://raw.githubusercontent.com/KSP-CKAN/KSP2-CKAN-meta/main/repositories.json");

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

// Key: Allowed value of install_to
// Value: Relative path
// (PrimaryModDirectoryRelative is allowed implicitly)
Expand Down
2 changes: 1 addition & 1 deletion GUI/Main/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ private void reportClientIssueToolStripMenuItem_Click(object sender, EventArgs e

private void reportMetadataIssueToolStripMenuItem_Click(object sender, EventArgs e)
{
Utilities.ProcessStartURL("https://github.com/KSP-CKAN/NetKAN/issues/new/choose");
Utilities.ProcessStartURL(Manager.CurrentInstance.game.MetadataBugtrackerURL.ToString());
}

private void Main_Resize(object sender, EventArgs e)
Expand Down

0 comments on commit 01d5177

Please sign in to comment.