feat(event): April Fools 2017

This commit is contained in:
SabreCat
2017-03-30 17:25:37 +00:00
parent bdf4a69eaf
commit 2850de985f
15 changed files with 22 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 979 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -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';
}
} }
]); ]);

View File

@@ -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)')

View File

@@ -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')