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

Method getDefenseValue

src/Savegame/Base.cpp:832–843  ·  view source on GitHub ↗

* Returns the total defense value of all * the facilities in the base. * @return Defense value. */

Source from the content-addressed store, hash-verified

830 * @return Defense value.
831 */
832int Base::getDefenseValue() const
833{
834 int total = 0;
835 for (std::vector<BaseFacility*>::const_iterator i = _facilities.begin(); i != _facilities.end(); ++i)
836 {
837 if ((*i)->getBuildTime() == 0)
838 {
839 total += (*i)->getRules()->getDefenseValue();
840 }
841 }
842 return total;
843}
844
845/**
846 * Returns the total amount of short range

Callers 4

setupDefensesMethod · 0.45
initMethod · 0.45
nextStepMethod · 0.45

Calls 2

getBuildTimeMethod · 0.45
getRulesMethod · 0.45

Tested by

no test coverage detected