re-add the dequip option for removing backgrounds with proper bug fix (ref 9199c6c7e2); make whitespace consistent

This commit is contained in:
Alice Harris
2015-03-16 19:27:44 +10:00
parent ca796e294f
commit 44259925e4
2 changed files with 12 additions and 15 deletions

View File

@@ -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"
}

View File

@@ -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;
}
}
};
}
]);