2019-10-08 14:57:10 +00:00
|
|
|
import forOwn from 'lodash/forOwn';
|
|
|
|
|
import clone from 'lodash/clone';
|
2016-01-21 13:24:10 +00:00
|
|
|
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';
|
2016-01-21 13:24:10 +00:00
|
|
|
|
2019-10-08 14:57:10 +00:00
|
|
|
const reorderedBgs = {};
|
2016-01-21 13:24:10 +00:00
|
|
|
|
2019-10-08 14:57:10 +00:00
|
|
|
forOwn(backgrounds, (value, key) => {
|
|
|
|
|
forOwn(value, (bgObject, bgKey) => {
|
|
|
|
|
const bg = clone(bgObject);
|
2016-01-21 13:24:10 +00:00
|
|
|
bg.set = {
|
|
|
|
|
text: key,
|
|
|
|
|
key,
|
|
|
|
|
setPrice: 15,
|
|
|
|
|
};
|
|
|
|
|
reorderedBgs[bgKey] = bg;
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
2019-10-08 14:57:10 +00:00
|
|
|
const appearances = {
|
2020-05-07 14:15:11 +00:00
|
|
|
hair, NO appearances.hair.{bangs|base|beard|color|flower|mustache}[key].set.setPrice and .key
|
|
|
|
|
shirt: shirts, appearances.shirt[key].set.setPrice and .key
|
|
|
|
|
size: sizes, NO, does not have cost
|
|
|
|
|
skin: skins, OK, appearances.skin[key].set.setPrice and .key
|
|
|
|
|
chair: chairs, NO, does not have cost
|
|
|
|
|
background: reorderedBgs, OK appearances.backgroud[key].set.setPrice and .key
|
2016-01-21 13:24:10 +00:00
|
|
|
};
|
|
|
|
|
|
2020-05-07 14:15:11 +00:00
|
|
|
^ check with get(path) after validating name because hair are nested for example
|
|
|
|
|
^ if item.set exist -> use item.setPrice
|
|
|
|
|
^ what about other items in set?
|
|
|
|
|
|
2019-10-01 15:53:48 +00:00
|
|
|
export default appearances;
|