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

Method getAvailableLaboratories

src/Savegame/Base.cpp:679–690  ·  view source on GitHub ↗

* Returns the total amount of laboratories * available in the base. * @return Laboratory space. */

Source from the content-addressed store, hash-verified

677 * @return Laboratory space.
678 */
679int Base::getAvailableLaboratories() const
680{
681 int total = 0;
682 for (std::vector<BaseFacility*>::const_iterator i = _facilities.begin(); i != _facilities.end(); ++i)
683 {
684 if ((*i)->getBuildTime() == 0)
685 {
686 total += (*i)->getRules()->getLaboratories();
687 }
688 }
689 return total;
690}
691
692/**
693 * Returns the amount of workshops used up

Callers 2

inUseMethod · 0.80
initMethod · 0.80

Calls 3

getLaboratoriesMethod · 0.80
getBuildTimeMethod · 0.45
getRulesMethod · 0.45

Tested by

no test coverage detected