Show the server map pool in the client map chooser.
Maps that aren't installed are queried from the resource center.
This commit is contained in:
@@ -236,7 +236,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
var onSelect = new Action<string>(uid =>
|
||||
{
|
||||
// Don't select the same map again, and handle map becoming unavailable
|
||||
if (uid == map.Uid || modData.MapCache[uid].Status != MapStatus.Available)
|
||||
var status = modData.MapCache[uid].Status;
|
||||
if (uid == map.Uid || (status != MapStatus.Available && status != MapStatus.DownloadAvailable))
|
||||
return;
|
||||
|
||||
orderManager.IssueOrder(Order.Command("map " + uid));
|
||||
@@ -250,6 +251,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
Ui.OpenWindow("MAPCHOOSER_PANEL", new WidgetArgs()
|
||||
{
|
||||
{ "initialMap", modData.MapCache.PickLastModifiedMap(MapVisibility.Lobby) ?? map.Uid },
|
||||
{ "remoteMapPool", orderManager.ServerMapPool },
|
||||
{ "initialTab", MapClassification.System },
|
||||
{ "onExit", modData.MapCache.UpdateMaps },
|
||||
{ "onSelect", Game.IsHost ? onSelect : null },
|
||||
|
||||
Reference in New Issue
Block a user