mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
Expand object to make it more readable.
This commit is contained in:
@@ -116,7 +116,13 @@ habitrpg.controller("InventoryCtrl",
|
|||||||
if (!$window.confirm(window.env.t('hatchAPot', {potion: potName, egg: eggName}))) return;
|
if (!$window.confirm(window.env.t('hatchAPot', {potion: potName, egg: eggName}))) return;
|
||||||
user.ops.hatch({params:{egg:egg.key, hatchingPotion:potion.key}});
|
user.ops.hatch({params:{egg:egg.key, hatchingPotion:potion.key}});
|
||||||
if (!user.preferences.suppressModals.hatchPet) {
|
if (!user.preferences.suppressModals.hatchPet) {
|
||||||
$rootScope.hatchedPet = {egg: eggName, potion: potName, potionKey:potion.key, eggKey: egg.key, pet: 'Pet-' + egg.key + '-' + potion.key};
|
$rootScope.hatchedPet = {
|
||||||
|
egg: eggName,
|
||||||
|
potion: potName,
|
||||||
|
potionKey:potion.key,
|
||||||
|
eggKey: egg.key,
|
||||||
|
pet: 'Pet-' + egg.key + '-' + potion.key
|
||||||
|
};
|
||||||
$rootScope.openModal('hatchPet', {controller: 'InventoryCtrl', size: 'sm'});
|
$rootScope.openModal('hatchPet', {controller: 'InventoryCtrl', size: 'sm'});
|
||||||
}
|
}
|
||||||
$scope.selectedEgg = null;
|
$scope.selectedEgg = null;
|
||||||
@@ -161,7 +167,12 @@ habitrpg.controller("InventoryCtrl",
|
|||||||
|
|
||||||
_updateDropAnimalCount(user.items);
|
_updateDropAnimalCount(user.items);
|
||||||
if (Stats.totalCount(user.items.mounts) > startingMounts && !user.preferences.suppressModals.raisePet) {
|
if (Stats.totalCount(user.items.mounts) > startingMounts && !user.preferences.suppressModals.raisePet) {
|
||||||
$rootScope.raisedPet = {displayName: petDisplayName, spriteName: pet, egg: egg, potion: potion}
|
$rootScope.raisedPet = {
|
||||||
|
displayName: petDisplayName,
|
||||||
|
spriteName: pet,
|
||||||
|
egg: egg,
|
||||||
|
potion: potion
|
||||||
|
}
|
||||||
$rootScope.openModal('raisePet', {controller:'InventoryCtrl',size:'sm'});
|
$rootScope.openModal('raisePet', {controller:'InventoryCtrl',size:'sm'});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user