Add Server.MapPool setting for dedicated servers.

This takes a list of map UIDs which may be locally installed or hosted
on the resource center. If any maps aren't found, startup will be
delayed by up to 10 seconds while it attempts to query the resource
center.
This commit is contained in:
Paul Chote
2021-05-09 17:18:25 +01:00
committed by Gustas
parent 01fec1ae02
commit 72646fc7ff
4 changed files with 95 additions and 16 deletions

View File

@@ -16,7 +16,6 @@ using System.IO;
using System.Net;
using System.Threading;
using OpenRA.Network;
using OpenRA.Support;
namespace OpenRA.Server
{
@@ -90,8 +89,6 @@ namespace OpenRA.Server
// HACK: Related to the above one, initialize the translations so we can load maps with their (translated) lobby options.
TranslationProvider.Initialize(modData, modData.DefaultFileSystem);
settings.Map = modData.MapCache.ChooseInitialMap(settings.Map, new MersenneTwister());
var endpoints = new List<IPEndPoint> { new IPEndPoint(IPAddress.IPv6Any, settings.ListenPort), new IPEndPoint(IPAddress.Any, settings.ListenPort) };
var server = new Server(endpoints, settings, modData, ServerType.Dedicated);