| 8 | Order_Region junkyard_dog_impl(Enum::JUNKYARD_DOG); |
| 9 | |
| 10 | bool Order_Region::execute(aithread &thread) const |
| 11 | { |
| 12 | // Get units in region |
| 13 | Unitset rgnUnits( Broodwar->getUnitsInRectangle(thread.getLocation().topLeft, thread.getLocation().bottomRight, |
| 14 | GetPlayer == Broodwar->self() && IsCompleted) ); |
| 15 | |
| 16 | // Execute action |
| 17 | if ( this->getOpcode() == Enum::MAKE_PATROL ) |
| 18 | { |
| 19 | rgnUnits.patrol( MainController.genCmdTarget.center() ); |
| 20 | } |
| 21 | else if ( this->getOpcode() == Enum::JUNKYARD_DOG ) |
| 22 | { |
| 23 | for each ( Unit u in rgnUnits ) |
| 24 | UnitWrap(u).SetVirtualUnitOrder(Orders::Enum::JunkYardDog); |
| 25 | } |
| 26 | |
| 27 | // Debug |
| 28 | thread.saveDebug(Text::Green, this->getOpcode()); |
| 29 | return true; |
| 30 | } |
nothing calls this directly
no test coverage detected