more trivial cleanups

This commit is contained in:
Chris Forbes
2011-05-04 20:41:44 +12:00
parent 599ee25cb1
commit b12a35af4c
2 changed files with 5 additions and 5 deletions

View File

@@ -288,7 +288,7 @@ namespace OpenRA.Mods.RA
return true;
}
var sp = self.TraitsImplementing<Production>().Where(p => p.Info.Produces.Contains(Info.Type)).FirstOrDefault();
var sp = self.TraitsImplementing<Production>().FirstOrDefault(p => p.Info.Produces.Contains(Info.Type));
if (sp != null && !IsDisabledBuilding(self) && sp.Produce(self, Rules.Info[ name ]))
{
FinishProduction();