Merge branch 'develop' into sabrecat/teams-rebase

This commit is contained in:
SabreCat
2022-05-17 09:34:51 -05:00
44 changed files with 1410 additions and 899 deletions
+139 -109
View File
@@ -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: {
+1 -1
View File
@@ -220,7 +220,7 @@ const bundles = {
'trex_undead',
],
canBuy () {
return moment().isBetween('2019-11-14', '2019-12-02');
return moment().isBetween('2022-05-16', '2022-05-31');
},
type: 'quests',
value: 7,
@@ -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',
},
};
@@ -10,11 +10,17 @@ const gemsPromo = {
export const EVENTS = {
noCurrentEvent: {
start: '2022-04-30T20:00-05:00',
start: '2022-05-31T20:00-04:00',
end: '2022-06-30T20:00-05:00',
season: 'normal',
npcImageSuffix: '',
},
potions202205: {
start: '2022-05-17T08:00-04:00',
end: '2022-05-31T20:00-04:00',
season: 'normal',
npcImageSuffix: '',
},
spring2022: {
start: '2022-03-22T08:00-05:00',
end: '2022-04-30T20:00-05:00',
@@ -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;
@@ -96,13 +96,13 @@ const premium = {
value: 2,
text: t('hatchingPotionFloral'),
limited: true,
event: EVENTS.potions202105,
event: EVENTS.potions202205,
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndMay'),
previousDate: t('mayYYYY', { year: 2019 }),
previousDate: t('mayYYYY', { year: 2021 }),
}),
canBuy () {
return moment().isBefore(EVENTS.potions202105.end);
return moment().isBefore(EVENTS.potions202205.end);
},
},
Aquatic: {
@@ -297,12 +297,13 @@ const premium = {
value: 2,
text: t('hatchingPotionSunshine'),
limited: true,
event: EVENTS.potions202205,
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndMay'),
previousDate: t('mayYYYY', { year: 2019 }),
previousDate: t('mayYYYY', { year: 2020 }),
}),
canBuy () {
return moment().isBefore('2020-06-02');
return moment().isBefore(EVENTS.potions202205.end);
},
},
Bronze: {
+2
View File
@@ -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;
@@ -1,11 +1,11 @@
import moment from 'moment';
import { EVENTS } from './constants';
// import { EVENTS } from './constants';
// Magic Hatching Potions are configured like this:
// type: 'premiumHatchingPotion', // note no "s" at the end
// path: 'premiumHatchingPotions.Rainbow',
const featuredItems = {
market () {
if (moment().isBefore(EVENTS.spring2022.end)) {
if (moment().isBefore('2022-05-31T20:00-04:00')) {
return [
{
type: 'armoire',
@@ -13,15 +13,15 @@ const featuredItems = {
},
{
type: 'premiumHatchingPotion',
path: 'premiumHatchingPotions.Shimmer',
path: 'premiumHatchingPotions.Sunshine',
},
{
type: 'premiumHatchingPotion',
path: 'premiumHatchingPotions.Celestial',
path: 'premiumHatchingPotions.Floral',
},
{
type: 'premiumHatchingPotion',
path: 'premiumHatchingPotions.PolkaDot',
type: 'hatchingPotions',
path: 'hatchingPotions.Golden',
},
];
}
@@ -45,19 +45,19 @@ const featuredItems = {
];
},
quests () {
if (moment().isBefore('2022-03-31T20:00-04:00')) {
if (moment().isBefore('2022-05-31T20:00-04:00')) {
return [
{
type: 'bundles',
path: 'bundles.cuddleBuddies',
path: 'bundles.delightfulDinos',
},
{
type: 'quests',
path: 'quests.egg',
path: 'quests.alligator',
},
{
type: 'quests',
path: 'quests.ghost_stag',
path: 'quests.turtle',
},
];
}
+6 -6
View File
@@ -108,12 +108,6 @@ shops.checkMarketGearLocked = function checkMarketGearLocked (user, items) {
gear.locked = true;
}
if (Boolean(gear.specialClass) && Boolean(gear.set)) {
const currentSet = gear.set === seasonalShopConfig.pinnedSets[gear.specialClass];
gear.locked = currentSet && user.stats.class !== gear.specialClass;
}
if (gear.canOwn) {
gear.locked = !gear.canOwn(user);
}
@@ -124,6 +118,12 @@ shops.checkMarketGearLocked = function checkMarketGearLocked (user, items) {
gear.locked = true;
}
if (Boolean(gear.specialClass) && Boolean(gear.set)) {
const currentSet = gear.set === seasonalShopConfig.pinnedSets[gear.specialClass];
gear.locked = currentSet && user.stats.class !== gear.specialClass;
}
gear.owned = itemOwned;
// @TODO: I'm not sure what the logic for locking is supposed to be
@@ -28,7 +28,7 @@ export class BuyMarketGearOperation extends AbstractGoldItemOperation { // eslin
const checkSpecialClass = item.klass === 'special' && item.specialClass && item.specialClass !== user.stats.class;
// check for different class gear
if (checkKlass || checkSpecialClass) {
if ((checkKlass || checkSpecialClass) && user.items.gear.owned[item.key] !== false) {
throw new NotAuthorized(this.i18n('cannotBuyItem'));
}
}
+1
View File
@@ -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`),
+2
View File
@@ -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`),
+1 -1
View File
@@ -420,5 +420,5 @@ export default function scoreTask (options = {}, req = {}, analytics) {
checkOnboardingStatus(user, req, analytics);
}
return [delta];
return delta;
}