Merge pull request #2439 from diablomarcus/potatoe-fix

Fixes feeding modal display text
This commit is contained in:
Cole Gleason
2014-01-17 18:38:40 -08:00
+3 -2
View File
@@ -92,14 +92,15 @@ habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', '$window', 'User',
}
$scope.choosePet = function(egg, potion){
var pet = egg + '-' + potion;
var petDisplayName = potion + " " + egg,
pet = egg + '-' + potion;
// Feeding Pet
if ($scope.selectedFood) {
var food = $scope.selectedFood
if (food.key == 'Saddle') {
if (!$window.confirm('Saddle ' + pet + '?')) return;
} else if (!$window.confirm('Feed ' + pet + ' a ' + food.key + '?')) {
} else if (!$window.confirm('Feed ' + petDisplayName + ' '+ food.article + food.text + '?')) {
return;
}
User.user.ops.feed({params:{pet: pet, food: food.key}});