Fixes misuse of food.key in modal display and instead uses the text value

This commit is contained in:
diablo 2014-01-16 20:42:15 -06:00
parent 29b1320f4a
commit 7e791158d4

View file

@ -99,7 +99,7 @@ habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', '$window', 'User',
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 ' + pet + ' a ' + food.text + '?')) {
return;
}
User.user.ops.feed({params:{pet: pet, food: food.key}});