feat(content): new Gold quests (#8418)

and Wintery Skins, and fixes #8412
This commit is contained in:
Sabe Jones
2017-01-17 16:03:10 -08:00
committed by GitHub
parent 69cac7e504
commit 6169b9d0ae
42 changed files with 160 additions and 11 deletions

View File

@@ -94,12 +94,14 @@ habitrpg.controller("UserCtrl", ['$rootScope', '$scope', '$location', 'User', '$
$scope.getProgressDisplay = function () {
var currentLoginDay = Content.loginIncentives[$scope.profile.loginIncentives];
var nextRewardAt = currentLoginDay.nextRewardAt;
if (!currentLoginDay || !nextRewardAt) return env.t('moreIncentivesComingSoon');
if (!currentLoginDay.prevRewardKey) currentLoginDay.prevRewardKey = 0;
return ' ' + ($scope.profile.loginIncentives - currentLoginDay.prevRewardKey) + '/' + (nextRewardAt - currentLoginDay.prevRewardKey);
return env.t('checkinProgressTitle') + ' ' + ($scope.profile.loginIncentives - currentLoginDay.prevRewardKey) + '/' + (nextRewardAt - currentLoginDay.prevRewardKey);
};
$scope.incentivesProgress = function () {
var currentLoginDay = Content.loginIncentives[$scope.profile.loginIncentives];
if (!currentLoginDay) return 0;
var previousRewardDay = currentLoginDay.prevRewardKey;
var nextRewardAt = currentLoginDay.nextRewardAt;
return ($scope.profile.loginIncentives - previousRewardDay)/(nextRewardAt - previousRewardDay) * 100;
@@ -107,6 +109,6 @@ habitrpg.controller("UserCtrl", ['$rootScope', '$scope', '$location', 'User', '$
$scope.achievements = Shared.achievements.getAchievementsForProfile($scope.profile);
$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
}
]);