mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
feat(modals): Hatch Pet modal
Complete except for the planned addition of a heart sprite over the pet.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user