Don't show negative prerequisites on tooltip

This commit is contained in:
Mustafa Alperen Seki
2018-04-17 20:10:07 +03:00
committed by reaperrr
parent 160ade1060
commit ec61527ebc

View File

@@ -87,7 +87,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
hotkeyLabel.Bounds.X = nameSize.X + 2 * nameLabel.Bounds.X;
}
var prereqs = buildable.Prerequisites.Select(a => ActorName(mapRules, a)).Where(s => !s.StartsWith("~", StringComparison.Ordinal));
var prereqs = buildable.Prerequisites.Select(a => ActorName(mapRules, a))
.Where(s => !s.StartsWith("~", StringComparison.Ordinal) && !s.StartsWith("!", StringComparison.Ordinal));
requiresLabel.Text = prereqs.Any() ? requiresFormat.F(prereqs.JoinWith(", ")) : "";
var requiresSize = requiresFont.Measure(requiresLabel.Text);