MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / addItemToInventoryBattle

Method addItemToInventoryBattle

game/ui/general/aequipscreen.cpp:1176–1191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1174}
1175
1176void AEquipScreen::addItemToInventoryBattle(sp<AEquipment> item)
1177{
1178 // Expecting to have an agent
1179 auto currentAgent = selectedAgents.front();
1180
1181 item->ownerUnit = currentAgent->unit;
1182 auto bi = state->current_battle->placeItem(*state, item, currentAgent->unit->position);
1183 if (bi->findSupport())
1184 {
1185 bi->getSupport();
1186 }
1187 else
1188 {
1189 bi->falling = true;
1190 }
1191}
1192
1193void AEquipScreen::addItemToInventoryBase(sp<AEquipment> item)
1194{

Callers

nothing calls this directly

Calls 3

placeItemMethod · 0.80
getSupportMethod · 0.80
findSupportMethod · 0.45

Tested by

no test coverage detected