* Returns the total amount of short range * detection facilities in the base. * @return Defense value. */
| 848 | * @return Defense value. |
| 849 | */ |
| 850 | int 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 |
no test coverage detected