feat(sharing): More opt outs

Also fixes a bug where "Display Now" didn't work for pets with a space in their name.
This commit is contained in:
Sabe Jones
2015-10-28 17:48:16 -04:00
parent aad3e5ade6
commit 22caaa7eda
7 changed files with 36 additions and 12 deletions

View File

@@ -116,7 +116,7 @@ habitrpg.controller("InventoryCtrl",
if (!$window.confirm(window.env.t('hatchAPot', {potion: potName, egg: eggName}))) return;
user.ops.hatch({params:{egg:egg.key, hatchingPotion:potion.key}});
if (!user.preferences.suppressModals.hatchPet) {
$rootScope.hatchedPet = {egg: eggName, potion: potName, pet: 'Pet-' + egg.key + '-' + potion.key};
$rootScope.hatchedPet = {egg: eggName, potion: potName, eggKey: egg.key, pet: 'Pet-' + egg.key + '-' + potion.key};
$rootScope.openModal('hatchPet', {controller: 'InventoryCtrl', size: 'sm'});
}
$scope.selectedEgg = null;
@@ -160,7 +160,7 @@ habitrpg.controller("InventoryCtrl",
$scope.selectedFood = null;
_updateDropAnimalCount(user.items);
if ($scope.mountCount > startingMounts) {
if ($scope.mountCount > startingMounts && !user.preferences.suppressModals.raisePet) {
$rootScope.raisedPet = {displayName: petDisplayName, spriteName: pet, egg: egg, potion: potion}
$rootScope.openModal('raisePet', {controller:'InventoryCtrl',size:'sm'});
}