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

Method getShield

game/state/shared/agent.cpp:1430–1442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1428}
1429
1430int Agent::getShield(GameState &state) const
1431{
1432 int curShield = 0;
1433
1434 for (auto &e : equipment)
1435 {
1436 if (e->type->type != AEquipmentType::Type::DisruptorShield || !e->canBeUsed(state))
1437 continue;
1438 curShield += e->ammo;
1439 }
1440
1441 return curShield;
1442}
1443
1444void Agent::destroy()
1445{

Callers

nothing calls this directly

Calls 1

canBeUsedMethod · 0.45

Tested by

no test coverage detected