mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +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.",
|
"displayNameDescription3": "and scroll down to the Registration section to change your login name.",
|
||||||
"unequipBattleGear": "Unequip Battle Gear",
|
"unequipBattleGear": "Unequip Battle Gear",
|
||||||
"unequipCostume": "Unequip Costume",
|
"unequipCostume": "Unequip Costume",
|
||||||
"unequipPetMountBackground": "Unequip Pet, Mount"
|
"unequipPetMountBackground": "Unequip Pet, Mount, Background"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,7 +235,6 @@ habitrpg.controller("InventoryCtrl",
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.dequip = function(itemSet){
|
$scope.dequip = function(itemSet){
|
||||||
|
|
||||||
switch (itemSet) {
|
switch (itemSet) {
|
||||||
case "battleGear":
|
case "battleGear":
|
||||||
for (item in user.items.gear.equipped){
|
for (item in user.items.gear.equipped){
|
||||||
@@ -256,7 +255,6 @@ habitrpg.controller("InventoryCtrl",
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "petMountBackground":
|
case "petMountBackground":
|
||||||
|
|
||||||
var pet = user.items.currentPet;
|
var pet = user.items.currentPet;
|
||||||
if (pet) {
|
if (pet) {
|
||||||
user.ops.equip({params:{type: 'pet', key: pet}});
|
user.ops.equip({params:{type: 'pet', key: pet}});
|
||||||
@@ -267,14 +265,13 @@ habitrpg.controller("InventoryCtrl",
|
|||||||
user.ops.equip({params:{type: 'mount', key: mount}});
|
user.ops.equip({params:{type: 'mount', key: mount}});
|
||||||
}
|
}
|
||||||
|
|
||||||
// var background = user.preferences.background;
|
var background = user.preferences.background;
|
||||||
// User.user.ops.unlock({query:{path:"background."+background}});
|
if (background) {
|
||||||
// commented out until we fix this bug:
|
User.user.ops.unlock({query:{path:"background."+background}});
|
||||||
// https://github.com/HabitRPG/habitrpg/issues/4857#issuecomment-80722868
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in New Issue
Block a user