mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
fix(event): sell Santa scrolls
This commit is contained in:
@@ -235,6 +235,11 @@ shops.getSeasonalShopCategories = function getSeasonalShopCategories (user, lang
|
||||
const AVAILABLE_SPELLS = [
|
||||
];
|
||||
|
||||
const AVAILABLE_QUESTS = [
|
||||
'evilsanta',
|
||||
'evilsanta2',
|
||||
];
|
||||
|
||||
let categories = [];
|
||||
|
||||
let flatGearArray = _.toArray(content.gear.flat);
|
||||
@@ -265,6 +270,36 @@ shops.getSeasonalShopCategories = function getSeasonalShopCategories (user, lang
|
||||
categories.push(category);
|
||||
}
|
||||
|
||||
let quests = pickBy(content.quests, (quest, key) => {
|
||||
return _.indexOf(AVAILABLE_QUESTS, key) !== -1;
|
||||
});
|
||||
|
||||
if (_.keys(quests).length > 0) {
|
||||
let category = {
|
||||
identifier: 'quests',
|
||||
text: i18n.t('quests', language),
|
||||
};
|
||||
|
||||
category.items = _.map(quests, (quest, key) => {
|
||||
return {
|
||||
key,
|
||||
text: quest.text(language),
|
||||
notes: quest.notes(language),
|
||||
value: quest.value,
|
||||
type: 'quests',
|
||||
currency: 'gems',
|
||||
locked: false,
|
||||
drop: quest.drop,
|
||||
boss: quest.boss,
|
||||
collect: quest.collect,
|
||||
class: `inventory_quest_scroll_${key}`,
|
||||
purchaseType: 'quests',
|
||||
};
|
||||
});
|
||||
|
||||
categories.push(category);
|
||||
}
|
||||
|
||||
for (let key in AVAILABLE_SETS) {
|
||||
if (AVAILABLE_SETS.hasOwnProperty(key)) {
|
||||
let category = {
|
||||
|
||||
Reference in New Issue
Block a user