mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
fix(event): sell Santa scrolls
This commit is contained in:
@@ -698,7 +698,7 @@ api.quests = {
|
|||||||
},
|
},
|
||||||
evilsanta: {
|
evilsanta: {
|
||||||
canBuy: (function() {
|
canBuy: (function() {
|
||||||
return false;
|
return true;
|
||||||
}),
|
}),
|
||||||
text: t('questEvilSantaText'),
|
text: t('questEvilSantaText'),
|
||||||
notes: t('questEvilSantaNotes'),
|
notes: t('questEvilSantaNotes'),
|
||||||
@@ -724,7 +724,7 @@ api.quests = {
|
|||||||
},
|
},
|
||||||
evilsanta2: {
|
evilsanta2: {
|
||||||
canBuy: (function() {
|
canBuy: (function() {
|
||||||
return false;
|
return true;
|
||||||
}),
|
}),
|
||||||
text: t('questEvilSanta2Text'),
|
text: t('questEvilSanta2Text'),
|
||||||
notes: t('questEvilSanta2Notes'),
|
notes: t('questEvilSanta2Notes'),
|
||||||
|
|||||||
@@ -235,6 +235,11 @@ shops.getSeasonalShopCategories = function getSeasonalShopCategories (user, lang
|
|||||||
const AVAILABLE_SPELLS = [
|
const AVAILABLE_SPELLS = [
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const AVAILABLE_QUESTS = [
|
||||||
|
'evilsanta',
|
||||||
|
'evilsanta2',
|
||||||
|
];
|
||||||
|
|
||||||
let categories = [];
|
let categories = [];
|
||||||
|
|
||||||
let flatGearArray = _.toArray(content.gear.flat);
|
let flatGearArray = _.toArray(content.gear.flat);
|
||||||
@@ -265,6 +270,36 @@ shops.getSeasonalShopCategories = function getSeasonalShopCategories (user, lang
|
|||||||
categories.push(category);
|
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) {
|
for (let key in AVAILABLE_SETS) {
|
||||||
if (AVAILABLE_SETS.hasOwnProperty(key)) {
|
if (AVAILABLE_SETS.hasOwnProperty(key)) {
|
||||||
let category = {
|
let category = {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
li.customize-menu.inventory-gear
|
li.customize-menu.inventory-gear
|
||||||
menu.pets-menu(label='{{category.text}}', ng-repeat='category in seasonalShopCategories')
|
menu.pets-menu(label='{{category.text}}', ng-repeat='category in seasonalShopCategories')
|
||||||
div(ng-repeat='item in category.items', ng-if='!user.items.gear.owned[item.key]')
|
div(ng-repeat='item in category.items', ng-if='!user.items.gear.owned[item.key]')
|
||||||
button.customize-option(class='shop_{{item.key}}',
|
button.customize-option(class='{{item.class}} shop_{{item.key}}',
|
||||||
popover='{{item.notes}}', popover-title='{{item.text}}',
|
popover='{{item.notes}}', popover-title='{{item.text}}',
|
||||||
popover-trigger='mouseenter', popover-placement='right',
|
popover-trigger='mouseenter', popover-placement='right',
|
||||||
popover-append-to-body='true',
|
popover-append-to-body='true',
|
||||||
|
|||||||
Reference in New Issue
Block a user