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

Method get

game/state/rules/agenttype.cpp:25–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

agenttype.cppFile · 0.45

Calls 1

endMethod · 0.80

Tested by

no test coverage detected