[1/2] fixed #998 -- clean up HackyAI.BuildRandom

This commit is contained in:
Chris Forbes
2011-07-08 22:25:48 +12:00
committed by Paul Chote
parent 6f2d1c54d6
commit 56a38b9463

View File

@@ -437,23 +437,8 @@ namespace OpenRA.Mods.RA
return;
var unit = ChooseRandomUnitToBuild(queue);
Boolean found = false;
if (unit != null)
{
foreach (var un in Info.UnitsToBuild)
{
if (un.Key == unit.Name)
{
found = true;
break;
}
}
if (found == true)
{
world.IssueOrder(Order.StartProduction(queue.self, unit.Name, 1));
}
}
if (unit != null && Info.UnitsToBuild.Any( u => u.Key == unit.Name ))
world.IssueOrder(Order.StartProduction(queue.self, unit.Name, 1));
}
class BaseBuilder