MCPcopy Create free account
hub / github.com/bwapi/bwapi / MakeBuilding

Method MakeBuilding

bwapi/BWAPI/Source/BW/OrderTypes.cpp:119–137  ·  view source on GitHub ↗

--------------------------------------------- MAKE BULDING ---------------------------------------------

Source from the content-addressed store, hash-verified

117 }
118 //--------------------------------------------- MAKE BULDING ---------------------------------------------
119 MakeBuilding::MakeBuilding(BW::TilePosition position, BWAPI::UnitType type)
120 : position(position)
121 , type(static_cast<u16>(type))
122 {
123 switch( BWAPI::UnitType(type).getRace() )
124 {
125 case BWAPI::Races::Enum::Zerg:
126 raceDependant = BWAPI::Orders::Enum::DroneStartBuild;
127 break;
128 case BWAPI::Races::Enum::Terran:
129 raceDependant = BWAPI::Orders::Enum::PlaceBuilding;
130 break;
131 case BWAPI::Races::Enum::Protoss:
132 raceDependant = BWAPI::Orders::Enum::PlaceProtossBuilding;
133 break;
134 default:
135 break;
136 }
137 }
138 MakeBuilding::MakeBuilding(int tileX, int tileY, BWAPI::UnitType type)
139 : MakeBuilding(BW::TilePosition(static_cast<s16>(tileX), static_cast<s16>(tileY)), type)
140 {

Callers

nothing calls this directly

Calls 2

UnitTypeClass · 0.70
getRaceMethod · 0.45

Tested by

no test coverage detected