adding new ai functional

This commit is contained in:
Matthias Mailänder
2013-03-06 11:17:02 +01:00
parent 3f56e00173
commit e0b7242f1b
15 changed files with 1722 additions and 177 deletions

View File

@@ -74,7 +74,13 @@ namespace OpenRA.Mods.RA.AI
lastThinkTick = ai.ticks;
/* place the building */
var location = ai.ChooseBuildLocation(currentBuilding.Item);
BuildingType type = BuildingType.Building;
if(Rules.Info[currentBuilding.Item].Traits.Contains<AttackBaseInfo>())
type = BuildingType.Defense;
else if(Rules.Info[currentBuilding.Item].Traits.Contains<OreRefineryInfo>())
type = BuildingType.Refinery;
var location = ai.ChooseBuildLocation(currentBuilding.Item, type);
if (location == null)
{
HackyAI.BotDebug("AI: Nowhere to place {0}".F(currentBuilding.Item));