feat(modals): Hatch Pet modal

Complete except for the planned addition of a heart sprite over the pet.
This commit is contained in:
Sabe Jones
2015-10-15 16:34:53 -04:00
parent 5bfea172ee
commit c6dd2a0d10
5 changed files with 27 additions and 0 deletions

View File

@@ -112,6 +112,8 @@ habitrpg.controller("InventoryCtrl",
var potName = Content.hatchingPotions[potion.key].text();
if (!$window.confirm(window.env.t('hatchAPot', {potion: potName, egg: eggName}))) return;
user.ops.hatch({params:{egg:egg.key, hatchingPotion:potion.key}});
$rootScope.hatchedPet = {egg: eggName, potion: potName, pet: 'Pet-' + egg.key + '-' + potion.key};
$rootScope.openModal('hatchPet', {controller: 'InventoryCtrl', size: 'sm'});
$scope.selectedEgg = null;
$scope.selectedPotion = null;