From 7efdd6820fa378e8732284ae2946ea331e63b5e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 31 May 2015 20:59:11 +0200 Subject: [PATCH] make the description label optional --- OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs index 0bc0e5181c..8f4ab743b9 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs @@ -468,7 +468,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic { var techTraits = modRules.Actors["player"].Traits.WithInterface().ToList(); techLevel.IsVisible = () => techTraits.Count > 0; - optionsBin.GetOrNull("TECHLEVEL_DESC").IsVisible = () => techTraits.Count > 0; + + var techLevelDescription = optionsBin.GetOrNull("TECHLEVEL_DESC"); + if (techLevelDescription != null) + techLevelDescription.IsVisible = () => techTraits.Count > 0; + techLevel.IsDisabled = () => Map.Status != MapStatus.Available || Map.Map.Options.TechLevel != null || configurationDisabled() || techTraits.Count <= 1; techLevel.GetText = () => Map.Status != MapStatus.Available ||