Zero value stats now appear in character sheet
This commit is contained in:
@@ -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({
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template lang="html">
|
||||
<health-bar-card
|
||||
:attributes="attributes"
|
||||
@change="healthBarChanged"
|
||||
@click="healthBarClicked"
|
||||
/>
|
||||
:attributes="attributes"
|
||||
@change="healthBarChanged"
|
||||
@click="healthBarClicked"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -23,7 +23,6 @@
|
||||
'ancestors.id': this.creatureId,
|
||||
type: 'attribute',
|
||||
attributeType: 'healthBar',
|
||||
value: {$ne: 0},
|
||||
}, {
|
||||
sort: {order: 1},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user