[1/2] fixed #998 -- clean up HackyAI.BuildRandom
This commit is contained in:
@@ -437,23 +437,8 @@ namespace OpenRA.Mods.RA
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var unit = ChooseRandomUnitToBuild(queue);
|
var unit = ChooseRandomUnitToBuild(queue);
|
||||||
Boolean found = false;
|
if (unit != null && Info.UnitsToBuild.Any( u => u.Key == unit.Name ))
|
||||||
if (unit != null)
|
world.IssueOrder(Order.StartProduction(queue.self, unit.Name, 1));
|
||||||
{
|
|
||||||
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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class BaseBuilder
|
class BaseBuilder
|
||||||
|
|||||||
Reference in New Issue
Block a user