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

Method getFacilityMaintenance

src/Savegame/Base.cpp:934–945  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

932 * @return Maintenance costs.
933 */
934int Base::getFacilityMaintenance() const
935{
936 int total = 0;
937 for (std::vector<BaseFacility*>::const_iterator i = _facilities.begin(); i != _facilities.end(); ++i)
938 {
939 if ((*i)->getBuildTime() == 0)
940 {
941 total += (*i)->getRules()->getMonthlyCost();
942 }
943 }
944 return total;
945}
946
947/**
948 * Returns the total amount of all the maintenance

Callers 1

MonthlyCostsStateMethod · 0.80

Calls 3

getMonthlyCostMethod · 0.80
getBuildTimeMethod · 0.45
getRulesMethod · 0.45

Tested by

no test coverage detected