| 26 | } |
| 27 | |
| 28 | List<PlayerCodexes::CodexEntry> PlayerCodexes::codexes() const { |
| 29 | List<CodexEntry> result; |
| 30 | for (auto pair : m_codexes) |
| 31 | result.append(pair.second); |
| 32 | sort(result, |
| 33 | [](CodexEntry const& left, CodexEntry const& right) -> bool { |
| 34 | return make_tuple(left.second, left.first->title()) < make_tuple(right.second, right.first->title()); |
| 35 | }); |
| 36 | return result; |
| 37 | } |
| 38 | |
| 39 | bool PlayerCodexes::codexKnown(String const& codexId) const { |
| 40 | return m_codexes.contains(codexId); |