Removed texture pack extraction from launcher
This commit is contained in:
parent
20dbaa087a
commit
0159b1ba05
@ -19,7 +19,17 @@ namespace TrueCraft.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const string ImageFile = "pack.png";
|
public const string ImageFile = "pack.png";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public static string TexturePackPath
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
||||||
|
".truecraft/texturepacks/");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
@ -60,17 +60,13 @@ namespace TrueCraft.Launcher.Views
|
|||||||
{
|
{
|
||||||
var texturePack = _texturePacks[TexturePackListView.SelectedRow];
|
var texturePack = _texturePacks[TexturePackListView.SelectedRow];
|
||||||
if (_lastTexturePack != texturePack)
|
if (_lastTexturePack != texturePack)
|
||||||
{
|
UserSettings.Local.SelectedTexturePack = texturePack.Path;
|
||||||
// TODO: Enforce a file structure so only certain named files are extracted.
|
|
||||||
texturePack.ExtractTo("Content");
|
|
||||||
_lastTexturePack = texturePack;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
OpenFolderButton.Clicked += (sender, e) =>
|
OpenFolderButton.Clicked += (sender, e) =>
|
||||||
{
|
{
|
||||||
// TODO: Implement cross-platform logic here.
|
// TODO: Implement cross-platform logic here.
|
||||||
var dir = new DirectoryInfo("./Content/TexturePacks");
|
var dir = new DirectoryInfo(TexturePack.TexturePackPath);
|
||||||
Process.Start(dir.FullName);
|
Process.Start(dir.FullName);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -91,7 +87,7 @@ namespace TrueCraft.Launcher.Views
|
|||||||
|
|
||||||
private void LoadTexturePacks()
|
private void LoadTexturePacks()
|
||||||
{
|
{
|
||||||
var zips = Directory.EnumerateFiles("Content/TexturePacks/");
|
var zips = Directory.EnumerateFiles(TexturePack.TexturePackPath);
|
||||||
foreach (var zip in zips)
|
foreach (var zip in zips)
|
||||||
{
|
{
|
||||||
var texturePack = new TexturePack(zip);
|
var texturePack = new TexturePack(zip);
|
||||||
|
Reference in New Issue
Block a user