From ed35d2e9848097b0fb79a14849eaa3931a4b887b Mon Sep 17 00:00:00 2001 From: Thaum Rystra Date: Thu, 23 Apr 2020 19:32:48 +0200 Subject: [PATCH] Began work on viewers for attacks and actions --- app/imports/api/properties/Spells.js | 5 --- .../ui/components/computation/Computed.vue | 16 +++++++- .../computation/ComputedForCreature.vue | 2 +- .../CreaturePropertyDialog.vue | 20 +++++++++- .../components/actions/AttackListTile.vue | 2 +- .../ui/properties/forms/ActionForm.vue | 7 ++++ .../ui/properties/viewers/ActionViewer.vue | 32 +++++++++++++++ .../ui/properties/viewers/AttackViewer.vue | 39 +++++++++++++++++++ .../viewers/shared/PropertyField.vue | 10 +++-- .../viewers/shared/propertyViewerIndex.js | 6 ++- 10 files changed, 122 insertions(+), 17 deletions(-) create mode 100644 app/imports/ui/properties/viewers/AttackViewer.vue diff --git a/app/imports/api/properties/Spells.js b/app/imports/api/properties/Spells.js index 947632a0..3a8b4661 100644 --- a/app/imports/api/properties/Spells.js +++ b/app/imports/api/properties/Spells.js @@ -91,11 +91,6 @@ let SpellSchema = new SimpleSchema({}) defaultValue: 'abjuration', allowedValues: magicSchools, }, - // Set better defaults for the action - actionType: { - type: String, - defaultValue: 'spell', - }, }); export { SpellSchema }; diff --git a/app/imports/ui/components/computation/Computed.vue b/app/imports/ui/components/computation/Computed.vue index 0bd8fa62..1a52043d 100644 --- a/app/imports/ui/components/computation/Computed.vue +++ b/app/imports/ui/components/computation/Computed.vue @@ -1,9 +1,15 @@ + + diff --git a/app/imports/ui/properties/viewers/AttackViewer.vue b/app/imports/ui/properties/viewers/AttackViewer.vue new file mode 100644 index 00000000..598dc951 --- /dev/null +++ b/app/imports/ui/properties/viewers/AttackViewer.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/app/imports/ui/properties/viewers/shared/PropertyField.vue b/app/imports/ui/properties/viewers/shared/PropertyField.vue index 2c728ec8..fa7b6dd9 100644 --- a/app/imports/ui/properties/viewers/shared/PropertyField.vue +++ b/app/imports/ui/properties/viewers/shared/PropertyField.vue @@ -1,11 +1,13 @@ diff --git a/app/imports/ui/properties/viewers/shared/propertyViewerIndex.js b/app/imports/ui/properties/viewers/shared/propertyViewerIndex.js index cf7e0ec6..e318a639 100644 --- a/app/imports/ui/properties/viewers/shared/propertyViewerIndex.js +++ b/app/imports/ui/properties/viewers/shared/propertyViewerIndex.js @@ -1,4 +1,5 @@ -//import ActionViewer from '/imports/ui/properties/viewers/ActionViewer.vue'; +import ActionViewer from '/imports/ui/properties/viewers/ActionViewer.vue'; +import AttackViewer from '/imports/ui/properties/viewers/AttackViewer.vue'; import AttributeViewer from '/imports/ui/properties/viewers/AttributeViewer.vue'; import BuffViewer from '/imports/ui/properties/viewers/BuffViewer.vue'; import ContainerViewer from '/imports/ui/properties/viewers/ContainerViewer.vue'; @@ -17,7 +18,8 @@ import SpellListViewer from '/imports/ui/properties/viewers/SpellListViewer.vue' import SpellViewer from '/imports/ui/properties/viewers/SpellViewer.vue'; export default { -// action: ActionViewer, + action: ActionViewer, + attack: AttackViewer, attribute: AttributeViewer, buff: BuffViewer, container: ContainerViewer,