feat(event): April Fools 2017
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 838 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 979 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
@@ -117,5 +117,25 @@ habitrpg.controller("UserCtrl", ['$rootScope', '$scope', '$location', 'User', '$
|
|||||||
$scope.achievements = Shared.achievements.getAchievementsForProfile($scope.profile);
|
$scope.achievements = Shared.achievements.getAchievementsForProfile($scope.profile);
|
||||||
$scope.achievPopoverPlacement = 'right';
|
$scope.achievPopoverPlacement = 'right';
|
||||||
$scope.achievAppendToBody = 'true'; // append-to-body breaks popovers in modal windows
|
$scope.achievAppendToBody = 'true'; // append-to-body breaks popovers in modal windows
|
||||||
|
|
||||||
|
$scope.aprilFool = function (pet) {
|
||||||
|
if (!pet) return 'Pet-AprilFool-None';
|
||||||
|
if (pet === 'Phoenix-Base') return 'Pet-AprilFool-Red';
|
||||||
|
var petStringArray = pet.split('-');
|
||||||
|
var petColor = petStringArray[1];
|
||||||
|
var standardColors = ['Base', 'CottonCandyBlue', 'CottonCandyPink', 'Desert', 'Golden', 'Red', 'Shade', 'Skeleton', 'White', 'Zombie'];
|
||||||
|
if (standardColors.indexOf(petColor) !== -1) return 'Pet-AprilFool-' + petColor;
|
||||||
|
if (petColor === 'Cerberus') return 'Pet-AprilFool-Zombie';
|
||||||
|
if (petColor === 'Cupid') return 'Pet-AprilFool-CottonCandyPink';
|
||||||
|
if (petColor === 'Ghost') return 'Pet-AprilFool-Skeleton';
|
||||||
|
if (petColor === 'Gilded') return 'Pet-AprilFool-Golden';
|
||||||
|
if (petColor === 'Hydra') return 'Pet-AprilFool-Zombie';
|
||||||
|
if (petColor === 'Polar') return 'Pet-AprilFool-White';
|
||||||
|
if (petColor === 'RoyalPurple') return 'Pet-AprilFool-Golden';
|
||||||
|
if (petColor === 'Shimmer') return 'Pet-AprilFool-Red';
|
||||||
|
if (petColor === 'Spooky') return 'Pet-AprilFool-Zombie';
|
||||||
|
if (petColor === 'Veteran') return 'Pet-AprilFool-Shade';
|
||||||
|
return 'Pet-AprilFool-Magic';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -33,4 +33,4 @@ mixin avatar(opts)
|
|||||||
|
|
||||||
// Pet
|
// Pet
|
||||||
if !opts.minimal
|
if !opts.minimal
|
||||||
span.current-pet(class='Pet-{{profile.items.currentPet}}', ng-show='profile.items.currentPet')
|
span.current-pet(ng-class='aprilFool(profile.items.currentPet)')
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ script(type='text/ng-template', id='modals/hatchPet.html')
|
|||||||
.container-fluid
|
.container-fluid
|
||||||
.row(style='margin-bottom:1em', ng-controller='UserCtrl')
|
.row(style='margin-bottom:1em', ng-controller='UserCtrl')
|
||||||
.col-xs-4(style='padding:0')
|
.col-xs-4(style='padding:0')
|
||||||
div(class='{{::hatchedPet.pet}}').pull-right
|
div(ng-class='aprilFool(hatchedPet.pet.slice(4))').pull-right
|
||||||
.col-xs-3
|
.col-xs-3
|
||||||
.empty_bottles(style='margin-top:2.8em')
|
.empty_bottles(style='margin-top:2.8em')
|
||||||
.col-xs-5(style='padding:0')
|
.col-xs-5(style='padding:0')
|
||||||
|
|||||||