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

Method get

game/state/shared/agent.cpp:29–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27static const unsigned TICKS_PER_PSI_TRAINING = 4 * TICKS_PER_HOUR;
28
29template <> sp<Agent> StateObject<Agent>::get(const GameState &state, const UString &id)
30{
31 auto it = state.agents.find(id);
32 if (it == state.agents.end())
33 {
34 LogError("No agent matching ID \"%s\"", id);
35 return nullptr;
36 }
37 return it->second;
38}
39
40template <> const UString &StateObject<Agent>::getPrefix()
41{

Callers 3

getAutoreloadAmmoTypeFunction · 0.45
agent.cppFile · 0.45
createAgentMethod · 0.45

Calls 1

endMethod · 0.80

Tested by

no test coverage detected