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

Method getAvailableWorkshops

src/Savegame/Base.cpp:712–723  ·  view source on GitHub ↗

* Returns the total amount of workshops * available in the base. * @return Workshop space. */

Source from the content-addressed store, hash-verified

710 * @return Workshop space.
711 */
712int Base::getAvailableWorkshops() const
713{
714 int total = 0;
715 for (std::vector<BaseFacility*>::const_iterator i = _facilities.begin(); i != _facilities.end(); ++i)
716 {
717 if ((*i)->getBuildTime() == 0)
718 {
719 total += (*i)->getRules()->getWorkshops();
720 }
721 }
722 return total;
723}
724
725/**
726 * Returns the amount of hangars used up

Callers 2

inUseMethod · 0.80
initMethod · 0.80

Calls 3

getWorkshopsMethod · 0.80
getBuildTimeMethod · 0.45
getRulesMethod · 0.45

Tested by

no test coverage detected