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

Method getShortRangeDetection

src/Savegame/Base.cpp:850–861  ·  view source on GitHub ↗

* Returns the total amount of short range * detection facilities in the base. * @return Defense value. */

Source from the content-addressed store, hash-verified

848 * @return Defense value.
849 */
850int Base::getShortRangeDetection() const
851{
852 int total = 0;
853 for (std::vector<BaseFacility*>::const_iterator i = _facilities.begin(); i != _facilities.end(); ++i)
854 {
855 if ((*i)->getBuildTime() == 0 && (*i)->getRules()->getRadarRange() == 1500)
856 {
857 total++;
858 }
859 }
860 return total;
861}
862
863/**
864 * Returns the total amount of long range

Callers 1

initMethod · 0.80

Calls 3

getBuildTimeMethod · 0.45
getRadarRangeMethod · 0.45
getRulesMethod · 0.45

Tested by

no test coverage detected