mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Fix featured items
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
"groupBy": "Group By <%= type %>",
|
"groupBy": "Group By <%= type %>",
|
||||||
"classBonus": "(This item matches your class, so it gets an additional 1.5 Stat multiplier.)",
|
"classBonus": "(This item matches your class, so it gets an additional 1.5 Stat multiplier.)",
|
||||||
"classArmor": "Class Armor",
|
"classArmor": "Class Armor",
|
||||||
"featuredset": "Featured Set <%= name %>",
|
"featuredset": "Featured Set: <%= name %>",
|
||||||
"mysterySets": "Mystery Sets",
|
"mysterySets": "Mystery Sets",
|
||||||
"gearNotOwned": "You do not own this item.",
|
"gearNotOwned": "You do not own this item.",
|
||||||
"noGearItemsOfType": "You don't own any of these.",
|
"noGearItemsOfType": "You don't own any of these.",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"groupBy": "Group By <%= type %>",
|
"groupBy": "Group By <%= type %>",
|
||||||
"classBonus": "(This item matches your class, so it gets an additional 1.5 Stat multiplier.)",
|
"classBonus": "(This item matches your class, so it gets an additional 1.5 Stat multiplier.)",
|
||||||
"classArmor": "Class Armour",
|
"classArmor": "Class Armour",
|
||||||
"featuredset": "Featured Set <%= name %>",
|
"featuredset": "Featured Set: <%= name %>",
|
||||||
"mysterySets": "Mystery Sets",
|
"mysterySets": "Mystery Sets",
|
||||||
"gearNotOwned": "You do not own this item.",
|
"gearNotOwned": "You do not own this item.",
|
||||||
"noGearItemsOfType": "You don't own any of these.",
|
"noGearItemsOfType": "You don't own any of these.",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"groupBy": "Agrupar por <%= type %>",
|
"groupBy": "Agrupar por <%= type %>",
|
||||||
"classBonus": "(Este equipamiento es de tu clase por lo que gana un multiplicador de 1,5 a sus atributos)",
|
"classBonus": "(Este equipamiento es de tu clase por lo que gana un multiplicador de 1,5 a sus atributos)",
|
||||||
"classArmor": "Armadura de clase",
|
"classArmor": "Armadura de clase",
|
||||||
"featuredset": "Conjunto destacado <%= name %>",
|
"featuredset": "Conjunto destacado: <%= name %>",
|
||||||
"mysterySets": "Conjuntos misteriosos",
|
"mysterySets": "Conjuntos misteriosos",
|
||||||
"gearNotOwned": "No tienes este objeto.",
|
"gearNotOwned": "No tienes este objeto.",
|
||||||
"noGearItemsOfType": "No tienes ninguno de estos.",
|
"noGearItemsOfType": "No tienes ninguno de estos.",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"groupBy": "Agrupar Por <%= type %>",
|
"groupBy": "Agrupar Por <%= type %>",
|
||||||
"classBonus": "(Este artículo coincide con tu clase, por lo que gana un multiplicador de Atributos de 1.5)",
|
"classBonus": "(Este artículo coincide con tu clase, por lo que gana un multiplicador de Atributos de 1.5)",
|
||||||
"classArmor": "Armadura de Clase",
|
"classArmor": "Armadura de Clase",
|
||||||
"featuredset": "Conjunto Destacado <%= name %>",
|
"featuredset": "Conjunto Destacado: <%= name %>",
|
||||||
"mysterySets": "Conjuntos Misteriosos",
|
"mysterySets": "Conjuntos Misteriosos",
|
||||||
"gearNotOwned": "No posees este artículo.",
|
"gearNotOwned": "No posees este artículo.",
|
||||||
"noGearItemsOfType": "No posees ninguno de estos.",
|
"noGearItemsOfType": "No posees ninguno de estos.",
|
||||||
|
|||||||
@@ -41,7 +41,19 @@ const featuredItems = {
|
|||||||
});
|
});
|
||||||
return featured;
|
return featured;
|
||||||
},
|
},
|
||||||
seasonal: 'spring2019CloudRogueSet',
|
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: [
|
timeTravelers: [
|
||||||
// TODO
|
// TODO
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -18,8 +18,15 @@ function getCurrentSeasonalSets (currentEvent) {
|
|||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const currentEvent = getCurrentGalaKey();
|
const currentEvent = getCurrentGalaKey();
|
||||||
|
const pinnedSets = getCurrentSeasonalSets(currentEvent)
|
||||||
return {
|
return {
|
||||||
currentSeason: currentEvent ? upperFirst(currentEvent) : 'Closed',
|
currentSeason: currentEvent ? upperFirst(currentEvent) : 'Closed',
|
||||||
pinnedSets: getCurrentSeasonalSets(currentEvent),
|
pinnedSets,
|
||||||
|
featuredSet: user => {
|
||||||
|
if (user.stats.class) {
|
||||||
|
return pinnedSets[user.stats.class];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -458,8 +458,6 @@ shops.getSeasonalShop = function getSeasonalShop (user, language) {
|
|||||||
const shopConfig = seasonalShopConfig();
|
const shopConfig = seasonalShopConfig();
|
||||||
const officialPinnedItems = getOfficialPinnedItems(user);
|
const officialPinnedItems = getOfficialPinnedItems(user);
|
||||||
|
|
||||||
console.log('shopConfig', shopConfig);
|
|
||||||
|
|
||||||
const resObject = {
|
const resObject = {
|
||||||
identifier: 'seasonalShop',
|
identifier: 'seasonalShop',
|
||||||
text: i18n.t('seasonalShop'),
|
text: i18n.t('seasonalShop'),
|
||||||
@@ -468,14 +466,8 @@ shops.getSeasonalShop = function getSeasonalShop (user, language) {
|
|||||||
opened: true,
|
opened: true,
|
||||||
categories: this.getSeasonalShopCategories(user, language, shopConfig),
|
categories: this.getSeasonalShopCategories(user, language, shopConfig),
|
||||||
featured: {
|
featured: {
|
||||||
text: i18n.t(shopConfig.featuredSet),
|
text: i18n.t(shopConfig.featuredSet(user)),
|
||||||
items: shops.getSeasonalGearBySet(
|
items: officialPinnedItems.map(i => getItemInfo(user, i.type, get(content, i.path))),
|
||||||
user,
|
|
||||||
shopConfig.featuredSet,
|
|
||||||
officialPinnedItems,
|
|
||||||
language,
|
|
||||||
true,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user