From 4a35d85884f741026c444328206d576a86d21bc9 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Thu, 16 May 2019 14:05:51 +0200 Subject: [PATCH] Add a DropdownVisible property to TimeLimitManager --- OpenRA.Mods.Common/Traits/Player/TimeLimitManager.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/Player/TimeLimitManager.cs b/OpenRA.Mods.Common/Traits/Player/TimeLimitManager.cs index 00cb64c186..9a637cc898 100644 --- a/OpenRA.Mods.Common/Traits/Player/TimeLimitManager.cs +++ b/OpenRA.Mods.Common/Traits/Player/TimeLimitManager.cs @@ -46,6 +46,9 @@ namespace OpenRA.Mods.Common.Traits [Desc("Prevent the time limit option from being changed in the lobby.")] public readonly bool TimeLimitLocked = false; + [Desc("Whether to display the options dropdown in the lobby.")] + public readonly bool TimeLimitDropdownVisible = true; + [Desc("Display order for the time limit dropdown in the lobby.")] public readonly int TimeLimitDisplayOrder = 0; @@ -62,7 +65,7 @@ namespace OpenRA.Mods.Common.Traits return c.ToString() + " minute{0}".F(c > 1 ? "s" : null); }); - yield return new LobbyOption("timelimit", TimeLimitLabel, TimeLimitDescription, true, TimeLimitDisplayOrder, + yield return new LobbyOption("timelimit", TimeLimitLabel, TimeLimitDescription, TimeLimitDropdownVisible, TimeLimitDisplayOrder, new ReadOnlyDictionary(timelimits), TimeLimitDefault.ToString(), TimeLimitLocked); }