mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
re-add the dequip option for removing backgrounds with proper bug fix (ref 9199c6c7e2); make whitespace consistent
This commit is contained in:
@@ -136,5 +136,5 @@
|
||||
"displayNameDescription3": "and scroll down to the Registration section to change your login name.",
|
||||
"unequipBattleGear": "Unequip Battle Gear",
|
||||
"unequipCostume": "Unequip Costume",
|
||||
"unequipPetMountBackground": "Unequip Pet, Mount"
|
||||
"unequipPetMountBackground": "Unequip Pet, Mount, Background"
|
||||
}
|
||||
|
||||
@@ -235,7 +235,6 @@ habitrpg.controller("InventoryCtrl",
|
||||
};
|
||||
|
||||
$scope.dequip = function(itemSet){
|
||||
|
||||
switch (itemSet) {
|
||||
case "battleGear":
|
||||
for (item in user.items.gear.equipped){
|
||||
@@ -256,7 +255,6 @@ habitrpg.controller("InventoryCtrl",
|
||||
break;
|
||||
|
||||
case "petMountBackground":
|
||||
|
||||
var pet = user.items.currentPet;
|
||||
if (pet) {
|
||||
user.ops.equip({params:{type: 'pet', key: pet}});
|
||||
@@ -267,14 +265,13 @@ habitrpg.controller("InventoryCtrl",
|
||||
user.ops.equip({params:{type: 'mount', key: mount}});
|
||||
}
|
||||
|
||||
// var background = user.preferences.background;
|
||||
// User.user.ops.unlock({query:{path:"background."+background}});
|
||||
// commented out until we fix this bug:
|
||||
// https://github.com/HabitRPG/habitrpg/issues/4857#issuecomment-80722868
|
||||
var background = user.preferences.background;
|
||||
if (background) {
|
||||
User.user.ops.unlock({query:{path:"background."+background}});
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user