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

Method getPersonnelMaintenance

src/Savegame/Base.cpp:920–927  ·  view source on GitHub ↗

* Returns the total amount of monthly costs * for maintaining the personnel in the base. * @return Maintenance costs. */

Source from the content-addressed store, hash-verified

918 * @return Maintenance costs.
919 */
920int Base::getPersonnelMaintenance() const
921{
922 size_t total = 0;
923 total += _soldiers.size() * _rule->getSoldierCost();
924 total += getTotalEngineers() * _rule->getEngineerCost();
925 total += getTotalScientists() * _rule->getScientistCost();
926 return total;
927}
928
929/**
930 * Returns the total amount of monthly costs

Callers 1

thinkMethod · 0.80

Calls 3

getSoldierCostMethod · 0.80
getEngineerCostMethod · 0.80
getScientistCostMethod · 0.80

Tested by

no test coverage detected