fix(hair): exclusivity and canvas tweaks

This commit is contained in:
Sabe Jones
2016-11-15 21:24:46 +00:00
parent c977e5ebb5
commit 874887b790
7 changed files with 252 additions and 239 deletions

View File

@@ -66,8 +66,10 @@ habitrpg.controller("UserCtrl", ['$rootScope', '$scope', '$location', 'User', '$
if (confirm(window.env.t('purchaseFor',{cost:cost*4})) !== true) return;
if (User.user.balance < cost) return $rootScope.openModal('buyGems');
} else if (!_.get(User.user, 'purchased.' + path)) {
if (confirm(window.env.t('purchaseFor',{cost:cost*4})) !== true) return;
if (User.user.balance < cost) return $rootScope.openModal('buyGems');
if (path.indexOf('hair.base') === -1 || !_.includes(['0', '1', '3'], path.split('.').pop())) {
if (confirm(window.env.t('purchaseFor',{cost:cost*4})) !== true) return;
if (User.user.balance < cost) return $rootScope.openModal('buyGems');
}
}
User.unlock({query:{path:path}})
}