mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
feat(modals): Grew Mount
A modal now appears when you raise a pet into a mount, which allows the user to immediately equip the new mount.
This commit is contained in:
@@ -144,8 +144,9 @@ habitrpg.controller("InventoryCtrl",
|
||||
|
||||
// Feeding Pet
|
||||
if ($scope.selectedFood) {
|
||||
var food = $scope.selectedFood
|
||||
if (food.key == 'Saddle') {
|
||||
var food = $scope.selectedFood;
|
||||
var startingMounts = $scope.mountCount;
|
||||
if (food.key === 'Saddle') {
|
||||
if (!$window.confirm(window.env.t('useSaddle', {pet: petDisplayName}))) return;
|
||||
} else if (!$window.confirm(window.env.t('feedPet', {name: petDisplayName, article: food.article, text: food.text()}))) {
|
||||
return;
|
||||
@@ -154,6 +155,10 @@ habitrpg.controller("InventoryCtrl",
|
||||
$scope.selectedFood = null;
|
||||
|
||||
_updateDropAnimalCount(user.items);
|
||||
if ($scope.mountCount > startingMounts) {
|
||||
$rootScope.raisedPet = {displayName: petDisplayName, spriteName: pet, egg: egg, potion: potion}
|
||||
$rootScope.openModal('raisePet', {controller:'InventoryCtrl',size:'sm'});
|
||||
}
|
||||
|
||||
// Checks if mountmaster has been reached for the first time
|
||||
if(!user.achievements.mountMaster
|
||||
|
||||
Reference in New Issue
Block a user