Create method to calculate whether or not user has attained all mystery equipment

This commit is contained in:
Blade Barringer
2015-09-13 16:26:29 -05:00
parent b6f02d388f
commit 5553d74334
3 changed files with 21 additions and 1 deletions

View File

@@ -228,6 +228,13 @@ habitrpg.controller("InventoryCtrl",
});
};
$scope.hasAllTimeTravelerItems = function(items) {
var itemsLeftInTimeTravlerStore = Content.timeTravelerStore(user.items.gear.owned);
var keys = Object.keys(itemsLeftInTimeTravlerStore);
return keys.length === 0;
};
function _updateDropAnimalCount(items) {
$scope.petCount = Shared.count.beastMasterProgress(items.pets);
$scope.mountCount = Shared.count.mountMasterProgress(items.mounts);