WIP(warning-modal): Low health warning

This commit is contained in:
Sabe Jones
2015-08-18 16:05:48 -04:00
parent 120550666d
commit 12b0361d45
6 changed files with 37 additions and 3 deletions

View File

@@ -8,6 +8,8 @@ habitrpg.controller('NotificationCtrl',
if (after <= 0){
$rootScope.playSound('Death');
$rootScope.openModal('death', {keyboard:false, backdrop:'static'});
} else if (after <= 30 && !User.user.flags.warnedLowHealth) {
$rootScope.openModal('lowHealth', {keyboard:false, backdrop:'static', controller:'UserCtrl'});
}
if (after == before) return;
if (User.user.stats.lvl == 0) return;