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

Method getAvailableQuarters

src/Savegame/Base.cpp:543–554  ·  view source on GitHub ↗

* Returns the total amount of living quarters * available in the base. * @return Living space. */

Source from the content-addressed store, hash-verified

541 * @return Living space.
542 */
543int Base::getAvailableQuarters() const
544{
545 int total = 0;
546 for (std::vector<BaseFacility*>::const_iterator i = _facilities.begin(); i != _facilities.end(); ++i)
547 {
548 if ((*i)->getBuildTime() == 0)
549 {
550 total += (*i)->getRules()->getPersonnel();
551 }
552 }
553 return total;
554}
555
556/**
557 * Returns the amount of stores used up by equipment in the base,

Callers 4

inUseMethod · 0.80
initMethod · 0.80
increaseByValueMethod · 0.80
increaseByValueMethod · 0.80

Calls 3

getPersonnelMethod · 0.80
getBuildTimeMethod · 0.45
getRulesMethod · 0.45

Tested by

no test coverage detected