mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Add avatar customizations to content API
This commit is contained in:
committed by
Blade Barringer
parent
0d06d765f2
commit
8e8c28725a
31
common/script/content/appearance/index.js
Normal file
31
common/script/content/appearance/index.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import hair from './hair';
|
||||
import shirts from './shirt.js';
|
||||
import skins from './skin.js';
|
||||
import sizes from './size.js';
|
||||
import backgrounds from './backgrounds.js';
|
||||
import {forOwn, clone} from 'lodash';
|
||||
|
||||
let reorderedBgs = {};
|
||||
|
||||
forOwn(backgrounds, function restructureBackgroundSet (value, key) {
|
||||
forOwn(value, function restructureBackground (bgObject, bgKey) {
|
||||
let bg = clone(bgObject);
|
||||
bg.set = {
|
||||
text: key,
|
||||
key,
|
||||
setPrice: 15,
|
||||
};
|
||||
reorderedBgs[bgKey] = bg;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
let appearances = {
|
||||
hair,
|
||||
shirt: shirts,
|
||||
size: sizes,
|
||||
skin: skins,
|
||||
background: reorderedBgs,
|
||||
};
|
||||
|
||||
module.exports = appearances;
|
||||
Reference in New Issue
Block a user