def getAchievementFactory(name, dossier): if name in _ACHIEVEMENTS_BY_NAME: return _ACHIEVEMENTS_BY_NAME[name](name, dossier) else: achieveType = dossiers_utils.getAchievementType(name) if achieveType is not None and achieveType in _ACHIEVEMENTS_BY_TYPE: return _ACHIEVEMENTS_BY_TYPE[achieveType](name, dossier) return _AchieveFactory(achievements.RegularAchievement, name, dossier)
def getType(self): return dossiers_utils.getAchievementType(self.name)