Add additional metadata to lobby options.

This commit is contained in:
Paul Chote
2017-12-09 20:17:39 +00:00
committed by reaperrr
parent b71b2ad523
commit 97cdce7448
19 changed files with 171 additions and 18 deletions

View File

@@ -24,6 +24,12 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Prevent the developer mode state from being changed in the lobby.")]
public bool Locked = false;
[Desc("Whether to display the developer mode checkbox in the lobby.")]
public bool Visible = true;
[Desc("Display order for the developer mode checkbox in the lobby.")]
public int DisplayOrder = 0;
[Desc("Default cash bonus granted by the give cash cheat.")]
public int Cash = 20000;
@@ -50,7 +56,9 @@ namespace OpenRA.Mods.Common.Traits
IEnumerable<LobbyOption> ILobbyOptions.LobbyOptions(Ruleset rules)
{
yield return new LobbyBooleanOption("cheats", "Debug Menu", Enabled, Locked);
yield return new LobbyBooleanOption("cheats", "Debug Menu",
"Enables cheats and developer commands",
Visible, DisplayOrder, Enabled, Locked);
}
public object Create(ActorInitializer init) { return new DeveloperMode(this); }