diff --git a/website/assets/sprites/dist/spritesmith-main-15.css b/website/assets/sprites/dist/spritesmith-main-15.css new file mode 100644 index 0000000000..5bbf5619b0 --- /dev/null +++ b/website/assets/sprites/dist/spritesmith-main-15.css @@ -0,0 +1,336 @@ +.Pet-Turtle-Red { + background-image: url(/spritesmith-main-15.png); + background-position: -82px 0px; + width: 81px; + height: 99px; +} +.Pet-Turtle-Shade { + background-image: url(/spritesmith-main-15.png); + background-position: 0px -400px; + width: 81px; + height: 99px; +} +.Pet-Turtle-Skeleton { + background-image: url(/spritesmith-main-15.png); + background-position: -164px 0px; + width: 81px; + height: 99px; +} +.Pet-Turtle-White { + background-image: url(/spritesmith-main-15.png); + background-position: 0px -100px; + width: 81px; + height: 99px; +} +.Pet-Turtle-Zombie { + background-image: url(/spritesmith-main-15.png); + background-position: -82px -100px; + width: 81px; + height: 99px; +} +.Pet-Unicorn-Base { + background-image: url(/spritesmith-main-15.png); + background-position: -164px -100px; + width: 81px; + height: 99px; +} +.Pet-Unicorn-CottonCandyBlue { + background-image: url(/spritesmith-main-15.png); + background-position: -246px 0px; + width: 81px; + height: 99px; +} +.Pet-Unicorn-CottonCandyPink { + background-image: url(/spritesmith-main-15.png); + background-position: -246px -100px; + width: 81px; + height: 99px; +} +.Pet-Unicorn-Desert { + background-image: url(/spritesmith-main-15.png); + background-position: 0px -200px; + width: 81px; + height: 99px; +} +.Pet-Unicorn-Golden { + background-image: url(/spritesmith-main-15.png); + background-position: -82px -200px; + width: 81px; + height: 99px; +} +.Pet-Unicorn-Red { + background-image: url(/spritesmith-main-15.png); + background-position: -164px -200px; + width: 81px; + height: 99px; +} +.Pet-Unicorn-Shade { + background-image: url(/spritesmith-main-15.png); + background-position: -246px -200px; + width: 81px; + height: 99px; +} +.Pet-Unicorn-Skeleton { + background-image: url(/spritesmith-main-15.png); + background-position: -328px 0px; + width: 81px; + height: 99px; +} +.Pet-Unicorn-White { + background-image: url(/spritesmith-main-15.png); + background-position: -328px -100px; + width: 81px; + height: 99px; +} +.Pet-Unicorn-Zombie { + background-image: url(/spritesmith-main-15.png); + background-position: -328px -200px; + width: 81px; + height: 99px; +} +.Pet-Whale-Base { + background-image: url(/spritesmith-main-15.png); + background-position: 0px -300px; + width: 81px; + height: 99px; +} +.Pet-Whale-CottonCandyBlue { + background-image: url(/spritesmith-main-15.png); + background-position: -82px -300px; + width: 81px; + height: 99px; +} +.Pet-Whale-CottonCandyPink { + background-image: url(/spritesmith-main-15.png); + background-position: -164px -300px; + width: 81px; + height: 99px; +} +.Pet-Whale-Desert { + background-image: url(/spritesmith-main-15.png); + background-position: -246px -300px; + width: 81px; + height: 99px; +} +.Pet-Whale-Golden { + background-image: url(/spritesmith-main-15.png); + background-position: -328px -300px; + width: 81px; + height: 99px; +} +.Pet-Whale-Red { + background-image: url(/spritesmith-main-15.png); + background-position: -410px 0px; + width: 81px; + height: 99px; +} +.Pet-Whale-Shade { + background-image: url(/spritesmith-main-15.png); + background-position: -410px -100px; + width: 81px; + height: 99px; +} +.Pet-Whale-Skeleton { + background-image: url(/spritesmith-main-15.png); + background-position: -410px -200px; + width: 81px; + height: 99px; +} +.Pet-Whale-White { + background-image: url(/spritesmith-main-15.png); + background-position: -410px -300px; + width: 81px; + height: 99px; +} +.Pet-Whale-Zombie { + background-image: url(/spritesmith-main-15.png); + background-position: -492px 0px; + width: 81px; + height: 99px; +} +.Pet-Wolf-Base { + background-image: url(/spritesmith-main-15.png); + background-position: -492px -100px; + width: 81px; + height: 99px; +} +.Pet-Wolf-CottonCandyBlue { + background-image: url(/spritesmith-main-15.png); + background-position: -492px -200px; + width: 81px; + height: 99px; +} +.Pet-Wolf-CottonCandyPink { + background-image: url(/spritesmith-main-15.png); + background-position: -492px -300px; + width: 81px; + height: 99px; +} +.Pet-Wolf-Desert { + background-image: url(/spritesmith-main-15.png); + background-position: 0px 0px; + width: 81px; + height: 99px; +} +.Pet-Wolf-Floral { + background-image: url(/spritesmith-main-15.png); + background-position: -82px -400px; + width: 81px; + height: 99px; +} +.Pet-Wolf-Ghost { + background-image: url(/spritesmith-main-15.png); + background-position: -164px -400px; + width: 81px; + height: 99px; +} +.Pet-Wolf-Golden { + background-image: url(/spritesmith-main-15.png); + background-position: -246px -400px; + width: 81px; + height: 99px; +} +.Pet-Wolf-Peppermint { + background-image: url(/spritesmith-main-15.png); + background-position: -328px -400px; + width: 81px; + height: 99px; +} +.Pet-Wolf-Red { + background-image: url(/spritesmith-main-15.png); + background-position: -410px -400px; + width: 81px; + height: 99px; +} +.Pet-Wolf-Shade { + background-image: url(/spritesmith-main-15.png); + background-position: -492px -400px; + width: 81px; + height: 99px; +} +.Pet-Wolf-Skeleton { + background-image: url(/spritesmith-main-15.png); + background-position: -574px 0px; + width: 81px; + height: 99px; +} +.Pet-Wolf-Spooky { + background-image: url(/spritesmith-main-15.png); + background-position: -574px -100px; + width: 81px; + height: 99px; +} +.Pet-Wolf-Thunderstorm { + background-image: url(/spritesmith-main-15.png); + background-position: -574px -200px; + width: 81px; + height: 99px; +} +.Pet-Wolf-Veteran { + background-image: url(/spritesmith-main-15.png); + background-position: -574px -300px; + width: 81px; + height: 99px; +} +.Pet-Wolf-White { + background-image: url(/spritesmith-main-15.png); + background-position: -574px -400px; + width: 81px; + height: 99px; +} +.Pet-Wolf-Zombie { + background-image: url(/spritesmith-main-15.png); + background-position: 0px -500px; + width: 81px; + height: 99px; +} +.Pet_HatchingPotion_Base { + background-image: url(/spritesmith-main-15.png); + background-position: -131px -500px; + width: 48px; + height: 51px; +} +.Pet_HatchingPotion_CottonCandyBlue { + background-image: url(/spritesmith-main-15.png); + background-position: -425px -500px; + width: 48px; + height: 51px; +} +.Pet_HatchingPotion_CottonCandyPink { + background-image: url(/spritesmith-main-15.png); + background-position: -180px -500px; + width: 48px; + height: 51px; +} +.Pet_HatchingPotion_Desert { + background-image: url(/spritesmith-main-15.png); + background-position: -229px -500px; + width: 48px; + height: 51px; +} +.Pet_HatchingPotion_Floral { + background-image: url(/spritesmith-main-15.png); + background-position: -278px -500px; + width: 48px; + height: 51px; +} +.Pet_HatchingPotion_Ghost { + background-image: url(/spritesmith-main-15.png); + background-position: -327px -500px; + width: 48px; + height: 51px; +} +.Pet_HatchingPotion_Golden { + background-image: url(/spritesmith-main-15.png); + background-position: -376px -500px; + width: 48px; + height: 51px; +} +.Pet_HatchingPotion_Peppermint { + background-image: url(/spritesmith-main-15.png); + background-position: -82px -500px; + width: 48px; + height: 51px; +} +.Pet_HatchingPotion_Red { + background-image: url(/spritesmith-main-15.png); + background-position: -474px -500px; + width: 48px; + height: 51px; +} +.Pet_HatchingPotion_Shade { + background-image: url(/spritesmith-main-15.png); + background-position: -523px -500px; + width: 48px; + height: 51px; +} +.Pet_HatchingPotion_Skeleton { + background-image: url(/spritesmith-main-15.png); + background-position: -572px -500px; + width: 48px; + height: 51px; +} +.Pet_HatchingPotion_Spooky { + background-image: url(/spritesmith-main-15.png); + background-position: 0px -600px; + width: 48px; + height: 51px; +} +.Pet_HatchingPotion_Thunderstorm { + background-image: url(/spritesmith-main-15.png); + background-position: -49px -600px; + width: 48px; + height: 51px; +} +.Pet_HatchingPotion_White { + background-image: url(/spritesmith-main-15.png); + background-position: -98px -600px; + width: 48px; + height: 51px; +} +.Pet_HatchingPotion_Zombie { + background-image: url(/spritesmith-main-15.png); + background-position: -147px -600px; + width: 48px; + height: 51px; +} diff --git a/website/assets/sprites/dist/spritesmith-main-15.png b/website/assets/sprites/dist/spritesmith-main-15.png new file mode 100644 index 0000000000..31ee58ce1c Binary files /dev/null and b/website/assets/sprites/dist/spritesmith-main-15.png differ diff --git a/website/common/locales/en/character.json b/website/common/locales/en/character.json index 2b6d54afb5..ea0b2f0a7d 100644 --- a/website/common/locales/en/character.json +++ b/website/common/locales/en/character.json @@ -30,6 +30,7 @@ "hairBase": "Base", "hairSet1": "Hairstyle Set 1", "hairSet2": "Hairstyle Set 2", + "hairSet3": "Hairstyle Set 3", "bodyFacialHair": "Facial Hair", "beard": "Beard", "mustache": "Mustache", diff --git a/website/common/script/content/appearance/hair/bangs.js b/website/common/script/content/appearance/hair/bangs.js index 40f01cdce4..a540190cda 100644 --- a/website/common/script/content/appearance/hair/bangs.js +++ b/website/common/script/content/appearance/hair/bangs.js @@ -5,4 +5,5 @@ module.exports = prefill({ 1: {}, 2: {}, 3: {}, + 4: {}, }); diff --git a/website/common/script/content/appearance/hair/index.js b/website/common/script/content/appearance/hair/index.js index 35201d8b1c..464ade2463 100644 --- a/website/common/script/content/appearance/hair/index.js +++ b/website/common/script/content/appearance/hair/index.js @@ -4,6 +4,7 @@ import beard from './beard.js'; import color from './color.js'; import flower from './flower.js'; import mustache from './mustache.js'; +import topHair from './top-hair.js'; module.exports = { color, @@ -12,4 +13,5 @@ module.exports = { flower, beard, mustache, + topHair, }; diff --git a/website/common/script/content/appearance/hair/top-hair.js b/website/common/script/content/appearance/hair/top-hair.js new file mode 100644 index 0000000000..50610fbe03 --- /dev/null +++ b/website/common/script/content/appearance/hair/top-hair.js @@ -0,0 +1,12 @@ +import prefill from '../prefill.js'; +import sets from '../sets.js'; + +module.exports = prefill({ + 0: {}, + 1: {price: 2, set: sets.topHair}, + 2: {price: 2, set: sets.topHair}, + 3: {price: 2, set: sets.topHair}, + 4: {price: 2, set: sets.topHair}, + 5: {price: 2, set: sets.topHair}, + 6: {price: 2, set: sets.topHair}, +}); diff --git a/website/common/script/content/appearance/sets.js b/website/common/script/content/appearance/sets.js index 6d9be3abd7..fec4b73dca 100644 --- a/website/common/script/content/appearance/sets.js +++ b/website/common/script/content/appearance/sets.js @@ -4,6 +4,7 @@ import prefill from './prefill.js'; module.exports = prefill({ baseHair1: {setPrice: 5, text: t('hairSet1')}, baseHair2: {setPrice: 5, text: t('hairSet2')}, + topHair: {setPrice: 5, text: t('hairSet3')}, facialHair: {setPrice: 5, text: t('bodyFacialHair')}, specialShirts: {setPrice: 5, text: t('specialShirts')}, winterHairColors: {setPrice: 5, availableUntil: '2016-01-01'}, diff --git a/website/server/models/user/schema.js b/website/server/models/user/schema.js index 3816641331..8a571608a7 100644 --- a/website/server/models/user/schema.js +++ b/website/server/models/user/schema.js @@ -395,6 +395,7 @@ let schema = new Schema({ beard: {type: Number, default: 0}, mustache: {type: Number, default: 0}, flower: {type: Number, default: 1}, + topHair: {type: Number, default: 0}, }, hideHeader: {type: Boolean, default: false}, skin: {type: String, default: '915533'}, diff --git a/website/views/options/profile.jade b/website/views/options/profile.jade index b5ca6e177b..eac91aa92e 100644 --- a/website/views/options/profile.jade +++ b/website/views/options/profile.jade @@ -109,7 +109,7 @@ mixin customizeProfile(mobile) // Bangs menu(label=env.t('hairBangs')) button(class='head_0 customize-option', type='button', ng-click='set({"preferences.hair.bangs":0})', ng-class='{selectableInventory: user.preferences.hair.bangs == 0}') - each num in [1,2,3] + each num in [1,2,3,4] button(class='hair_bangs_#{num}_{{user.preferences.hair.color}} customize-option', type='button', ng-click='set({"preferences.hair.bangs":#{num}})', ng-class='{selectableInventory: user.preferences.hair.bangs == "#{num}"}') // Base hairstyles (free) @@ -133,6 +133,14 @@ mixin customizeProfile(mobile) button.btn.btn-xs(ng-click='#{unlockPath("hair.base", styles)}')!= env.t('unlockSet', {cost: 5}) + ' ' each num in styles button(class='hair_base_#{num}_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.base["#{num}"], selectableInventory: user.preferences.hair.base == "#{num}"}', ng-click='unlock("hair.base.#{num}")') + menu(label=env.t('hairSet3')) + - var styles = [1,2,3,4,5,6] + span(ng-hide='#{showPath("user.purchased.hair.topHair", styles, "&&")}') + +gemCost(2) + button.btn.btn-xs(ng-click='#{unlockPath("hair.topHair", styles)}')!= env.t('unlockSet', {cost: 5}) + ' ' + button(class='head_0 customize-option', type='button', ng-click='set({"preferences.hair.topHair":0})', ng-class='{selectableInventory: user.preferences.hair.topHair == 0}') + each num in styles + button(class='hair_topHair_#{num}_{{user.preferences.hair.color}} customize-option', type='button', ng-class='{locked: !user.purchased.hair.topHair["#{num}"], selectableInventory: user.preferences.hair.topHair == "#{num}"}', ng-click='unlock("hair.topHair.#{num}")') li.customize-menu menu(label=env.t('bodyFacialHair')) diff --git a/website/views/shared/avatar/generated_avatar.jade b/website/views/shared/avatar/generated_avatar.jade index 0dbea1c12c..265215e735 100644 --- a/website/views/shared/avatar/generated_avatar.jade +++ b/website/views/shared/avatar/generated_avatar.jade @@ -19,7 +19,7 @@ mixin generatedAvatar(options) +costumeSetting('back', {suffix: " + '_collar'"}) +costumeSetting('body') span.head_0 - - var hairTypes = ['base', 'bangs', 'mustache', 'beard'] + - var hairTypes = ['base', 'bangs', 'topHair', 'mustache', 'beard'] each type in hairTypes span(class='hair_#{type}_{{profile.preferences.hair.#{type}}}_{{profile.preferences.hair.color}}') +costumeSetting('eyewear')