| 133 | {} |
| 134 | |
| 135 | void BWScriptEmulator::onUnitCreate(BWAPI::Unit unit) |
| 136 | { |
| 137 | if ( unit->getPlayer() == self ) // If we own it |
| 138 | { |
| 139 | UnitWrap u(unit); |
| 140 | |
| 141 | // Run computer idle order |
| 142 | u.AssignComputerIdleOrder(); |
| 143 | |
| 144 | // Assign control types |
| 145 | if ( u->getType().isWorker() ) |
| 146 | u.SetControlType(ControlTypes::Worker); |
| 147 | else |
| 148 | { |
| 149 | u.SetControlType(ControlTypes::Guard); |
| 150 | u.SetGuardReturnPosition(u->getPosition()); |
| 151 | } |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | void BWScriptEmulator::onUnitDestroy(BWAPI::Unit unit) |
| 156 | { |
nothing calls this directly
no test coverage detected