mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
feat(sharing): More achievements
This commit is contained in:
@@ -62,15 +62,20 @@ habitrpg.controller('NotificationCtrl',
|
||||
|
||||
$rootScope.$watch('user.stats.lvl', function(after, before) {
|
||||
if (after <= before) return;
|
||||
Notification.lvl();
|
||||
$rootScope.playSound('Level_Up');
|
||||
if (User.user._tmp && User.user._tmp.drop && (User.user._tmp.drop.type === 'Quest')) return;
|
||||
if (after === 3) return; // Drop system unlock. FIXME can we do this without hardcoding?
|
||||
if (after === 50) return; // Orb of Rebirth unlock FIXME as above
|
||||
if (!User.user.flags.classSelected && User.user.stats.lvl >= 10) return $rootScope.openModal('chooseClass', {controller:'UserCtrl', keyboard:false, backdrop:'static'});
|
||||
Notification.lvl();
|
||||
$rootScope.playSound('Level_Up');
|
||||
if (!User.user.preferences.suppressModals.levelUp) $rootScope.openModal('levelUp', {controller:'UserCtrl', size:'sm'});
|
||||
});
|
||||
|
||||
$rootScope.$watch('!user.flags.classSelected && user.stats.lvl >= 10', function(after, before){
|
||||
if(after){
|
||||
$rootScope.openModal('chooseClass', {controller:'UserCtrl', keyboard:false, backdrop:'static'});
|
||||
}
|
||||
});
|
||||
|
||||
$rootScope.$watch('user._tmp.crit', function(after, before){
|
||||
if (after == before || !after) return;
|
||||
var amount = User.user._tmp.crit * 100 - 100;
|
||||
@@ -139,7 +144,7 @@ habitrpg.controller('NotificationCtrl',
|
||||
|
||||
$rootScope.$watch('user.achievements.ultimateGearSets', function(after, before){
|
||||
if (_.isEqual(after,before) || !_.contains(User.user.achievements.ultimateGearSets, true)) return;
|
||||
$rootScope.openModal('achievements/ultimateGear');
|
||||
$rootScope.openModal('achievements/ultimateGear', {controller:'UserCtrl'});
|
||||
}, true);
|
||||
|
||||
$rootScope.$watch('user.flags.armoireEmpty', function(after,before){
|
||||
|
||||
Reference in New Issue
Block a user