diff --git a/app/imports/api/creature/getActiveProperties.js b/app/imports/api/creature/getActiveProperties.js index 3b783ea9..e6a6158d 100644 --- a/app/imports/api/creature/getActiveProperties.js +++ b/app/imports/api/creature/getActiveProperties.js @@ -6,12 +6,14 @@ export default function getActiveProperties({ filter = {}, options = {sort: {order: 1}}, includeUntoggled = false, + includeUnprepared = false, excludeAncestors, }){ filter = getActivePropertyFilter({ ancestorId, filter, includeUntoggled, + includeUnprepared, excludeAncestors, }); return CreatureProperties.find(filter, options).fetch(); @@ -21,6 +23,7 @@ export function getActivePropertyFilter({ ancestorId, filter = {}, includeUntoggled = false, + includeUnprepared = false, excludeAncestors = [], }){ if (!ancestorId){ @@ -38,6 +41,12 @@ export function getActivePropertyFilter({ if (!includeUntoggled){ disabledAncestorsFilter.$or.push({toggleResult: false}); } + if (!includeUnprepared){ + disabledAncestorsFilter.$or.push({ + prepared: false, + alwaysPrepared: false + }); + } let disabledAncestorIds = CreatureProperties.find(disabledAncestorsFilter, { fields: {_id: 1}, }).map(prop => prop._id); diff --git a/app/imports/ui/properties/components/spells/SpellListCard.vue b/app/imports/ui/properties/components/spells/SpellListCard.vue index 199126f0..2942f687 100644 --- a/app/imports/ui/properties/components/spells/SpellListCard.vue +++ b/app/imports/ui/properties/components/spells/SpellListCard.vue @@ -88,6 +88,7 @@ export default { order: 1, }, }, + includeUnprepared: this.preparingSpells, }); }, numPrepared(){