-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74b5ea5
commit 72be0cd
Showing
11 changed files
with
183 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 25 additions & 4 deletions
29
MinecraftLaunch/Components/Authenticator/UnifiedPassAuthenticator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
MinecraftLaunch/Components/Resolver/CurseforgeModpacksResolver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace MinecraftLaunch.Components.Resolver; | ||
|
||
public sealed class CurseforgeModpacksResolver { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,51 @@ | ||
using MinecraftLaunch.Classes.Models.Game; | ||
|
||
namespace MinecraftLaunch.Extensions { | ||
public static class GameEntryExtension { | ||
public static string OfLauncherProfilePath(this string root) => | ||
Path.Combine(root, "launcher_profiles.json"); | ||
|
||
public static string OfLauncherAccountPath(this string root) => | ||
Path.Combine(root, "launcher_accounts.json"); | ||
|
||
public static string OfVersionJsonPath(this GameEntry entry) => | ||
Path.Combine(entry.GameFolderPath, "versions", entry.Id, $"{entry.Id}.json"); | ||
namespace MinecraftLaunch.Extensions; | ||
|
||
public static string OfVersionDirectoryPath(this GameEntry entry, bool Isolate = true) => Isolate | ||
? Path.Combine(entry.GameFolderPath, "versions", entry.Id) | ||
: entry.GameFolderPath; | ||
/// <summary> | ||
/// Provides extension methods for game entries. | ||
/// </summary> | ||
public static class GameEntryExtension { | ||
/// <summary> | ||
/// Gets the path of the launcher profile. | ||
/// </summary> | ||
/// <param name="root">The root directory.</param> | ||
/// <returns>The path of the launcher profile.</returns> | ||
public static string OfLauncherProfilePath(this string root) => | ||
Path.Combine(root, "launcher_profiles.json"); | ||
|
||
public static string OfModDirectorypath(this GameEntry entry, bool Isolate = true) => Path | ||
.Combine(entry.OfVersionDirectoryPath(Isolate), "mods"); | ||
} | ||
} | ||
/// <summary> | ||
/// Gets the path of the launcher account. | ||
/// </summary> | ||
/// <param name="root">The root directory.</param> | ||
/// <returns>The path of the launcher account.</returns> | ||
public static string OfLauncherAccountPath(this string root) => | ||
Path.Combine(root, "launcher_accounts.json"); | ||
|
||
/// <summary> | ||
/// Gets the path of the version JSON file. | ||
/// </summary> | ||
/// <param name="entry">The game entry.</param> | ||
/// <returns>The path of the version JSON file.</returns> | ||
public static string OfVersionJsonPath(this GameEntry entry) => | ||
Path.Combine(entry.GameFolderPath, "versions", entry.Id, $"{entry.Id}.json"); | ||
|
||
/// <summary> | ||
/// Gets the path of the version directory. | ||
/// </summary> | ||
/// <param name="entry">The game entry.</param> | ||
/// <param name="Isolate">A value indicating whether to isolate the version directory.</param> | ||
/// <returns>The path of the version directory.</returns> | ||
public static string OfVersionDirectoryPath(this GameEntry entry, bool Isolate = true) => Isolate | ||
? Path.Combine(entry.GameFolderPath, "versions", entry.Id) | ||
: entry.GameFolderPath; | ||
|
||
/// <summary> | ||
/// Gets the path of the mod directory. | ||
/// </summary> | ||
/// <param name="entry">The game entry.</param> | ||
/// <param name="Isolate">A value indicating whether to isolate the mod directory.</param> | ||
/// <returns>The path of the mod directory.</returns> | ||
public static string OfModDirectorypath(this GameEntry entry, bool Isolate = true) => Path | ||
.Combine(entry.OfVersionDirectoryPath(Isolate), "mods"); | ||
} |
Oops, something went wrong.