From d63565633e43fd65d0e6781b6dc892cfefb57e35 Mon Sep 17 00:00:00 2001 From: Thaum Rystra Date: Wed, 29 Apr 2020 11:10:23 +0200 Subject: [PATCH] Zero value stats now appear in character sheet --- .../character/characterSheetTabs/StatsTab.vue | 18 +++--------------- .../attributes/HealthBarCardContainer.vue | 9 ++++----- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/app/imports/ui/creature/character/characterSheetTabs/StatsTab.vue b/app/imports/ui/creature/character/characterSheetTabs/StatsTab.vue index 605bfa61..6561b30a 100644 --- a/app/imports/ui/creature/character/characterSheetTabs/StatsTab.vue +++ b/app/imports/ui/creature/character/characterSheetTabs/StatsTab.vue @@ -204,18 +204,6 @@ }); }; - const getNonZeroAttributeOfType = function(charId, type){ - return CreatureProperties.find({ - 'ancestors.id': charId, - type: 'attribute', - attributeType: type, - value: {$ne: 0}, - removed: {$ne: true}, - }, { - sort: {order: 1} - }); - }; - export default { components: { AbilityListTile, @@ -246,13 +234,13 @@ return getAttributeOfType(this.creatureId, 'modifier'); }, resources(){ - return getNonZeroAttributeOfType(this.creatureId, 'resource'); + return getAttributeOfType(this.creatureId, 'resource'); }, spellSlots(){ - return getNonZeroAttributeOfType(this.creatureId, 'spellSlot'); + return getAttributeOfType(this.creatureId, 'spellSlot'); }, hitDice(){ - return getNonZeroAttributeOfType(this.creatureId, 'hitDice'); + return getAttributeOfType(this.creatureId, 'hitDice'); }, checks(){ return CreatureProperties.find({ diff --git a/app/imports/ui/properties/components/attributes/HealthBarCardContainer.vue b/app/imports/ui/properties/components/attributes/HealthBarCardContainer.vue index 429c57a4..a621fa86 100644 --- a/app/imports/ui/properties/components/attributes/HealthBarCardContainer.vue +++ b/app/imports/ui/properties/components/attributes/HealthBarCardContainer.vue @@ -1,9 +1,9 @@