Allow ProductionQueue to filter by race.

This commit is contained in:
Paul Chote
2014-06-21 19:33:39 +12:00
parent d9e0559c7a
commit ca082e3cec
8 changed files with 39 additions and 15 deletions

View File

@@ -809,7 +809,7 @@ namespace OpenRA.Mods.RA.AI
internal IEnumerable<ProductionQueue> FindQueues(string category)
{
return world.ActorsWithTrait<ProductionQueue>()
.Where(a => a.Actor.Owner == p && a.Trait.Info.Type == category)
.Where(a => a.Actor.Owner == p && a.Trait.Info.Type == category && a.Trait.Enabled)
.Select(a => a.Trait);
}