* Removes the given number of engineers from the project if possible. * @param change How much we want to subtract. */
| 319 | * @param change How much we want to subtract. |
| 320 | */ |
| 321 | void ManufactureInfoState::lessEngineer(int change) |
| 322 | { |
| 323 | if (0 >= change) return; |
| 324 | int assigned = _production->getAssignedEngineers(); |
| 325 | if(assigned > 0) |
| 326 | { |
| 327 | change = std::min(assigned, change); |
| 328 | _production->setAssignedEngineers(assigned-change); |
| 329 | _base->setEngineers(_base->getEngineers()+change); |
| 330 | setAssignedEngineer(); |
| 331 | } |
| 332 | } |
| 333 | |
| 334 | /** |
| 335 | * Starts the timerLessEngineer. |
nothing calls this directly
no test coverage detected