mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Implement new content schedule for magic hatching potions
This commit is contained in:
committed by
Sabe Jones
parent
f223b5dd2a
commit
129cb7627c
@@ -71,8 +71,10 @@ shops.getMarketCategories = function getMarket (user, language) {
|
||||
text: i18n.t('magicHatchingPotions', language),
|
||||
notes: i18n.t('premiumPotionNoDropExplanation', language),
|
||||
};
|
||||
const matchers = assembleScheduledMatchers(new Date()).filter(matcher => matcher.type === 'premiumHatchingPotions').map(matcher => matcher.matcher);
|
||||
premiumHatchingPotionsCategory.items = sortBy(values(content.hatchingPotions)
|
||||
.filter(hp => hp.limited && hp.canBuy(user))
|
||||
.filter(hp => hp.limited
|
||||
&& matchers.map(matcher => matcher(hp.key)).every(matcher => matcher === true))
|
||||
.map(premiumHatchingPotion => getItemInfo(user, 'premiumHatchingPotion', premiumHatchingPotion, officialPinnedItems, language)), 'key');
|
||||
if (premiumHatchingPotionsCategory.items.length > 0) {
|
||||
categories.push(premiumHatchingPotionsCategory);
|
||||
|
||||
Reference in New Issue
Block a user