логи
This commit is contained in:
@@ -22,11 +22,11 @@ public class GameVersionProps
|
||||
Name = name;
|
||||
LocalDescriptorPath = descriptorPath;
|
||||
RemoteDescriptorUrl = url;
|
||||
IsDownloaded = File.Exists(Пролетариат.GetVersionJarFilePath(name));
|
||||
IsDownloaded = File.Exists(Пути.GetVersionJarFilePath(name));
|
||||
}
|
||||
|
||||
public GameVersionProps(string name, string? url) :
|
||||
this(name, url, Пролетариат.GetVersionDescriptorPath(name)) { }
|
||||
this(name, url, Пути.GetVersionDescriptorPath(name)) { }
|
||||
|
||||
public override string ToString() => Name;
|
||||
}
|
||||
|
||||
@@ -1,27 +1,6 @@
|
||||
using Млаумчерб.Клиент.видимое;
|
||||
|
||||
namespace Млаумчерб.Клиент.классы;
|
||||
namespace Млаумчерб.Клиент.классы;
|
||||
|
||||
public static class Пролетариат
|
||||
{
|
||||
public static IOPath GetAssetIndexFilePath(string id) =>
|
||||
Path.Concat(Главне.Настройки.путь_к_кубачу, $"assets/indexes/{id}.json");
|
||||
|
||||
public static IOPath GetVersionDescriptorDir() =>
|
||||
Path.Concat(Главне.Настройки.путь_к_кубачу, "version_descriptors");
|
||||
|
||||
public static string GetVersionDescriptorName(IOPath path) =>
|
||||
path.LastName().RemoveExtension().ToString();
|
||||
|
||||
public static IOPath GetVersionDescriptorPath(string name) =>
|
||||
Path.Concat(GetVersionDescriptorDir(), Path.ReplaceRestrictedChars(name) + ".json");
|
||||
|
||||
public static IOPath GetVersionDir() =>
|
||||
Path.Concat(Главне.Настройки.путь_к_кубачу, "versions");
|
||||
|
||||
public static IOPath GetVersionJarFilePath(string name) =>
|
||||
Path.Concat(GetVersionDir(), name + ".jar");
|
||||
|
||||
public static IOPath GetLibrariesDir() =>
|
||||
Path.Concat(Главне.Настройки.путь_к_кубачу, "libraries");
|
||||
}
|
||||
}
|
||||
27
Млаумчерб.Клиент/классы/Пути.cs
Normal file
27
Млаумчерб.Клиент/классы/Пути.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Млаумчерб.Клиент.видимое;
|
||||
|
||||
namespace Млаумчерб.Клиент.классы;
|
||||
|
||||
public static class Пути
|
||||
{
|
||||
public static IOPath GetAssetIndexFilePath(string id) =>
|
||||
Path.Concat(Приложение.Настройки.путь_к_кубачу, $"assets/indexes/{id}.json");
|
||||
|
||||
public static IOPath GetVersionDescriptorDir() =>
|
||||
Path.Concat(Приложение.Настройки.путь_к_кубачу, "version_descriptors");
|
||||
|
||||
public static string GetVersionDescriptorName(IOPath path) =>
|
||||
path.LastName().RemoveExtension().ToString();
|
||||
|
||||
public static IOPath GetVersionDescriptorPath(string name) =>
|
||||
Path.Concat(GetVersionDescriptorDir(), Path.ReplaceRestrictedChars(name) + ".json");
|
||||
|
||||
public static IOPath GetVersionDir() =>
|
||||
Path.Concat(Приложение.Настройки.путь_к_кубачу, "versions");
|
||||
|
||||
public static IOPath GetVersionJarFilePath(string name) =>
|
||||
Path.Concat(GetVersionDir(), name + ".jar");
|
||||
|
||||
public static IOPath GetLibrariesDir() =>
|
||||
Path.Concat(Приложение.Настройки.путь_к_кубачу, "libraries");
|
||||
}
|
||||
Reference in New Issue
Block a user