InstalledGameVersionCatalog

This commit is contained in:
2024-12-31 17:55:30 +05:00
parent 2c780afea8
commit e5deb3f3d4
24 changed files with 477 additions and 341 deletions

View File

@@ -60,4 +60,9 @@ public static class PathHelper
public static IOPath GetModpackManifestPath(string game_version) =>
Path.Concat(GetVersionDir(game_version), "timerix_modpack_files.json");
public static IOPath GetCacheDir() =>
Path.Concat(GetRootFullPath(), "cache");
public static IOPath GetInstalledVersionCatalogPath() =>
Path.Concat(GetCacheDir(), "installed_versions.json");
}

View File

@@ -0,0 +1,12 @@
namespace Mlaumcherb.Client.Avalonia.холопы;
// compares Y with X instead of X with Y
public class ReverseComparer<T> : IComparer<T> where T : IComparable<T>
{
public int Compare(T? x, T? y)
{
if (y is null)
return x is null ? 0 : -1;
return y.CompareTo(x);
}
}