Files
habitica/website/common/script/content/shop-featuredItems.js
Natalie 949f638b6e 2024-09 Content Prebuild (#15295)
* 202409 subscriber gear

* 2024-09 enchanted armoire gear

* 2024 fall festival gear

* 2024-09 background

* 2024-09 pet quest

* typos and update featuredItems.js

* quest and typo fix

* fix subscriber set name

* text amendments

* update quest title
2024-08-23 12:47:25 -05:00

96 lines
1.9 KiB
JavaScript

import { getScheduleMatchingGroup } from './constants';
// Magic Hatching Potions are configured like this:
// type: 'premiumHatchingPotion', // note no "s" at the end
// path: 'premiumHatchingPotions.Rainbow',
const potentialFeaturedPetQuests = [
'nudibranch',
'yarn',
'slime',
'cat',
'frog',
'monkey',
'sloth',
'hippo',
'giraffe',
'guineapig',
'chameleon',
'cheetah',
'crab',
'beetle',
'raccoon',
'snail',
'kangaroo',
'owl',
'ghost_stag',
'sabretooth',
];
const featuredItems = {
market () {
const featured = [{
type: 'armoire',
path: 'armoire',
}];
const itemKeys = getScheduleMatchingGroup('premiumHatchingPotions').items;
itemKeys.forEach(itemKey => {
if (featured.length < 4) {
featured.push({
type: 'premiumHatchingPotion',
path: `premiumHatchingPotions.${itemKey}`,
});
}
});
return featured;
},
quests () {
const featured = [];
const petQuestKeys = getScheduleMatchingGroup('petQuests').items;
petQuestKeys.forEach(itemKey => {
if (potentialFeaturedPetQuests.includes(itemKey)) {
featured.push({
type: 'quests',
path: `quests.${itemKey}`,
});
}
});
const hatchingPotionQuests = getScheduleMatchingGroup('hatchingPotionQuests').items;
hatchingPotionQuests.forEach(itemKey => {
featured.push({
type: 'quests',
path: `quests.${itemKey}`,
});
});
return featured;
},
seasonal () {
const featured = [];
const itemKeys = getScheduleMatchingGroup('premiumHatchingPotions').items;
itemKeys.forEach(itemKey => {
if (featured.length < 4) {
featured.push({
type: 'premiumHatchingPotion',
path: `premiumHatchingPotions.${itemKey}`,
});
}
});
return featured;
},
timeTravelers: [
// TODO
],
};
export default featuredItems;