Add a lobby option to control spawning creeps (viceroids/worms)

The lobby option is only exposed in d2k currently, not in TD or TS.
This commit is contained in:
Oliver Brakmann
2014-12-28 17:39:26 +01:00
parent c1bf8b29e3
commit de0a62eb42
9 changed files with 314 additions and 2 deletions

View File

@@ -523,6 +523,29 @@ namespace OpenRA.Mods.Common.Server
return true;
}
},
{ "creeps",
s =>
{
if (!client.IsAdmin)
{
server.SendOrderTo(conn, "Message", "Only the host can set that option.");
return true;
}
if (server.Map.Options.Creeps.HasValue)
{
server.SendOrderTo(conn, "Message", "Map has disabled Creeps spawning configuration.");
return true;
}
bool.TryParse(s, out server.LobbyInfo.GlobalSettings.Creeps);
server.SyncLobbyGlobalSettings();
server.SendMessage("{0} {1} Creeps spawning."
.F(client.Name, server.LobbyInfo.GlobalSettings.Creeps ? "enabled" : "disabled"));
return true;
}
},
{ "allybuildradius",
s =>
{