| 143 | } |
| 144 | |
| 145 | bool Statistics::checkAchievement(String const& achievementName) { |
| 146 | auto statisticsDatabase = Root::singleton().statisticsDatabase(); |
| 147 | auto achievement = statisticsDatabase->achievement(achievementName); |
| 148 | if (achievementUnlocked(achievement->name)) |
| 149 | return true; |
| 150 | |
| 151 | Maybe<bool> result = runStatScript<bool>(achievement->scripts, achievement->config, "check", achievementName); |
| 152 | return result && *result; |
| 153 | } |
| 154 | |
| 155 | void Statistics::readStatistics() { |
| 156 | auto versioningDatabase = Root::singleton().versioningDatabase(); |
nothing calls this directly
no test coverage detected