* Increases the "units to produce", in the case of a right-click, to infinite, and 1 on left-click. * @param action A pointer to an Action. */
| 414 | * @param action A pointer to an Action. |
| 415 | */ |
| 416 | void ManufactureInfoState::moreUnitClick(Action * action) |
| 417 | { |
| 418 | if (_production->getInfiniteAmount()) return; // We can't increase over infinite :) |
| 419 | if (action->getDetails()->button.button == SDL_BUTTON_RIGHT) |
| 420 | { |
| 421 | _production->setInfiniteAmount(true); |
| 422 | setAssignedEngineer(); |
| 423 | } |
| 424 | else if (action->getDetails()->button.button == SDL_BUTTON_LEFT) |
| 425 | { |
| 426 | moreUnit(1); |
| 427 | } |
| 428 | } |
| 429 | |
| 430 | /** |
| 431 | * Removes the given number of units to produce from the project if possible. |
nothing calls this directly
no test coverage detected