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

Method isSelectable

src/Savegame/BattleUnit.cpp:2642–2645  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

2640 * @return True if the unit can be selected, false otherwise.
2641 */
2642bool 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

Callers 2

selectPlayerUnitMethod · 0.80
endTurnMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected