mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Add avatar customizations to content API
This commit is contained in:
committed by
Blade Barringer
parent
0d06d765f2
commit
8e8c28725a
@@ -207,5 +207,4 @@
|
||||
|
||||
"foodNotes": "Feed this to a pet and it may grow into a sturdy steed."
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
export let defaultAppearancePreferences = {
|
||||
background: {},
|
||||
hair: {
|
||||
bangs: {
|
||||
0: true,
|
||||
1: true,
|
||||
2: true,
|
||||
3: true,
|
||||
},
|
||||
base: {
|
||||
0: true,
|
||||
1: true,
|
||||
3: true,
|
||||
},
|
||||
beard: {
|
||||
0: true,
|
||||
},
|
||||
color: {
|
||||
white: true,
|
||||
brown: true,
|
||||
blond: true,
|
||||
red: true,
|
||||
black: true,
|
||||
},
|
||||
flower: {
|
||||
0: true,
|
||||
1: true,
|
||||
2: true,
|
||||
3: true,
|
||||
4: true,
|
||||
5: true,
|
||||
6: true,
|
||||
},
|
||||
mustache: {
|
||||
0: true,
|
||||
},
|
||||
},
|
||||
shirt: {
|
||||
black: true,
|
||||
blue: true,
|
||||
green: true,
|
||||
pink: true,
|
||||
white: true,
|
||||
yellow: true,
|
||||
},
|
||||
size: {
|
||||
slim: true,
|
||||
broad: true,
|
||||
},
|
||||
skin: {
|
||||
/* eslint-disable quote-props */
|
||||
'ddc994': true,
|
||||
'f5a76e': true,
|
||||
'ea8349': true,
|
||||
'c06534': true,
|
||||
'98461a': true,
|
||||
'915533': true,
|
||||
'c3e1dc': true,
|
||||
'6bd049': true,
|
||||
/* eslint-enable quote-props */
|
||||
},
|
||||
};
|
||||
295
common/script/content/appearance/backgrounds.js
Normal file
295
common/script/content/appearance/backgrounds.js
Normal file
@@ -0,0 +1,295 @@
|
||||
import {forOwn} from 'lodash';
|
||||
let t = require('../translation.js');
|
||||
|
||||
/* eslint-disable camelcase */
|
||||
let backgrounds = {
|
||||
backgrounds062014: {
|
||||
beach: {
|
||||
text: t('backgroundBeachText'),
|
||||
notes: t('backgroundBeachNotes'),
|
||||
},
|
||||
fairy_ring: {
|
||||
text: t('backgroundFairyRingText'),
|
||||
notes: t('backgroundFairyRingNotes'),
|
||||
},
|
||||
forest: {
|
||||
text: t('backgroundForestText'),
|
||||
notes: t('backgroundForestNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds072014: {
|
||||
open_waters: {
|
||||
text: t('backgroundOpenWatersText'),
|
||||
notes: t('backgroundOpenWatersNotes'),
|
||||
},
|
||||
coral_reef: {
|
||||
text: t('backgroundCoralReefText'),
|
||||
notes: t('backgroundCoralReefNotes'),
|
||||
},
|
||||
seafarer_ship: {
|
||||
text: t('backgroundSeafarerShipText'),
|
||||
notes: t('backgroundSeafarerShipNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds082014: {
|
||||
volcano: {
|
||||
text: t('backgroundVolcanoText'),
|
||||
notes: t('backgroundVolcanoNotes'),
|
||||
},
|
||||
clouds: {
|
||||
text: t('backgroundCloudsText'),
|
||||
notes: t('backgroundCloudsNotes'),
|
||||
},
|
||||
dusty_canyons: {
|
||||
text: t('backgroundDustyCanyonsText'),
|
||||
notes: t('backgroundDustyCanyonsNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds092014: {
|
||||
thunderstorm: {
|
||||
text: t('backgroundThunderstormText'),
|
||||
notes: t('backgroundThunderstormNotes'),
|
||||
},
|
||||
autumn_forest: {
|
||||
text: t('backgroundAutumnForestText'),
|
||||
notes: t('backgroundAutumnForestNotes'),
|
||||
},
|
||||
harvest_fields: {
|
||||
text: t('backgroundHarvestFieldsText'),
|
||||
notes: t('backgroundHarvestFieldsNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds102014: {
|
||||
graveyard: {
|
||||
text: t('backgroundGraveyardText'),
|
||||
notes: t('backgroundGraveyardNotes'),
|
||||
},
|
||||
haunted_house: {
|
||||
text: t('backgroundHauntedHouseText'),
|
||||
notes: t('backgroundHauntedHouseNotes'),
|
||||
},
|
||||
pumpkin_patch: {
|
||||
text: t('backgroundPumpkinPatchText'),
|
||||
notes: t('backgroundPumpkinPatchNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds112014: {
|
||||
harvest_feast: {
|
||||
text: t('backgroundHarvestFeastText'),
|
||||
notes: t('backgroundHarvestFeastNotes'),
|
||||
},
|
||||
sunset_meadow: {
|
||||
text: t('backgroundSunsetMeadowText'),
|
||||
notes: t('backgroundSunsetMeadowNotes'),
|
||||
},
|
||||
starry_skies: {
|
||||
text: t('backgroundStarrySkiesText'),
|
||||
notes: t('backgroundStarrySkiesNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds122014: {
|
||||
iceberg: {
|
||||
text: t('backgroundIcebergText'),
|
||||
notes: t('backgroundIcebergNotes'),
|
||||
},
|
||||
twinkly_lights: {
|
||||
text: t('backgroundTwinklyLightsText'),
|
||||
notes: t('backgroundTwinklyLightsNotes'),
|
||||
},
|
||||
south_pole: {
|
||||
text: t('backgroundSouthPoleText'),
|
||||
notes: t('backgroundSouthPoleNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds012015: {
|
||||
ice_cave: {
|
||||
text: t('backgroundIceCaveText'),
|
||||
notes: t('backgroundIceCaveNotes'),
|
||||
},
|
||||
frigid_peak: {
|
||||
text: t('backgroundFrigidPeakText'),
|
||||
notes: t('backgroundFrigidPeakNotes'),
|
||||
},
|
||||
snowy_pines: {
|
||||
text: t('backgroundSnowyPinesText'),
|
||||
notes: t('backgroundSnowyPinesNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds022015: {
|
||||
blacksmithy: {
|
||||
text: t('backgroundBlacksmithyText'),
|
||||
notes: t('backgroundBlacksmithyNotes'),
|
||||
},
|
||||
crystal_cave: {
|
||||
text: t('backgroundCrystalCaveText'),
|
||||
notes: t('backgroundCrystalCaveNotes'),
|
||||
},
|
||||
distant_castle: {
|
||||
text: t('backgroundDistantCastleText'),
|
||||
notes: t('backgroundDistantCastleNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds032015: {
|
||||
spring_rain: {
|
||||
text: t('backgroundSpringRainText'),
|
||||
notes: t('backgroundSpringRainNotes'),
|
||||
},
|
||||
stained_glass: {
|
||||
text: t('backgroundStainedGlassText'),
|
||||
notes: t('backgroundStainedGlassNotes'),
|
||||
},
|
||||
rolling_hills: {
|
||||
text: t('backgroundRollingHillsText'),
|
||||
notes: t('backgroundRollingHillsNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds042015: {
|
||||
cherry_trees: {
|
||||
text: t('backgroundCherryTreesText'),
|
||||
notes: t('backgroundCherryTreesNotes'),
|
||||
},
|
||||
floral_meadow: {
|
||||
text: t('backgroundFloralMeadowText'),
|
||||
notes: t('backgroundFloralMeadowNotes'),
|
||||
},
|
||||
gumdrop_land: {
|
||||
text: t('backgroundGumdropLandText'),
|
||||
notes: t('backgroundGumdropLandNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds052015: {
|
||||
marble_temple: {
|
||||
text: t('backgroundMarbleTempleText'),
|
||||
notes: t('backgroundMarbleTempleNotes'),
|
||||
},
|
||||
mountain_lake: {
|
||||
text: t('backgroundMountainLakeText'),
|
||||
notes: t('backgroundMountainLakeNotes'),
|
||||
},
|
||||
pagodas: {
|
||||
text: t('backgroundPagodasText'),
|
||||
notes: t('backgroundPagodasNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds062015: {
|
||||
drifting_raft: {
|
||||
text: t('backgroundDriftingRaftText'),
|
||||
notes: t('backgroundDriftingRaftNotes'),
|
||||
},
|
||||
shimmery_bubbles: {
|
||||
text: t('backgroundShimmeryBubblesText'),
|
||||
notes: t('backgroundShimmeryBubblesNotes'),
|
||||
},
|
||||
island_waterfalls: {
|
||||
text: t('backgroundIslandWaterfallsText'),
|
||||
notes: t('backgroundIslandWaterfallsNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds072015: {
|
||||
dilatory_ruins: {
|
||||
text: t('backgroundDilatoryRuinsText'),
|
||||
notes: t('backgroundDilatoryRuinsNotes'),
|
||||
},
|
||||
giant_wave: {
|
||||
text: t('backgroundGiantWaveText'),
|
||||
notes: t('backgroundGiantWaveNotes'),
|
||||
},
|
||||
sunken_ship: {
|
||||
text: t('backgroundSunkenShipText'),
|
||||
notes: t('backgroundSunkenShipNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds082015: {
|
||||
pyramids: {
|
||||
text: t('backgroundPyramidsText'),
|
||||
notes: t('backgroundPyramidsNotes'),
|
||||
},
|
||||
sunset_savannah: {
|
||||
text: t('backgroundSunsetSavannahText'),
|
||||
notes: t('backgroundSunsetSavannahNotes'),
|
||||
},
|
||||
twinkly_party_lights: {
|
||||
text: t('backgroundTwinklyPartyLightsText'),
|
||||
notes: t('backgroundTwinklyPartyLightsNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds092015: {
|
||||
market: {
|
||||
text: t('backgroundMarketText'),
|
||||
notes: t('backgroundMarketNotes'),
|
||||
},
|
||||
stable: {
|
||||
text: t('backgroundStableText'),
|
||||
notes: t('backgroundStableNotes'),
|
||||
},
|
||||
tavern: {
|
||||
text: t('backgroundTavernText'),
|
||||
notes: t('backgroundTavernNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds102015: {
|
||||
harvest_moon: {
|
||||
text: t('backgroundHarvestMoonText'),
|
||||
notes: t('backgroundHarvestMoonNotes'),
|
||||
},
|
||||
slimy_swamp: {
|
||||
text: t('backgroundSlimySwampText'),
|
||||
notes: t('backgroundSlimySwampNotes'),
|
||||
},
|
||||
swarming_darkness: {
|
||||
text: t('backgroundSwarmingDarknessText'),
|
||||
notes: t('backgroundSwarmingDarknessNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds112015: {
|
||||
floating_islands: {
|
||||
text: t('backgroundFloatingIslandsText'),
|
||||
notes: t('backgroundFloatingIslandsNotes'),
|
||||
},
|
||||
night_dunes: {
|
||||
text: t('backgroundNightDunesText'),
|
||||
notes: t('backgroundNightDunesNotes'),
|
||||
},
|
||||
sunset_oasis: {
|
||||
text: t('backgroundSunsetOasisText'),
|
||||
notes: t('backgroundSunsetOasisNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds122015: {
|
||||
alpine_slopes: {
|
||||
text: t('backgroundAlpineSlopesText'),
|
||||
notes: t('backgroundAlpineSlopesNotes'),
|
||||
},
|
||||
snowy_sunrise: {
|
||||
text: t('backgroundSnowySunriseText'),
|
||||
notes: t('backgroundSnowySunriseNotes'),
|
||||
},
|
||||
winter_town: {
|
||||
text: t('backgroundWinterTownText'),
|
||||
notes: t('backgroundWinterTownNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds012016: {
|
||||
frozen_lake: {
|
||||
text: t('backgroundFrozenLakeText'),
|
||||
notes: t('backgroundFrozenLakeNotes'),
|
||||
},
|
||||
snowman_army: {
|
||||
text: t('backgroundSnowmanArmyText'),
|
||||
notes: t('backgroundSnowmanArmyNotes'),
|
||||
},
|
||||
winter_night: {
|
||||
text: t('backgroundWinterNightText'),
|
||||
notes: t('backgroundWinterNightNotes'),
|
||||
},
|
||||
},
|
||||
};
|
||||
/* eslint-enable quote-props */
|
||||
|
||||
forOwn(backgrounds, function prefillBackgroundSet (value) {
|
||||
forOwn(value, function prefillBackground (bgObject) {
|
||||
bgObject.price = 7;
|
||||
});
|
||||
});
|
||||
|
||||
export default backgrounds;
|
||||
8
common/script/content/appearance/hair/bangs.js
Normal file
8
common/script/content/appearance/hair/bangs.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import prefill from '../prefill.js';
|
||||
|
||||
export default prefill({
|
||||
0: {},
|
||||
1: {},
|
||||
2: {},
|
||||
3: {},
|
||||
});
|
||||
19
common/script/content/appearance/hair/base.js
Normal file
19
common/script/content/appearance/hair/base.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import prefill from '../prefill.js';
|
||||
import sets from '../sets.js';
|
||||
export default prefill({
|
||||
0: {},
|
||||
1: {},
|
||||
2: {price: 2, set: sets.baseHair1},
|
||||
3: {},
|
||||
4: {price: 2, set: sets.baseHair1},
|
||||
5: {price: 2, set: sets.baseHair1},
|
||||
6: {price: 2, set: sets.baseHair1},
|
||||
7: {price: 2, set: sets.baseHair1},
|
||||
8: {price: 2, set: sets.baseHair1},
|
||||
9: {price: 2, set: sets.baseHair2},
|
||||
10: {price: 2, set: sets.baseHair2},
|
||||
11: {price: 2, set: sets.baseHair2},
|
||||
12: {price: 2, set: sets.baseHair2},
|
||||
13: {price: 2, set: sets.baseHair2},
|
||||
14: {price: 2, set: sets.baseHair2},
|
||||
});
|
||||
9
common/script/content/appearance/hair/beard.js
Normal file
9
common/script/content/appearance/hair/beard.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import sets from '../sets.js';
|
||||
import prefill from '../prefill.js';
|
||||
|
||||
export default prefill({
|
||||
0: {},
|
||||
1: {price: 2, set: sets.facialHair},
|
||||
2: {price: 2, set: sets.facialHair},
|
||||
3: {price: 2, set: sets.facialHair},
|
||||
});
|
||||
50
common/script/content/appearance/hair/color.js
Normal file
50
common/script/content/appearance/hair/color.js
Normal file
@@ -0,0 +1,50 @@
|
||||
import sets from '../sets.js';
|
||||
import prefill from '../prefill.js';
|
||||
|
||||
export default prefill({
|
||||
white: {},
|
||||
brown: {},
|
||||
blond: {},
|
||||
red: {},
|
||||
black: {},
|
||||
|
||||
candycane: {price: 2, set: sets.winterHairColors},
|
||||
frost: {price: 2, set: sets.winterHairColors},
|
||||
winternight: {price: 2, set: sets.winterHairColors},
|
||||
holly: {price: 2, set: sets.winterHairColors},
|
||||
|
||||
pblue: {price: 2, set: sets.pastelHairColors},
|
||||
pgreen: {price: 2, set: sets.pastelHairColors},
|
||||
porange: {price: 2, set: sets.pastelHairColors},
|
||||
ppink: {price: 2, set: sets.pastelHairColors},
|
||||
ppurple: {price: 2, set: sets.pastelHairColors},
|
||||
pyellow: {price: 2, set: sets.pastelHairColors},
|
||||
|
||||
rainbow: {price: 2, set: sets.rainbowHairColors},
|
||||
yellow: {price: 2, set: sets.rainbowHairColors},
|
||||
green: {price: 2, set: sets.rainbowHairColors},
|
||||
purple: {price: 2, set: sets.rainbowHairColors},
|
||||
blue: {price: 2, set: sets.rainbowHairColors},
|
||||
TRUred: {price: 2, set: sets.rainbowHairColors},
|
||||
|
||||
pblue2: {price: 2, set: sets.shimmerHairColors},
|
||||
pgreen2: {price: 2, set: sets.shimmerHairColors},
|
||||
porange2: {price: 2, set: sets.shimmerHairColors},
|
||||
ppink2: {price: 2, set: sets.shimmerHairColors},
|
||||
ppurple2: {price: 2, set: sets.shimmerHairColors},
|
||||
pyellow2: {price: 2, set: sets.shimmerHairColors},
|
||||
|
||||
candycorn: {price: 2, set: sets.hauntedHairColors},
|
||||
ghostwhite: {price: 2, set: sets.hauntedHairColors},
|
||||
halloween: {price: 2, set: sets.hauntedHairColors},
|
||||
midnight: {price: 2, set: sets.hauntedHairColors},
|
||||
pumpkin: {price: 2, set: sets.hauntedHairColors},
|
||||
zombie: {price: 2, set: sets.hauntedHairColors},
|
||||
|
||||
aurora: {price: 2, set: sets.winteryHairColors},
|
||||
festive: {price: 2, set: sets.winteryHairColors},
|
||||
hollygreen: {price: 2, set: sets.winteryHairColors},
|
||||
peppermint: {price: 2, set: sets.winteryHairColors},
|
||||
snowy: {price: 2, set: sets.winteryHairColors},
|
||||
winterstar: {price: 2, set: sets.winteryHairColors},
|
||||
});
|
||||
11
common/script/content/appearance/hair/flower.js
Normal file
11
common/script/content/appearance/hair/flower.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import prefill from '../prefill.js';
|
||||
|
||||
export default prefill({
|
||||
0: {},
|
||||
1: {},
|
||||
2: {},
|
||||
3: {},
|
||||
4: {},
|
||||
5: {},
|
||||
6: {},
|
||||
});
|
||||
15
common/script/content/appearance/hair/index.js
Normal file
15
common/script/content/appearance/hair/index.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import bangs from './bangs.js';
|
||||
import base from './base.js';
|
||||
import beard from './beard.js';
|
||||
import color from './color.js';
|
||||
import flower from './flower.js';
|
||||
import mustache from './mustache.js';
|
||||
|
||||
export default {
|
||||
color,
|
||||
base,
|
||||
bangs,
|
||||
flower,
|
||||
beard,
|
||||
mustache,
|
||||
};
|
||||
8
common/script/content/appearance/hair/mustache.js
Normal file
8
common/script/content/appearance/hair/mustache.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import sets from '../sets.js';
|
||||
import prefill from '../prefill.js';
|
||||
|
||||
export default prefill({
|
||||
0: {},
|
||||
1: {price: 2, set: sets.facialHair},
|
||||
2: {price: 2, set: sets.facialHair},
|
||||
});
|
||||
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;
|
||||
11
common/script/content/appearance/prefill.js
Normal file
11
common/script/content/appearance/prefill.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import {forOwn} from 'lodash';
|
||||
|
||||
export default function prefillAppearances (obj) {
|
||||
forOwn(obj, function prefillAppearance (value, key) {
|
||||
value.key = key;
|
||||
if (!value.price) {
|
||||
value.price = 0;
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
}
|
||||
21
common/script/content/appearance/sets.js
Normal file
21
common/script/content/appearance/sets.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import t from '../translation';
|
||||
import prefill from './prefill.js';
|
||||
|
||||
export default prefill({
|
||||
baseHair1: {setPrice: 5, text: t('hairSet1')},
|
||||
baseHair2: {setPrice: 5, text: t('hairSet2')},
|
||||
facialHair: {setPrice: 5, text: t('bodyFacialHair')},
|
||||
specialShirts: {setPrice: 5, text: t('specialShirts')},
|
||||
winterHairColors: {setPrice: 5, availableUntil: '2016-01-01'},
|
||||
pastelHairColors: {setPrice: 5, availableUntil: '2016-01-01'},
|
||||
rainbowHairColors: {setPrice: 5, text: t('rainbowColors')},
|
||||
shimmerHairColors: {setPrice: 5, availableUntil: '2016-01-01', text: t('shimmerColors')},
|
||||
hauntedHairColors: {setPrice: 5, availableUntil: '2016-01-01', text: t('hauntedColors')},
|
||||
winteryHairColors: {setPrice: 5, availableFrom: '2015-12-18', availableUntil: '2016-02-02', text: t('winteryColors')},
|
||||
rainbowSkins: {setPrice: 5, text: t('rainbowSkins')},
|
||||
animalSkins: {setPrice: 5, text: t('animalSkins')},
|
||||
pastelSkins: {setPrice: 5, availableUntil: '2016-01-01', text: t('pastelSkins')},
|
||||
spookySkins: {setPrice: 5, availableUntil: '2016-01-01', text: t('spookySkins')},
|
||||
supernaturalSkins: {setPrice: 5, availableUntil: '2016-01-01', text: t('supernaturalSkins')},
|
||||
splashySkins: {setPrice: 5, availableUntil: '2016-01-01', text: t('splashySkins')},
|
||||
});
|
||||
23
common/script/content/appearance/shirt.js
Normal file
23
common/script/content/appearance/shirt.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import sets from './sets.js';
|
||||
import prefill from './prefill.js';
|
||||
|
||||
export default prefill({
|
||||
black: {},
|
||||
blue: {},
|
||||
green: {},
|
||||
pink: {},
|
||||
white: {},
|
||||
yellow: {},
|
||||
|
||||
convict: {price: 2, set: sets.specialShirts},
|
||||
cross: {price: 2, set: sets.specialShirts},
|
||||
fire: {price: 2, set: sets.specialShirts},
|
||||
horizon: {price: 2, set: sets.specialShirts},
|
||||
ocean: {price: 2, set: sets.specialShirts},
|
||||
purple: {price: 2, set: sets.specialShirts},
|
||||
rainbow: {price: 2, set: sets.specialShirts},
|
||||
redblue: {price: 2, set: sets.specialShirts},
|
||||
thunder: {price: 2, set: sets.specialShirts},
|
||||
tropical: {price: 2, set: sets.specialShirts},
|
||||
zombie: {price: 2, set: sets.specialShirts},
|
||||
});
|
||||
6
common/script/content/appearance/size.js
Normal file
6
common/script/content/appearance/size.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import prefill from './prefill.js';
|
||||
|
||||
export default prefill({
|
||||
slim: {},
|
||||
broad: {},
|
||||
});
|
||||
68
common/script/content/appearance/skin.js
Normal file
68
common/script/content/appearance/skin.js
Normal file
@@ -0,0 +1,68 @@
|
||||
import prefill from './prefill.js';
|
||||
import sets from './sets.js';
|
||||
|
||||
export default prefill({
|
||||
/* eslint-disable quote-props */
|
||||
'ddc994': {},
|
||||
'f5a76e': {},
|
||||
'ea8349': {},
|
||||
'c06534': {},
|
||||
'98461a': {},
|
||||
'915533': {},
|
||||
'c3e1dc': {},
|
||||
'6bd049': {},
|
||||
|
||||
'eb052b': {price: 2, set: sets.rainbowSkins},
|
||||
'f69922': {price: 2, set: sets.rainbowSkins},
|
||||
'f5d70f': {price: 2, set: sets.rainbowSkins},
|
||||
'0ff591': {price: 2, set: sets.rainbowSkins},
|
||||
'2b43f6': {price: 2, set: sets.rainbowSkins},
|
||||
'd7a9f7': {price: 2, set: sets.rainbowSkins},
|
||||
'800ed0': {price: 2, set: sets.rainbowSkins},
|
||||
'rainbow': {price: 2, set: sets.rainbowSkins},
|
||||
|
||||
'bear': {price: 2, set: sets.animalSkins},
|
||||
'cactus': {price: 2, set: sets.animalSkins},
|
||||
'fox': {price: 2, set: sets.animalSkins},
|
||||
'lion': {price: 2, set: sets.animalSkins},
|
||||
'panda': {price: 2, set: sets.animalSkins},
|
||||
'pig': {price: 2, set: sets.animalSkins},
|
||||
'tiger': {price: 2, set: sets.animalSkins},
|
||||
'wolf': {price: 2, set: sets.animalSkins},
|
||||
|
||||
'pastelPink': {price: 2, set: sets.pastelSkins},
|
||||
'pastelOrange': {price: 2, set: sets.pastelSkins},
|
||||
'pastelYellow': {price: 2, set: sets.pastelSkins},
|
||||
'pastelGreen': {price: 2, set: sets.pastelSkins},
|
||||
'pastelBlue': {price: 2, set: sets.pastelSkins},
|
||||
'pastelPurple': {price: 2, set: sets.pastelSkins},
|
||||
'pastelRainbowChevron': {price: 2, set: sets.pastelSkins},
|
||||
'pastelRainbowDiagonal': {price: 2, set: sets.pastelSkins},
|
||||
|
||||
'monster': {price: 2, set: sets.spookySkins},
|
||||
'pumpkin': {price: 2, set: sets.spookySkins},
|
||||
'skeleton': {price: 2, set: sets.spookySkins},
|
||||
'zombie': {price: 2, set: sets.spookySkins},
|
||||
'ghost': {price: 2, set: sets.spookySkins},
|
||||
'shadow': {price: 2, set: sets.spookySkins},
|
||||
|
||||
'candycorn': {price: 2, set: sets.supernaturalSkins},
|
||||
'ogre': {price: 2, set: sets.supernaturalSkins},
|
||||
'pumpkin2': {price: 2, set: sets.supernaturalSkins},
|
||||
'reptile': {price: 2, set: sets.supernaturalSkins},
|
||||
'shadow2': {price: 2, set: sets.supernaturalSkins},
|
||||
'skeleton2': {price: 2, set: sets.supernaturalSkins},
|
||||
'transparent': {price: 2, set: sets.supernaturalSkins},
|
||||
'zombie2': {price: 2, set: sets.supernaturalSkins},
|
||||
|
||||
'clownfish': {price: 2, set: sets.splashySkins},
|
||||
'deepocean': {price: 2, set: sets.splashySkins},
|
||||
'merblue': {price: 2, set: sets.splashySkins},
|
||||
'mergold': {price: 2, set: sets.splashySkins},
|
||||
'mergreen': {price: 2, set: sets.splashySkins},
|
||||
'merruby': {price: 2, set: sets.splashySkins},
|
||||
'shark': {price: 2, set: sets.splashySkins},
|
||||
'tropicalwater': {price: 2, set: sets.splashySkins},
|
||||
|
||||
/* eslint-enable quote-props */
|
||||
});
|
||||
@@ -19,7 +19,9 @@ import {
|
||||
import mysterySets from './mystery-sets';
|
||||
|
||||
import gear from './gear';
|
||||
import { defaultAppearancePreferences } from './appearance';
|
||||
|
||||
import appearances from './appearance';
|
||||
import backgrounds from './appearance/backgrounds.js'
|
||||
|
||||
api.mystery = mysterySets;
|
||||
|
||||
@@ -3049,290 +3051,9 @@ api.questsByLevel = _.sortBy(api.quests, function(quest) {
|
||||
return quest.lvl || 0;
|
||||
});
|
||||
|
||||
api.defaultAppearancePreferences = defaultAppearancePreferences;
|
||||
api.appearances = appearances;
|
||||
|
||||
api.backgrounds = {
|
||||
backgrounds062014: {
|
||||
beach: {
|
||||
text: t('backgroundBeachText'),
|
||||
notes: t('backgroundBeachNotes')
|
||||
},
|
||||
fairy_ring: {
|
||||
text: t('backgroundFairyRingText'),
|
||||
notes: t('backgroundFairyRingNotes')
|
||||
},
|
||||
forest: {
|
||||
text: t('backgroundForestText'),
|
||||
notes: t('backgroundForestNotes')
|
||||
}
|
||||
},
|
||||
backgrounds072014: {
|
||||
open_waters: {
|
||||
text: t('backgroundOpenWatersText'),
|
||||
notes: t('backgroundOpenWatersNotes')
|
||||
},
|
||||
coral_reef: {
|
||||
text: t('backgroundCoralReefText'),
|
||||
notes: t('backgroundCoralReefNotes')
|
||||
},
|
||||
seafarer_ship: {
|
||||
text: t('backgroundSeafarerShipText'),
|
||||
notes: t('backgroundSeafarerShipNotes')
|
||||
}
|
||||
},
|
||||
backgrounds082014: {
|
||||
volcano: {
|
||||
text: t('backgroundVolcanoText'),
|
||||
notes: t('backgroundVolcanoNotes')
|
||||
},
|
||||
clouds: {
|
||||
text: t('backgroundCloudsText'),
|
||||
notes: t('backgroundCloudsNotes')
|
||||
},
|
||||
dusty_canyons: {
|
||||
text: t('backgroundDustyCanyonsText'),
|
||||
notes: t('backgroundDustyCanyonsNotes')
|
||||
}
|
||||
},
|
||||
backgrounds092014: {
|
||||
thunderstorm: {
|
||||
text: t('backgroundThunderstormText'),
|
||||
notes: t('backgroundThunderstormNotes')
|
||||
},
|
||||
autumn_forest: {
|
||||
text: t('backgroundAutumnForestText'),
|
||||
notes: t('backgroundAutumnForestNotes')
|
||||
},
|
||||
harvest_fields: {
|
||||
text: t('backgroundHarvestFieldsText'),
|
||||
notes: t('backgroundHarvestFieldsNotes')
|
||||
}
|
||||
},
|
||||
backgrounds102014: {
|
||||
graveyard: {
|
||||
text: t('backgroundGraveyardText'),
|
||||
notes: t('backgroundGraveyardNotes')
|
||||
},
|
||||
haunted_house: {
|
||||
text: t('backgroundHauntedHouseText'),
|
||||
notes: t('backgroundHauntedHouseNotes')
|
||||
},
|
||||
pumpkin_patch: {
|
||||
text: t('backgroundPumpkinPatchText'),
|
||||
notes: t('backgroundPumpkinPatchNotes')
|
||||
}
|
||||
},
|
||||
backgrounds112014: {
|
||||
harvest_feast: {
|
||||
text: t('backgroundHarvestFeastText'),
|
||||
notes: t('backgroundHarvestFeastNotes')
|
||||
},
|
||||
sunset_meadow: {
|
||||
text: t('backgroundSunsetMeadowText'),
|
||||
notes: t('backgroundSunsetMeadowNotes')
|
||||
},
|
||||
starry_skies: {
|
||||
text: t('backgroundStarrySkiesText'),
|
||||
notes: t('backgroundStarrySkiesNotes')
|
||||
}
|
||||
},
|
||||
backgrounds122014: {
|
||||
iceberg: {
|
||||
text: t('backgroundIcebergText'),
|
||||
notes: t('backgroundIcebergNotes')
|
||||
},
|
||||
twinkly_lights: {
|
||||
text: t('backgroundTwinklyLightsText'),
|
||||
notes: t('backgroundTwinklyLightsNotes')
|
||||
},
|
||||
south_pole: {
|
||||
text: t('backgroundSouthPoleText'),
|
||||
notes: t('backgroundSouthPoleNotes')
|
||||
}
|
||||
},
|
||||
backgrounds012015: {
|
||||
ice_cave: {
|
||||
text: t('backgroundIceCaveText'),
|
||||
notes: t('backgroundIceCaveNotes')
|
||||
},
|
||||
frigid_peak: {
|
||||
text: t('backgroundFrigidPeakText'),
|
||||
notes: t('backgroundFrigidPeakNotes')
|
||||
},
|
||||
snowy_pines: {
|
||||
text: t('backgroundSnowyPinesText'),
|
||||
notes: t('backgroundSnowyPinesNotes')
|
||||
}
|
||||
},
|
||||
backgrounds022015: {
|
||||
blacksmithy: {
|
||||
text: t('backgroundBlacksmithyText'),
|
||||
notes: t('backgroundBlacksmithyNotes')
|
||||
},
|
||||
crystal_cave: {
|
||||
text: t('backgroundCrystalCaveText'),
|
||||
notes: t('backgroundCrystalCaveNotes')
|
||||
},
|
||||
distant_castle: {
|
||||
text: t('backgroundDistantCastleText'),
|
||||
notes: t('backgroundDistantCastleNotes')
|
||||
}
|
||||
},
|
||||
backgrounds032015: {
|
||||
spring_rain: {
|
||||
text: t('backgroundSpringRainText'),
|
||||
notes: t('backgroundSpringRainNotes')
|
||||
},
|
||||
stained_glass: {
|
||||
text: t('backgroundStainedGlassText'),
|
||||
notes: t('backgroundStainedGlassNotes')
|
||||
},
|
||||
rolling_hills: {
|
||||
text: t('backgroundRollingHillsText'),
|
||||
notes: t('backgroundRollingHillsNotes')
|
||||
}
|
||||
},
|
||||
backgrounds042015: {
|
||||
cherry_trees: {
|
||||
text: t('backgroundCherryTreesText'),
|
||||
notes: t('backgroundCherryTreesNotes')
|
||||
},
|
||||
floral_meadow: {
|
||||
text: t('backgroundFloralMeadowText'),
|
||||
notes: t('backgroundFloralMeadowNotes')
|
||||
},
|
||||
gumdrop_land: {
|
||||
text: t('backgroundGumdropLandText'),
|
||||
notes: t('backgroundGumdropLandNotes')
|
||||
}
|
||||
},
|
||||
backgrounds052015: {
|
||||
marble_temple: {
|
||||
text: t('backgroundMarbleTempleText'),
|
||||
notes: t('backgroundMarbleTempleNotes')
|
||||
},
|
||||
mountain_lake: {
|
||||
text: t('backgroundMountainLakeText'),
|
||||
notes: t('backgroundMountainLakeNotes')
|
||||
},
|
||||
pagodas: {
|
||||
text: t('backgroundPagodasText'),
|
||||
notes: t('backgroundPagodasNotes')
|
||||
}
|
||||
},
|
||||
backgrounds062015: {
|
||||
drifting_raft: {
|
||||
text: t('backgroundDriftingRaftText'),
|
||||
notes: t('backgroundDriftingRaftNotes')
|
||||
},
|
||||
shimmery_bubbles: {
|
||||
text: t('backgroundShimmeryBubblesText'),
|
||||
notes: t('backgroundShimmeryBubblesNotes')
|
||||
},
|
||||
island_waterfalls: {
|
||||
text: t('backgroundIslandWaterfallsText'),
|
||||
notes: t('backgroundIslandWaterfallsNotes')
|
||||
}
|
||||
},
|
||||
backgrounds072015: {
|
||||
dilatory_ruins: {
|
||||
text: t('backgroundDilatoryRuinsText'),
|
||||
notes: t('backgroundDilatoryRuinsNotes')
|
||||
},
|
||||
giant_wave: {
|
||||
text: t('backgroundGiantWaveText'),
|
||||
notes: t('backgroundGiantWaveNotes')
|
||||
},
|
||||
sunken_ship: {
|
||||
text: t('backgroundSunkenShipText'),
|
||||
notes: t('backgroundSunkenShipNotes')
|
||||
}
|
||||
},
|
||||
backgrounds082015: {
|
||||
pyramids: {
|
||||
text: t('backgroundPyramidsText'),
|
||||
notes: t('backgroundPyramidsNotes')
|
||||
},
|
||||
sunset_savannah: {
|
||||
text: t('backgroundSunsetSavannahText'),
|
||||
notes: t('backgroundSunsetSavannahNotes')
|
||||
},
|
||||
twinkly_party_lights: {
|
||||
text: t('backgroundTwinklyPartyLightsText'),
|
||||
notes: t('backgroundTwinklyPartyLightsNotes')
|
||||
}
|
||||
},
|
||||
backgrounds092015: {
|
||||
market: {
|
||||
text: t('backgroundMarketText'),
|
||||
notes: t('backgroundMarketNotes')
|
||||
},
|
||||
stable: {
|
||||
text: t('backgroundStableText'),
|
||||
notes: t('backgroundStableNotes')
|
||||
},
|
||||
tavern: {
|
||||
text: t('backgroundTavernText'),
|
||||
notes: t('backgroundTavernNotes')
|
||||
}
|
||||
},
|
||||
backgrounds102015: {
|
||||
harvest_moon: {
|
||||
text: t('backgroundHarvestMoonText'),
|
||||
notes: t('backgroundHarvestMoonNotes')
|
||||
},
|
||||
slimy_swamp: {
|
||||
text: t('backgroundSlimySwampText'),
|
||||
notes: t('backgroundSlimySwampNotes')
|
||||
},
|
||||
swarming_darkness: {
|
||||
text: t('backgroundSwarmingDarknessText'),
|
||||
notes: t('backgroundSwarmingDarknessNotes')
|
||||
}
|
||||
},
|
||||
backgrounds112015: {
|
||||
floating_islands: {
|
||||
text: t('backgroundFloatingIslandsText'),
|
||||
notes: t('backgroundFloatingIslandsNotes')
|
||||
},
|
||||
night_dunes: {
|
||||
text: t('backgroundNightDunesText'),
|
||||
notes: t('backgroundNightDunesNotes')
|
||||
},
|
||||
sunset_oasis: {
|
||||
text: t('backgroundSunsetOasisText'),
|
||||
notes: t('backgroundSunsetOasisNotes')
|
||||
}
|
||||
},
|
||||
backgrounds122015: {
|
||||
alpine_slopes: {
|
||||
text: t('backgroundAlpineSlopesText'),
|
||||
notes: t('backgroundAlpineSlopesNotes')
|
||||
},
|
||||
snowy_sunrise: {
|
||||
text: t('backgroundSnowySunriseText'),
|
||||
notes: t('backgroundSnowySunriseNotes')
|
||||
},
|
||||
winter_town: {
|
||||
text: t('backgroundWinterTownText'),
|
||||
notes: t('backgroundWinterTownNotes')
|
||||
}
|
||||
},
|
||||
backgrounds012016: {
|
||||
frozen_lake: {
|
||||
text: t('backgroundFrozenLakeText'),
|
||||
notes: t('backgroundFrozenLakeNotes')
|
||||
},
|
||||
snowman_army: {
|
||||
text: t('backgroundSnowmanArmyText'),
|
||||
notes: t('backgroundSnowmanArmyNotes')
|
||||
},
|
||||
winter_night: {
|
||||
text: t('backgroundWinterNightText'),
|
||||
notes: t('backgroundWinterNightNotes')
|
||||
}
|
||||
},
|
||||
};
|
||||
api.backgrounds = backgrounds;
|
||||
|
||||
api.subscriptionBlocks = {
|
||||
basic_earned: {
|
||||
|
||||
@@ -319,9 +319,9 @@ let requiresPurchase = {
|
||||
|
||||
let checkPreferencePurchase = (user, path, item) => {
|
||||
let itemPath = `${path}.${item}`;
|
||||
let isDefaultPreference = _.get(shared.content.defaultAppearancePreferences, itemPath);
|
||||
|
||||
if (isDefaultPreference) return true;
|
||||
let appearance = _.get(shared.content.appearances, itemPath)
|
||||
if (!appearance) return false;
|
||||
if (appearance.price === 0) return true;
|
||||
|
||||
return _.get(user.purchased, itemPath);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user