mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
fix most customizations not being pinnable
This commit is contained in:
@@ -2,7 +2,12 @@ import get from 'lodash/get';
|
||||
import content from '../content/index';
|
||||
|
||||
export default function getItemByPathAndType (type, path) {
|
||||
let item = get(content, path);
|
||||
let item;
|
||||
if (type === 'appearance') {
|
||||
item = get(content, `appearance.${path}`);
|
||||
} else {
|
||||
item = get(content, path);
|
||||
}
|
||||
|
||||
if (type === 'timeTravelersStable') {
|
||||
const [, animalType, key] = path.split('.');
|
||||
|
||||
@@ -385,7 +385,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
||||
notes: '',
|
||||
path: `hair.color.${item.key}`,
|
||||
purchaseType: 'customization',
|
||||
pinType: 'timeTravelersStable',
|
||||
pinType: 'appearance',
|
||||
set: item.set,
|
||||
text: item.text(language),
|
||||
type: 'color',
|
||||
@@ -401,7 +401,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
||||
locked: false,
|
||||
notes: '',
|
||||
path: `hair.base.${item.key}`,
|
||||
pinType: 'timeTravelersStable',
|
||||
pinType: 'appearance',
|
||||
purchaseType: 'customization',
|
||||
set: item.set,
|
||||
text: item.text(language),
|
||||
@@ -418,7 +418,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
||||
locked: false,
|
||||
notes: '',
|
||||
path: `hair.mustache.${item.key}`,
|
||||
pinType: 'timeTravelersStable',
|
||||
pinType: 'appearance',
|
||||
purchaseType: 'customization',
|
||||
set: item.set,
|
||||
text: item.text(language),
|
||||
@@ -452,7 +452,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
||||
locked: false,
|
||||
notes: '',
|
||||
path: `shirt.${item.key}`,
|
||||
pinType: 'timeTravelersStable',
|
||||
pinType: 'appearance',
|
||||
purchaseType: 'customization',
|
||||
set: item.set,
|
||||
text: item.text(language),
|
||||
@@ -469,7 +469,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
||||
locked: false,
|
||||
path: `skin.${item.key}`,
|
||||
notes: '',
|
||||
pinType: 'timeTravelersStable',
|
||||
pinType: 'appearance',
|
||||
purchaseType: 'customization',
|
||||
set: item.set,
|
||||
text: item.text(language),
|
||||
|
||||
Reference in New Issue
Block a user