Store map path in MapPreview.

This commit is contained in:
Paul Chote
2016-02-05 21:29:23 +00:00
parent 6628bc046f
commit d5e3fbf452
4 changed files with 7 additions and 4 deletions

View File

@@ -284,7 +284,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
string DeleteMap(string map)
{
var path = Game.ModData.MapCache[map].Map.Path;
var path = Game.ModData.MapCache[map].Path;
try
{
if (File.Exists(path))

View File

@@ -103,7 +103,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var missionMapPaths = kv.Value.Nodes.Select(n => Path.GetFullPath(n.Key)).ToList();
var maps = modData.MapCache
.Where(p => p.Status == MapStatus.Available && missionMapPaths.Contains(Path.GetFullPath(p.Map.Path)))
.Where(p => p.Status == MapStatus.Available && missionMapPaths.Contains(Path.GetFullPath(p.Path)))
.Select(p => p.Map)
.OrderBy(m => missionMapPaths.IndexOf(Path.GetFullPath(m.Path)));