diff --git a/app/imports/api/creature/getActiveProperties.js b/app/imports/api/creature/getActiveProperties.js index deef0796..999da873 100644 --- a/app/imports/api/creature/getActiveProperties.js +++ b/app/imports/api/creature/getActiveProperties.js @@ -32,15 +32,21 @@ export default function getActiveProperties({ 'ancestors.id': ancestorId, }, { fields: {_id: 1}, - }).forEach(prop => { - disabledAncestorIds.push(prop._id); + }).forEach(subCreature => { + disabledAncestorIds.push(subCreature._id); }); - // Get all the properties that aren't from the excluded decendents + // Get all the properties that are decendents of the ancestor of interest but + // aren't from the excluded decendents filter['ancestors.id'] = { $eq: ancestorId, $nin: disabledAncestorIds, }; + // Get properties that aren't removed filter.removed = {$ne: true}; + // Don't include the disabled ancestors themselves either + filter._id = { + $nin: disabledAncestorIds, + } return CreatureProperties.find(filter, options).fetch(); } diff --git a/app/imports/api/properties/Results.js b/app/imports/api/properties/Results.js deleted file mode 100644 index cc094118..00000000 --- a/app/imports/api/properties/Results.js +++ /dev/null @@ -1,15 +0,0 @@ -import SimpleSchema from 'simpl-schema'; - -const ResultSchema = new SimpleSchema({ - name: { - type: String, - optional: true, - }, - // Expression of whether or not to apply the children - comparison: { - type: String, - optional: true, - }, -}); - -export { ResultSchema }; diff --git a/app/imports/api/properties/computedPropertySchemasIndex.js b/app/imports/api/properties/computedPropertySchemasIndex.js index 0a741d8c..1b4ce80f 100644 --- a/app/imports/api/properties/computedPropertySchemasIndex.js +++ b/app/imports/api/properties/computedPropertySchemasIndex.js @@ -3,33 +3,32 @@ import { ActionSchema } from '/imports/api/properties/Actions.js'; import { AdjustmentSchema } from '/imports/api/properties/Adjustments.js'; import { AttackSchema } from '/imports/api/properties/Attacks.js'; import { ComputedAttributeSchema } from '/imports/api/properties/Attributes.js'; -import { AppliedBuffSchema } from '/imports/api/properties/Buffs.js'; +import { BuffSchema } from '/imports/api/properties/Buffs.js'; import { ClassLevelSchema } from '/imports/api/properties/ClassLevels.js'; +import { ContainerSchema } from '/imports/api/properties/Containers.js'; import { DamageSchema } from '/imports/api/properties/Damages.js'; import { DamageMultiplierSchema } from '/imports/api/properties/DamageMultipliers.js'; import { ComputedEffectSchema } from '/imports/api/properties/Effects.js'; import { ExperienceSchema } from '/imports/api/properties/Experiences.js'; import { FeatureSchema } from '/imports/api/properties/Features.js'; import { FolderSchema } from '/imports/api/properties/Folders.js'; +import { ItemSchema } from '/imports/api/properties/Items.js'; import { NoteSchema } from '/imports/api/properties/Notes.js'; import { ProficiencySchema } from '/imports/api/properties/Proficiencies.js'; -import { ResultSchema } from '/imports/api/properties/Results.js'; import { RollSchema } from '/imports/api/properties/Rolls.js'; import { SavingThrowSchema } from '/imports/api/properties/SavingThrows.js'; import { ComputedSkillSchema } from '/imports/api/properties/Skills.js'; import { SlotSchema } from '/imports/api/properties/Slots.js'; -import { SpellListSchema } from '/imports/api/properties/SpellLists.js'; import { SpellSchema } from '/imports/api/properties/Spells.js'; +import { SpellListSchema } from '/imports/api/properties/SpellLists.js'; import { ToggleSchema } from '/imports/api/properties/Toggles.js'; -import { ContainerSchema } from '/imports/api/properties/Containers.js'; -import { ItemSchema } from '/imports/api/properties/Items.js'; const propertySchemasIndex = { action: ActionSchema, adjustment: AdjustmentSchema, attack: AttackSchema, attribute: ComputedAttributeSchema, - buff: AppliedBuffSchema, + buff: BuffSchema, classLevel: ClassLevelSchema, damage: DamageSchema, damageMultiplier: DamageMultiplierSchema, @@ -39,7 +38,6 @@ const propertySchemasIndex = { folder: FolderSchema, note: NoteSchema, proficiency: ProficiencySchema, - result: ResultSchema, roll: RollSchema, savingThrow: SavingThrowSchema, skill: ComputedSkillSchema, diff --git a/app/imports/api/properties/propertySchemasIndex.js b/app/imports/api/properties/propertySchemasIndex.js index 3b209718..585c5f67 100644 --- a/app/imports/api/properties/propertySchemasIndex.js +++ b/app/imports/api/properties/propertySchemasIndex.js @@ -3,7 +3,7 @@ import { ActionSchema } from '/imports/api/properties/Actions.js'; import { AdjustmentSchema } from '/imports/api/properties/Adjustments.js'; import { AttackSchema } from '/imports/api/properties/Attacks.js'; import { AttributeSchema } from '/imports/api/properties/Attributes.js'; -import { StoredBuffSchema } from '/imports/api/properties/Buffs.js'; +import { BuffSchema } from '/imports/api/properties/Buffs.js'; import { ClassLevelSchema } from '/imports/api/properties/ClassLevels.js'; import { DamageSchema } from '/imports/api/properties/Damages.js'; import { DamageMultiplierSchema } from '/imports/api/properties/DamageMultipliers.js'; @@ -13,7 +13,6 @@ import { FeatureSchema } from '/imports/api/properties/Features.js'; import { FolderSchema } from '/imports/api/properties/Folders.js'; import { NoteSchema } from '/imports/api/properties/Notes.js'; import { ProficiencySchema } from '/imports/api/properties/Proficiencies.js'; -import { ResultSchema } from '/imports/api/properties/Results.js'; import { RollSchema } from '/imports/api/properties/Rolls.js'; import { SavingThrowSchema } from '/imports/api/properties/SavingThrows.js'; import { SkillSchema } from '/imports/api/properties/Skills.js'; @@ -29,7 +28,7 @@ const propertySchemasIndex = { adjustment: AdjustmentSchema, attack: AttackSchema, attribute: AttributeSchema, - buff: StoredBuffSchema, + buff: BuffSchema, classLevel: ClassLevelSchema, damage: DamageSchema, damageMultiplier: DamageMultiplierSchema, @@ -39,7 +38,6 @@ const propertySchemasIndex = { folder: FolderSchema, note: NoteSchema, proficiency: ProficiencySchema, - result: ResultSchema, roll: RollSchema, savingThrow: SavingThrowSchema, skill: SkillSchema, diff --git a/app/imports/constants/PROPERTIES.js b/app/imports/constants/PROPERTIES.js index 9c8e6974..a5adb990 100644 --- a/app/imports/constants/PROPERTIES.js +++ b/app/imports/constants/PROPERTIES.js @@ -3,6 +3,10 @@ const PROPERTIES = Object.freeze({ icon: 'offline_bolt', name: 'Action' }, + adjustment: { + icon: 'warning', + name: 'Adjustment' + }, attack: { icon: 'bolt', name: 'Attack' @@ -19,6 +23,10 @@ const PROPERTIES = Object.freeze({ icon: 'school', name: 'Class level' }, + damage: { + icon: 'report', + name: 'Damage' + }, damageMultiplier: { icon: 'layers', name: 'Damage multiplier' diff --git a/app/imports/ui/creature/creatureProperties/CreaturePropertyDialog.vue b/app/imports/ui/creature/creatureProperties/CreaturePropertyDialog.vue index b9aefbe7..adeb2b4c 100644 --- a/app/imports/ui/creature/creatureProperties/CreaturePropertyDialog.vue +++ b/app/imports/ui/creature/creatureProperties/CreaturePropertyDialog.vue @@ -5,7 +5,7 @@ :type="model.type" class="mr-2" /> - + {{ model.name || getPropertyName(model.type) }} diff --git a/app/imports/ui/library/LibraryNodeEditDialog.vue b/app/imports/ui/library/LibraryNodeEditDialog.vue index 69d613e3..18a5bfd1 100644 --- a/app/imports/ui/library/LibraryNodeEditDialog.vue +++ b/app/imports/ui/library/LibraryNodeEditDialog.vue @@ -5,7 +5,7 @@ :type="model.type" class="mr-2" /> - + {{ getPropertyName(model.type) }} diff --git a/app/imports/ui/properties/components/actions/ActionListTile.vue b/app/imports/ui/properties/components/actions/ActionListTile.vue index 0af27eef..e90d8506 100644 --- a/app/imports/ui/properties/components/actions/ActionListTile.vue +++ b/app/imports/ui/properties/components/actions/ActionListTile.vue @@ -7,20 +7,12 @@ {{ model.name }} - - - - - diff --git a/app/imports/ui/properties/forms/ActionForm.vue b/app/imports/ui/properties/forms/ActionForm.vue index d060b542..61ce4e63 100644 --- a/app/imports/ui/properties/forms/ActionForm.vue +++ b/app/imports/ui/properties/forms/ActionForm.vue @@ -33,15 +33,6 @@ @change="(value, ack) => $emit('change', {path: ['description'], value, ack})" /> - - - - import FormSection, {FormSections} from '/imports/ui/properties/forms/shared/FormSection.vue'; - import ResultsForm from '/imports/ui/properties/forms/ResultsForm.vue'; import ResourcesForm from '/imports/ui/properties/forms/ResourcesForm.vue'; export default { components: { FormSection, FormSections, - ResultsForm, ResourcesForm, }, props: { diff --git a/app/imports/ui/properties/forms/AdjustmentForm.vue b/app/imports/ui/properties/forms/AdjustmentForm.vue index 3d4ae5bf..cfcb4174 100644 --- a/app/imports/ui/properties/forms/AdjustmentForm.vue +++ b/app/imports/ui/properties/forms/AdjustmentForm.vue @@ -1,5 +1,5 @@ - - - - diff --git a/app/imports/ui/properties/forms/BuffForm.vue b/app/imports/ui/properties/forms/BuffForm.vue index a1e3c529..876e4dd6 100644 --- a/app/imports/ui/properties/forms/BuffForm.vue +++ b/app/imports/ui/properties/forms/BuffForm.vue @@ -22,34 +22,11 @@ :debounce-time="debounceTime" @change="(value, ack) => $emit('change', {path: ['duration'], value, ack})" /> -
- - -
- - diff --git a/app/imports/ui/properties/forms/DamageListForm.vue b/app/imports/ui/properties/forms/DamageListForm.vue deleted file mode 100644 index 142659ab..00000000 --- a/app/imports/ui/properties/forms/DamageListForm.vue +++ /dev/null @@ -1,55 +0,0 @@ - - - diff --git a/app/imports/ui/properties/forms/EffectListForm.vue b/app/imports/ui/properties/forms/EffectListForm.vue deleted file mode 100644 index 3d792adb..00000000 --- a/app/imports/ui/properties/forms/EffectListForm.vue +++ /dev/null @@ -1,89 +0,0 @@ - - - - - diff --git a/app/imports/ui/properties/forms/ExperienceForm.vue b/app/imports/ui/properties/forms/ExperienceForm.vue index d9a0ffcd..b1f95c9e 100644 --- a/app/imports/ui/properties/forms/ExperienceForm.vue +++ b/app/imports/ui/properties/forms/ExperienceForm.vue @@ -1,16 +1,5 @@ diff --git a/app/imports/ui/properties/forms/ResultsForm.vue b/app/imports/ui/properties/forms/ResultsForm.vue deleted file mode 100644 index 308463de..00000000 --- a/app/imports/ui/properties/forms/ResultsForm.vue +++ /dev/null @@ -1,146 +0,0 @@ - - - - - diff --git a/app/imports/ui/properties/forms/RollForm.vue b/app/imports/ui/properties/forms/RollForm.vue index 795d4759..9e316363 100644 --- a/app/imports/ui/properties/forms/RollForm.vue +++ b/app/imports/ui/properties/forms/RollForm.vue @@ -8,47 +8,6 @@ @change="(value, ack) => $emit('change', {path: ['roll'], value, ack})" /> - - -
-
- - - delete - -
- -
-
-
- - add - Add Result - -
-
- - - - - - - - diff --git a/app/imports/ui/properties/forms/shared/propertyFormIndex.js b/app/imports/ui/properties/forms/shared/propertyFormIndex.js index 4c42afad..c46d613f 100644 --- a/app/imports/ui/properties/forms/shared/propertyFormIndex.js +++ b/app/imports/ui/properties/forms/shared/propertyFormIndex.js @@ -1,9 +1,11 @@ import ActionForm from '/imports/ui/properties/forms/ActionForm.vue'; +import AdjustmentForm from '/imports/ui/properties/forms/AdjustmentForm.vue'; import AttackForm from '/imports/ui/properties/forms/AttackForm.vue'; import AttributeForm from '/imports/ui/properties/forms/AttributeForm.vue'; import BuffForm from '/imports/ui/properties/forms/BuffForm.vue'; -import ContainerForm from '/imports/ui/properties/forms/ContainerForm.vue'; import ClassLevelForm from '/imports/ui/properties/forms/ClassLevelForm.vue'; +import ContainerForm from '/imports/ui/properties/forms/ContainerForm.vue'; +import DamageForm from '/imports/ui/properties/forms/DamageForm.vue'; import DamageMultiplierForm from '/imports/ui/properties/forms/DamageMultiplierForm.vue'; import EffectForm from '/imports/ui/properties/forms/EffectForm.vue'; import ExperienceForm from '/imports/ui/properties/forms/ExperienceForm.vue'; @@ -21,11 +23,13 @@ import ToggleForm from '/imports/ui/properties/forms/ToggleForm.vue'; export default { action: ActionForm, + adjustment: AdjustmentForm, attack: AttackForm, attribute: AttributeForm, buff: BuffForm, container: ContainerForm, classLevel: ClassLevelForm, + damage: DamageForm, damageMultiplier: DamageMultiplierForm, experience:ExperienceForm, effect: EffectForm, diff --git a/app/imports/ui/properties/viewers/ActionViewer.vue b/app/imports/ui/properties/viewers/ActionViewer.vue index 14421a58..38de992d 100644 --- a/app/imports/ui/properties/viewers/ActionViewer.vue +++ b/app/imports/ui/properties/viewers/ActionViewer.vue @@ -26,18 +26,13 @@ :value="reset" /> - diff --git a/app/imports/ui/properties/viewers/ResultsViewer.vue b/app/imports/ui/properties/viewers/ResultsViewer.vue deleted file mode 100644 index 7c54d1a6..00000000 --- a/app/imports/ui/properties/viewers/ResultsViewer.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - - -