1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

gain_once fixup

This commit is contained in:
Zeno Rogue 2020-04-06 09:36:41 +02:00
parent b79eb4de1d
commit 8609389281

View File

@ -130,11 +130,12 @@ EX bool wrongMode(char flags) {
EX set<string> got_achievements; EX set<string> got_achievements;
EX void achievement_gain_once(const string& s) { EX void achievement_gain_once(const string& s, char flags IS(0)) {
LATE(achievement_gain_once(s)); LATE(achievement_gain_once(s, flags));
if(wrongMode(flags)) return;
if(got_achievements.count(s)) return; if(got_achievements.count(s)) return;
got_achievements.insert(s); got_achievements.insert(s);
achievement_gain(s.c_str()); achievement_gain(s.c_str(), flags);
} }
EX void achievement_log(const char* s, char flags) { EX void achievement_log(const char* s, char flags) {