Merge pull request #5405 from RoosterDragon/min-max

Added MinBy, MaxBy, etc.
This commit is contained in:
Paul Chote
2014-06-09 17:42:01 +12:00
16 changed files with 90 additions and 47 deletions

View File

@@ -93,8 +93,7 @@ namespace OpenRA.Widgets
if (multiClick)
{
var unit = World.ScreenMap.ActorsAt(xy)
.OrderByDescending(a => a.Info.SelectionPriority())
.FirstOrDefault();
.WithHighestSelectionPriority();
var newSelection2 = SelectActorsInBox(World, worldRenderer.Viewport.TopLeft, worldRenderer.Viewport.BottomRight,
a => unit != null && a.Info.Name == unit.Info.Name && a.Owner == unit.Owner);