mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
feat(content): seasonal quest achievement
This commit is contained in:
@@ -395,6 +395,14 @@ const NOTIFICATIONS = {
|
|||||||
achievement: 'legendaryBestiary',
|
achievement: 'legendaryBestiary',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
ACHIEVEMENT_SEASONAL_SPECIALIST: {
|
||||||
|
achievement: true,
|
||||||
|
label: $t => `${$t('achievement')}: ${$t('achievementSeasonalSpecialist')}`,
|
||||||
|
modalId: 'generic-achievement',
|
||||||
|
data: {
|
||||||
|
achievement: 'seasonalSpecialist',
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -457,7 +465,7 @@ export default {
|
|||||||
'ONBOARDING_COMPLETE', 'FIRST_DROPS', 'ACHIEVEMENT_BUG_BONANZA', 'ACHIEVEMENT_BARE_NECESSITIES',
|
'ONBOARDING_COMPLETE', 'FIRST_DROPS', 'ACHIEVEMENT_BUG_BONANZA', 'ACHIEVEMENT_BARE_NECESSITIES',
|
||||||
'ACHIEVEMENT_FRESHWATER_FRIENDS', 'ACHIEVEMENT_GOOD_AS_GOLD', 'ACHIEVEMENT_ALL_THAT_GLITTERS',
|
'ACHIEVEMENT_FRESHWATER_FRIENDS', 'ACHIEVEMENT_GOOD_AS_GOLD', 'ACHIEVEMENT_ALL_THAT_GLITTERS',
|
||||||
'ACHIEVEMENT_BONE_COLLECTOR', 'ACHIEVEMENT_SKELETON_CREW', 'ACHIEVEMENT_SEEING_RED',
|
'ACHIEVEMENT_BONE_COLLECTOR', 'ACHIEVEMENT_SKELETON_CREW', 'ACHIEVEMENT_SEEING_RED',
|
||||||
'ACHIEVEMENT_RED_LETTER_DAY', 'ACHIEVEMENT_LEGENDARY_BESTIARY',
|
'ACHIEVEMENT_RED_LETTER_DAY', 'ACHIEVEMENT_LEGENDARY_BESTIARY', 'ACHIEVEMENT_SEASONAL_SPECIALIST',
|
||||||
].forEach(type => {
|
].forEach(type => {
|
||||||
handledNotifications[type] = true;
|
handledNotifications[type] = true;
|
||||||
});
|
});
|
||||||
@@ -879,6 +887,7 @@ export default {
|
|||||||
case 'ACHIEVEMENT_SEEING_RED':
|
case 'ACHIEVEMENT_SEEING_RED':
|
||||||
case 'ACHIEVEMENT_RED_LETTER_DAY':
|
case 'ACHIEVEMENT_RED_LETTER_DAY':
|
||||||
case 'ACHIEVEMENT_LEGENDARY_BESTIARY':
|
case 'ACHIEVEMENT_LEGENDARY_BESTIARY':
|
||||||
|
case 'ACHIEVEMENT_SEASONAL_SPECIALIST':
|
||||||
case 'GENERIC_ACHIEVEMENT':
|
case 'GENERIC_ACHIEVEMENT':
|
||||||
this.showNotificationWithModal(notification);
|
this.showNotificationWithModal(notification);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -105,5 +105,8 @@
|
|||||||
"achievementRedLetterDayModalText": "You tamed all the Red Mounts!",
|
"achievementRedLetterDayModalText": "You tamed all the Red Mounts!",
|
||||||
"achievementLegendaryBestiary": "Legendary Bestiary",
|
"achievementLegendaryBestiary": "Legendary Bestiary",
|
||||||
"achievementLegendaryBestiaryText": "Has hatched all the mythical pets: Dragon, Flying Pig, Gryphon, Sea Serpent, and Unicorn!",
|
"achievementLegendaryBestiaryText": "Has hatched all the mythical pets: Dragon, Flying Pig, Gryphon, Sea Serpent, and Unicorn!",
|
||||||
"achievementLegendaryBestiaryModalText": "You collected all the mythical pets!"
|
"achievementLegendaryBestiaryModalText": "You collected all the mythical pets!",
|
||||||
|
"achievementSeasonalSpecialist": "Seasonal Specialist",
|
||||||
|
"achievementSeasonalSpecialistText": "Has completed all the Spring and Winter seasonal quests: Egg Hunt, Trapper Santa, and Find the Cub!",
|
||||||
|
"achievementSeasonalSpecialistModalText": "You completed all the seasonal quests!"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -237,6 +237,11 @@ const basicAchievs = {
|
|||||||
titleKey: 'achievementLegendaryBestiary',
|
titleKey: 'achievementLegendaryBestiary',
|
||||||
textKey: 'achievementLegendaryBestiaryText',
|
textKey: 'achievementLegendaryBestiaryText',
|
||||||
},
|
},
|
||||||
|
seasonalSpecialist: {
|
||||||
|
icon: 'achievement-seasonalSpecialist',
|
||||||
|
titleKey: 'achievementSeasonalSpecialist',
|
||||||
|
textKey: 'achievementSeasonalSpecialistText',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
Object.assign(achievementsData, basicAchievs);
|
Object.assign(achievementsData, basicAchievs);
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,11 @@ const QUEST_SERIES_ACHIEVEMENTS = {
|
|||||||
'frog',
|
'frog',
|
||||||
'hippo',
|
'hippo',
|
||||||
],
|
],
|
||||||
|
seasonalSpecialist: [
|
||||||
|
'egg',
|
||||||
|
'evilsanta',
|
||||||
|
'evilsanta2',
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
export default QUEST_SERIES_ACHIEVEMENTS;
|
export default QUEST_SERIES_ACHIEVEMENTS;
|
||||||
|
|||||||
@@ -209,6 +209,7 @@ function _getBasicAchievements (user, language) {
|
|||||||
_addSimple(result, user, { path: 'seeingRed', language });
|
_addSimple(result, user, { path: 'seeingRed', language });
|
||||||
_addSimple(result, user, { path: 'redLetterDay', language });
|
_addSimple(result, user, { path: 'redLetterDay', language });
|
||||||
_addSimple(result, user, { path: 'legendaryBestiary', language });
|
_addSimple(result, user, { path: 'legendaryBestiary', language });
|
||||||
|
_addSimple(result, user, { path: 'seasonalSpecialist', language });
|
||||||
|
|
||||||
_addSimpleWithMasterCount(result, user, { path: 'beastMaster', language });
|
_addSimpleWithMasterCount(result, user, { path: 'beastMaster', language });
|
||||||
_addSimpleWithMasterCount(result, user, { path: 'mountMaster', language });
|
_addSimpleWithMasterCount(result, user, { path: 'mountMaster', language });
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ export default new Schema({
|
|||||||
seeingRed: Boolean,
|
seeingRed: Boolean,
|
||||||
redLetterDay: Boolean,
|
redLetterDay: Boolean,
|
||||||
legendaryBestiary: Boolean,
|
legendaryBestiary: Boolean,
|
||||||
|
seasonalSpecialist: Boolean,
|
||||||
// Onboarding Guide
|
// Onboarding Guide
|
||||||
createdTask: Boolean,
|
createdTask: Boolean,
|
||||||
completedTask: Boolean,
|
completedTask: Boolean,
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ const NOTIFICATION_TYPES = [
|
|||||||
'ACHIEVEMENT_SEEING_RED',
|
'ACHIEVEMENT_SEEING_RED',
|
||||||
'ACHIEVEMENT_RED_LETTER_DAY',
|
'ACHIEVEMENT_RED_LETTER_DAY',
|
||||||
'ACHIEVEMENT_LEGENDARY_BESTIARY',
|
'ACHIEVEMENT_LEGENDARY_BESTIARY',
|
||||||
|
'ACHIEVEMENT_SEASONAL_SPECIALIST',
|
||||||
'ACHIEVEMENT', // generic achievement notification, details inside `notification.data`
|
'ACHIEVEMENT', // generic achievement notification, details inside `notification.data`
|
||||||
'DROP_CAP_REACHED',
|
'DROP_CAP_REACHED',
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user