remove most of the crap from queries
This commit is contained in:
@@ -132,7 +132,8 @@ namespace OpenRA.Traits
|
||||
{
|
||||
var eva = self.World.WorldActor.Info.Traits.Get<EvaAlertsInfo>();
|
||||
|
||||
OreCapacity = self.World.Queries.OwnedBy[Owner].WithTrait<IStoreOre>()
|
||||
OreCapacity = self.World.Queries.WithTrait<IStoreOre>()
|
||||
.Where(a => a.Actor.Owner == Owner)
|
||||
.Sum(a => a.Trait.Capacity);
|
||||
|
||||
if (Ore > OreCapacity)
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace OpenRA.Traits
|
||||
}
|
||||
// Is now our ally; add unit vis
|
||||
if (newStance == Stance.Ally)
|
||||
foreach (var a in w.Queries.OwnedBy[player])
|
||||
foreach (var a in w.Actors.Where( a => a.Owner == player ))
|
||||
AddActor(a);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user