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

Function canUseTech

bwapi/Shared/Templates.h:2231–2242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2229 return true;
2230 }
2231 static inline bool canUseTech(Unit thisUnit, BWAPI::TechType tech, Position target, bool checkCanTargetUnit = true, bool checkTargetsType = true, bool checkCanIssueCommandType = true, bool checkCommandibility = true)
2232 {
2233 if (!checkCommandibility)
2234 Broodwar->setLastError();
2235 else if (!canCommand(thisUnit))
2236 return false;
2237
2238 if (!canUseTechPosition(thisUnit, tech, target, checkTargetsType, checkCanIssueCommandType, false))
2239 return false;
2240
2241 return true;
2242 }
2243 static inline bool canUseTech(Unit thisUnit, BWAPI::TechType tech, Unit target = nullptr, bool checkCanTargetUnit = true, bool checkTargetsType = true, bool checkCanIssueCommandType = true, bool checkCommandibility = true)
2244 {
2245 if (!checkCommandibility)

Callers 1

canUseTechMethod · 0.85

Calls 5

canCommandFunction · 0.85
canUseTechPositionFunction · 0.85
canUseTechWithoutTargetFunction · 0.85
canUseTechUnitFunction · 0.85
setLastErrorMethod · 0.80

Tested by

no test coverage detected