| 8 | Train train_impl(AISCRIPT::Enum::TRAIN); |
| 9 | |
| 10 | bool Train::execute(aithread &thread) const |
| 11 | { |
| 12 | // Parameters |
| 13 | BYTE bCount; |
| 14 | WORD wUnitType; |
| 15 | thread.readTuple( std::tie(bCount, wUnitType) ); |
| 16 | |
| 17 | // Debug |
| 18 | thread.saveDebug(Text::Green, this->getOpcode(), "%u %s", bCount, AISCRIPT::getUnitName(wUnitType) ); |
| 19 | |
| 20 | // Perform actions |
| 21 | if ( GetStandardUnitCount(wUnitType, this->getOpcode() != AISCRIPT::Enum::TRAIN) < bCount ) |
| 22 | { |
| 23 | MainController.wWaitForType = (int)wUnitType + 1; |
| 24 | if ( this->getOpcode() != AISCRIPT::Enum::DO_MORPH ) |
| 25 | return thread.retry(); |
| 26 | } |
| 27 | return thread.noretry(); |
| 28 | } |
nothing calls this directly
no test coverage detected