![]() |
BTHAI 2.3
|
#include <StructureAgent.h>
Public Member Functions | |
StructureAgent (Unit *mUnit) | |
virtual void | computeActions () |
bool | canMorphInto (UnitType type) |
void | sendWorkers () |
string | getTypeName () |
virtual void | printInfo () |
Protected Member Functions | |
bool | canBuildUnit (UnitType type) |
bool | canEvolveUnit (UnitType type) |
TilePosition | getNextScanLocation () |
Protected Attributes | |
bool | repairing |
vector< UpgradeType > | upgradeOrder |
vector< TechType > | researchOrder |
vector< TilePosition > | hasScanned |
The StructureAgent is the base agent class for all agents handling buildings. If a building is created and no specific agent for that type is found, the building is assigned to a StructureAgent. StructureAgents are typically agents without logic, for example supply depots. To add logic to a building, for example Terran Academy researching stim packs, an agent implementation for that unit type must be created.
Author: Johan Hagelback (johan.hagelback@gmail.com)
bool StructureAgent::canMorphInto | ( | UnitType | type | ) |
Checks if the agent can morph into the specified type. Zerg only.
void StructureAgent::computeActions | ( | ) | [virtual] |
Called each update to issue orders.
Reimplemented from BaseAgent.
Reimplemented in BunkerAgent, CommandCenterAgent, FleetBeaconAgent, HatcheryAgent, NexusAgent, and RefineryAgent.
string StructureAgent::getTypeName | ( | ) | [virtual] |
Returns the unique type name for structure agents.
Reimplemented from BaseAgent.
Reimplemented in BunkerAgent, CommandCenterAgent, FleetBeaconAgent, HatcheryAgent, NexusAgent, and RefineryAgent.
void StructureAgent::printInfo | ( | ) | [virtual] |
Used to print info about this agent to the screen.
Reimplemented from BaseAgent.
Reimplemented in BunkerAgent.
void StructureAgent::sendWorkers | ( | ) |
Sends a number of workers to a newly constructed base.