mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
refactor(achievements): crush down to much fewer notification types
most work by @CuriousMagpie
This commit is contained in:
@@ -55,27 +55,30 @@ const seasonalSpellAchievs = {
|
||||
};
|
||||
Object.assign(achievementsData, seasonalSpellAchievs);
|
||||
|
||||
const masterAchievs = {
|
||||
const stableAchievs = {
|
||||
beastMaster: {
|
||||
icon: 'achievement-rat',
|
||||
titleKey: 'beastMasterName',
|
||||
textKey: 'beastMasterText',
|
||||
text2Key: 'beastMasterText2',
|
||||
notificationText: 'beastAchievement',
|
||||
},
|
||||
mountMaster: {
|
||||
icon: 'achievement-wolf',
|
||||
titleKey: 'mountMasterName',
|
||||
textKey: 'mountMasterText',
|
||||
text2Key: 'mountMasterText2',
|
||||
notificationText: 'mountAchievement',
|
||||
},
|
||||
triadBingo: {
|
||||
icon: 'achievement-triadbingo',
|
||||
titleKey: 'triadBingoName',
|
||||
textKey: 'triadBingoText',
|
||||
text2Key: 'triadBingoText2',
|
||||
notificationText: 'triadBingoAchievement',
|
||||
},
|
||||
};
|
||||
Object.assign(achievementsData, masterAchievs);
|
||||
Object.assign(achievementsData, stableAchievs);
|
||||
|
||||
const basicAchievs = {
|
||||
partyUp: {
|
||||
@@ -122,146 +125,173 @@ const basicAchievs = {
|
||||
titleKey: 'invitedFriend',
|
||||
textKey: 'invitedFriendText',
|
||||
},
|
||||
};
|
||||
Object.assign(achievementsData, basicAchievs);
|
||||
|
||||
const questSeriesAchievs = {
|
||||
lostMasterclasser: {
|
||||
icon: 'achievement-lostMasterclasser',
|
||||
titleKey: 'achievementLostMasterclasser',
|
||||
textKey: 'achievementLostMasterclasserText',
|
||||
},
|
||||
mindOverMatter: {
|
||||
icon: 'achievement-mindOverMatter',
|
||||
titleKey: 'achievementMindOverMatter',
|
||||
textKey: 'achievementMindOverMatterText',
|
||||
},
|
||||
justAddWater: {
|
||||
icon: 'achievement-justAddWater',
|
||||
titleKey: 'achievementJustAddWater',
|
||||
textKey: 'achievementJustAddWaterText',
|
||||
},
|
||||
backToBasics: {
|
||||
icon: 'achievement-backToBasics',
|
||||
titleKey: 'achievementBackToBasics',
|
||||
textKey: 'achievementBackToBasicsText',
|
||||
},
|
||||
allYourBase: {
|
||||
icon: 'achievement-allYourBase',
|
||||
titleKey: 'achievementAllYourBase',
|
||||
textKey: 'achievementAllYourBaseText',
|
||||
},
|
||||
dustDevil: {
|
||||
icon: 'achievement-dustDevil',
|
||||
titleKey: 'achievementDustDevil',
|
||||
textKey: 'achievementDustDevilText',
|
||||
},
|
||||
aridAuthority: {
|
||||
icon: 'achievement-aridAuthority',
|
||||
titleKey: 'achievementAridAuthority',
|
||||
textKey: 'achievementAridAuthorityText',
|
||||
},
|
||||
monsterMagus: {
|
||||
icon: 'achievement-monsterMagus',
|
||||
titleKey: 'achievementMonsterMagus',
|
||||
textKey: 'achievementMonsterMagusText',
|
||||
},
|
||||
undeadUndertaker: {
|
||||
icon: 'achievement-undeadUndertaker',
|
||||
titleKey: 'achievementUndeadUndertaker',
|
||||
textKey: 'achievementUndeadUndertakerText',
|
||||
},
|
||||
primedForPainting: {
|
||||
icon: 'achievement-primedForPainting',
|
||||
titleKey: 'achievementPrimedForPainting',
|
||||
textKey: 'achievementPrimedForPaintingText',
|
||||
},
|
||||
pearlyPro: {
|
||||
icon: 'achievement-pearlyPro',
|
||||
titleKey: 'achievementPearlyPro',
|
||||
textKey: 'achievementPearlyProText',
|
||||
},
|
||||
tickledPink: {
|
||||
icon: 'achievement-tickledPink',
|
||||
titleKey: 'achievementTickledPink',
|
||||
textKey: 'achievementTickledPinkText',
|
||||
},
|
||||
rosyOutlook: {
|
||||
icon: 'achievement-rosyOutlook',
|
||||
titleKey: 'achievementRosyOutlook',
|
||||
textKey: 'achievementRosyOutlookText',
|
||||
},
|
||||
bugBonanza: {
|
||||
icon: 'achievement-bugBonanza',
|
||||
titleKey: 'achievementBugBonanza',
|
||||
textKey: 'achievementBugBonanzaText',
|
||||
},
|
||||
bareNecessities: {
|
||||
icon: 'achievement-bareNecessities',
|
||||
titleKey: 'achievementBareNecessities',
|
||||
textKey: 'achievementBareNecessitiesText',
|
||||
},
|
||||
bugBonanza: {
|
||||
icon: 'achievement-bugBonanza',
|
||||
titleKey: 'achievementBugBonanza',
|
||||
textKey: 'achievementBugBonanzaText',
|
||||
},
|
||||
freshwaterFriends: {
|
||||
icon: 'achievement-freshwaterFriends',
|
||||
titleKey: 'achievementFreshwaterFriends',
|
||||
textKey: 'achievementFreshwaterFriendsText',
|
||||
},
|
||||
goodAsGold: {
|
||||
icon: 'achievement-goodAsGold',
|
||||
titleKey: 'achievementGoodAsGold',
|
||||
textKey: 'achievementGoodAsGoldText',
|
||||
justAddWater: {
|
||||
icon: 'achievement-justAddWater',
|
||||
titleKey: 'achievementJustAddWater',
|
||||
textKey: 'achievementJustAddWaterText',
|
||||
},
|
||||
allThatGlitters: {
|
||||
icon: 'achievement-allThatGlitters',
|
||||
titleKey: 'achievementAllThatGlitters',
|
||||
textKey: 'achievementAllThatGlittersText',
|
||||
},
|
||||
boneCollector: {
|
||||
icon: 'achievement-boneCollector',
|
||||
titleKey: 'achievementBoneCollector',
|
||||
textKey: 'achievementBoneCollectorText',
|
||||
},
|
||||
skeletonCrew: {
|
||||
icon: 'achievement-skeletonCrew',
|
||||
titleKey: 'achievementSkeletonCrew',
|
||||
textKey: 'achievementSkeletonCrewText',
|
||||
},
|
||||
seeingRed: {
|
||||
icon: 'achievement-seeingRed',
|
||||
titleKey: 'achievementSeeingRed',
|
||||
textKey: 'achievementSeeingRedText',
|
||||
},
|
||||
redLetterDay: {
|
||||
icon: 'achievement-redLetterDay',
|
||||
titleKey: 'achievementRedLetterDay',
|
||||
textKey: 'achievementRedLetterDayText',
|
||||
},
|
||||
legendaryBestiary: {
|
||||
icon: 'achievement-legendaryBestiary',
|
||||
titleKey: 'achievementLegendaryBestiary',
|
||||
textKey: 'achievementLegendaryBestiaryText',
|
||||
mindOverMatter: {
|
||||
icon: 'achievement-mindOverMatter',
|
||||
titleKey: 'achievementMindOverMatter',
|
||||
textKey: 'achievementMindOverMatterText',
|
||||
},
|
||||
seasonalSpecialist: {
|
||||
icon: 'achievement-seasonalSpecialist',
|
||||
titleKey: 'achievementSeasonalSpecialist',
|
||||
textKey: 'achievementSeasonalSpecialistText',
|
||||
},
|
||||
violetsAreBlue: {
|
||||
icon: 'achievement-violetsAreBlue',
|
||||
titleKey: 'achievementVioletsAreBlue',
|
||||
textKey: 'achievementVioletsAreBlueText',
|
||||
};
|
||||
Object.assign(achievementsData, questSeriesAchievs);
|
||||
|
||||
const animalSetAchievs = {
|
||||
legendaryBestiary: {
|
||||
icon: 'achievement-legendaryBestiary',
|
||||
titleKey: 'achievementLegendaryBestiary',
|
||||
textKey: 'achievementLegendaryBestiaryText',
|
||||
},
|
||||
wildBlueYonder: {
|
||||
icon: 'achievement-wildBlueYonder',
|
||||
titleKey: 'achievementWildBlueYonder',
|
||||
textKey: 'achievementWildBlueYonderText',
|
||||
birdsOfAFeather: {
|
||||
icon: 'achievement-birdsOfAFeather',
|
||||
titleKey: 'achievementBirdsOfAFeather',
|
||||
textKey: 'achievementBirdsOfAFeatherText',
|
||||
},
|
||||
domesticated: {
|
||||
icon: 'achievement-domesticated',
|
||||
titleKey: 'achievementDomesticated',
|
||||
textKey: 'achievementDomesticatedText',
|
||||
},
|
||||
zodiacZookeeper: {
|
||||
icon: 'achievement-zodiac',
|
||||
titleKey: 'achievementZodiacZookeeper',
|
||||
textKey: 'achievementZodiacZookeeperText',
|
||||
},
|
||||
};
|
||||
Object.assign(achievementsData, animalSetAchievs);
|
||||
|
||||
const petColorAchievs = {
|
||||
backToBasics: {
|
||||
icon: 'achievement-backToBasics',
|
||||
titleKey: 'achievementBackToBasics',
|
||||
textKey: 'achievementBackToBasicsText',
|
||||
},
|
||||
dustDevil: {
|
||||
icon: 'achievement-dustDevil',
|
||||
titleKey: 'achievementDustDevil',
|
||||
textKey: 'achievementDustDevilText',
|
||||
},
|
||||
monsterMagus: {
|
||||
icon: 'achievement-monsterMagus',
|
||||
titleKey: 'achievementMonsterMagus',
|
||||
textKey: 'achievementMonsterMagusText',
|
||||
},
|
||||
primedForPainting: {
|
||||
icon: 'achievement-primedForPainting',
|
||||
titleKey: 'achievementPrimedForPainting',
|
||||
textKey: 'achievementPrimedForPaintingText',
|
||||
},
|
||||
tickledPink: {
|
||||
icon: 'achievement-tickledPink',
|
||||
titleKey: 'achievementTickledPink',
|
||||
textKey: 'achievementTickledPinkText',
|
||||
},
|
||||
goodAsGold: {
|
||||
icon: 'achievement-goodAsGold',
|
||||
titleKey: 'achievementGoodAsGold',
|
||||
textKey: 'achievementGoodAsGoldText',
|
||||
},
|
||||
boneCollector: {
|
||||
icon: 'achievement-boneCollector',
|
||||
titleKey: 'achievementBoneCollector',
|
||||
textKey: 'achievementBoneCollectorText',
|
||||
},
|
||||
seeingRed: {
|
||||
icon: 'achievement-seeingRed',
|
||||
titleKey: 'achievementSeeingRed',
|
||||
textKey: 'achievementSeeingRedText',
|
||||
modalTextKey: 'achievementSeeingRedModalText',
|
||||
},
|
||||
violetsAreBlue: {
|
||||
icon: 'achievement-violetsAreBlue',
|
||||
titleKey: 'achievementVioletsAreBlue',
|
||||
textKey: 'achievementVioletsAreBlueText',
|
||||
},
|
||||
shadyCustomer: {
|
||||
icon: 'achievement-shadyCustomer',
|
||||
titleKey: 'achievementShadyCustomer',
|
||||
textKey: 'achievementShadyCustomerText',
|
||||
},
|
||||
};
|
||||
Object.assign(achievementsData, petColorAchievs);
|
||||
|
||||
const mountColorAchievs = {
|
||||
allYourBase: {
|
||||
icon: 'achievement-allYourBase',
|
||||
titleKey: 'achievementAllYourBase',
|
||||
textKey: 'achievementAllYourBaseText',
|
||||
},
|
||||
aridAuthority: {
|
||||
icon: 'achievement-aridAuthority',
|
||||
titleKey: 'achievementAridAuthority',
|
||||
textKey: 'achievementAridAuthorityText',
|
||||
},
|
||||
undeadUndertaker: {
|
||||
icon: 'achievement-undeadUndertaker',
|
||||
titleKey: 'achievementUndeadUndertaker',
|
||||
textKey: 'achievementUndeadUndertakerText',
|
||||
},
|
||||
pearlyPro: {
|
||||
icon: 'achievement-pearlyPro',
|
||||
titleKey: 'achievementPearlyPro',
|
||||
textKey: 'achievementPearlyProText',
|
||||
},
|
||||
rosyOutlook: {
|
||||
icon: 'achievement-rosyOutlook',
|
||||
titleKey: 'achievementRosyOutlook',
|
||||
textKey: 'achievementRosyOutlookText',
|
||||
},
|
||||
allThatGlitters: {
|
||||
icon: 'achievement-allThatGlitters',
|
||||
titleKey: 'achievementAllThatGlitters',
|
||||
textKey: 'achievementAllThatGlittersText',
|
||||
},
|
||||
skeletonCrew: {
|
||||
icon: 'achievement-skeletonCrew',
|
||||
titleKey: 'achievementSkeletonCrew',
|
||||
textKey: 'achievementSkeletonCrewText',
|
||||
},
|
||||
redLetterDay: {
|
||||
icon: 'achievement-redLetterDay',
|
||||
titleKey: 'achievementRedLetterDay',
|
||||
textKey: 'achievementRedLetterDayText',
|
||||
},
|
||||
wildBlueYonder: {
|
||||
icon: 'achievement-wildBlueYonder',
|
||||
titleKey: 'achievementWildBlueYonder',
|
||||
textKey: 'achievementWildBlueYonderText',
|
||||
},
|
||||
shadeOfItAll: {
|
||||
icon: 'achievement-shadeOfItAll',
|
||||
titleKey: 'achievementShadeOfItAll',
|
||||
@@ -278,7 +308,7 @@ const basicAchievs = {
|
||||
textKey: 'achievementBirdsOfAFeatherText',
|
||||
},
|
||||
};
|
||||
Object.assign(achievementsData, basicAchievs);
|
||||
Object.assign(achievementsData, mountColorAchievs);
|
||||
|
||||
const onboardingAchievs = {
|
||||
createdTask: {
|
||||
|
||||
@@ -2,72 +2,72 @@ const ANIMAL_COLOR_ACHIEVEMENTS = [
|
||||
{
|
||||
color: 'Base',
|
||||
petAchievement: 'backToBasics',
|
||||
petNotificationType: 'ACHIEVEMENT_BACK_TO_BASICS',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'allYourBase',
|
||||
mountNotificationType: 'ACHIEVEMENT_ALL_YOUR_BASE',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'Desert',
|
||||
petAchievement: 'dustDevil',
|
||||
petNotificationType: 'ACHIEVEMENT_DUST_DEVIL',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'aridAuthority',
|
||||
mountNotificationType: 'ACHIEVEMENT_ARID_AUTHORITY',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'Zombie',
|
||||
petAchievement: 'monsterMagus',
|
||||
petNotificationType: 'ACHIEVEMENT_MONSTER_MAGUS',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'undeadUndertaker',
|
||||
mountNotificationType: 'ACHIEVEMENT_UNDEAD_UNDERTAKER',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'White',
|
||||
petAchievement: 'primedForPainting',
|
||||
petNotificationType: 'ACHIEVEMENT_PRIMED_FOR_PAINTING',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'pearlyPro',
|
||||
mountNotificationType: 'ACHIEVEMENT_PEARLY_PRO',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'CottonCandyPink',
|
||||
petAchievement: 'tickledPink',
|
||||
petNotificationType: 'ACHIEVEMENT_TICKLED_PINK',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'rosyOutlook',
|
||||
mountNotificationType: 'ACHIEVEMENT_ROSY_OUTLOOK',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'Golden',
|
||||
petAchievement: 'goodAsGold',
|
||||
petNotificationType: 'ACHIEVEMENT_GOOD_AS_GOLD',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'allThatGlitters',
|
||||
mountNotificationType: 'ACHIEVEMENT_ALL_THAT_GLITTERS',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'Skeleton',
|
||||
petAchievement: 'boneCollector',
|
||||
petNotificationType: 'ACHIEVEMENT_BONE_COLLECTOR',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'skeletonCrew',
|
||||
mountNotificationType: 'ACHIEVEMENT_SKELETON_CREW',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'Red',
|
||||
petAchievement: 'seeingRed',
|
||||
petNotificationType: 'ACHIEVEMENT_SEEING_RED',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'redLetterDay',
|
||||
mountNotificationType: 'ACHIEVEMENT_RED_LETTER_DAY',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'CottonCandyBlue',
|
||||
petAchievement: 'violetsAreBlue',
|
||||
petNotificationType: 'ACHIEVEMENT_VIOLETS_ARE_BLUE',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'wildBlueYonder',
|
||||
mountNotificationType: 'ACHIEVEMENT_WILD_BLUE_YONDER',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'Shade',
|
||||
petAchievement: 'shadyCustomer',
|
||||
petNotificationType: 'ACHIEVEMENT_SHADY_CUSTOMER',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'shadeOfItAll',
|
||||
mountNotificationType: 'ACHIEVEMENT_SHADE_OF_IT_ALL',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ const ANIMAL_SET_ACHIEVEMENTS = {
|
||||
'Unicorn',
|
||||
],
|
||||
achievementKey: 'legendaryBestiary',
|
||||
notificationType: 'ACHIEVEMENT_LEGENDARY_BESTIARY',
|
||||
notificationType: 'ACHIEVEMENT_ANIMAL_SET',
|
||||
},
|
||||
birdsOfAFeather: {
|
||||
type: 'pet',
|
||||
@@ -24,7 +24,7 @@ const ANIMAL_SET_ACHIEVEMENTS = {
|
||||
'Peacock',
|
||||
],
|
||||
achievementKey: 'birdsOfAFeather',
|
||||
notificationType: 'ACHIEVEMENT_BIRDS_OF_A_FEATHER',
|
||||
notificationType: 'ACHIEVEMENT_ANIMAL_SET',
|
||||
},
|
||||
domesticated: {
|
||||
type: 'pet',
|
||||
@@ -39,7 +39,7 @@ const ANIMAL_SET_ACHIEVEMENTS = {
|
||||
'Cow',
|
||||
],
|
||||
achievementKey: 'domesticated',
|
||||
notificationType: 'ACHIEVEMENT_DOMESTICATED',
|
||||
notificationType: 'ACHIEVEMENT_ANIMAL_SET',
|
||||
},
|
||||
zodiacZookeeper: {
|
||||
type: 'pet',
|
||||
@@ -53,12 +53,12 @@ const ANIMAL_SET_ACHIEVEMENTS = {
|
||||
'Monkey',
|
||||
'Rooster',
|
||||
'Wolf',
|
||||
'TigerCub',
|
||||
'Tiger',
|
||||
'FlyingPig',
|
||||
'Dragon',
|
||||
],
|
||||
achievementKey: 'zodiacZookeeper',
|
||||
notificationType: 'ACHIEVEMENT_ZODIAC_ZOOKEEPER',
|
||||
notificationType: 'ACHIEVEMENT_ANIMAL_SET',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ export { default as SEASONAL_SETS } from './seasonalSets';
|
||||
export { default as ANIMAL_COLOR_ACHIEVEMENTS } from './animalColorAchievements';
|
||||
export { default as ANIMAL_SET_ACHIEVEMENTS } from './animalSetAchievements';
|
||||
export { default as QUEST_SERIES_ACHIEVEMENTS } from './questSeriesAchievements';
|
||||
export { default as STABLE_ACHIEVEMENTS } from './stableAchievements';
|
||||
export { default as ITEM_LIST } from './itemList';
|
||||
export { default as QUEST_SERIES } from '../quests/series';
|
||||
export { default as QUEST_MASTERCLASSER } from '../quests/masterclasser';
|
||||
|
||||
@@ -17,10 +17,21 @@ const QUEST_SERIES_ACHIEVEMENTS = {
|
||||
'lostMasterclasser3',
|
||||
'lostMasterclasser4',
|
||||
],
|
||||
mindOverMatter: [
|
||||
'rock',
|
||||
'slime',
|
||||
'yarn',
|
||||
bareNecessities: [
|
||||
'monkey',
|
||||
'sloth',
|
||||
'treeling',
|
||||
],
|
||||
bugBonanza: [
|
||||
'beetle',
|
||||
'butterfly',
|
||||
'snail',
|
||||
'spider',
|
||||
],
|
||||
freshwaterFriends: [
|
||||
'axolotl',
|
||||
'frog',
|
||||
'hippo',
|
||||
],
|
||||
justAddWater: [
|
||||
'octopus',
|
||||
@@ -32,21 +43,10 @@ const QUEST_SERIES_ACHIEVEMENTS = {
|
||||
'seaserpent',
|
||||
'dolphin',
|
||||
],
|
||||
bugBonanza: [
|
||||
'beetle',
|
||||
'butterfly',
|
||||
'snail',
|
||||
'spider',
|
||||
],
|
||||
bareNecessities: [
|
||||
'monkey',
|
||||
'sloth',
|
||||
'treeling',
|
||||
],
|
||||
freshwaterFriends: [
|
||||
'axolotl',
|
||||
'frog',
|
||||
'hippo',
|
||||
mindOverMatter: [
|
||||
'rock',
|
||||
'slime',
|
||||
'yarn',
|
||||
],
|
||||
seasonalSpecialist: [
|
||||
'egg',
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
const STABLE_ACHIEVEMENTS = {
|
||||
ACHIEVEMENT_BEAST_MASTER: {
|
||||
masterAchievement: 'beastMasterName',
|
||||
masterNotificationType: 'ACHIEVEMENT_STABLE',
|
||||
},
|
||||
ACHIEVEMENT_MOUNT_MASTER: {
|
||||
masterAchievement: 'mountMasterName',
|
||||
masterNotificationType: 'ACHIEVEMENT_STABLE',
|
||||
},
|
||||
ACHIEVEMENT_TRIAD_BINGO: {
|
||||
masterAchievement: 'triadBingoName',
|
||||
masterNotificationType: 'ACHIEVEMENT_STABLE',
|
||||
},
|
||||
};
|
||||
|
||||
export default STABLE_ACHIEVEMENTS;
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
QUEST_SERIES_ACHIEVEMENTS,
|
||||
ANIMAL_COLOR_ACHIEVEMENTS,
|
||||
ANIMAL_SET_ACHIEVEMENTS,
|
||||
STABLE_ACHIEVEMENTS,
|
||||
} from './constants';
|
||||
|
||||
import achievements from './achievements';
|
||||
@@ -41,6 +42,7 @@ api.achievements = achievements;
|
||||
api.questSeriesAchievements = QUEST_SERIES_ACHIEVEMENTS;
|
||||
api.animalColorAchievements = ANIMAL_COLOR_ACHIEVEMENTS;
|
||||
api.animalSetAchievements = ANIMAL_SET_ACHIEVEMENTS;
|
||||
api.stableAchievements = STABLE_ACHIEVEMENTS;
|
||||
|
||||
api.quests = quests;
|
||||
api.questsByLevel = questsByLevel;
|
||||
|
||||
@@ -130,6 +130,7 @@ export default function feed (user, req = {}, analytics) {
|
||||
if (user.addNotification) {
|
||||
const achievementString = `achievement${upperFirst(achievement.mountAchievement)}`;
|
||||
user.addNotification(achievement.mountNotificationType, {
|
||||
label: `${'achievement'}: ${achievementString}`,
|
||||
achievement: achievement.mountAchievement,
|
||||
message: `${i18n.t('modalAchievement')} ${i18n.t(achievementString)}`,
|
||||
modalText: i18n.t(`${achievementString}ModalText`),
|
||||
|
||||
@@ -72,6 +72,7 @@ export default function hatch (user, req = {}, analytics) {
|
||||
if (user.addNotification) {
|
||||
const achievementString = `achievement${upperFirst(achievement.petAchievement)}`;
|
||||
user.addNotification(achievement.petNotificationType, {
|
||||
label: `${'achievement'}: ${achievementString}`,
|
||||
achievement: achievement.petAchievement,
|
||||
message: `${i18n.t('modalAchievement')} ${i18n.t(achievementString)}`,
|
||||
modalText: i18n.t(`${achievementString}ModalText`),
|
||||
@@ -100,6 +101,7 @@ export default function hatch (user, req = {}, analytics) {
|
||||
if (user.addNotification) {
|
||||
const achievementString = `achievement${upperFirst(achievement.achievementKey)}`;
|
||||
user.addNotification(achievement.notificationType, {
|
||||
label: `${'achievement'}: ${achievementString}`,
|
||||
achievement: achievement.achievementKey,
|
||||
message: `${i18n.t('modalAchievement')} ${i18n.t(achievementString)}`,
|
||||
modalText: i18n.t(`${achievementString}ModalText`),
|
||||
|
||||
Reference in New Issue
Block a user