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

Method get

game/state/rules/aequipmenttype.cpp:23–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22template <>
23sp<AEquipmentType> StateObject<AEquipmentType>::get(const GameState &state, const UString &id)
24{
25 auto it = state.agent_equipment.find(id);
26 if (it == state.agent_equipment.end())
27 {
28 LogError("No aequipement type matching ID \"%s\"", id);
29 return nullptr;
30 }
31 return it->second;
32}
33
34template <> const UString &StateObject<EquipmentSet>::getPrefix()
35{

Callers 1

generateEquipmentListMethod · 0.45

Calls 1

endMethod · 0.80

Tested by

no test coverage detected