StyleCop clean OpenRA.Game

This commit is contained in:
Matthias Mailänder
2015-01-04 11:56:13 +01:00
parent d2d715765c
commit bc3acfeee7
345 changed files with 835 additions and 833 deletions

View File

@@ -22,16 +22,16 @@ namespace OpenRA.Mods.Common.Scripting
[Desc("Returns the player with the specified internal name, or nil if a match is not found.")]
public Player GetPlayer(string name)
{
return context.World.Players.FirstOrDefault(p => p.InternalName == name);
return Context.World.Players.FirstOrDefault(p => p.InternalName == name);
}
[Desc("Returns a table of players filtered by the specified function.")]
public Player[] GetPlayers(LuaFunction filter)
{
return context.World.Players
return Context.World.Players
.Where(p =>
{
using (var f = filter.Call(p.ToLuaValue(context)))
using (var f = filter.Call(p.ToLuaValue(Context)))
return f.First().ToBoolean();
}).ToArray();
}