remove a redundant method from queries.

This commit is contained in:
Chris Forbes
2010-12-27 14:39:19 +13:00
parent 439bb7d02f
commit 4a94cf656b
6 changed files with 8 additions and 13 deletions

View File

@@ -29,7 +29,7 @@ namespace OpenRA.Mods.RA
var prevItems = GetNumBuildables(self.Owner);
// Find the queue with the target actor
var queue = w.Queries.WithTraitMultiple<ProductionQueue>()
var queue = w.Queries.WithTrait<ProductionQueue>()
.Where(p => p.Actor.Owner == self.Owner &&
p.Trait.CurrentItem() != null &&
p.Trait.CurrentItem().Item == order.TargetString &&
@@ -109,7 +109,7 @@ namespace OpenRA.Mods.RA
{
if (p != p.World.LocalPlayer) return 0; // this only matters for local players.
return p.World.Queries.WithTraitMultiple<ProductionQueue>()
return p.World.Queries.WithTrait<ProductionQueue>()
.Where(a => a.Actor.Owner == p)
.SelectMany(a => a.Trait.BuildableItems()).Distinct().Count();
}