remove most of the crap from queries

This commit is contained in:
Chris Forbes
2011-03-17 21:48:50 +13:00
parent eba7641125
commit 149324ea92
21 changed files with 113 additions and 129 deletions

View File

@@ -50,7 +50,8 @@ namespace OpenRA.Mods.RA.Orders
public static bool PlayerIsAllowedToRepair( World world )
{
return world.Queries.OwnedBy[ world.LocalPlayer ].WithTrait<AllowsBuildingRepair>().Any();
return world.Queries.WithTrait<AllowsBuildingRepair>()
.Any(a => a.Actor.Owner == world.LocalPlayer);
}
public void RenderAfterWorld( WorldRenderer wr, World world ) { }