mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37: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';
|
import content from '../content/index';
|
||||||
|
|
||||||
export default function getItemByPathAndType (type, path) {
|
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') {
|
if (type === 'timeTravelersStable') {
|
||||||
const [, animalType, key] = path.split('.');
|
const [, animalType, key] = path.split('.');
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
|||||||
notes: '',
|
notes: '',
|
||||||
path: `hair.color.${item.key}`,
|
path: `hair.color.${item.key}`,
|
||||||
purchaseType: 'customization',
|
purchaseType: 'customization',
|
||||||
pinType: 'timeTravelersStable',
|
pinType: 'appearance',
|
||||||
set: item.set,
|
set: item.set,
|
||||||
text: item.text(language),
|
text: item.text(language),
|
||||||
type: 'color',
|
type: 'color',
|
||||||
@@ -401,7 +401,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
|||||||
locked: false,
|
locked: false,
|
||||||
notes: '',
|
notes: '',
|
||||||
path: `hair.base.${item.key}`,
|
path: `hair.base.${item.key}`,
|
||||||
pinType: 'timeTravelersStable',
|
pinType: 'appearance',
|
||||||
purchaseType: 'customization',
|
purchaseType: 'customization',
|
||||||
set: item.set,
|
set: item.set,
|
||||||
text: item.text(language),
|
text: item.text(language),
|
||||||
@@ -418,7 +418,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
|||||||
locked: false,
|
locked: false,
|
||||||
notes: '',
|
notes: '',
|
||||||
path: `hair.mustache.${item.key}`,
|
path: `hair.mustache.${item.key}`,
|
||||||
pinType: 'timeTravelersStable',
|
pinType: 'appearance',
|
||||||
purchaseType: 'customization',
|
purchaseType: 'customization',
|
||||||
set: item.set,
|
set: item.set,
|
||||||
text: item.text(language),
|
text: item.text(language),
|
||||||
@@ -452,7 +452,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
|||||||
locked: false,
|
locked: false,
|
||||||
notes: '',
|
notes: '',
|
||||||
path: `shirt.${item.key}`,
|
path: `shirt.${item.key}`,
|
||||||
pinType: 'timeTravelersStable',
|
pinType: 'appearance',
|
||||||
purchaseType: 'customization',
|
purchaseType: 'customization',
|
||||||
set: item.set,
|
set: item.set,
|
||||||
text: item.text(language),
|
text: item.text(language),
|
||||||
@@ -469,7 +469,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
|
|||||||
locked: false,
|
locked: false,
|
||||||
path: `skin.${item.key}`,
|
path: `skin.${item.key}`,
|
||||||
notes: '',
|
notes: '',
|
||||||
pinType: 'timeTravelersStable',
|
pinType: 'appearance',
|
||||||
purchaseType: 'customization',
|
purchaseType: 'customization',
|
||||||
set: item.set,
|
set: item.set,
|
||||||
text: item.text(language),
|
text: item.text(language),
|
||||||
|
|||||||
Reference in New Issue
Block a user