habitica-self-host/website/common/script/content/appearance/index.js

35 lines
656 B
JavaScript
Raw Normal View History

2019-10-08 14:57:10 +00:00
import forOwn from 'lodash/forOwn';
import clone from 'lodash/clone';
import hair from './hair';
2019-10-09 14:51:17 +00:00
import shirts from './shirt';
import skins from './skin';
import sizes from './size';
import backgrounds from './backgrounds';
import chairs from './chair';
2019-10-08 14:57:10 +00:00
const reorderedBgs = {};
2019-10-08 14:57:10 +00:00
forOwn(backgrounds, (value, key) => {
forOwn(value, (bgObject, bgKey) => {
const bg = clone(bgObject);
bg.set = {
text: key,
key,
setPrice: 15,
};
reorderedBgs[bgKey] = bg;
});
});
2019-10-08 14:57:10 +00:00
const appearances = {
hair,
shirt: shirts,
size: sizes,
skin: skins,
chair: chairs,
background: reorderedBgs,
};
2019-10-01 15:53:48 +00:00
export default appearances;