Add Selectable field to Selectable.
There are a bunch of bogus assumptions about targetable actors being selectable. These aren't easily fixed, so this add a Selectable field that can be diabled for things we want to target, but not select.
This commit is contained in:
@@ -184,7 +184,7 @@ namespace OpenRA.Widgets
|
||||
IEnumerable<Actor> SelectActorsInBox(World world, PPos a, PPos b, Func<Actor, bool> cond)
|
||||
{
|
||||
return world.FindUnits(a, b)
|
||||
.Where(x => x.HasTrait<Selectable>() && !world.FogObscures(x) && cond(x))
|
||||
.Where(x => x.HasTrait<Selectable>() && x.Trait<Selectable>().Info.Selectable && !world.FogObscures(x) && cond(x))
|
||||
.GroupBy(x => x.GetSelectionPriority())
|
||||
.OrderByDescending(g => g.Key)
|
||||
.Select(g => g.AsEnumerable())
|
||||
|
||||
Reference in New Issue
Block a user