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

Method get

game/state/city/research.cpp:154–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152
153template <>
154sp<ResearchTopic> StateObject<ResearchTopic>::get(const GameState &state, const UString &id)
155{
156 auto it = state.research.topics.find(id);
157 if (it == state.research.topics.end())
158 {
159 LogError("No research topic matching ID \"%s\"", id);
160 return nullptr;
161 }
162 return it->second;
163}
164template <> const UString &StateObject<ResearchTopic>::getPrefix()
165{
166 static UString prefix = "RESEARCH_";

Callers 3

research.cppFile · 0.45
setResearchMethod · 0.45
updateMethod · 0.45

Calls 1

endMethod · 0.80

Tested by

no test coverage detected