MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / getDependableManufacture

Method getDependableManufacture

src/Savegame/SavedGame.cpp:1198–1210  ·  view source on GitHub ↗

* 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 */

Source from the content-addressed store, hash-verified

1196 * @param base a pointer to a Base
1197 */
1198void 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.

Callers 1

time1DayMethod · 0.80

Calls 2

getManufactureMethod · 0.80
getNameMethod · 0.45

Tested by

no test coverage detected