* Checks if this unit can be selected. Only alive units * belonging to the faction can be selected. * @param faction The faction to compare with. * @param checkReselect Check if the unit is reselectable. * @param checkInventory Check if the unit has an inventory. * @return True if the unit can be selected, false otherwise. */
| 2640 | * @return True if the unit can be selected, false otherwise. |
| 2641 | */ |
| 2642 | bool BattleUnit::isSelectable(UnitFaction faction, bool checkReselect, bool checkInventory) const |
| 2643 | { |
| 2644 | return (_faction == faction && !isOut() && (!checkReselect || reselectAllowed()) && (!checkInventory || hasInventory())); |
| 2645 | } |
| 2646 | |
| 2647 | /** |
| 2648 | * Checks if this unit has an inventory. Large units and/or |
no outgoing calls
no test coverage detected