* Opens the Production settings screen. * @param action A pointer to an Action. */
| 116 | * @param action A pointer to an Action. |
| 117 | */ |
| 118 | void NewManufactureListState::lstProdClick (Action *) |
| 119 | { |
| 120 | RuleManufacture *rule = _possibleProductions[_lstManufacture->getSelectedRow()]; |
| 121 | if (rule->getCategory() == "STR_CRAFT" && _base->getAvailableHangars() - _base->getUsedHangars() == 0) |
| 122 | { |
| 123 | _game->pushState(new ErrorMessageState(_game, "STR_NO_FREE_HANGARS_FOR_CRAFT_PRODUCTION", _palette, Palette::blockOffset(15)+1, "BACK17.SCR", 6)); |
| 124 | } |
| 125 | else if (rule->getRequiredSpace() > _base->getFreeWorkshops()) |
| 126 | { |
| 127 | _game->pushState(new ErrorMessageState(_game, "STR_NOT_ENOUGH_WORK_SPACE", _palette, Palette::blockOffset(15)+1, "BACK17.SCR", 6)); |
| 128 | } |
| 129 | else |
| 130 | { |
| 131 | _game->pushState(new ManufactureStartState(_game, _base, rule)); |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | |
| 136 | /** |
nothing calls this directly
no test coverage detected