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

Method getImagePack

game/state/shared/agent.cpp:1351–1362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1349}
1350
1351StateRef<BattleUnitImagePack> Agent::getImagePack(BodyPart bodyPart) const
1352{
1353 EquipmentSlotType slotType = AgentType::getArmorSlotType(bodyPart);
1354
1355 auto e = getFirstItemInSlot(slotType);
1356 if (e)
1357 return e->type->body_image_pack;
1358 auto it = type->image_packs[appearance].find(bodyPart);
1359 if (it != type->image_packs[appearance].end())
1360 return it->second;
1361 return nullptr;
1362}
1363
1364sp<Equipment> Agent::getEquipmentAt(const Vec2<int> &position) const
1365{

Callers 1

drawMethod · 0.80

Calls 1

endMethod · 0.80

Tested by

no test coverage detected