mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
WIP(customizations): animal bits
This commit is contained in:
@@ -235,7 +235,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
|||||||
case 'gear':
|
case 'gear':
|
||||||
// spread operator not available
|
// spread operator not available
|
||||||
itemInfo = Object.assign(getDefaultGearProps(item, language), {
|
itemInfo = Object.assign(getDefaultGearProps(item, language), {
|
||||||
value: item.twoHanded ? 2 : 1,
|
value: item.twoHanded || item.gearSet === 'animal' ? 2 : 1,
|
||||||
currency: 'gems',
|
currency: 'gems',
|
||||||
pinType: 'gear',
|
pinType: 'gear',
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -677,15 +677,31 @@ shops.getCustomizationsShopCategories = function getCustomizationsShopCategories
|
|||||||
const animalEarsCategory = {
|
const animalEarsCategory = {
|
||||||
identifier: 'animalEars',
|
identifier: 'animalEars',
|
||||||
text: i18n.t('animalEars', language),
|
text: i18n.t('animalEars', language),
|
||||||
items: [],
|
|
||||||
};
|
};
|
||||||
|
animalEarsCategory.items = values(content.gear.tree.headAccessory.special)
|
||||||
|
.filter(gearItem => {
|
||||||
|
const { owned } = user.items.gear;
|
||||||
|
if (typeof owned[gearItem.key] !== 'undefined') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return gearItem.gearSet === 'animal';
|
||||||
|
})
|
||||||
|
.map(gearItem => getItemInfo(user, 'gear', gearItem, officialPinnedItems, language));
|
||||||
categories.push(animalEarsCategory);
|
categories.push(animalEarsCategory);
|
||||||
|
|
||||||
const animalTailsCategory = {
|
const animalTailsCategory = {
|
||||||
identifier: 'animalTails',
|
identifier: 'animalTails',
|
||||||
text: i18n.t('animalTails', language),
|
text: i18n.t('animalTails', language),
|
||||||
items: [],
|
|
||||||
};
|
};
|
||||||
|
animalTailsCategory.items = values(content.gear.tree.back.special)
|
||||||
|
.filter(gearItem => {
|
||||||
|
const { owned } = user.items.gear;
|
||||||
|
if (typeof owned[gearItem.key] !== 'undefined') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return gearItem.gearSet === 'animal';
|
||||||
|
})
|
||||||
|
.map(gearItem => getItemInfo(user, 'gear', gearItem, officialPinnedItems, language));
|
||||||
categories.push(animalTailsCategory);
|
categories.push(animalTailsCategory);
|
||||||
|
|
||||||
const shirtsCategory = {
|
const shirtsCategory = {
|
||||||
|
|||||||
Reference in New Issue
Block a user