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

Method getType

src/Basescape/SellState.cpp:741–755  ·  view source on GitHub ↗

* Gets the Type of the selected item. * @param selected Currently selected item. * @return The type of the selected item. */

Source from the content-addressed store, hash-verified

739 * @return The type of the selected item.
740 */
741enum SellType SellState::getType(size_t selected) const
742{
743 size_t max = _soldiers.size();
744
745 if (selected < max)
746 return SELL_SOLDIER;
747 if (selected < (max += _crafts.size()) )
748 return SELL_CRAFT;
749 if (selected < (max += _hasSci))
750 return SELL_SCIENTIST;
751 if (selected < (max += _hasEng))
752 return SELL_ENGINEER;
753
754 return SELL_ITEM;
755}
756
757/**
758 * Gets the index of the selected item.

Callers 15

runMethod · 0.45
addXCOMVehicleMethod · 0.45
placeItemByLayoutMethod · 0.45
addItemMethod · 0.45
setupPatrolMethod · 0.45
saveEquipmentLayoutMethod · 0.45
drawRoutine0Method · 0.45
setupPatrolMethod · 0.45
prepareDebriefingMethod · 0.45
reequipCraftMethod · 0.45
recoverItemsMethod · 0.45
handleAIMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected