* Get the list of newly available manufacture projects once a ResearchProject has been completed. This function check for fake ResearchProject. * @param dependables the list of RuleManufacture which are now available. * @param research The RuleResearch which has just been discovered * @param ruleset the Game Ruleset * @param base a pointer to a Base */
| 1196 | * @param base a pointer to a Base |
| 1197 | */ |
| 1198 | void SavedGame::getDependableManufacture (std::vector<RuleManufacture *> & dependables, const RuleResearch *research, const Ruleset * ruleset, Base *) const |
| 1199 | { |
| 1200 | const std::vector<std::string> &mans = ruleset->getManufactureList(); |
| 1201 | for(std::vector<std::string>::const_iterator iter = mans.begin (); iter != mans.end (); ++iter) |
| 1202 | { |
| 1203 | RuleManufacture *m = ruleset->getManufacture(*iter); |
| 1204 | const std::vector<std::string> &reqs = m->getRequirements(); |
| 1205 | if(isResearched(m->getRequirements()) && std::find(reqs.begin(), reqs.end(), research->getName()) != reqs.end()) |
| 1206 | { |
| 1207 | dependables.push_back(m); |
| 1208 | } |
| 1209 | } |
| 1210 | } |
| 1211 | |
| 1212 | /** |
| 1213 | * Returns if a certain research has been completed. |
no test coverage detected