mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
New default background (#8597)
* feat(bgs): new default background * feat(bgs): backfill migration * fix(migration): extraneous imports, bad paths * fix(bgs): address comments * fix(test): assert equality
This commit is contained in:
@@ -65,7 +65,9 @@ habitrpg.controller("UserCtrl", ['$rootScope', '$scope', '$location', 'User', '$
|
||||
(fullSet ? 3.75 : 1.75) : // (Backgrounds) 15G per set, 7G per individual
|
||||
(fullSet ? 1.25 : 0.5); // (Hair, skin, etc) 5G per set, 2G per individual
|
||||
|
||||
if (path.indexOf('background.blue') === -1 && path.indexOf('background.green') === -1 && path.indexOf('background.red') === -1 && path.indexOf('background.purple') === -1 && path.indexOf('background.yellow') === -1) {
|
||||
if (path.indexOf('background.blue') === -1 && path.indexOf('background.green') === -1 &&
|
||||
path.indexOf('background.red') === -1 && path.indexOf('background.purple') === -1 &&
|
||||
path.indexOf('background.yellow') === -1 && path.indexOf('background.violet') === -1) {
|
||||
if (fullSet) {
|
||||
if (confirm(window.env.t('purchaseFor',{cost:cost*4})) !== true) return;
|
||||
if (User.user.balance < cost) return $rootScope.openModal('buyGems');
|
||||
@@ -84,6 +86,10 @@ habitrpg.controller("UserCtrl", ['$rootScope', '$scope', '$location', 'User', '$
|
||||
});
|
||||
};
|
||||
|
||||
$scope.showPlainBackgroundBlurb = function(identifier, set) {
|
||||
return identifier === 'incentiveBackgrounds' && !$scope.ownsSet('background', set);
|
||||
};
|
||||
|
||||
$scope.setKeys = function(type, _set) {
|
||||
return _.map(_set, function(v,k) {
|
||||
if (type === 'background') k = v.key;
|
||||
|
||||
Reference in New Issue
Block a user