392 lines
9.6 KiB
C
392 lines
9.6 KiB
C
![]() |
#pragma once
|
||
|
#include <BWAPI/Type.h>
|
||
|
|
||
|
namespace BWAPI
|
||
|
{
|
||
|
namespace Orders
|
||
|
{
|
||
|
/// Enumeration of unit orders
|
||
|
namespace Enum
|
||
|
{
|
||
|
/// Enumeration of unit orders
|
||
|
enum Enum
|
||
|
{
|
||
|
Die,
|
||
|
Stop,
|
||
|
Guard,
|
||
|
PlayerGuard,
|
||
|
TurretGuard,
|
||
|
BunkerGuard,
|
||
|
Move,
|
||
|
ReaverStop,
|
||
|
Attack1,
|
||
|
Attack2,
|
||
|
AttackUnit,
|
||
|
AttackFixedRange,
|
||
|
AttackTile,
|
||
|
Hover,
|
||
|
AttackMove,
|
||
|
InfestedCommandCenter,
|
||
|
UnusedNothing,
|
||
|
UnusedPowerup,
|
||
|
TowerGuard,
|
||
|
TowerAttack,
|
||
|
VultureMine,
|
||
|
StayInRange,
|
||
|
TurretAttack,
|
||
|
Nothing,
|
||
|
Unused_24,
|
||
|
DroneStartBuild,
|
||
|
DroneBuild,
|
||
|
CastInfestation,
|
||
|
MoveToInfest,
|
||
|
InfestingCommandCenter,
|
||
|
PlaceBuilding,
|
||
|
PlaceProtossBuilding,
|
||
|
CreateProtossBuilding,
|
||
|
ConstructingBuilding,
|
||
|
Repair,
|
||
|
MoveToRepair,
|
||
|
PlaceAddon,
|
||
|
BuildAddon,
|
||
|
Train,
|
||
|
RallyPointUnit,
|
||
|
RallyPointTile,
|
||
|
ZergBirth,
|
||
|
ZergUnitMorph,
|
||
|
ZergBuildingMorph,
|
||
|
IncompleteBuilding,
|
||
|
IncompleteMorphing,
|
||
|
BuildNydusExit,
|
||
|
EnterNydusCanal,
|
||
|
IncompleteWarping,
|
||
|
Follow,
|
||
|
Carrier,
|
||
|
ReaverCarrierMove,
|
||
|
CarrierStop,
|
||
|
CarrierAttack,
|
||
|
CarrierMoveToAttack,
|
||
|
CarrierIgnore2,
|
||
|
CarrierFight,
|
||
|
CarrierHoldPosition,
|
||
|
Reaver,
|
||
|
ReaverAttack,
|
||
|
ReaverMoveToAttack,
|
||
|
ReaverFight,
|
||
|
ReaverHoldPosition,
|
||
|
TrainFighter,
|
||
|
InterceptorAttack,
|
||
|
ScarabAttack,
|
||
|
RechargeShieldsUnit,
|
||
|
RechargeShieldsBattery,
|
||
|
ShieldBattery,
|
||
|
InterceptorReturn,
|
||
|
DroneLand,
|
||
|
BuildingLand,
|
||
|
BuildingLiftOff,
|
||
|
DroneLiftOff,
|
||
|
LiftingOff,
|
||
|
ResearchTech,
|
||
|
Upgrade,
|
||
|
Larva,
|
||
|
SpawningLarva,
|
||
|
Harvest1,
|
||
|
Harvest2,
|
||
|
MoveToGas,
|
||
|
WaitForGas,
|
||
|
HarvestGas,
|
||
|
ReturnGas,
|
||
|
MoveToMinerals,
|
||
|
WaitForMinerals,
|
||
|
MiningMinerals,
|
||
|
Harvest3,
|
||
|
Harvest4,
|
||
|
ReturnMinerals,
|
||
|
Interrupted,
|
||
|
EnterTransport,
|
||
|
PickupIdle,
|
||
|
PickupTransport,
|
||
|
PickupBunker,
|
||
|
Pickup4,
|
||
|
PowerupIdle,
|
||
|
Sieging,
|
||
|
Unsieging,
|
||
|
WatchTarget,
|
||
|
InitCreepGrowth,
|
||
|
SpreadCreep,
|
||
|
StoppingCreepGrowth,
|
||
|
GuardianAspect,
|
||
|
ArchonWarp,
|
||
|
CompletingArchonSummon,
|
||
|
HoldPosition,
|
||
|
QueenHoldPosition,
|
||
|
Cloak,
|
||
|
Decloak,
|
||
|
Unload,
|
||
|
MoveUnload,
|
||
|
FireYamatoGun,
|
||
|
MoveToFireYamatoGun,
|
||
|
CastLockdown,
|
||
|
Burrowing,
|
||
|
Burrowed,
|
||
|
Unburrowing,
|
||
|
CastDarkSwarm,
|
||
|
CastParasite,
|
||
|
CastSpawnBroodlings,
|
||
|
CastEMPShockwave,
|
||
|
NukeWait,
|
||
|
NukeTrain,
|
||
|
NukeLaunch,
|
||
|
NukePaint,
|
||
|
NukeUnit,
|
||
|
CastNuclearStrike,
|
||
|
NukeTrack,
|
||
|
InitializeArbiter,
|
||
|
CloakNearbyUnits,
|
||
|
PlaceMine,
|
||
|
RightClickAction,
|
||
|
SuicideUnit,
|
||
|
SuicideLocation,
|
||
|
SuicideHoldPosition,
|
||
|
CastRecall,
|
||
|
Teleport,
|
||
|
CastScannerSweep,
|
||
|
Scanner,
|
||
|
CastDefensiveMatrix,
|
||
|
CastPsionicStorm,
|
||
|
CastIrradiate,
|
||
|
CastPlague,
|
||
|
CastConsume,
|
||
|
CastEnsnare,
|
||
|
CastStasisField,
|
||
|
CastHallucination,
|
||
|
Hallucination2,
|
||
|
ResetCollision,
|
||
|
ResetHarvestCollision,
|
||
|
Patrol,
|
||
|
CTFCOPInit,
|
||
|
CTFCOPStarted,
|
||
|
CTFCOP2,
|
||
|
ComputerAI,
|
||
|
AtkMoveEP,
|
||
|
HarassMove,
|
||
|
AIPatrol,
|
||
|
GuardPost,
|
||
|
RescuePassive,
|
||
|
Neutral,
|
||
|
ComputerReturn,
|
||
|
InitializePsiProvider,
|
||
|
SelfDestructing,
|
||
|
Critter,
|
||
|
HiddenGun,
|
||
|
OpenDoor,
|
||
|
CloseDoor,
|
||
|
HideTrap,
|
||
|
RevealTrap,
|
||
|
EnableDoodad,
|
||
|
DisableDoodad,
|
||
|
WarpIn,
|
||
|
Medic,
|
||
|
MedicHeal,
|
||
|
HealMove,
|
||
|
MedicHoldPosition,
|
||
|
MedicHealToIdle,
|
||
|
CastRestoration,
|
||
|
CastDisruptionWeb,
|
||
|
CastMindControl,
|
||
|
DarkArchonMeld,
|
||
|
CastFeedback,
|
||
|
CastOpticalFlare,
|
||
|
CastMaelstrom,
|
||
|
JunkYardDog,
|
||
|
Fatal,
|
||
|
None,
|
||
|
Unknown,
|
||
|
MAX
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
/// An Order (Order type) represents a Unit's current action and can be retrieved with
|
||
|
/// UnitInterface::getOrder. It can also be used to identify the current state of the unit during
|
||
|
/// command execution (gathering minerals can consist of Orders::MoveToMinerals,
|
||
|
/// Orders::WaitForMinerals, Orders::MiningMinerals, etc.).
|
||
|
///
|
||
|
/// @see UnitInterface::getOrder
|
||
|
class Order : public Type<Order, Orders::Enum::Unknown>
|
||
|
{
|
||
|
public:
|
||
|
/// @copydoc Type::Type(int)
|
||
|
Order(int id = Orders::Enum::None);
|
||
|
};
|
||
|
/// Namespace containing unit orders
|
||
|
namespace Orders
|
||
|
{
|
||
|
/// Retrieves the set of all the Orders.
|
||
|
///
|
||
|
/// @returns Set of all Order types.
|
||
|
const Order::const_set& allOrders();
|
||
|
|
||
|
#ifdef BWAPI_DECL
|
||
|
#undef BWAPI_DECL
|
||
|
#endif
|
||
|
#define BWAPI_DECL(x) /** x */ extern const Order x
|
||
|
BWAPI_DECL(Die);
|
||
|
BWAPI_DECL(Stop);
|
||
|
BWAPI_DECL(Guard);
|
||
|
BWAPI_DECL(PlayerGuard);
|
||
|
BWAPI_DECL(TurretGuard);
|
||
|
BWAPI_DECL(BunkerGuard);
|
||
|
BWAPI_DECL(Move);
|
||
|
BWAPI_DECL(AttackUnit);
|
||
|
BWAPI_DECL(AttackTile);
|
||
|
BWAPI_DECL(Hover);
|
||
|
BWAPI_DECL(AttackMove);
|
||
|
BWAPI_DECL(InfestedCommandCenter);
|
||
|
BWAPI_DECL(UnusedNothing);
|
||
|
BWAPI_DECL(UnusedPowerup);
|
||
|
BWAPI_DECL(TowerGuard);
|
||
|
BWAPI_DECL(VultureMine);
|
||
|
BWAPI_DECL(Nothing);
|
||
|
BWAPI_DECL(CastInfestation);
|
||
|
BWAPI_DECL(InfestingCommandCenter);
|
||
|
BWAPI_DECL(PlaceBuilding);
|
||
|
BWAPI_DECL(CreateProtossBuilding);
|
||
|
BWAPI_DECL(ConstructingBuilding);
|
||
|
BWAPI_DECL(Repair);
|
||
|
BWAPI_DECL(PlaceAddon);
|
||
|
BWAPI_DECL(BuildAddon);
|
||
|
BWAPI_DECL(Train);
|
||
|
BWAPI_DECL(RallyPointUnit);
|
||
|
BWAPI_DECL(RallyPointTile);
|
||
|
BWAPI_DECL(ZergBirth);
|
||
|
BWAPI_DECL(ZergUnitMorph);
|
||
|
BWAPI_DECL(ZergBuildingMorph);
|
||
|
BWAPI_DECL(IncompleteBuilding);
|
||
|
BWAPI_DECL(BuildNydusExit);
|
||
|
BWAPI_DECL(EnterNydusCanal);
|
||
|
BWAPI_DECL(Follow);
|
||
|
BWAPI_DECL(Carrier);
|
||
|
BWAPI_DECL(ReaverCarrierMove);
|
||
|
BWAPI_DECL(CarrierIgnore2);
|
||
|
BWAPI_DECL(Reaver);
|
||
|
BWAPI_DECL(TrainFighter);
|
||
|
BWAPI_DECL(InterceptorAttack);
|
||
|
BWAPI_DECL(ScarabAttack);
|
||
|
BWAPI_DECL(RechargeShieldsUnit);
|
||
|
BWAPI_DECL(RechargeShieldsBattery);
|
||
|
BWAPI_DECL(ShieldBattery);
|
||
|
BWAPI_DECL(InterceptorReturn);
|
||
|
BWAPI_DECL(BuildingLand);
|
||
|
BWAPI_DECL(BuildingLiftOff);
|
||
|
BWAPI_DECL(DroneLiftOff);
|
||
|
BWAPI_DECL(LiftingOff);
|
||
|
BWAPI_DECL(ResearchTech);
|
||
|
BWAPI_DECL(Upgrade);
|
||
|
BWAPI_DECL(Larva);
|
||
|
BWAPI_DECL(SpawningLarva);
|
||
|
BWAPI_DECL(Harvest1);
|
||
|
BWAPI_DECL(Harvest2);
|
||
|
BWAPI_DECL(MoveToGas);
|
||
|
BWAPI_DECL(WaitForGas);
|
||
|
BWAPI_DECL(HarvestGas);
|
||
|
BWAPI_DECL(ReturnGas);
|
||
|
BWAPI_DECL(MoveToMinerals);
|
||
|
BWAPI_DECL(WaitForMinerals);
|
||
|
BWAPI_DECL(MiningMinerals);
|
||
|
BWAPI_DECL(Harvest3);
|
||
|
BWAPI_DECL(Harvest4);
|
||
|
BWAPI_DECL(ReturnMinerals);
|
||
|
BWAPI_DECL(Interrupted);
|
||
|
BWAPI_DECL(EnterTransport);
|
||
|
BWAPI_DECL(PickupIdle);
|
||
|
BWAPI_DECL(PickupTransport);
|
||
|
BWAPI_DECL(PickupBunker);
|
||
|
BWAPI_DECL(Pickup4);
|
||
|
BWAPI_DECL(PowerupIdle);
|
||
|
BWAPI_DECL(Sieging);
|
||
|
BWAPI_DECL(Unsieging);
|
||
|
BWAPI_DECL(InitCreepGrowth);
|
||
|
BWAPI_DECL(SpreadCreep);
|
||
|
BWAPI_DECL(StoppingCreepGrowth);
|
||
|
BWAPI_DECL(GuardianAspect);
|
||
|
BWAPI_DECL(ArchonWarp);
|
||
|
BWAPI_DECL(CompletingArchonSummon);
|
||
|
BWAPI_DECL(HoldPosition);
|
||
|
BWAPI_DECL(Cloak);
|
||
|
BWAPI_DECL(Decloak);
|
||
|
BWAPI_DECL(Unload);
|
||
|
BWAPI_DECL(MoveUnload);
|
||
|
BWAPI_DECL(FireYamatoGun);
|
||
|
BWAPI_DECL(CastLockdown);
|
||
|
BWAPI_DECL(Burrowing);
|
||
|
BWAPI_DECL(Burrowed);
|
||
|
BWAPI_DECL(Unburrowing);
|
||
|
BWAPI_DECL(CastDarkSwarm);
|
||
|
BWAPI_DECL(CastParasite);
|
||
|
BWAPI_DECL(CastSpawnBroodlings);
|
||
|
BWAPI_DECL(CastEMPShockwave);
|
||
|
BWAPI_DECL(NukeWait);
|
||
|
BWAPI_DECL(NukeTrain);
|
||
|
BWAPI_DECL(NukeLaunch);
|
||
|
BWAPI_DECL(NukePaint);
|
||
|
BWAPI_DECL(NukeUnit);
|
||
|
BWAPI_DECL(CastNuclearStrike);
|
||
|
BWAPI_DECL(NukeTrack);
|
||
|
BWAPI_DECL(CloakNearbyUnits);
|
||
|
BWAPI_DECL(PlaceMine);
|
||
|
BWAPI_DECL(RightClickAction);
|
||
|
BWAPI_DECL(CastRecall);
|
||
|
BWAPI_DECL(Teleport);
|
||
|
BWAPI_DECL(CastScannerSweep);
|
||
|
BWAPI_DECL(Scanner);
|
||
|
BWAPI_DECL(CastDefensiveMatrix);
|
||
|
BWAPI_DECL(CastPsionicStorm);
|
||
|
BWAPI_DECL(CastIrradiate);
|
||
|
BWAPI_DECL(CastPlague);
|
||
|
BWAPI_DECL(CastConsume);
|
||
|
BWAPI_DECL(CastEnsnare);
|
||
|
BWAPI_DECL(CastStasisField);
|
||
|
BWAPI_DECL(CastHallucination);
|
||
|
BWAPI_DECL(Hallucination2);
|
||
|
BWAPI_DECL(ResetCollision);
|
||
|
BWAPI_DECL(Patrol);
|
||
|
BWAPI_DECL(CTFCOPInit);
|
||
|
BWAPI_DECL(CTFCOPStarted);
|
||
|
BWAPI_DECL(CTFCOP2);
|
||
|
BWAPI_DECL(ComputerAI);
|
||
|
BWAPI_DECL(AtkMoveEP);
|
||
|
BWAPI_DECL(HarassMove);
|
||
|
BWAPI_DECL(AIPatrol);
|
||
|
BWAPI_DECL(GuardPost);
|
||
|
BWAPI_DECL(RescuePassive);
|
||
|
BWAPI_DECL(Neutral);
|
||
|
BWAPI_DECL(ComputerReturn);
|
||
|
BWAPI_DECL(SelfDestructing);
|
||
|
BWAPI_DECL(Critter);
|
||
|
BWAPI_DECL(HiddenGun);
|
||
|
BWAPI_DECL(OpenDoor);
|
||
|
BWAPI_DECL(CloseDoor);
|
||
|
BWAPI_DECL(HideTrap);
|
||
|
BWAPI_DECL(RevealTrap);
|
||
|
BWAPI_DECL(EnableDoodad);
|
||
|
BWAPI_DECL(DisableDoodad);
|
||
|
BWAPI_DECL(WarpIn);
|
||
|
BWAPI_DECL(Medic);
|
||
|
BWAPI_DECL(MedicHeal);
|
||
|
BWAPI_DECL(HealMove);
|
||
|
BWAPI_DECL(MedicHealToIdle);
|
||
|
BWAPI_DECL(CastRestoration);
|
||
|
BWAPI_DECL(CastDisruptionWeb);
|
||
|
BWAPI_DECL(CastMindControl);
|
||
|
BWAPI_DECL(DarkArchonMeld);
|
||
|
BWAPI_DECL(CastFeedback);
|
||
|
BWAPI_DECL(CastOpticalFlare);
|
||
|
BWAPI_DECL(CastMaelstrom);
|
||
|
BWAPI_DECL(JunkYardDog);
|
||
|
BWAPI_DECL(Fatal);
|
||
|
BWAPI_DECL(None);
|
||
|
BWAPI_DECL(Unknown);
|
||
|
#undef BWAPI_DECL
|
||
|
};
|
||
|
}
|