Unhardcode map installation directory.

This commit is contained in:
Paul Chote
2016-02-28 19:34:56 +00:00
parent be52c1cb72
commit 21d19e65a5

View File

@@ -272,8 +272,15 @@ namespace OpenRA
return;
Status = MapStatus.Downloading;
var mapInstallPackage = new Folder(Platform.ResolvePath("^", "maps", Game.ModData.Manifest.Mod.Id));
var installLocation = cache.MapLocations.FirstOrDefault(p => p.Value == MapClassification.User);
if (installLocation.Key == null || !(installLocation.Key is IReadWritePackage))
{
Log.Write("debug", "Map install directory not found");
Status = MapStatus.DownloadError;
return;
}
var mapInstallPackage = installLocation.Key as IReadWritePackage;
var modData = Game.ModData;
new Thread(() =>
{