Parse map rules and players from remote maps.

This commit is contained in:
Paul Chote
2016-03-27 13:11:37 +01:00
parent 81f22f8871
commit 65f7d46025
3 changed files with 47 additions and 12 deletions

View File

@@ -112,7 +112,7 @@ namespace OpenRA
}
}
public void QueryRemoteMapDetails(IEnumerable<string> uids)
public void QueryRemoteMapDetails(IEnumerable<string> uids, Action<MapPreview> mapDetailsReceived = null)
{
var maps = uids.Distinct()
.Select(uid => previews[uid])
@@ -144,7 +144,7 @@ namespace OpenRA
{
var yaml = MiniYaml.FromString(data);
foreach (var kv in yaml)
maps[kv.Key].UpdateRemoteSearch(MapStatus.DownloadAvailable, kv.Value);
maps[kv.Key].UpdateRemoteSearch(MapStatus.DownloadAvailable, kv.Value, mapDetailsReceived);
}
catch
{