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

Method getTotalEngineers

src/Savegame/Base.cpp:511–526  ·  view source on GitHub ↗

* Returns the total amount of engineers contained * in the base. * @return Number of engineers. */

Source from the content-addressed store, hash-verified

509 * @return Number of engineers.
510 */
511int Base::getTotalEngineers() const
512{
513 int total = _engineers;
514 for (std::vector<Transfer*>::const_iterator i = _transfers.begin(); i != _transfers.end(); ++i)
515 {
516 if ((*i)->getType() == TRANSFER_ENGINEER)
517 {
518 total += (*i)->getQuantity();
519 }
520 }
521 for (std::vector<Production *>::const_iterator iter = _productions.begin (); iter != _productions.end (); ++iter)
522 {
523 total += (*iter)->getAssignedEngineers();
524 }
525 return total;
526}
527
528/**
529 * Returns the amount of living quarters used up

Callers 3

MonthlyCostsStateMethod · 0.80
initMethod · 0.80
PurchaseStateMethod · 0.80

Calls 3

getAssignedEngineersMethod · 0.80
getTypeMethod · 0.45
getQuantityMethod · 0.45

Tested by

no test coverage detected