* Populates the build list from the current "available" facilities. */
| 98 | * Populates the build list from the current "available" facilities. |
| 99 | */ |
| 100 | void BuildFacilitiesState::PopulateBuildList() |
| 101 | { |
| 102 | const std::vector<std::string> &facilities = _game->getRuleset()->getBaseFacilitiesList(); |
| 103 | for (std::vector<std::string>::const_iterator i = facilities.begin(); i != facilities.end(); ++i) |
| 104 | { |
| 105 | RuleBaseFacility *rule = _game->getRuleset()->getBaseFacility(*i); |
| 106 | if (_game->getSavedGame()->isResearched(rule->getRequirements()) && !rule->isLift()) |
| 107 | _facilities.push_back(rule); |
| 108 | } |
| 109 | |
| 110 | for (std::vector<RuleBaseFacility*>::iterator i = _facilities.begin(); i != _facilities.end(); ++i) |
| 111 | { |
| 112 | _lstFacilities->addRow(1, tr((*i)->getType()).c_str()); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | /** |
| 117 | * The player can change the selected base |
nothing calls this directly
no test coverage detected