hide Plain Egg mounts and remove them from the totalMounts count

This commit is contained in:
Alice Harris 2014-09-11 17:59:37 +10:00
parent 29d1cf460c
commit d9661cf089
2 changed files with 12 additions and 10 deletions

View file

@ -8,7 +8,7 @@ habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', '$window', 'User',
$scope.selectedEgg = null; // {index: 1, name: "Tiger", value: 5}
$scope.selectedPotion = null; // {index: 5, name: "Red", value: 3}
$scope.totalPets = _.size(Content.dropEggs) * _.size(Content.hatchingPotions);
$scope.totalMounts = _.size(Content.eggs) * _.size(Content.hatchingPotions);
$scope.totalMounts = _.size(_.reject(Content.eggs,function(egg){return egg.noMount})) * _.size(Content.hatchingPotions);
// count egg, food, hatchingPotion stack totals
var countStacks = function(items) { return _.reduce(items,function(m,v){return m+v;},0);}

View file

@ -14,15 +14,17 @@ script(type='text/ng-template', id='partials/options.inventory.mounts.html')
.col-md-12
menu.pets(type='list')
each egg in env.Content.eggs
li.customize-menu
menu
each potion in env.Content.hatchingPotions
- mount = egg.key+"-"+potion.key
div(popover-trigger='mouseenter', popover=env.t('mountName', {potion: potion.text(env.language.code), mount: egg.mountText(env.language.code)}), popover-placement='bottom')
button(class="pet-button Mount_Head_#{mount}", ng-show='user.items.mounts["#{mount}"]', ng-class='{active: user.items.currentMount == "#{mount}"}', ng-click='chooseMount("#{egg.key}", "#{potion.key}")')
//div(class='Mount_Head_{{mount}}')
button(class="pet-button pet-not-owned", ng-hide='user.items.mounts["#{mount}"]')
.PixelPaw
-if(!egg.noMount) {
li.customize-menu
menu
each potion in env.Content.hatchingPotions
- mount = egg.key+"-"+potion.key
div(popover-trigger='mouseenter', popover=env.t('mountName', {potion: potion.text(env.language.code), mount: egg.mountText(env.language.code)}), popover-placement='bottom')
button(class="pet-button Mount_Head_#{mount}", ng-show='user.items.mounts["#{mount}"]', ng-class='{active: user.items.currentMount == "#{mount}"}', ng-click='chooseMount("#{egg.key}", "#{potion.key}")')
//div(class='Mount_Head_{{mount}}')
button(class="pet-button pet-not-owned", ng-hide='user.items.mounts["#{mount}"]')
.PixelPaw
-}
.col-md-12
h4=env.t('rareMounts')
menu