This commit is contained in:
Chris Forbes
2010-12-28 18:32:18 +13:00
parent cc2efdfa4a
commit cc6d445ef1

View File

@@ -42,7 +42,6 @@ namespace OpenRA
WidgetLoader = new WidgetLoader( this ); WidgetLoader = new WidgetLoader( this );
} }
// TODO: Do this nicer
IEnumerable<string> FindMapsIn(string dir) IEnumerable<string> FindMapsIn(string dir)
{ {
string[] NoMaps = { }; string[] NoMaps = { };
@@ -59,7 +58,8 @@ namespace OpenRA
var paths = new[] { "maps/" }.Concat(mods.Select(m => "mods/" + m + "/maps/")) var paths = new[] { "maps/" }.Concat(mods.Select(m => "mods/" + m + "/maps/"))
.SelectMany(p => FindMapsIn(p)); .SelectMany(p => FindMapsIn(p));
return paths.Select(p => new MapStub(new Folder(p, int.MaxValue))).ToDictionary(m => m.Uid); return paths.Select(p => new MapStub(new Folder(p, int.MaxValue)))
.ToDictionary(m => m.Uid);
} }
string cachedTileset = null; string cachedTileset = null;