| 152 | |
| 153 | template <> |
| 154 | sp<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 | } |
| 164 | template <> const UString &StateObject<ResearchTopic>::getPrefix() |
| 165 | { |
| 166 | static UString prefix = "RESEARCH_"; |
no test coverage detected