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

Function canUseTechPosition

bwapi/Shared/Templates.h:2447–2463  ·  view source on GitHub ↗

------------------------------------------- CAN USE TECH POSITION --------------------------------------

Source from the content-addressed store, hash-verified

2445 }
2446 //------------------------------------------- CAN USE TECH POSITION --------------------------------------
2447 static inline bool canUseTechPosition(Unit thisUnit, BWAPI::TechType tech, bool checkCanIssueCommandType = true, bool checkCommandibility = true)
2448 {
2449 if ( !checkCommandibility )
2450 Broodwar->setLastError();
2451 else if ( !canCommand(thisUnit) )
2452 return false;
2453
2454 if ( checkCanIssueCommandType && !canUseTechWithOrWithoutTarget(thisUnit, false) )
2455 return false;
2456
2457 if ( !canUseTechWithOrWithoutTarget(thisUnit, tech, false, false) )
2458 return false;
2459 if ( !tech.targetsPosition() )
2460 return Broodwar->setLastError(Errors::Incompatible_TechType);
2461
2462 return true;
2463 }
2464 static inline bool canUseTechPosition(Unit thisUnit, BWAPI::TechType tech, Position target, bool checkTargetsPositions, bool checkCanIssueCommandType, bool checkCommandibility)
2465 {
2466 if ( !checkCommandibility )

Callers 4

canUseTechFunction · 0.85
canIssueCommandFunction · 0.85
canIssueCommandGroupedFunction · 0.85
canUseTechPositionMethod · 0.85

Calls 5

canCommandFunction · 0.85
setLastErrorMethod · 0.80
targetsPositionMethod · 0.80
hasPathMethod · 0.45

Tested by

no test coverage detected