Define ServerTraits in mod.yaml

This commit is contained in:
Paul Chote
2010-11-09 23:04:08 +13:00
parent ed4c588701
commit 8e007131c9
8 changed files with 18 additions and 10 deletions

View File

@@ -55,16 +55,14 @@ namespace OpenRA.Server
{
Log.AddChannel("server", "server.log");
ServerTraits.Add( new DebugServerTrait() );
ServerTraits.Add( new PlayerCommands() );
ServerTraits.Add( new LobbyCommands() );
ServerTraits.Add( new MasterServerPinger() );
listener = new TcpListener(IPAddress.Any, settings.Server.ListenPort);
Name = settings.Server.Name;
randomSeed = (int)DateTime.Now.ToBinary();
ModData = modData;
foreach (var trait in modData.Manifest.ServerTraits)
ServerTraits.Add( modData.ObjectCreator.CreateObject<ServerTrait>(trait) );
lobbyInfo = new Session( settings.Game.Mods );
lobbyInfo.GlobalSettings.RandomSeed = randomSeed;
lobbyInfo.GlobalSettings.Map = map;