MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / unlockAchievement

Method unlockAchievement

source/game/StarStatistics.cpp:136–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136void Statistics::unlockAchievement(String const& name) {
137 if (achievementUnlocked(name))
138 return;
139 m_achievements.add(name);
140 if (m_service)
141 m_service->unlockAchievement(name);
142 Logger::debug("Achievement get {}", name);
143}
144
145bool Statistics::checkAchievement(String const& achievementName) {
146 auto statisticsDatabase = Root::singleton().statisticsDatabase();

Callers 1

Calls 1

addMethod · 0.45

Tested by

no test coverage detected