Removed texture pack extraction from launcher

This commit is contained in:
William Moorehouse 2015-06-16 21:37:00 -04:00 committed by Drew DeVault
parent 20dbaa087a
commit 0159b1ba05
2 changed files with 14 additions and 8 deletions

View File

@ -19,7 +19,17 @@ namespace TrueCraft.Core
/// </summary>
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>
///

View File

@ -60,17 +60,13 @@ namespace TrueCraft.Launcher.Views
{
var texturePack = _texturePacks[TexturePackListView.SelectedRow];
if (_lastTexturePack != texturePack)
{
// TODO: Enforce a file structure so only certain named files are extracted.
texturePack.ExtractTo("Content");
_lastTexturePack = texturePack;
}
UserSettings.Local.SelectedTexturePack = texturePack.Path;
};
OpenFolderButton.Clicked += (sender, e) =>
{
// TODO: Implement cross-platform logic here.
var dir = new DirectoryInfo("./Content/TexturePacks");
var dir = new DirectoryInfo(TexturePack.TexturePackPath);
Process.Start(dir.FullName);
};
@ -91,7 +87,7 @@ namespace TrueCraft.Launcher.Views
private void LoadTexturePacks()
{
var zips = Directory.EnumerateFiles("Content/TexturePacks/");
var zips = Directory.EnumerateFiles(TexturePack.TexturePackPath);
foreach (var zip in zips)
{
var texturePack = new TexturePack(zip);