add IEnum<T>.JoinWith, use it to clean up a bunch of things

This commit is contained in:
Chris Forbes
2011-10-30 10:38:02 +13:00
parent 8111ccbea6
commit f83c9fd4d7
17 changed files with 35 additions and 25 deletions

View File

@@ -52,7 +52,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
nameLabel.GetText = () => tooltip.Name;
var prereqs = buildable.Prerequisites.Select(a => ActorName(a));
var requiresString = prereqs.Any() ? "Requires {0}".F(string.Join(", ", prereqs.ToArray())) : "";
var requiresString = prereqs.Any() ? "Requires {0}".F(prereqs.JoinWith(", ")) : "";
requiresLabel.GetText = () => requiresString;
var power = bi != null ? bi.Power : 0;