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

Method removeItem

src/Savegame/Tile.cpp:720–731  ·  view source on GitHub ↗

* Remove an item from the tile. * @param item */

Source from the content-addressed store, hash-verified

718 * @param item
719 */
720void Tile::removeItem(BattleItem *item)
721{
722 for (std::vector<BattleItem*>::iterator i = _inventory.begin(); i != _inventory.end(); ++i)
723 {
724 if ((*i) == item)
725 {
726 _inventory.erase(i);
727 break;
728 }
729 }
730 item->setTile(0);
731}
732
733/**
734 * Get the topmost item sprite to draw on the battlescape.

Callers 15

setupDefensesMethod · 0.45
destroyFacilityMethod · 0.45
startItemMethod · 0.45
rearmMethod · 0.45
deployXCOMMethod · 0.45
createNewProjectileMethod · 0.45
thinkMethod · 0.45
performMeleeAttackMethod · 0.45
reequipCraftMethod · 0.45
handleAIMethod · 0.45
endTurnMethod · 0.45
primaryActionMethod · 0.45

Calls 1

setTileMethod · 0.45

Tested by

no test coverage detected