1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-04 03:27:55 +00:00

achievement_gain_once

This commit is contained in:
Zeno Rogue
2020-03-06 14:22:36 +01:00
parent e53ff34cec
commit ca7f0cb4c3
3 changed files with 16 additions and 11 deletions

View File

@@ -128,6 +128,15 @@ EX bool wrongMode(char flags) {
return false;
}
EX set<string> got_achievements;
EX void achievement_gain_once(const string& s) {
LATE(achievement_gain_once(s));
if(got_achievements.count(s)) return;
got_achievements.insert(s);
achievement_gain(s.c_str());
}
EX void achievement_log(const char* s, char flags) {
#ifdef PRINT_ACHIEVEMENTS