mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
feat(content): seasonal quest achievement
This commit is contained in:
@@ -395,6 +395,14 @@ const NOTIFICATIONS = {
|
||||
achievement: 'legendaryBestiary',
|
||||
},
|
||||
},
|
||||
ACHIEVEMENT_SEASONAL_SPECIALIST: {
|
||||
achievement: true,
|
||||
label: $t => `${$t('achievement')}: ${$t('achievementSeasonalSpecialist')}`,
|
||||
modalId: 'generic-achievement',
|
||||
data: {
|
||||
achievement: 'seasonalSpecialist',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
@@ -457,7 +465,7 @@ export default {
|
||||
'ONBOARDING_COMPLETE', 'FIRST_DROPS', 'ACHIEVEMENT_BUG_BONANZA', 'ACHIEVEMENT_BARE_NECESSITIES',
|
||||
'ACHIEVEMENT_FRESHWATER_FRIENDS', 'ACHIEVEMENT_GOOD_AS_GOLD', 'ACHIEVEMENT_ALL_THAT_GLITTERS',
|
||||
'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 => {
|
||||
handledNotifications[type] = true;
|
||||
});
|
||||
@@ -879,6 +887,7 @@ export default {
|
||||
case 'ACHIEVEMENT_SEEING_RED':
|
||||
case 'ACHIEVEMENT_RED_LETTER_DAY':
|
||||
case 'ACHIEVEMENT_LEGENDARY_BESTIARY':
|
||||
case 'ACHIEVEMENT_SEASONAL_SPECIALIST':
|
||||
case 'GENERIC_ACHIEVEMENT':
|
||||
this.showNotificationWithModal(notification);
|
||||
break;
|
||||
|
||||
@@ -105,5 +105,8 @@
|
||||
"achievementRedLetterDayModalText": "You tamed all the Red Mounts!",
|
||||
"achievementLegendaryBestiary": "Legendary Bestiary",
|
||||
"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',
|
||||
textKey: 'achievementLegendaryBestiaryText',
|
||||
},
|
||||
seasonalSpecialist: {
|
||||
icon: 'achievement-seasonalSpecialist',
|
||||
titleKey: 'achievementSeasonalSpecialist',
|
||||
textKey: 'achievementSeasonalSpecialistText',
|
||||
},
|
||||
};
|
||||
Object.assign(achievementsData, basicAchievs);
|
||||
|
||||
|
||||
@@ -48,6 +48,11 @@ const QUEST_SERIES_ACHIEVEMENTS = {
|
||||
'frog',
|
||||
'hippo',
|
||||
],
|
||||
seasonalSpecialist: [
|
||||
'egg',
|
||||
'evilsanta',
|
||||
'evilsanta2',
|
||||
],
|
||||
};
|
||||
|
||||
export default QUEST_SERIES_ACHIEVEMENTS;
|
||||
|
||||
@@ -209,6 +209,7 @@ function _getBasicAchievements (user, language) {
|
||||
_addSimple(result, user, { path: 'seeingRed', language });
|
||||
_addSimple(result, user, { path: 'redLetterDay', language });
|
||||
_addSimple(result, user, { path: 'legendaryBestiary', language });
|
||||
_addSimple(result, user, { path: 'seasonalSpecialist', language });
|
||||
|
||||
_addSimpleWithMasterCount(result, user, { path: 'beastMaster', language });
|
||||
_addSimpleWithMasterCount(result, user, { path: 'mountMaster', language });
|
||||
|
||||
@@ -141,6 +141,7 @@ export default new Schema({
|
||||
seeingRed: Boolean,
|
||||
redLetterDay: Boolean,
|
||||
legendaryBestiary: Boolean,
|
||||
seasonalSpecialist: Boolean,
|
||||
// Onboarding Guide
|
||||
createdTask: Boolean,
|
||||
completedTask: Boolean,
|
||||
|
||||
@@ -64,6 +64,7 @@ const NOTIFICATION_TYPES = [
|
||||
'ACHIEVEMENT_SEEING_RED',
|
||||
'ACHIEVEMENT_RED_LETTER_DAY',
|
||||
'ACHIEVEMENT_LEGENDARY_BESTIARY',
|
||||
'ACHIEVEMENT_SEASONAL_SPECIALIST',
|
||||
'ACHIEVEMENT', // generic achievement notification, details inside `notification.data`
|
||||
'DROP_CAP_REACHED',
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user